8 vpath ao-make-product.5c ..
13 VERSION=$(shell git describe)
16 CFLAGS=--model-small --debug --opt-code-speed
18 LDFLAGS=--out-fmt-ihx --code-loc 0x0000 --code-size 0x8000 \
19 --xram-loc 0xf000 --xram-size 0xda2 --iram-size 0xff
29 # Common AltOS sources
41 # Shared AltOS drivers
66 # Shared Tele drivers (on TeleMetrum, TeleTerra, TeleDongle)
74 # Debug dongle driver (only on TI)
80 # Drivers only on TeleMetrum
88 # 25LC1024 driver source
93 # AT45DB161D driver source
104 # Skytraq driver source
110 # Tasks run on TeleMetrum
122 # Base sources for TeleMetrum
126 $(ALTOS_DRIVER_SRC) \
137 # All sources for the TI debug dongle
141 $(ALTOS_DRIVER_SRC) \
142 $(TELE_RECEIVER_SRC) \
150 # All sources for TeleTerra
154 $(ALTOS_DRIVER_SRC) \
155 $(TELE_RECEIVER_SRC) \
162 # Sources for TeleDongle
170 $(ALTOS_DRIVER_SRC) \
171 $(TELE_RECEIVER_SRC) \
175 include Makefile.defs
177 CFLAGS += $(PRODUCT_DEF) -I.
180 CHECK_STACK=sh ../check-stack
182 REL=$(SRC:.c=.rel) ao_product.rel
190 PCDB=$(PROG:.ihx=.cdb)
191 PLNK=$(PROG:.ihx=.lnk)
192 PMAP=$(PROG:.ihx=.map)
193 PMEM=$(PROG:.ihx=.mem)
197 # The user has explicitly enabled quiet compilation.
199 quiet = @printf " $1 $2 $@\n"; $($1)
201 # Otherwise, print the full command line.
205 $(call quiet,CC,$(PRODUCT_DEF)) $(CFLAGS) -c -o$@ $<
209 ../$(PROG): $(REL) Makefile Makefile.defs ../Makefile.proto
210 $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(REL) && cp $(PROG) $(PMAP) ..
211 $(call quiet,CHECK_STACK) ../ao.h $(PMEM)
213 ../altitude.h: make-altitude
216 ao_product.h: ao-make-product.5c
217 $(call quiet,NICKLE,$<) $< -m altusmetrum.org -p $(PRODUCT) -v $(VERSION) > $@
219 ao_product.rel: ao_product.c ao_product.h
220 $(call quiet,CC) -c $(CFLAGS) -D PRODUCT_DEFS='\"ao_product.h\"' -o$@ $<
225 rm -f $(ADB) $(ASM) $(LNK) $(LST) $(REL) $(RST) $(SYM)
226 rm -f $(PCDB) $(PLNK) $(PMAP) $(PMEM) $(PAOM)