]> git.gag.com Git - fw/altos/blob - src/teleballoon-v1.1/Makefile
Merge branch 'master' of ssh://git.gag.com/scm/git/fw/altos
[fw/altos] / src / teleballoon-v1.1 / 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.1
11 TELEBALLOON_DEF=1_1
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_telemetry.c
54
55 CC1111_SRC = \
56         ao_adc.c \
57         ao_beep.c \
58         ao_dbg.c \
59         ao_dma.c \
60         ao_led.c \
61         ao_packet.c \
62         ao_packet_slave.c \
63         ao_radio.c \
64         ao_romconfig.c \
65         ao_serial.c \
66         ao_string.c \
67         ao_spi.c \
68         ao_timer.c \
69         ao_usb.c \
70         _bp.c
71
72 DRIVER_SRC = \
73         $(TELEBALLOON_SRC)
74
75 PRODUCT_SRC = \
76         ao_teleballoon.c
77
78 SRC = \
79         $(CORE_SRC) \
80         $(CC1111_SRC) \
81         $(DRIVER_SRC) \
82         $(PRODUCT_SRC)
83
84 PROGNAME = teleballoon-v$(TELEBALLOON_VER)
85 PROG = $(PROGNAME)-$(VERSION).ihx
86 PRODUCT=TeleBalloon-v$(TELEBALLOON_VER)
87 PRODUCT_DEF=-DTELEBALLOON_V_$(TELEBALLOON_DEF)
88 IDPRODUCT=0x000b
89
90 include ../cc1111/Makefile.cc1111
91
92 NICKLE=nickle
93 CHECK_STACK=sh ../util/check-stack
94
95 V=0
96 # The user has explicitly enabled quiet compilation.
97 ifeq ($(V),0)
98 quiet = @printf "  $1 $2 $@\n"; $($1)
99 endif
100 # Otherwise, print the full command line.
101 quiet ?= $($1)
102
103 all: $(PROG)
104
105 $(PROG): $(REL) Makefile
106         $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(REL)
107         $(call quiet,CHECK_STACK) ../cc1111/ao_arch.h $(PMEM) || rm $@
108
109 ao_product.h: ao-make-product.5c ../Version
110         $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@
111
112 distclean:      clean
113
114 clean: clean-cc1111
115
116 install:
117
118 uninstall:
119