b63a81d6aa40ca824f0be20f97981d7a624757e0
[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
46 CC1111_SRC = \
47         ao_dbg.c \
48         ao_dma.c \
49         ao_led.c \
50         ao_intflash.c \
51         ao_packet.c \
52         ao_packet_slave.c \
53         ao_radio.c \
54         ao_romconfig.c \
55         ao_serial.c \
56         ao_string.c \
57         ao_timer.c \
58         ao_usb.c \
59         _bp.c
60
61 DRIVER_SRC = \
62         $(TELESHIELD_SRC)
63
64 PRODUCT_SRC = \
65         ao_teleshield.c
66
67 SRC = \
68         $(CORE_SRC) \
69         $(CC1111_SRC) \
70         $(DRIVER_SRC) \
71         $(PRODUCT_SRC)
72
73 PROG = teleshield-v$(TELESHIELD_VER)-$(VERSION).ihx
74 PRODUCT=TeleShield-v$(TELESHIELD_VER)
75 PRODUCT_DEF=-DTELESHIELD_V_$(TELESHIELD_DEF)
76 IDPRODUCT=0x0013
77 CODESIZE=0x7800
78
79 include ../cc1111/Makefile.cc1111
80
81 NICKLE=nickle
82 CHECK_STACK=sh ../util/check-stack
83
84 V=0
85 # The user has explicitly enabled quiet compilation.
86 ifeq ($(V),0)
87 quiet = @printf "  $1 $2 $@\n"; $($1)
88 endif
89 # Otherwise, print the full command line.
90 quiet ?= $($1)
91
92 all: ../$(PROG)
93
94 ../$(PROG): $(REL) Makefile
95         $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(REL) && cp $(PROG) $(PMAP) ..
96         $(call quiet,CHECK_STACK) ../cc1111/ao_arch.h $(PMEM) || rm $@
97
98 ao_product.h: ao-make-product.5c ../Version
99         $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@
100
101 distclean:      clean
102
103 clean:
104         rm -f $(ADB) $(ASM) $(LNK) $(LST) $(REL) $(RST) $(SYM)
105         rm -f $(PROG) $(PCDB) $(PLNK) $(PMAP) $(PMEM) $(PAOM)
106         rm -f ao_product.h
107         rm -f ../$(PROG) ../$(PMAP)
108
109 install:
110
111 uninstall:
112