altos: Massive product config cleanup
[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 PROG = teleshield-v$(TELESHIELD_VER)-$(VERSION).ihx
76 PRODUCT=TeleShield-v$(TELESHIELD_VER)
77 PRODUCT_DEF=-DTELESHIELD_V_$(TELESHIELD_DEF)
78 IDPRODUCT=0x0013
79 CODESIZE=0x7800
80
81 include ../cc1111/Makefile.cc1111
82
83 NICKLE=nickle
84 CHECK_STACK=sh ../util/check-stack
85
86 V=0
87 # The user has explicitly enabled quiet compilation.
88 ifeq ($(V),0)
89 quiet = @printf "  $1 $2 $@\n"; $($1)
90 endif
91 # Otherwise, print the full command line.
92 quiet ?= $($1)
93
94 all: ../$(PROG)
95
96 ../$(PROG): $(REL) Makefile
97         $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(REL) && cp $(PROG) $(PMAP) ..
98         $(call quiet,CHECK_STACK) ../cc1111/ao_arch.h $(PMEM) || rm $@
99
100 ao_product.h: ao-make-product.5c ../Version
101         $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@
102
103 distclean:      clean
104
105 clean:
106         rm -f $(ADB) $(ASM) $(LNK) $(LST) $(REL) $(RST) $(SYM)
107         rm -f $(PROG) $(PCDB) $(PLNK) $(PMAP) $(PMEM) $(PAOM)
108         rm -f ao_product.h
109         rm -f ../$(PROG) ../$(PMAP)
110
111 install:
112
113 uninstall:
114