altos: Stop copying cc1111 binaries to the altos/src dir
[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_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_romconfig.c \
40         ao_string.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 PROGNAME = tidongle
57 PROG = $(PROGNAME)-$(VERSION).ihx
58 PRODUCT=TIDongle
59 PRODUCT_DEF=-DTIDONGLE
60 IDPRODUCT=0x000a
61
62 include ../cc1111/Makefile.cc1111
63
64 NICKLE=nickle
65 CHECK_STACK=sh ../util/check-stack
66
67 V=0
68 # The user has explicitly enabled quiet compilation.
69 ifeq ($(V),0)
70 quiet = @printf "  $1 $2 $@\n"; $($1)
71 endif
72 # Otherwise, print the full command line.
73 quiet ?= $($1)
74
75 all: $(PROG)
76
77 $(PROG): $(REL) Makefile
78         $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(REL)
79         $(call quiet,CHECK_STACK) ../cc1111/ao_arch.h $(PMEM) || rm $@
80
81 ao_product.h: ao-make-product.5c ../Version
82         $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@
83
84 distclean:      clean
85
86 clean: clean-cc1111
87
88 install:
89
90 uninstall:
91