]> git.gag.com Git - fw/altos/blob - src/teleterra-v0.2/Makefile
Merge branch 'branch-1.2' into debian
[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_sqrt.c \
29         ao_stdio.c \
30         ao_storage.c \
31         ao_task.c \
32         ao_freq.c
33
34 CC1111_SRC = \
35         ao_battery.c \
36         ao_beep.c \
37         ao_button.c \
38         ao_dbg.c \
39         ao_dma.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 PROGNAME = teleterra-v$(TELETERRA_VER)
70 PROG = $(PROGNAME)-$(VERSION).ihx
71 PRODUCT=TeleTerra-v$(TELETERRA_VER)
72 PRODUCT_DEF=-DTELETERRA_V_$(TELETERRA_DEF)
73 IDPRODUCT=0x000d
74
75 include ../cc1111/Makefile.cc1111
76
77 NICKLE=nickle
78 CHECK_STACK=sh ../util/check-stack
79
80 V=0
81 # The user has explicitly enabled quiet compilation.
82 ifeq ($(V),0)
83 quiet = @printf "  $1 $2 $@\n"; $($1)
84 endif
85 # Otherwise, print the full command line.
86 quiet ?= $($1)
87
88 all: ../$(PROG)
89
90 ../$(PROG): $(REL) Makefile
91         $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(REL) && cp $(PROG) $(PMAP) ..
92         $(call quiet,CHECK_STACK) ../cc1111/ao_arch.h $(PMEM) || rm $@
93
94 ao_product.h: ao-make-product.5c ../Version
95         $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@
96
97 distclean:      clean
98
99 clean: clean-cc1111
100
101 install:
102
103 uninstall:
104