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