X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=src%2FMakefile;h=9891cdadf708947bf838bd43b2cabe83e9908aa0;hp=3928136976259daf9bf8cce48de76183106d3a46;hb=fb8f3fee6a1bab1e46d782e84405845cee2dadb4;hpb=210dbaa23cdacf3a6f2d6e23493e96ee2ac9bca7 diff --git a/src/Makefile b/src/Makefile index 39281369..9891cdad 100644 --- a/src/Makefile +++ b/src/Makefile @@ -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 \ @@ -58,7 +59,6 @@ TELE_RECEIVER_SRC =\ TELE_DRIVER_SRC = \ ao_convert.c \ - ao_gps.c \ ao_serial.c # @@ -68,6 +68,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 +83,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 +118,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 +138,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 +179,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 +207,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 +HOST_PROGS=ao_flight_test ao_gps_test ao_gps_test_skytraq PCDB=$(PROGS:.ihx=.cdb) PLNK=$(PROGS:.ihx=.lnk) @@ -194,15 +223,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) @@ -250,6 +285,8 @@ $(TELEDONGLE_DEFS): ao-make-product.5c $(TIDONGLE_DEFS): ao-make-product.5c nickle ao-make-product.5c -m altusmetrum.org -p TIDongle -v $(VERSION) > $@ +distclean: clean + clean: rm -f $(ADB) $(ASM) $(LNK) $(LST) $(REL) $(RST) $(SYM) rm -f $(PROGS) $(PCDB) $(PLNK) $(PMAP) $(PMEM) $(PAOM) @@ -258,5 +295,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_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