adding GPL V3
[ixm-collector.git] / Makefile
blobd0ff14ee0b26dfe5480d77f4f2a3a6b6a71b4398
1 BASEDIR:=/home/eschulte/src/ixm/sfb/src/template/../..
3 export TARGET=body
4 include $(BASEDIR)/config/Makevars.mk
5 OBJDIR:=.
6 BINDIR:=.
7 include $(BASEDIR)/config/Makecommon.mk
9 COMMON_CPPFLAGS:=-Wall -pedantic -Werror -Wundef
10 CROSS_GCC_CPPFLAGS:=$(COMMON_CPPFLAGS) -mcpu=arm7tdmi -mthumb-interwork -mno-long-calls -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fno-use-cxa-atexit -fno-use-cxa-get-exception-ptr
11 CPPFLAGS:=$(CROSS_GCC_CPPFLAGS)
13 CPPFLAGS+=-I$(INCLUDEDIR) -I$(INCLUDEDIR)/lpc -Os -O2
14 CFLAGS+=-I$(INCLUDEDIR) -I$(INCLUDEDIR)/lpc -Os -O2
16 # If anything in the lib changes: Kill them, kill them all
17 ALLDEP+=$(wildcard $(LIBDIR)/*)
19 OBJFILES:=sketch-wrapper.o collector.o
21 LDFLAGS+= -nostartfiles --cref -M -Map $(TMPDIR)/sketch.map -lm -lc
23 all: sketch.hex
26 $(BINDIR)/sketch.hex: $(OBJDIR)/sketch
27 $(OBJCOPY) --strip-unneeded -O ihex $(OBJDIR)/sketch $@
29 $(OBJDIR)/sketch: $(OBJFILES) FORCE
30 $(LD) $(OBJFILES) $(LDFLAGS) -T $(LIBDIR)/sfbloader.ld -o"$@"
32 sketch-wrapper.o: sketch-wrapper.cpp sketch.pde $(ALLDEP)
33 $(GCC) $(CPPFLAGS) $(SKETCH_EXTRA_CPPFLAGS) -Wall -c -I ../../src/include/ sketch-wrapper.cpp
35 collector.o: collector.cpp $(ALLDEP)
36 $(GCC) $(CPPFLAGS) $(SKETCH_EXTRA_CPPFLAGS) -Wall -c -I ../../src/include/ collector.cpp
38 clean: FORCE
39 @rm -f *.o *~ sketch
41 realclean: clean
42 @rm -f sketch.hex
44 .PHONY: FORCE