Do radio settings solely by frequency
[fw/altos] / src / product / Makefile.teledongle
1 #
2 # TeleDongle build file
3 #
4 # The various teledongle versions differ only
5 # in minor pin variations
6 # so the per-board makefiles simply define
7 # TD_VER, TD_DEF and include
8 # this file
9
10 vpath %.c ..:../core:../cc1111:../drivers:../product
11 vpath %.h ..:../core:../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         cc1111.h \
22         ao_product.h
23
24 CORE_SRC = \
25         ao_cmd.c \
26         ao_config.c \
27         ao_gps_print.c \
28         ao_monitor.c \
29         ao_mutex.c \
30         ao_panic.c \
31         ao_rssi.c \
32         ao_state.c \
33         ao_stdio.c \
34         ao_task.c \
35         ao_freq.c
36
37 CC1111_SRC = \
38         ao_aes.c \
39         ao_dbg.c \
40         ao_dma.c \
41         ao_led.c \
42         ao_packet.c \
43         ao_packet_master.c \
44         ao_radio.c \
45         ao_radio_cmac.c \
46         ao_romconfig.c \
47         ao_string.c \
48         ao_timer.c \
49         ao_usb.c \
50         _bp.c
51
52 DRIVER_SRC =
53
54 PRODUCT_SRC = \
55         ao_teledongle.c
56
57 SRC = \
58         $(CORE_SRC) \
59         $(CC1111_SRC) \
60         $(DRIVER_SRC) \
61         $(PRODUCT_SRC)
62
63 PROG = teledongle-v$(TD_VER)-$(VERSION).ihx
64 PRODUCT=TeleDongle-v$(TD_VER)
65 PRODUCT_DEF=-DTELEDONGLE_V_$(TD_DEF)
66 IDPRODUCT=0x000c
67
68 include ../cc1111/Makefile.cc1111
69
70 NICKLE=nickle
71 CHECK_STACK=sh ../util/check-stack
72
73 V=0
74 # The user has explicitly enabled quiet compilation.
75 ifeq ($(V),0)
76 quiet = @printf "  $1 $2 $@\n"; $($1)
77 endif
78 # Otherwise, print the full command line.
79 quiet ?= $($1)
80
81 all: ../$(PROG)
82
83 ../$(PROG): $(REL) Makefile
84         $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(REL) && cp $(PROG) $(PMAP) ..
85         $(call quiet,CHECK_STACK) ../cc1111/ao_arch.h $(PMEM) || rm $@
86
87 ao_product.h: ao-make-product.5c ../Version
88         $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@
89
90 distclean:      clean
91
92 clean:
93         rm -f $(ADB) $(ASM) $(LNK) $(LST) $(REL) $(RST) $(SYM)
94         rm -f $(PROG) $(PCDB) $(PLNK) $(PMAP) $(PMEM) $(PAOM)
95         rm -f ao_product.h
96         rm -f ../$(PROG) ../$(PMAP)
97
98 install:
99
100 uninstall: