9 vpath kalman.5c ../kalman
10 vpath kalman_filter.5c ../kalman
11 vpath load_csv.5c ../kalman
12 vpath matrix.5c ../kalman
13 vpath ao-make-product.5c ..
21 CFLAGS=--model-small --debug --opt-code-speed -DCODESIZE=$(CODESIZE)
25 LDFLAGS=--out-fmt-ihx --code-loc 0x0000 --code-size $(CODESIZE) \
26 --xram-loc 0xf000 --xram-size 0xda2 --iram-size 0xff
37 # Common AltOS sources
50 # Shared AltOS drivers
79 # Shared Tele drivers (on TeleMetrum, TeleTerra, TeleDongle)
98 # Debug dongle driver (only on TI)
104 # Drivers only on TeleMetrum
114 # 25LC1024 driver source
120 # AT45DB161D driver source
127 # Numonyx M25P80 driver source
140 # Skytraq driver source
146 # Tasks run on TeleMetrum
159 # Base sources for TeleMetrum
163 $(ALTOS_DRIVER_SRC) \
165 $(SERIAL_DRIVER_SRC) \
172 # Sources for TeleMini
192 $(ALTOS_DRIVER_SRC) \
195 $(TMINI_DRIVER_SRC) \
200 # Sources for TeleNano
220 $(ALTOS_DRIVER_SRC) \
223 $(TNANO_DRIVER_SRC) \
234 # All sources for the TI debug dongle
238 $(ALTOS_DRIVER_SRC) \
239 $(TELE_RECEIVER_SRC) \
248 # All sources for TeleTerra
252 $(ALTOS_DRIVER_SRC) \
253 $(TELE_RECEIVER_SRC) \
261 # Sources for TeleDongle
269 $(ALTOS_DRIVER_SRC) \
270 $(TELE_RECEIVER_SRC) \
275 include Makefile.defs
277 CFLAGS += $(PRODUCT_DEF) -I.
280 CHECK_STACK=sh ../check-stack
282 REL=$(SRC:.c=.rel) ao_product.rel
290 PCDB=$(PROG:.ihx=.cdb)
291 PLNK=$(PROG:.ihx=.lnk)
292 PMAP=$(PROG:.ihx=.map)
293 PMEM=$(PROG:.ihx=.mem)
297 # The user has explicitly enabled quiet compilation.
299 quiet = @printf " $1 $2 $@\n"; $($1)
301 # Otherwise, print the full command line.
305 $(call quiet,CC,$(PRODUCT_DEF)) $(CFLAGS) -c -o$@ $<
309 ../$(PROG): $(REL) Makefile Makefile.defs ../Makefile.proto
310 $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(REL) && cp $(PROG) $(PMAP) ..
311 $(call quiet,CHECK_STACK) ../ao.h $(PMEM)
313 ../altitude.h: make-altitude
316 ../ao_kalman.h: make-kalman kalman.5c kalman_filter.5c load_csv.5c matrix.5c
319 ao_product.h: ao-make-product.5c ../Version
320 $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@
322 ao_product.rel: ao_product.c ao_product.h
323 $(call quiet,CC) -c $(CFLAGS) -D PRODUCT_DEFS='\"ao_product.h\"' -o$@ $<
328 rm -f $(ADB) $(ASM) $(LNK) $(LST) $(REL) $(RST) $(SYM)
329 rm -f $(PCDB) $(PLNK) $(PMAP) $(PMEM) $(PAOM)