Merge remote-tracking branch 'origin/master' into multiarch
[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
31 CC1111_SRC = \
32         ao_aes.c \
33         ao_dbg.c \
34         ao_dma.c \
35         ao_led.c \
36         ao_packet.c \
37         ao_packet_master.c \
38         ao_radio.c \
39         ao_radio_cmac.c \
40         ao_romconfig.c \
41         ao_timer.c \
42         ao_usb.c \
43         _bp.c
44
45 DRIVER_SRC =
46
47 PRODUCT_SRC = \
48         ao_tidongle.c
49
50 SRC = \
51         $(CORE_SRC) \
52         $(CC1111_SRC) \
53         $(DRIVER_SRC) \
54         $(PRODUCT_SRC)
55
56 PROG = tidongle-$(VERSION).ihx
57 PRODUCT=TIDongle
58 PRODUCT_DEF=-DTIDONGLE
59 IDPRODUCT=0x000a
60
61 include ../cc1111/Makefile.cc1111
62
63 NICKLE=nickle
64 CHECK_STACK=sh ../util/check-stack
65
66 V=0
67 # The user has explicitly enabled quiet compilation.
68 ifeq ($(V),0)
69 quiet = @printf "  $1 $2 $@\n"; $($1)
70 endif
71 # Otherwise, print the full command line.
72 quiet ?= $($1)
73
74 all: ../$(PROG)
75
76 ../$(PROG): $(REL) Makefile
77         $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(REL) && cp $(PROG) $(PMAP) ..
78         $(call quiet,CHECK_STACK) ../cc1111/ao_arch.h $(PMEM)
79
80 ao_product.h: ao-make-product.5c ../Version
81         $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@
82
83 distclean:      clean
84
85 clean:
86         rm -f $(ADB) $(ASM) $(LNK) $(LST) $(REL) $(RST) $(SYM)
87         rm -f $(PROG) $(PCDB) $(PLNK) $(PMAP) $(PMEM) $(PAOM)
88         rm -f ao_product.h
89         rm -f ../$(PROG) ../$(PMAP)
90
91 install:
92
93 uninstall:
94