Warn when we are linking an executable without symbols.
[oota-llvm.git] / Makefile.common
index e8cc9bad5dcd708554d06740de2246758ea49cfd..65bb19be1d216c05c34122d6d1d62a279302c5b4 100644 (file)
@@ -142,8 +142,10 @@ endif
 # By default, strip symbol information from executable
 ifdef KEEP_SYMBOLS
 STRIP =
+WARN_MSG =
 else
 STRIP = -s
+WARN_MSG = "(without symbols) "
 endif
 
 # Allow gnu extensions...
@@ -198,7 +200,9 @@ BISON    = bison
 # source files...
 # The local Makefile can list other Source files via ExtraSource = ...
 # 
+ifndef Source
 Source  := $(ExtraSource) $(wildcard *.cpp *.c *.y *.l)
+endif
 
 Objs := $(sort $(patsubst Debug/%.o, %.o, $(addsuffix .o,$(basename $(Source)))))
 ObjectsO := $(addprefix $(BUILD_ROOT)/Release/,$(Objs))
@@ -395,7 +399,7 @@ clean::
        $(VERB) rm -f $(TOOLEXENAMES)
 
 $(TOOLEXENAME_G): $(ObjectsG) $(USED_LIB_PATHS_G) $(BUILD_ROOT_TOP)/tools/Debug/.dir
-       @echo ======= Linking $(TOOLNAME) debug executable =======
+       @echo ======= Linking $(TOOLNAME) debug executable $(WARN_MSG) =======
        $(VERB) $(LinkG) -o $@ $(ObjectsG) $(USED_LIBS_OPTIONS_G) $(TOOLLINKOPTS)
 
 $(TOOLEXENAME_O): $(ObjectsO) $(USED_LIB_PATHS_O) $(BUILD_ROOT_TOP)/tools/Release/.dir