23aed1c7dcb3b44eadb4dec86067c6ff9a4031d6
[fw/altos] / src / product / Makefile.telemini
1 #
2 # TeleMini build file
3 #
4 # Define TELEMINI_VER and TELEMINI_DEF and then
5 # include this file
6
7 vpath %.c ..:../core:../cc1111:../drivers:../product
8 vpath %.h ..:../core:../cc1111:../drivers:../product
9 vpath ao-make-product.5c ../util
10
11 ifndef VERSION
12 include ../Version
13 endif
14
15 INC = \
16         ao.h \
17         ao_pins.h \
18         ao_arch.h \
19         ao_arch_funcs.h \
20         cc1111.h \
21         ao_product.h
22
23 CORE_SRC = \
24         ao_cmd.c \
25         ao_config.c \
26         ao_convert.c \
27         ao_flight.c \
28         ao_kalman.c \
29         ao_log.c \
30         ao_log_tiny.c \
31         ao_mutex.c \
32         ao_panic.c \
33         ao_report.c \
34         ao_sample.c \
35         ao_stdio.c \
36         ao_storage.c \
37         ao_task.c \
38         ao_telemetry.c \
39         ao_freq.c
40
41 CC1111_SRC = \
42         ao_adc.c \
43         ao_dma.c \
44         ao_ignite.c \
45         ao_intflash.c \
46         ao_led.c \
47         ao_packet.c \
48         ao_packet_slave.c \
49         ao_radio.c \
50         ao_romconfig.c \
51         ao_string.c \
52         ao_timer.c \
53         _bp.c
54
55 DRIVER_SRC =
56
57 PRODUCT_SRC = \
58         ao_telemini.c
59
60 SRC = \
61         $(CORE_SRC) \
62         $(CC1111_SRC) \
63         $(DRIVER_SRC) \
64         $(PRODUCT_SRC)
65
66 PROG = telemini-v$(TELEMINI_VER)-$(VERSION).ihx
67 PRODUCT=TeleMini-v$(TELEMINI_VER)
68 PRODUCT_DEF=-DTELEMINI_V_$(TELEMINI_DEF)
69 IDPRODUCT=0x000a
70 CODESIZE=0x6700
71
72 include ../cc1111/Makefile.cc1111
73
74 NICKLE=nickle
75 CHECK_STACK=sh ../util/check-stack
76
77 V=0
78 # The user has explicitly enabled quiet compilation.
79 ifeq ($(V),0)
80 quiet = @printf "  $1 $2 $@\n"; $($1)
81 endif
82 # Otherwise, print the full command line.
83 quiet ?= $($1)
84
85 all: ../$(PROG)
86
87 ../$(PROG): $(REL) Makefile
88         $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(REL) && cp $(PROG) $(PMAP) ..
89         $(call quiet,CHECK_STACK) ../cc1111/ao_arch.h $(PMEM) || rm $@
90
91 ao_product.h: ao-make-product.5c ../Version
92         $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@
93
94 distclean:      clean
95
96 clean:
97         rm -f $(ADB) $(ASM) $(LNK) $(LST) $(REL) $(RST) $(SYM)
98         rm -f $(PROG) $(PCDB) $(PLNK) $(PMAP) $(PMEM) $(PAOM)
99         rm -f ao_product.h
100         rm -f ../$(PROG) ../$(PMAP)
101
102 install:
103
104 uninstall: