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
161 # Base sources for TeleMetrum
165 $(ALTOS_DRIVER_SRC) \
167 $(SERIAL_DRIVER_SRC) \
174 # Sources for TeleMini
196 $(ALTOS_DRIVER_SRC) \
199 $(TMINI_DRIVER_SRC) \
204 # Sources for TeleNano
225 $(ALTOS_DRIVER_SRC) \
228 $(TNANO_DRIVER_SRC) \
239 # All sources for the TI debug dongle
243 $(ALTOS_DRIVER_SRC) \
244 $(TELE_RECEIVER_SRC) \
253 # All sources for TeleTerra
257 $(ALTOS_DRIVER_SRC) \
258 $(TELE_RECEIVER_SRC) \
266 # Sources for TeleDongle
274 $(ALTOS_DRIVER_SRC) \
275 $(TELE_RECEIVER_SRC) \
280 include Makefile.defs
282 CFLAGS += $(PRODUCT_DEF) -I.
285 CHECK_STACK=sh ../check-stack
287 REL=$(SRC:.c=.rel) ao_product.rel
295 PCDB=$(PROG:.ihx=.cdb)
296 PLNK=$(PROG:.ihx=.lnk)
297 PMAP=$(PROG:.ihx=.map)
298 PMEM=$(PROG:.ihx=.mem)
302 # The user has explicitly enabled quiet compilation.
304 quiet = @printf " $1 $2 $@\n"; $($1)
306 # Otherwise, print the full command line.
310 $(call quiet,CC,$(PRODUCT_DEF)) $(CFLAGS) -c -o$@ $<
314 ../$(PROG): $(REL) Makefile Makefile.defs ../Makefile.proto
315 $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(REL) && cp $(PROG) $(PMAP) ..
316 $(call quiet,CHECK_STACK) ../ao.h $(PMEM)
318 ../altitude.h: make-altitude
321 ../ao_kalman.h: make-kalman kalman.5c kalman_filter.5c load_csv.5c matrix.5c
324 ao_product.h: ao-make-product.5c ../Version
325 $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@
327 ao_product.rel: ao_product.c ao_product.h
328 $(call quiet,CC) -c $(CFLAGS) -D PRODUCT_DEFS='\"ao_product.h\"' -o$@ $<
333 rm -f $(ADB) $(ASM) $(LNK) $(LST) $(REL) $(RST) $(SYM)
334 rm -f $(PCDB) $(PLNK) $(PMAP) $(PMEM) $(PAOM)