altos: Create telebt-v1.0 product. Remove old telebt products
[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_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_string.c \
46         ao_timer.c \
47         ao_usb.c \
48         _bp.c
49
50 DRIVER_SRC = \
51         ao_btm.c
52
53 PRODUCT_SRC = \
54         ao_telebt.c
55
56 SRC = \
57         $(CORE_SRC) \
58         $(CC1111_SRC) \
59         $(DRIVER_SRC) \
60         $(PRODUCT_SRC)
61
62 PROGNAME = telebt-v$(TELEBT_VER)
63 PROG = $(PROGNAME)-$(VERSION).ihx
64 PRODUCT=TeleBT-v$(TELEBT_VER)
65 PRODUCT_DEF=-DTELEBT_V_$(TELEBT_DEF)
66 IDPRODUCT=0x000e
67
68 include ../cc1111/Makefile.cc1111
69
70 NICKLE=nickle
71 CHECK_STACK=sh ../util/check-stack
72
73 V=0
74 # The user has explicitly enabled quiet compilation.
75 ifeq ($(V),0)
76 quiet = @printf "  $1 $2 $@\n"; $($1)
77 endif
78 # Otherwise, print the full command line.
79 quiet ?= $($1)
80
81 all: $(PROG)
82
83 $(PROG): $(REL) Makefile
84         $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(REL) && cp $(PROG) $(PMAP) ..
85         $(call quiet,CHECK_STACK) ../cc1111/ao_arch.h $(PMEM) || rm $@
86
87 ao_product.h: ao-make-product.5c ../Version
88         $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@
89
90 distclean:      clean
91
92 clean: clean-cc1111
93
94 install:
95
96 uninstall: