summaryrefslogtreecommitdiff
path: root/digital/io-hub/src/guybrush/Makefile
diff options
context:
space:
mode:
authorNicolas Schodet2012-03-26 00:57:00 +0200
committerNicolas Schodet2012-03-26 00:57:00 +0200
commitc912f3edd803e4d8e6664e360590a0a538fbc7e5 (patch)
tree14a7ddabbffdbbf7160aaa759de457206c754a17 /digital/io-hub/src/guybrush/Makefile
parent0443ae6a587e083db400c25e52c9a2fff3d1a582 (diff)
digital/io-hub/src/guybrush: initial guybrush almost empty program
Diffstat (limited to 'digital/io-hub/src/guybrush/Makefile')
-rw-r--r--digital/io-hub/src/guybrush/Makefile39
1 files changed, 39 insertions, 0 deletions
diff --git a/digital/io-hub/src/guybrush/Makefile b/digital/io-hub/src/guybrush/Makefile
new file mode 100644
index 00000000..535fba17
--- /dev/null
+++ b/digital/io-hub/src/guybrush/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 top.c \
+ radar_defs.c radar.c path.c move.c \
+ init.c fsm.host.c fsm_AI_gen.avr.c fsm_queue.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 \
+ adc devices/usdist \
+ math/fixed math/geometry path/astar
+AI_MODULES = twi_master common utils fsm move
+# 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