Add TeleBalloon v1.2 support
[fw/altos] / src / teleballoon-v1.2 / Makefile
1 #
2 # TeleBalloon 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 TELEBALLOON_VER=1.2
11 TELEBALLOON_DEF=1_2
12
13 TELEBALLOON_INC =
14
15 TELEBALLOON_SRC = \
16         ao_companion.c \
17         ao_gps_skytraq.c \
18         ao_m25.c
19
20 vpath %.c ..:../core:../cc1111:../drivers:../product:.
21 vpath %.h ..:../core:../cc1111:../drivers:../product:.
22 vpath ao-make-product.5c ../util
23
24 ifndef VERSION
25 include ../Version
26 endif
27
28 INC = \
29         ao.h \
30         ao_pins.h \
31         cc1111.h \
32         altitude.h \
33         ao_kalman.h \
34         ao_product.h \
35         $(TELEBALLOON_INC)
36
37 CORE_SRC = \
38         ao_cmd.c \
39         ao_config.c \
40         ao_convert.c \
41         ao_gps_report.c \
42         ao_mutex.c \
43         ao_panic.c \
44         ao_stdio.c \
45         ao_storage.c \
46         ao_task.c \
47         ao_balloon.c \
48         ao_sample.c \
49         ao_kalman.c \
50         ao_log.c \
51         ao_log_big.c \
52         ao_report.c \
53         ao_freq.c \
54         ao_telemetry.c
55
56 CC1111_SRC = \
57         ao_adc.c \
58         ao_beep.c \
59         ao_dbg.c \
60         ao_dma.c \
61         ao_led.c \
62         ao_packet.c \
63         ao_packet_slave.c \
64         ao_radio.c \
65         ao_romconfig.c \
66         ao_serial.c \
67         ao_string.c \
68         ao_spi.c \
69         ao_timer.c \
70         ao_usb.c \
71         _bp.c
72
73 DRIVER_SRC = \
74         $(TELEBALLOON_SRC)
75
76 PRODUCT_SRC = \
77         ao_teleballoon.c
78
79 SRC = \
80         $(CORE_SRC) \
81         $(CC1111_SRC) \
82         $(DRIVER_SRC) \
83         $(PRODUCT_SRC)
84
85 PROGNAME = teleballoon-v$(TELEBALLOON_VER)
86 PROG = $(PROGNAME)-$(VERSION).ihx
87 PRODUCT=TeleBalloon-v$(TELEBALLOON_VER)
88 PRODUCT_DEF=-DTELEBALLOON_V_$(TELEBALLOON_DEF)
89 IDPRODUCT=0x000b
90
91 include ../cc1111/Makefile.cc1111
92
93 NICKLE=nickle
94 CHECK_STACK=sh ../util/check-stack
95
96 V=0
97 # The user has explicitly enabled quiet compilation.
98 ifeq ($(V),0)
99 quiet = @printf "  $1 $2 $@\n"; $($1)
100 endif
101 # Otherwise, print the full command line.
102 quiet ?= $($1)
103
104 all: $(PROG)
105
106 $(PROG): $(REL) Makefile
107         $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(REL) && cp $(PROG) $(PMAP) ..
108         $(call quiet,CHECK_STACK) ../cc1111/ao_arch.h $(PMEM) || rm $@
109
110 ao_product.h: ao-make-product.5c ../Version
111         $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@
112
113 distclean:      clean
114
115 clean: clean-cc1111
116
117 install:
118
119 uninstall:
120