]> git.gag.com Git - fw/altos/blob - src/telebt-v1.0/Makefile
altos: Monitor battery voltage on telebt
[fw/altos] / src / telebt-v1.0 / Makefile
1 #
2 # TeleBT build file
3 #
4
5 TELEBT_VER=1.0
6 TELEBT_DEF=1_0
7
8 vpath %.c ..:../core:../cc1111:../drivers:../product
9 vpath %.h ..:../core:../cc1111:../drivers:../product
10 vpath ao-make-product.5c ../util
11
12 ifndef VERSION
13 include ../Version
14 endif
15
16 INC = \
17         ao.h \
18         ao_pins.h \
19         ao_arch.h \
20         ao_arch_funcs.h \
21         cc1111.h \
22         ao_product.h
23
24 CORE_SRC = \
25         ao_cmd.c \
26         ao_config.c \
27         ao_gps_print.c \
28         ao_monitor.c \
29         ao_mutex.c \
30         ao_panic.c \
31         ao_state.c \
32         ao_stdio.c \
33         ao_task.c \
34         ao_freq.c
35
36 CC1111_SRC = \
37         ao_dbg.c \
38         ao_adc.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_string.c \
47         ao_timer.c \
48         ao_usb.c \
49         _bp.c
50
51 DRIVER_SRC = \
52         ao_btm.c
53
54 PRODUCT_SRC = \
55         ao_telebt.c
56
57 SRC = \
58         $(CORE_SRC) \
59         $(CC1111_SRC) \
60         $(DRIVER_SRC) \
61         $(PRODUCT_SRC)
62
63 PROGNAME = telebt-v$(TELEBT_VER)
64 PROG = $(PROGNAME)-$(VERSION).ihx
65 PRODUCT=TeleBT-v$(TELEBT_VER)
66 PRODUCT_DEF=-DTELEBT_V_$(TELEBT_DEF)
67 IDPRODUCT=0x000e
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) || rm $@
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: clean-cc1111
94
95 install:
96
97 uninstall: