altos: Add button driver and sample user
[fw/altos] / src / teleterra-v0.2 / Makefile
1 #
2 # TeleTerra build file
3 #
4
5 vpath %.c ..:../core:../cc1111:../drivers:../product
6 vpath %.h ..:../core:../cc1111:../drivers:../product
7 vpath ao-make-product.5c ../util
8
9 ifndef VERSION
10 include ../Version
11 endif
12
13 INC = \
14         ao.h \
15         ao_pins.h \
16         cc1111.h \
17         ao_product.h
18
19 CORE_SRC = \
20         ao_cmd.c \
21         ao_config.c \
22         ao_monitor.c \
23         ao_log_single.c \
24         ao_log_telem.c \
25         ao_mutex.c \
26         ao_panic.c \
27         ao_report.c \
28         ao_rssi.c \
29         ao_state.c \
30         ao_stdio.c \
31         ao_storage.c \
32         ao_task.c
33
34 CC1111_SRC = \
35         ao_beep.c \
36         ao_button.c \
37         ao_dbg.c \
38         ao_dma.c \
39         ao_led.c \
40         ao_packet.c \
41         ao_packet_master.c \
42         ao_radio.c \
43         ao_romconfig.c \
44         ao_serial.c \
45         ao_spi.c \
46         ao_string.c \
47         ao_timer.c \
48         ao_usb.c \
49         ao_lcd_port.c \
50         _bp.c
51
52 DRIVER_SRC = \
53         ao_m25.c \
54         ao_lcd.c \
55         ao_gps_skytraq.c
56
57 PRODUCT_SRC = \
58         ao_teleterra_0_2.c \
59         ao_terraui.c
60
61 SRC = \
62         $(CORE_SRC) \
63         $(CC1111_SRC) \
64         $(DRIVER_SRC) \
65         $(PRODUCT_SRC)
66
67 TELETERRA_VER=0.2
68 TELETERRA_DEF=0_2
69 PROG = teleterra-v$(TELETERRA_VER)-$(VERSION).ihx
70 PRODUCT=TeleTerra-v$(TELETERRA_VER)
71 PRODUCT_DEF=-DTELETERRA_V_$(TELETERRA_DEF)
72 IDPRODUCT=0x000d
73
74 include ../cc1111/Makefile.cc1111
75
76 NICKLE=nickle
77 CHECK_STACK=sh ../util/check-stack
78
79 V=0
80 # The user has explicitly enabled quiet compilation.
81 ifeq ($(V),0)
82 quiet = @printf "  $1 $2 $@\n"; $($1)
83 endif
84 # Otherwise, print the full command line.
85 quiet ?= $($1)
86
87 all: ../$(PROG)
88
89 ../$(PROG): $(REL) Makefile
90         $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(REL) && cp $(PROG) $(PMAP) ..
91         $(call quiet,CHECK_STACK) ../cc1111/ao_arch.h $(PMEM)
92
93 ao_product.h: ao-make-product.5c ../Version
94         $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@
95
96 distclean:      clean
97
98 clean:
99         rm -f $(ADB) $(ASM) $(LNK) $(LST) $(REL) $(RST) $(SYM)
100         rm -f $(PROG) $(PCDB) $(PLNK) $(PMAP) $(PMEM) $(PAOM)
101         rm -f ao_product.h
102         rm -f ../$(PROG) ../$(PMAP)
103
104 install:
105
106 uninstall:
107