]> git.gag.com Git - fw/altos/blob - src/product/Makefile.telemetrum
doc: Add asciidoc version of Altos Droid manual
[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 .:..:../kernel:../cc1111:../drivers:../product
11 vpath %.h .:..:../kernel:../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         ao_arch.h \
22         ao_arch_funcs.h \
23         cc1111.h \
24         altitude.h \
25         ao_kalman.h \
26         ao_product.h \
27         ao_telemetry.h \
28         $(TM_INC)
29
30 CORE_SRC = \
31         ao_cmd.c \
32         ao_config.c \
33         ao_convert.c \
34         ao_gps_report.c \
35         ao_mutex.c \
36         ao_panic.c \
37         ao_stdio.c \
38         ao_storage.c \
39         ao_task.c \
40         ao_flight.c \
41         ao_sample.c \
42         ao_kalman.c \
43         ao_log.c \
44         ao_log_big.c \
45         ao_report.c \
46         ao_telemetry.c \
47         ao_freq.c
48
49 CC1111_SRC = \
50         ao_adc.c \
51         ao_beep.c \
52         ao_dbg.c \
53         ao_dma.c \
54         ao_ignite.c \
55         ao_led.c \
56         ao_packet.c \
57         ao_packet_slave.c \
58         ao_radio.c \
59         ao_romconfig.c \
60         ao_serial.c \
61         ao_string.c \
62         ao_spi.c \
63         ao_timer.c \
64         ao_usb.c \
65         _bp.c
66
67 DRIVER_SRC = \
68         $(TM_SRC)
69
70 PRODUCT_SRC = \
71         ao_telemetrum.c
72
73 SRC = \
74         $(CORE_SRC) \
75         $(CC1111_SRC) \
76         $(DRIVER_SRC) \
77         $(PRODUCT_SRC)
78
79 PROGNAME = telemetrum-v$(TM_VER)$(TM_EXTRA)
80 PROG = $(PROGNAME)-$(VERSION).ihx
81 PRODUCT=TeleMetrum-v$(TM_VER)
82 PRODUCT_DEF=-DTELEMETRUM_V_$(TM_DEF)
83 IDPRODUCT=0x000b
84
85 include ../cc1111/Makefile.cc1111
86
87 NICKLE=nickle
88 CHECK_STACK=sh ../util/check-stack
89
90 V=0
91 # The user has explicitly enabled quiet compilation.
92 ifeq ($(V),0)
93 quiet = @printf "  $1 $2 $@\n"; $($1)
94 endif
95 # Otherwise, print the full command line.
96 quiet ?= $($1)
97
98 all: $(PROG)
99
100 $(PROG): $(REL) Makefile
101         $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(REL)
102         $(call quiet,CHECK_STACK) ../cc1111/ao_arch.h $(PMEM) || rm $@
103
104 ao_product.h: ao-make-product.5c ../Version
105         $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@
106
107 distclean:      clean
108
109 clean: clean-cc1111
110
111 install:
112
113 uninstall: