altos: Have 'make clean' remove all programs, even old ones
[fw/altos] / src / teleshield-v0.1 / Makefile
1 #
2 # TeleShield build file
3 #
4 # The various telemetrum versions differ only
5 # in which flash and GPS drivers are included,
6 # so the per-board makefiles simply define
7 # TM_VER, TM_DEF, TM_INC and TM_SRC and include
8 # this file
9
10 TELESHIELD_VER=0.1
11 TELESHIELD_DEF=0_1
12
13 TELESHIELD_INC =
14
15 TELESHIELD_SRC = \
16         ao_beep.c \
17         ao_btm.c \
18         ao_spi.c
19
20 vpath %.c ..:../core:../cc1111:../drivers:../product:.
21 vpath %.h ..:../core:../cc1111:../drivers:../product:.
22 vpath ao-make-product.5c ../util
23
24 ifndef VERSION
25 include ../Version
26 endif
27
28 INC = \
29         ao.h \
30         ao_pins.h \
31         cc1111.h \
32         ao_product.h \
33         $(TELESHIELD_INC)
34
35 CORE_SRC = \
36         ao_cmd.c \
37         ao_config.c \
38         ao_monitor.c \
39         ao_mutex.c \
40         ao_panic.c \
41         ao_state.c \
42         ao_storage.c \
43         ao_stdio.c \
44         ao_task.c \
45         ao_freq.c
46
47 CC1111_SRC = \
48         ao_dbg.c \
49         ao_dma.c \
50         ao_led.c \
51         ao_intflash.c \
52         ao_packet.c \
53         ao_packet_slave.c \
54         ao_radio.c \
55         ao_romconfig.c \
56         ao_serial.c \
57         ao_string.c \
58         ao_timer.c \
59         ao_usb.c \
60         _bp.c
61
62 DRIVER_SRC = \
63         $(TELESHIELD_SRC)
64
65 PRODUCT_SRC = \
66         ao_teleshield.c \
67         ao_ardu_serial.c
68
69 SRC = \
70         $(CORE_SRC) \
71         $(CC1111_SRC) \
72         $(DRIVER_SRC) \
73         $(PRODUCT_SRC)
74
75 PROGNAME = teleshield-v$(TELESHIELD_VER)
76 PROG = $(PROGNAME)-$(VERSION).ihx
77 PRODUCT=TeleShield-v$(TELESHIELD_VER)
78 PRODUCT_DEF=-DTELESHIELD_V_$(TELESHIELD_DEF)
79 IDPRODUCT=0x0013
80 CODESIZE=0x7800
81
82 include ../cc1111/Makefile.cc1111
83
84 NICKLE=nickle
85 CHECK_STACK=sh ../util/check-stack
86
87 V=0
88 # The user has explicitly enabled quiet compilation.
89 ifeq ($(V),0)
90 quiet = @printf "  $1 $2 $@\n"; $($1)
91 endif
92 # Otherwise, print the full command line.
93 quiet ?= $($1)
94
95 all: ../$(PROG)
96
97 ../$(PROG): $(REL) Makefile
98         $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(REL) && cp $(PROG) $(PMAP) ..
99         $(call quiet,CHECK_STACK) ../cc1111/ao_arch.h $(PMEM) || rm $@
100
101 ao_product.h: ao-make-product.5c ../Version
102         $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@
103
104 distclean:      clean
105
106 clean: clean-cc1111
107
108 install:
109
110 uninstall:
111