aboutsummaryrefslogtreecommitdiff
path: root/daemon/Makefile
diff options
context:
space:
mode:
authorDrew Richardson <drew.richardson@arm.com>2012-12-14 12:00:00 -0800
committerDrew Richardson <drew.richardson@arm.com>2014-12-19 15:33:02 -0800
commita01058e248133bb7c1ba0238ab380e4fac924e97 (patch)
tree8fc08c126fcb711fc9a2011eb6314c68d429b800 /daemon/Makefile
parentb04e8aefeed42f23955e88c7aa1611e49bdf5909 (diff)
gator: Version 5.135.13
Signed-off-by: Drew Richardson <drew.richardson@arm.com>
Diffstat (limited to 'daemon/Makefile')
-rw-r--r--daemon/Makefile42
1 files changed, 23 insertions, 19 deletions
diff --git a/daemon/Makefile b/daemon/Makefile
index 5562db7..95d1809 100644
--- a/daemon/Makefile
+++ b/daemon/Makefile
@@ -8,10 +8,8 @@
# targets it is necessary to add options
# '-marm -march=armv4t -mfloat-abi=soft'.
-ARCH=arm
-
-CPP=$(CROSS_COMPILE)g++
-GCC=$(CROSS_COMPILE)gcc
+CPP = $(CROSS_COMPILE)g++
+GCC = $(CROSS_COMPILE)gcc
# -g produces debugging information
# -O3 maximum optimization
@@ -21,34 +19,40 @@ GCC=$(CROSS_COMPILE)gcc
# -std=c++0x is the planned new c++ standard
# -std=c++98 is the 1998 c++ standard
# -mthumb-interwork is required for interworking to ARM or Thumb stdlibc
-CFLAGS=-O3 -Wall -mthumb-interwork
+CFLAGS = -O3 -Wall -mthumb-interwork -fno-exceptions
+CXXFLAGS = -fno-rtti
ifeq ($(WERROR),1)
CFLAGS += -Werror
endif
# -s strips the binary of debug info
-LDFLAGS=-s
-TARGET=gatord
+LDFLAGS = -s
+TARGET = gatord
C_SRC = $(wildcard mxml/*.c)
-CPP_SRC = $(wildcard *.cpp)
-TGT_OBJS = $(CPP_SRC:%.cpp=%.o) \
- $(C_SRC:%.c=%.o)
+CPP_SRC = $(wildcard *.cpp)
all: $(TARGET)
+events.xml: events_header.xml $(wildcard events-*.xml) events_footer.xml
+ cat $^ > $@
+
+StreamlineSetup.cpp: events_xml.h
+ConfigurationXML.cpp: configuration_xml.h
+
+%_xml.h: %.xml escape
+ ./escape $< > $@
+
%.o: %.c *.h
$(GCC) -c $(CFLAGS) -o $@ $<
%.o: %.cpp *.h
- $(CPP) -c $(CFLAGS) -o $@ $<
+ $(CPP) -c $(CFLAGS) $(CXXFLAGS) -o $@ $<
-$(TARGET): convert $(TGT_OBJS)
- $(CPP) $(LDFLAGS) -o $@ $(TGT_OBJS) -lc -lrt -lpthread
- rm events_xml.h configuration_xml.h
+$(TARGET): $(CPP_SRC:%.cpp=%.o) $(C_SRC:%.c=%.o)
+ $(CPP) $(LDFLAGS) -o $@ $^ -lc -lrt -lpthread
+ rm -f events_xml.h configuration_xml.h
-convert:
- cat events_header.xml events-*\.xml events_footer.xml > events.xml
- xxd -i events.xml > events_xml.h
- xxd -i configuration.xml > configuration_xml.h
+escape: escape.c
+ gcc $^ -o $@
clean:
- rm -f *.o mxml/*.o $(TARGET) events.xml events_xml.h configuration_xml.h
+ rm -f *.o mxml/*.o $(TARGET) escape events.xml events_xml.h configuration_xml.h