Do radio settings solely by frequency
[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         cc1111.h \
19         ao_product.h
20
21 CORE_SRC = \
22         ao_cmd.c \
23         ao_config.c \
24         ao_convert.c \
25         ao_flight_nano.c \
26         ao_kalman.c \
27         ao_log.c \
28         ao_log_tiny.c \
29         ao_mutex.c \
30         ao_panic.c \
31         ao_report.c \
32         ao_sample.c \
33         ao_stdio.c \
34         ao_storage.c \
35         ao_task.c \
36         ao_telemetry.c \
37         ao_freq.c
38
39 CC1111_SRC = \
40         ao_adc.c \
41         ao_dma.c \
42         ao_intflash.c \
43         ao_led.c \
44         ao_packet.c \
45         ao_packet_slave.c \
46         ao_radio.c \
47         ao_romconfig.c \
48         ao_string.c \
49         ao_timer.c \
50         _bp.c
51
52 DRIVER_SRC =
53
54 PRODUCT_SRC = \
55         ao_telenano.c
56
57 SRC = \
58         $(CORE_SRC) \
59         $(CC1111_SRC) \
60         $(DRIVER_SRC) \
61         $(PRODUCT_SRC)
62
63 PROG = telenano-v$(TELENANO_VER)-$(VERSION).ihx
64 PRODUCT=TeleNano-v$(TELENANO_VER)
65 PRODUCT_DEF=-DTELENANO_V_$(TELENANO_DEF)
66 IDPRODUCT=0x000a
67 CODESIZE=0x6700
68
69 include ../cc1111/Makefile.cc1111
70
71 NICKLE=nickle
72 CHECK_STACK=sh ../util/check-stack
73
74 V=0
75 # The user has explicitly enabled quiet compilation.
76 ifeq ($(V),0)
77 quiet = @printf "  $1 $2 $@\n"; $($1)
78 endif
79 # Otherwise, print the full command line.
80 quiet ?= $($1)
81
82 all: ../$(PROG)
83
84 ../$(PROG): $(REL) Makefile
85         $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(REL) && cp $(PROG) $(PMAP) ..
86         $(call quiet,CHECK_STACK) ../cc1111/ao_arch.h $(PMEM) || rm $@
87
88 ao_product.h: ao-make-product.5c ../Version
89         $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@
90
91 distclean:      clean
92
93 clean:
94         rm -f $(ADB) $(ASM) $(LNK) $(LST) $(REL) $(RST) $(SYM)
95         rm -f $(PROG) $(PCDB) $(PLNK) $(PMAP) $(PMEM) $(PAOM)
96         rm -f ao_product.h
97         rm -f ../$(PROG) ../$(PMAP)
98
99 install:
100
101 uninstall: