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