altos: Add battery voltage sampling driver
[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_battery.c \
36         ao_beep.c \
37         ao_button.c \
38         ao_dbg.c \
39         ao_dma.c \
40         ao_led.c \
41         ao_packet.c \
42         ao_packet_master.c \
43         ao_radio.c \
44         ao_romconfig.c \
45         ao_serial.c \
46         ao_spi.c \
47         ao_string.c \
48         ao_timer.c \
49         ao_usb.c \
50         ao_lcd_port.c \
51         _bp.c
52
53 DRIVER_SRC = \
54         ao_m25.c \
55         ao_lcd.c \
56         ao_gps_skytraq.c
57
58 PRODUCT_SRC = \
59         ao_teleterra_0_2.c \
60         ao_terraui.c
61
62 SRC = \
63         $(CORE_SRC) \
64         $(CC1111_SRC) \
65         $(DRIVER_SRC) \
66         $(PRODUCT_SRC)
67
68 TELETERRA_VER=0.2
69 TELETERRA_DEF=0_2
70 PROG = teleterra-v$(TELETERRA_VER)-$(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)
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:
100         rm -f $(ADB) $(ASM) $(LNK) $(LST) $(REL) $(RST) $(SYM)
101         rm -f $(PROG) $(PCDB) $(PLNK) $(PMAP) $(PMEM) $(PAOM)
102         rm -f ao_product.h
103         rm -f ../$(PROG) ../$(PMAP)
104
105 install:
106
107 uninstall:
108