3101b77706593c3f09350e71726ad05ff6bcb1b2
[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         ao_arch.h \
22         ao_arch_funcs.h \
23         cc1111.h \
24         ao_product.h
25
26 CORE_SRC = \
27         ao_cmd.c \
28         ao_config.c \
29         ao_gps_print.c \
30         ao_monitor.c \
31         ao_mutex.c \
32         ao_panic.c \
33         ao_rssi.c \
34         ao_state.c \
35         ao_stdio.c \
36         ao_task.c \
37         ao_freq.c
38
39 CC1111_SRC = \
40         ao_dbg.c \
41         ao_dma.c \
42         ao_led.c \
43         ao_packet.c \
44         ao_packet_master.c \
45         ao_radio.c \
46         ao_send_packet.c \
47         ao_romconfig.c \
48         ao_string.c \
49         ao_timer.c \
50         ao_usb.c \
51         _bp.c
52
53 DRIVER_SRC =
54
55 PRODUCT_SRC = \
56         ao_teledongle.c
57
58 SRC = \
59         $(CORE_SRC) \
60         $(CC1111_SRC) \
61         $(DRIVER_SRC) \
62         $(PRODUCT_SRC)
63
64 PROGNAME = teledongle-v$(TD_VER)
65 PROG = $(PROGNAME)-$(VERSION).ihx
66 PRODUCT=TeleDongle-v$(TD_VER)
67 PRODUCT_DEF=-DTELEDONGLE_V_$(TD_DEF)
68 IDPRODUCT=0x000c
69
70 include ../cc1111/Makefile.cc1111
71
72 NICKLE=nickle
73 CHECK_STACK=sh ../util/check-stack
74
75 V=0
76 # The user has explicitly enabled quiet compilation.
77 ifeq ($(V),0)
78 quiet = @printf "  $1 $2 $@\n"; $($1)
79 endif
80 # Otherwise, print the full command line.
81 quiet ?= $($1)
82
83 all: ../$(PROG)
84
85 ../$(PROG): $(REL) Makefile
86         $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(REL) && cp $(PROG) $(PMAP) ..
87         $(call quiet,CHECK_STACK) ../cc1111/ao_arch.h $(PMEM) || rm $@
88
89 ao_product.h: ao-make-product.5c ../Version
90         $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@
91
92 distclean:      clean
93
94 clean: clean-cc1111
95
96 install:
97
98 uninstall: