Enable packet-based communcation to command processor
[fw/altos] / src / Makefile
index 297f676b6b27e740edb4e561a476d55a5b8cbf0d..d984e9dc334011ce434d8a566010b92db297f4db 100644 (file)
@@ -4,7 +4,9 @@
 #
 CC=sdcc
 
+ifndef VERSION
 VERSION=$(shell git describe)
+endif
 
 CFLAGS=--model-small --debug --opt-code-speed
 
@@ -22,7 +24,6 @@ INC = \
 #
 ALTOS_SRC = \
        ao_cmd.c \
-       ao_dbg.c \
        ao_dma.c \
        ao_mutex.c \
        ao_panic.c \
@@ -43,6 +44,8 @@ ALTOS_DRIVER_SRC = \
 
 TELE_COMMON_SRC = \
        ao_gps_print.c \
+       ao_packet.c \
+       ao_packet_slave.c \
        ao_state.c
 
 #
@@ -50,6 +53,7 @@ TELE_COMMON_SRC = \
 #
 TELE_RECEIVER_SRC =\
        ao_monitor.c \
+       ao_packet_master.c \
        ao_rssi.c
 
 #
@@ -58,7 +62,6 @@ TELE_RECEIVER_SRC =\
 
 TELE_DRIVER_SRC = \
        ao_convert.c \
-       ao_gps.c \
        ao_serial.c
 
 #
@@ -68,6 +71,12 @@ TELE_FAKE_SRC = \
        ao_adc_fake.c \
        ao_ee_fake.c
 
+#
+# Debug dongle driver (only on TI)
+#
+DBG_DONGLE_SRC = \
+       ao_dbg.c
+
 #
 # Drivers only on TeleMetrum
 #
@@ -77,6 +86,17 @@ TM_DRIVER_SRC = \
        ao_gps_report.c \
        ao_ignite.c
 
+#
+# Drivers only on TeleMetrum
+#
+TM_SIRF_DRIVER_SRC = \
+       ao_gps_sirf.c
+#
+# Drivers only on TeleMetrum
+#
+TM_SKY_DRIVER_SRC = \
+       ao_gps_skytraq.c
+
 #
 # Tasks run on TeleMetrum
 #
@@ -101,6 +121,14 @@ TM_SRC = \
        $(TM_TASK_SRC) \
        $(TM_MAIN_SRC)
 
+TM_SIRF_SRC = \
+       $(TM_SRC) \
+       $(TM_SIRF_DRIVER_SRC)
+
+TM_SKY_SRC = \
+       $(TM_SRC) \
+       $(TM_SKY_DRIVER_SRC)
+
 TI_MAIN_SRC = \
        ao_tidongle.c
 
@@ -113,7 +141,8 @@ TI_SRC = \
        $(TELE_RECEIVER_SRC) \
        $(TELE_COMMON_SRC) \
        $(TELE_FAKE_SRC) \
-       $(TI_MAIN_SRC)
+       $(TI_MAIN_SRC) \
+       $(DBG_DONGLE_SRC)
 
 TT_MAIN_SRC = \
        ao_teleterra.c
@@ -153,13 +182,16 @@ SRC = \
        $(TELE_COMMON_SRC) \
        $(TELE_FAKE_SRC) \
        $(TM_DRIVER_SRC) \
+       $(TM_SIRF_DRIVER_SRC) \
+       $(TM_SKY_DRIVER_SRC) \
        $(TM_TASK_SRC) \
        $(TM_MAIN_SRC) \
        $(TI_MAIN_SRC) \
        $(TD_MAIN_SRC) \
        $(TT_MAIN_SRC)
 
-TM_REL=$(TM_SRC:.c=.rel) ao_product-telemetrum.rel
+TM_SIRF_REL=$(TM_SIRF_SRC:.c=.rel) ao_product-telemetrum.rel
+TM_SKY_REL=$(TM_SKY_SRC:.c=.rel) ao_product-telemetrum.rel
 TI_REL=$(TI_SRC:.c=.rel) ao_product-tidongle.rel
 TT_REL=$(TT_SRC:.c=.rel) ao_product-teleterra.rel
 TD_REL=$(TD_SRC:.c=.rel) ao_product-teledongle.rel
@@ -178,10 +210,10 @@ LST=$(REL:.rel=.lst)
 RST=$(REL:.rel=.rst)
 SYM=$(REL:.rel=.sym)
 
-PROGS= telemetrum.ihx tidongle.ihx \
+PROGS= telemetrum-sirf.ihx telemetrum-sky.ihx tidongle.ihx \
        teleterra.ihx teledongle.ihx
 
-HOST_PROGS=ao_flight_test ao_gps_test
+HOST_PROGS=ao_flight_test ao_gps_test ao_gps_test_skytraq
 
 PCDB=$(PROGS:.ihx=.cdb)
 PLNK=$(PROGS:.ihx=.lnk)
@@ -194,15 +226,21 @@ PAOM=$(PROGS:.ihx=)
 
 all: $(PROGS) $(HOST_PROGS)
 
-telemetrum.ihx: $(TM_REL) Makefile
-       $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(TM_REL)
-       sh check-stack ao.h telemetrum.mem
+telemetrum-sirf.ihx: $(TM_SIRF_REL) Makefile
+       $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(TM_SIRF_REL)
+       sh check-stack ao.h telemetrum-sirf.mem
+
+telemetrum-sky.ihx: $(TM_SKY_REL) Makefile
+       $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(TM_SKY_REL)
+       sh check-stack ao.h telemetrum-sky.mem
+
+telemetrum-sky.ihx: telemetrum-sirf.ihx
 
 tidongle.ihx: $(TI_REL) Makefile
        $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(TI_REL)
        sh check-stack ao.h tidongle.mem
 
-tidongle.ihx: telemetrum.ihx
+tidongle.ihx: telemetrum-sky.ihx
 
 teleterra.ihx: $(TT_REL) Makefile
        $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(TT_REL)
@@ -260,8 +298,11 @@ clean:
 
 install:
 
-ao_flight_test: ao_flight.c ao_flight_test.c
+ao_flight_test: ao_flight.c ao_flight_test.c ao_host.h
        cc -g -o $@ ao_flight_test.c
 
-ao_gps_test: ao_gps.c ao_gps_test.c ao_host.h
+ao_gps_test: ao_gps_sirf.c ao_gps_test.c ao_gps_print.c ao_host.h
        cc -g -o $@ ao_gps_test.c
+
+ao_gps_test_skytraq: ao_gps_skytraq.c ao_gps_test_skytraq.c ao_gps_print.c ao_host.h
+       cc -g -o $@ ao_gps_test_skytraq.c