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
141 # Skytraq driver source
148 # BTM-182 driver source
154 # Tasks run on TeleMetrum
169 # Base sources for TeleMetrum
173 $(ALTOS_DRIVER_SRC) \
175 $(SERIAL_DRIVER_SRC) \
182 # Sources for TeleMini
204 $(ALTOS_DRIVER_SRC) \
207 $(TMINI_DRIVER_SRC) \
212 # Sources for TeleNano
233 $(ALTOS_DRIVER_SRC) \
236 $(TNANO_DRIVER_SRC) \
242 # Sources for TeleTest
246 # Drivers only on TeleTest
260 $(ALTOS_DRIVER_SRC) \
262 $(SERIAL_DRIVER_SRC) \
264 $(TTEST_DRIVER_SRC) \
269 # Sources for TeleBluetooth
277 $(ALTOS_DRIVER_SRC) \
278 $(TELE_RECEIVER_SRC) \
280 $(SERIAL_DRIVER_SRC) \
300 # All sources for the TI debug dongle
304 $(ALTOS_DRIVER_SRC) \
305 $(TELE_RECEIVER_SRC) \
314 # All sources for TeleTerra
318 $(ALTOS_DRIVER_SRC) \
319 $(TELE_RECEIVER_SRC) \
327 # Sources for TeleDongle
335 $(ALTOS_DRIVER_SRC) \
336 $(TELE_RECEIVER_SRC) \
341 include Makefile.defs
343 CFLAGS += $(PRODUCT_DEF) -I.
346 CHECK_STACK=sh ../check-stack
348 REL=$(SRC:.c=.rel) ao_product.rel
356 PCDB=$(PROG:.ihx=.cdb)
357 PLNK=$(PROG:.ihx=.lnk)
358 PMAP=$(PROG:.ihx=.map)
359 PMEM=$(PROG:.ihx=.mem)
363 # The user has explicitly enabled quiet compilation.
365 quiet = @printf " $1 $2 $@\n"; $($1)
367 # Otherwise, print the full command line.
371 $(call quiet,CC,$(PRODUCT_DEF)) $(CFLAGS) -c -o$@ $<
375 ../$(PROG): $(REL) Makefile Makefile.defs ../Makefile.proto
376 $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(REL) && cp $(PROG) $(PMAP) ..
377 $(call quiet,CHECK_STACK) ../ao.h $(PMEM)
379 ../altitude.h: make-altitude
382 ../ao_kalman.h: make-kalman kalman.5c kalman_filter.5c load_csv.5c matrix.5c
385 ao_product.h: ao-make-product.5c ../Version
386 $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@
388 ao_product.rel: ao_product.c ao_product.h
389 $(call quiet,CC) -c $(CFLAGS) -D PRODUCT_DEFS='\"ao_product.h\"' -o$@ $<
394 rm -f $(ADB) $(ASM) $(LNK) $(LST) $(REL) $(RST) $(SYM)
395 rm -f $(PCDB) $(PLNK) $(PMAP) $(PMEM) $(PAOM)