diff options
author | Alex Shi <alex.shi@linaro.org> | 2013-10-15 10:35:02 +0800 |
---|---|---|
committer | Alex Shi <alex.shi@linaro.org> | 2013-10-15 10:35:02 +0800 |
commit | b660011c5c1066762b8d29e238a3a478b6f02bf4 (patch) | |
tree | a04058e9f6fcbdce048bbb662de8fb74972dfa92 /tools/gator/daemon/common.mk | |
parent | f85b6e7b8e12028219057306eaf24c8d77a5c0c3 (diff) | |
parent | 01239d6842a2e2653b7b42736cf2c10b69d0face (diff) |
Merge remote-tracking branch 'arm-landing/lsk-3.10-gator' into linux-linaro-lsk-android-testlsk-android-13.10
Diffstat (limited to 'tools/gator/daemon/common.mk')
-rw-r--r-- | tools/gator/daemon/common.mk | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/tools/gator/daemon/common.mk b/tools/gator/daemon/common.mk new file mode 100644 index 000000000000..ee2415b8825c --- /dev/null +++ b/tools/gator/daemon/common.mk @@ -0,0 +1,50 @@ +# -g produces debugging information +# -O3 maximum optimization +# -O0 no optimization, used for debugging +# -Wall enables most warnings +# -Werror treats warnings as errors +# -std=c++0x is the planned new c++ standard +# -std=c++98 is the 1998 c++ standard +CFLAGS += -O3 -Wall -fno-exceptions -pthread -MMD -DETCDIR=\"/etc\" -Ilibsensors +CXXFLAGS += -fno-rtti +ifeq ($(WERROR),1) + CFLAGS += -Werror +endif +# -s strips the binary of debug info +LDFLAGS += -s +TARGET = gatord +C_SRC = $(wildcard mxml/*.c) $(wildcard libsensors/*.c) +CPP_SRC = $(wildcard *.cpp) + +all: $(TARGET) + +events.xml: events_header.xml $(wildcard events-*.xml) events_footer.xml + cat $^ > $@ + +include $(wildcard *.d) +include $(wildcard mxml/*.d) + +EventsXML.cpp: events_xml.h +ConfigurationXML.cpp: configuration_xml.h + +# Don't regenerate conf-lex.c or conf-parse.c +libsensors/conf-lex.c: ; +libsensors/conf-parse.c: ; + +%_xml.h: %.xml escape + ./escape $< > $@ + +%.o: %.c + $(GCC) -c $(CFLAGS) -o $@ $< + +%.o: %.cpp + $(CPP) -c $(CFLAGS) $(CXXFLAGS) -o $@ $< + +$(TARGET): $(CPP_SRC:%.cpp=%.o) $(C_SRC:%.c=%.o) + $(CPP) $(LDFLAGS) -o $@ $^ -lrt -pthread + +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 configuration_xml.h |