altos: Make telemetrum-v1.1 compile with new ao_data structure
[fw/altos] / src / product / Makefile.telemetrum
1 #
2 # TeleMetrum build file
3 #
4 # The various telemetrum versions differ only
5 # in which flash and GPS drivers are included,
6 # so the per-board makefiles simply define
7 # TM_VER, TM_DEF, TM_INC and TM_SRC and include
8 # this file
9
10 vpath %.c .:..:../core:../cc1111:../drivers:../product
11 vpath %.h .:..:../core:../cc1111:../drivers:../product
12 vpath ao-make-product.5c ../util
13
14 ifndef VERSION
15 include ../Version
16 endif
17
18 INC = \
19         ao.h \
20         ao_pins.h \
21         cc1111.h \
22         altitude.h \
23         ao_kalman.h \
24         ao_product.h \
25         $(TM_INC)
26
27 CORE_SRC = \
28         ao_cmd.c \
29         ao_config.c \
30         ao_convert.c \
31         ao_gps_report.c \
32         ao_mutex.c \
33         ao_panic.c \
34         ao_stdio.c \
35         ao_storage.c \
36         ao_task.c \
37         ao_flight_mm.c \
38         ao_sample_mm.c \
39         ao_kalman.c \
40         ao_log.c \
41         ao_log_big.c \
42         ao_report.c \
43         ao_telemetry.c \
44         ao_freq.c
45
46 CC1111_SRC = \
47         ao_adc.c \
48         ao_beep.c \
49         ao_dbg.c \
50         ao_dma.c \
51         ao_ignite.c \
52         ao_led.c \
53         ao_packet.c \
54         ao_packet_slave.c \
55         ao_radio.c \
56         ao_romconfig.c \
57         ao_serial.c \
58         ao_string.c \
59         ao_spi.c \
60         ao_timer.c \
61         ao_usb.c \
62         _bp.c
63
64 DRIVER_SRC = \
65         $(TM_SRC)
66
67 PRODUCT_SRC = \
68         ao_telemetrum.c
69
70 SRC = \
71         $(CORE_SRC) \
72         $(CC1111_SRC) \
73         $(DRIVER_SRC) \
74         $(PRODUCT_SRC)
75
76 PROG = telemetrum-v$(TM_VER)-$(VERSION)$(TM_EXTRA).ihx
77 PRODUCT=TeleMetrum-v$(TM_VER)
78 PRODUCT_DEF=-DTELEMETRUM_V_$(TM_DEF)
79 IDPRODUCT=0x000b
80
81 include ../cc1111/Makefile.cc1111
82
83 NICKLE=nickle
84 CHECK_STACK=sh ../util/check-stack
85
86 V=0
87 # The user has explicitly enabled quiet compilation.
88 ifeq ($(V),0)
89 quiet = @printf "  $1 $2 $@\n"; $($1)
90 endif
91 # Otherwise, print the full command line.
92 quiet ?= $($1)
93
94 all: ../$(PROG)
95
96 ../$(PROG): $(REL) Makefile
97         $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(REL) && cp $(PROG) $(PMAP) ..
98         $(call quiet,CHECK_STACK) ../cc1111/ao_arch.h $(PMEM) || rm $@
99
100 ao_product.h: ao-make-product.5c ../Version
101         $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@
102
103 distclean:      clean
104
105 clean:
106         rm -f $(ADB) $(ASM) $(LNK) $(LST) $(REL) $(RST) $(SYM)
107         rm -f $(PROG) $(PCDB) $(PLNK) $(PMAP) $(PMEM) $(PAOM)
108         rm -f ao_product.h
109         rm -f ../$(PROG) ../$(PMAP)
110
111 install:
112
113 uninstall: