adb1256c221070086eceb6b856548bde4621e540
[fw/altos] / src / telemini-v2.0 / Makefile
1 #
2 # TeleMini build file
3 #
4
5 TELEMINI_VER=2.0
6 TELEMINI_DEF=2_0
7
8 vpath %.c ..:../core:../cc1111:../drivers:../product
9 vpath %.h ..:../core:../cc1111:../drivers:../product
10 vpath ao-make-product.5c ../util
11
12 ifndef VERSION
13 include ../Version
14 endif
15
16 INC = \
17         ao.h \
18         ao_pins.h \
19         ao_arch.h \
20         ao_arch_funcs.h \
21         cc1111.h \
22         ao_ms5607.h \
23         ao_ms5607_convert_8051.c \
24         ao_product.h \
25         ao_int64.h \
26         ao_sample.h
27
28 CORE_SRC = \
29         ao_cmd.c \
30         ao_config.c \
31         ao_convert.c \
32         ao_flight.c \
33         ao_kalman.c \
34         ao_log.c \
35         ao_log_mini.c \
36         ao_mutex.c \
37         ao_panic.c \
38         ao_report.c \
39         ao_sample.c \
40         ao_stdio.c \
41         ao_storage.c \
42         ao_task.c \
43         ao_telemetry.c \
44         ao_freq.c \
45         ao_int64.c
46
47 CC1111_SRC = \
48         ao_adc.c \
49         ao_dma.c \
50         ao_ignite.c \
51         ao_led.c \
52         ao_packet.c \
53         ao_packet_slave.c \
54         ao_radio.c \
55         ao_romconfig.c \
56         ao_string.c \
57         ao_spi.c \
58         ao_usb.c \
59         ao_convert_pa.c \
60         ao_data.c \
61         ao_beep.c \
62         ao_timer.c \
63         ao_exti.c \
64         _bp.c
65
66 DRIVER_SRC = \
67         ao_ms5607.c \
68         ao_m25.c
69
70 PRODUCT_SRC = \
71         ao_telemini.c
72
73 SRC = \
74         $(CORE_SRC) \
75         $(CC1111_SRC) \
76         $(DRIVER_SRC) \
77         $(PRODUCT_SRC)
78
79 PROGNAME = telemini-v$(TELEMINI_VER)
80 PROG = $(PROGNAME)-$(VERSION).ihx
81 PRODUCT=TeleMini-v$(TELEMINI_VER)
82 PRODUCT_DEF=-DTELEMINI_V_$(TELEMINI_DEF)
83 IDPRODUCT=0x000a
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) && cp $(PROG) $(PMAP) ..
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:
114