aboutsummaryrefslogtreecommitdiff
path: root/tools/gator/daemon/common.mk
diff options
context:
space:
mode:
authorKevin Hilman <khilman@linaro.org>2015-05-12 15:35:14 -0700
committerKevin Hilman <khilman@linaro.org>2015-05-12 15:35:14 -0700
commit106f1ce29f1fa7ad18e47823789c176df57d75ee (patch)
tree44f6a51ff81fefba6834383dc2bcb45aa4ebe60e /tools/gator/daemon/common.mk
parent1f8fdf83fe376cc83e96e942689a6cfac01e9634 (diff)
parent0ed41f1a9564c0733ad155b742ac66fb41d2f9d3 (diff)
Merge branch 'v3.10/topic/gator' into linux-linaro-lsk-v3.10
* v3.10/topic/gator: gator: Enable multiple source copies to exist in Android build environments gator: Add config for building the module in-tree gator: Version 5.21.1
Diffstat (limited to 'tools/gator/daemon/common.mk')
-rw-r--r--tools/gator/daemon/common.mk9
1 files changed, 6 insertions, 3 deletions
diff --git a/tools/gator/daemon/common.mk b/tools/gator/daemon/common.mk
index 769a92e51a35..0d5a0a835d2c 100644
--- a/tools/gator/daemon/common.mk
+++ b/tools/gator/daemon/common.mk
@@ -6,7 +6,7 @@
# -std=c++0x is the planned new c++ standard
# -std=c++98 is the 1998 c++ standard
CPPFLAGS += -O3 -Wall -fno-exceptions -pthread -MMD -DETCDIR=\"/etc\" -Ilibsensors
-CXXFLAGS += -fno-rtti -Wextra # -Weffc++
+CXXFLAGS += -fno-rtti -Wextra -Wshadow # -Weffc++
ifeq ($(WERROR),1)
CPPFLAGS += -Werror
endif
@@ -41,7 +41,10 @@ libsensors/conf-parse.c: ;
%.o: %.cpp
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $<
-$(TARGET): $(CXX_SRC:%.cpp=%.o) $(C_SRC:%.c=%.o)
+SrcMd5.cpp: $(wildcard *.cpp *.h mxml/*.c mxml/*.h libsensors/*.c libsensors/*.h)
+ echo 'extern const char *const gSrcMd5 = "'`ls $^ | grep -Ev '^(.*_xml\.h|$@)$$' | LC_ALL=C sort | xargs cat | md5sum | cut -b 1-32`'";' > $@
+
+$(TARGET): $(CXX_SRC:%.cpp=%.o) $(C_SRC:%.c=%.o) SrcMd5.o
$(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@
# Intentionally ignore CC as a native binary is required
@@ -49,4 +52,4 @@ escape: escape.c
gcc $^ -o $@
clean:
- rm -f *.d *.o mxml/*.d mxml/*.o libsensors/*.d libsensors/*.o $(TARGET) escape events.xml events_xml.h defaults_xml.h
+ rm -f *.d *.o mxml/*.d mxml/*.o libsensors/*.d libsensors/*.o $(TARGET) escape events.xml events_xml.h defaults_xml.h SrcMd5.cpp