Merge remote-tracking branch 'uniarch/master' into multiarch
[fw/altos] / src / product / Makefile.telelaunch
1 #
2 # TeleLaunch build file
3 #
4 # define TELELAUNCH_VER, TELELAUNCH_DEF
5 # this file
6
7 vpath %.c ..:../core:../cc1111:../drivers:../product
8 vpath %.h ..:../core:../cc1111:../drivers:../product
9 vpath ao-make-product.5c ../util
10
11 ifndef VERSION
12 include ../Version
13 endif
14
15 INC = \
16         ao.h \
17         ao_pins.h \
18         cc1111.h \
19         ao_product.h
20
21 CORE_SRC = \
22         ao_cmd.c \
23         ao_config.c \
24         ao_convert.c \
25         ao_launch.c \
26         ao_mutex.c \
27         ao_panic.c \
28         ao_stdio.c \
29         ao_storage.c \
30         ao_task.c
31
32 CC1111_SRC = \
33         ao_adc.c \
34         ao_aes.c \
35         ao_beep.c \
36         ao_dbg.c \
37         ao_dma.c \
38         ao_ignite.c \
39         ao_intflash.c \
40         ao_led.c \
41         ao_packet.c \
42         ao_packet_slave.c \
43         ao_radio.c \
44         ao_radio_cmac.c \
45         ao_romconfig.c \
46         ao_serial.c \
47         ao_spi.c \
48         ao_timer.c \
49         ao_usb.c \
50         _bp.c
51
52 DRIVER_SRC =
53
54 PRODUCT_SRC = \
55         ao_telelaunch.c
56
57 SRC = \
58         $(CORE_SRC) \
59         $(CC1111_SRC) \
60         $(DRIVER_SRC) \
61         $(PRODUCT_SRC)
62
63 PROG = telelaunch-v$(TELELAUNCH_VER)-$(VERSION).ihx
64 PRODUCT=TeleLaunch-v$(TELELAUNCH_VER)
65 PRODUCT_DEF=-DTELELAUNCH_V_$(TELELAUNCH_DEF)
66 IDPRODUCT=0x000f
67 CODESIZE=0x6700
68
69 include ../cc1111/Makefile.cc1111
70
71 NICKLE=nickle
72 CHECK_STACK=sh ../util/check-stack
73
74 V=0
75 # The user has explicitly enabled quiet compilation.
76 ifeq ($(V),0)
77 quiet = @printf "  $1 $2 $@\n"; $($1)
78 endif
79 # Otherwise, print the full command line.
80 quiet ?= $($1)
81
82 all: ../$(PROG)
83
84 ../$(PROG): $(REL) Makefile
85         $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(REL) && cp $(PROG) $(PMAP) ..
86         $(call quiet,CHECK_STACK) ../cc1111/ao_arch.h $(PMEM)
87
88 ao_product.h: ao-make-product.5c ../Version
89         $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@
90
91 distclean:      clean
92
93 clean:
94         rm -f $(ADB) $(ASM) $(LNK) $(LST) $(REL) $(RST) $(SYM)
95         rm -f $(PROG) $(PCDB) $(PLNK) $(PMAP) $(PMEM) $(PAOM)
96         rm -f ao_product.h
97         rm -f ../$(PROG) ../$(PMAP)
98
99 install:
100
101 uninstall: