summaryrefslogtreecommitdiff
path: root/digital/io-hub/src/robospierre/Makefile
diff options
context:
space:
mode:
authorNicolas Schodet2011-05-08 16:15:06 +0200
committerNicolas Schodet2011-05-08 16:15:06 +0200
commit0feb542a8cf7630a5d442387727414f5251aad83 (patch)
tree02092fbede27ef619ee63466f671513a889fb2ea /digital/io-hub/src/robospierre/Makefile
parent4cd9c4458eaa49c269171145f4bc2a184948eae1 (diff)
parentd385a9eacb2e8580239f101f96356f7ed216dd97 (diff)
Merge branch 'master' into efrei-robotique
Conflicts: digital/mimot/src/dirty/counter_ext.avr.c digital/mimot/tools/mimot/init.py
Diffstat (limited to 'digital/io-hub/src/robospierre/Makefile')
-rw-r--r--digital/io-hub/src/robospierre/Makefile39
1 files changed, 39 insertions, 0 deletions
diff --git a/digital/io-hub/src/robospierre/Makefile b/digital/io-hub/src/robospierre/Makefile
new file mode 100644
index 00000000..21411631
--- /dev/null
+++ b/digital/io-hub/src/robospierre/Makefile
@@ -0,0 +1,39 @@
+# Base directory of AVR.
+BASE = ../../../avr
+# Name of the program to build.
+PROGS = io_hub
+# Sources to compile.
+io_hub_SOURCES = main.c \
+ clamp.c \
+ fsm.host.c fsm_AI_gen.avr.c \
+ pwm.avr.c pwm.host.c \
+ contact.avr.c contact.host.c \
+ twi_master.c asserv.c mimot.c \
+ chrono.c timer.avr.c simu.host.c
+# Modules needed for IO.
+MODULES = proto uart twi utils \
+ math/fixed math/geometry
+AI_MODULES = twi_master common utils fsm
+# Configuration file.
+CONFIGFILE = avrconfig.h
+AVR_MCU = at90usb1287
+# Optimize for speed.
+OPTIMIZE = -O2
+HOST_LIBS = -lm
+
+vpath %.c ../common
+vpath %.h ../common
+vpath %.c $(AI_MODULES:%=../../../ai/src/%)
+vpath %.h $(AI_MODULES:%=../../../ai/src/%)
+INCLUDES += -I. -I../common $(AI_MODULES:%=-I../../../ai/src/%)
+
+EXTRA_CLEAN_FILES = fsm_AI_gen.h fsm_AI_gen.avr.c
+
+include $(BASE)/make/Makefile.gen
+
+# FSM generation.
+obj/main.avr.o: fsm_AI_gen.h
+fsm_AI_gen.avr.c: fsm_AI_gen.h
+fsm_AI_gen.h: io_hub.host
+ ./$< --gen
+ mv fsm_AI_gen.c fsm_AI_gen.avr.c