]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - android-sdk/arm-ds5-gator.git/blob - daemon/Makefile
2a41e31f9c3e7e10b851d4f7d707f7b387859a78
[android-sdk/arm-ds5-gator.git] / daemon / Makefile
1 #
2 # Makefile for ARM Streamline - Gator Daemon
3 #
5 # Uncomment and define CROSS_COMPILE if it is not already defined
6 # CROSS_COMPILE=/path/to/cross-compiler/arm-none-linux-gnueabi-
7 ARCH=arm
9 CPP=$(CROSS_COMPILE)g++
11 # -g produces debugging information
12 # -O3 maximum optimization
13 # -O0 no optimization, used for debugging
14 # -Wall enables most warnings
15 # -Werror treats warnings as errors
16 # -std=c++0x is the planned new c++ standard
17 # -std=c++98 is the 1998 c++ standard
18 # -march=armv5t is required to set the minimum architecture
19 # -mthumb-interwork is required for interworking to ARM or Thumb stdlibc
20 CFLAGS=-O3 -Wall -Werror -march=armv5t -mthumb-interwork
21 TARGET=gatord
22 CPP_SRC = $(wildcard *.cpp) $(wildcard ../../reptilia/*.cpp)
23 TGT_OBJS = $(CPP_SRC:%.cpp=%.o)
24 INCLUDES = -I../../reptilia
26 all: $(TARGET)
28 %.o: %.cpp *.h
29         $(CPP) $(INCLUDES) -c $(CFLAGS) -o $@ $<
31 $(TARGET): convert $(TGT_OBJS)
32         $(CPP) -s -o $@ $(TGT_OBJS) -lc -lrt -lpthread
33         rm events_xml.h configuration_xml.h
35 convert:
36         cat events_header.xml events-*\.xml events_footer.xml > events.xml
37         xxd -i events.xml > events_xml.h
38         xxd -i configuration.xml > configuration_xml.h
40 clean:
41         rm -f *.o $(TARGET) events.xml events_xml.h configuration_xml.h ../../reptilia/*.o