8 vpath ao-make-product.5c ..
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
42 # Shared AltOS drivers
71 # Shared Tele drivers (on TeleMetrum, TeleTerra, TeleDongle)
90 # Debug dongle driver (only on TI)
96 # Drivers only on TeleMetrum
106 # 25LC1024 driver source
112 # AT45DB161D driver source
119 # Numonyx M25P80 driver source
132 # Skytraq driver source
138 # Tasks run on TeleMetrum
150 # Base sources for TeleMetrum
154 $(ALTOS_DRIVER_SRC) \
156 $(SERIAL_DRIVER_SRC) \
163 # Sources for TeleMini
182 $(ALTOS_DRIVER_SRC) \
185 $(TMINI_DRIVER_SRC) \
193 # All sources for the TI debug dongle
197 $(ALTOS_DRIVER_SRC) \
198 $(TELE_RECEIVER_SRC) \
207 # All sources for TeleTerra
211 $(ALTOS_DRIVER_SRC) \
212 $(TELE_RECEIVER_SRC) \
220 # Sources for TeleDongle
228 $(ALTOS_DRIVER_SRC) \
229 $(TELE_RECEIVER_SRC) \
234 include Makefile.defs
236 CFLAGS += $(PRODUCT_DEF) -I.
239 CHECK_STACK=sh ../check-stack
241 REL=$(SRC:.c=.rel) ao_product.rel
249 PCDB=$(PROG:.ihx=.cdb)
250 PLNK=$(PROG:.ihx=.lnk)
251 PMAP=$(PROG:.ihx=.map)
252 PMEM=$(PROG:.ihx=.mem)
256 # The user has explicitly enabled quiet compilation.
258 quiet = @printf " $1 $2 $@\n"; $($1)
260 # Otherwise, print the full command line.
264 $(call quiet,CC,$(PRODUCT_DEF)) $(CFLAGS) -c -o$@ $<
268 ../$(PROG): $(REL) Makefile Makefile.defs ../Makefile.proto
269 $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(REL) && cp $(PROG) $(PMAP) ..
270 $(call quiet,CHECK_STACK) ../ao.h $(PMEM)
272 ../altitude.h: make-altitude
275 ao_product.h: ao-make-product.5c ../Version
276 $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@
278 ao_product.rel: ao_product.c ao_product.h
279 $(call quiet,CC) -c $(CFLAGS) -D PRODUCT_DEFS='\"ao_product.h\"' -o$@ $<
284 rm -f $(ADB) $(ASM) $(LNK) $(LST) $(REL) $(RST) $(SYM)
285 rm -f $(PCDB) $(PLNK) $(PMAP) $(PMEM) $(PAOM)