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) \
241 # Sources for TeleDongle
249 $(ALTOS_DRIVER_SRC) \
250 $(TELE_RECEIVER_SRC) \
252 $(SERIAL_DRIVER_SRC) \
265 # All sources for the TI debug dongle
269 $(ALTOS_DRIVER_SRC) \
270 $(TELE_RECEIVER_SRC) \
279 # All sources for TeleTerra
283 $(ALTOS_DRIVER_SRC) \
284 $(TELE_RECEIVER_SRC) \
292 # Sources for TeleDongle
300 $(ALTOS_DRIVER_SRC) \
301 $(TELE_RECEIVER_SRC) \
306 include Makefile.defs
308 CFLAGS += $(PRODUCT_DEF) -I.
311 CHECK_STACK=sh ../check-stack
313 REL=$(SRC:.c=.rel) ao_product.rel
321 PCDB=$(PROG:.ihx=.cdb)
322 PLNK=$(PROG:.ihx=.lnk)
323 PMAP=$(PROG:.ihx=.map)
324 PMEM=$(PROG:.ihx=.mem)
328 # The user has explicitly enabled quiet compilation.
330 quiet = @printf " $1 $2 $@\n"; $($1)
332 # Otherwise, print the full command line.
336 $(call quiet,CC,$(PRODUCT_DEF)) $(CFLAGS) -c -o$@ $<
340 ../$(PROG): $(REL) Makefile Makefile.defs ../Makefile.proto
341 $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(REL) && cp $(PROG) $(PMAP) ..
342 $(call quiet,CHECK_STACK) ../ao.h $(PMEM)
344 ../altitude.h: make-altitude
347 ../ao_kalman.h: make-kalman kalman.5c kalman_filter.5c load_csv.5c matrix.5c
350 ao_product.h: ao-make-product.5c ../Version
351 $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@
353 ao_product.rel: ao_product.c ao_product.h
354 $(call quiet,CC) -c $(CFLAGS) -D PRODUCT_DEFS='\"ao_product.h\"' -o$@ $<
359 rm -f $(ADB) $(ASM) $(LNK) $(LST) $(REL) $(RST) $(SYM)
360 rm -f $(PCDB) $(PLNK) $(PMAP) $(PMEM) $(PAOM)