altos: Make cc1111 products all depend on ao_arch.h and ao_arch_func.h
[fw/altos] / src / product / Makefile.telenano
1 #
2 # TeleNano build file
3 #
4 # Define TELENANO_VER and TELENANO_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_nano.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_mm.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_intflash.c \
45         ao_led.c \
46         ao_packet.c \
47         ao_packet_slave.c \
48         ao_radio.c \
49         ao_romconfig.c \
50         ao_string.c \
51         ao_timer.c \
52         _bp.c
53
54 DRIVER_SRC =
55
56 PRODUCT_SRC = \
57         ao_telenano.c
58
59 SRC = \
60         $(CORE_SRC) \
61         $(CC1111_SRC) \
62         $(DRIVER_SRC) \
63         $(PRODUCT_SRC)
64
65 PROG = telenano-v$(TELENANO_VER)-$(VERSION).ihx
66 PRODUCT=TeleNano-v$(TELENANO_VER)
67 PRODUCT_DEF=-DTELENANO_V_$(TELENANO_DEF)
68 IDPRODUCT=0x000a
69 CODESIZE=0x6700
70
71 include ../cc1111/Makefile.cc1111
72
73 NICKLE=nickle
74 CHECK_STACK=sh ../util/check-stack
75
76 V=0
77 # The user has explicitly enabled quiet compilation.
78 ifeq ($(V),0)
79 quiet = @printf "  $1 $2 $@\n"; $($1)
80 endif
81 # Otherwise, print the full command line.
82 quiet ?= $($1)
83
84 all: ../$(PROG)
85
86 ../$(PROG): $(REL) Makefile
87         $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(REL) && cp $(PROG) $(PMAP) ..
88         $(call quiet,CHECK_STACK) ../cc1111/ao_arch.h $(PMEM) || rm $@
89
90 ao_product.h: ao-make-product.5c ../Version
91         $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@
92
93 distclean:      clean
94
95 clean:
96         rm -f $(ADB) $(ASM) $(LNK) $(LST) $(REL) $(RST) $(SYM)
97         rm -f $(PROG) $(PCDB) $(PLNK) $(PMAP) $(PMEM) $(PAOM)
98         rm -f ao_product.h
99         rm -f ../$(PROG) ../$(PMAP)
100
101 install:
102
103 uninstall: