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) \
166 # All sources for the TI debug dongle
170 $(ALTOS_DRIVER_SRC) \
171 $(TELE_RECEIVER_SRC) \
180 # All sources for TeleTerra
184 $(ALTOS_DRIVER_SRC) \
185 $(TELE_RECEIVER_SRC) \
193 # Sources for TeleDongle
201 $(ALTOS_DRIVER_SRC) \
202 $(TELE_RECEIVER_SRC) \
207 include Makefile.defs
209 CFLAGS += $(PRODUCT_DEF) -I.
212 CHECK_STACK=sh ../check-stack
214 REL=$(SRC:.c=.rel) ao_product.rel
222 PCDB=$(PROG:.ihx=.cdb)
223 PLNK=$(PROG:.ihx=.lnk)
224 PMAP=$(PROG:.ihx=.map)
225 PMEM=$(PROG:.ihx=.mem)
229 # The user has explicitly enabled quiet compilation.
231 quiet = @printf " $1 $2 $@\n"; $($1)
233 # Otherwise, print the full command line.
237 $(call quiet,CC,$(PRODUCT_DEF)) $(CFLAGS) -c -o$@ $<
241 ../$(PROG): $(REL) Makefile Makefile.defs ../Makefile.proto
242 $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(REL) && cp $(PROG) $(PMAP) ..
243 $(call quiet,CHECK_STACK) ../ao.h $(PMEM)
245 ../altitude.h: make-altitude
248 ao_product.h: ao-make-product.5c ../Version
249 $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@
251 ao_product.rel: ao_product.c ao_product.h
252 $(call quiet,CC) -c $(CFLAGS) -D PRODUCT_DEFS='\"ao_product.h\"' -o$@ $<
257 rm -f $(ADB) $(ASM) $(LNK) $(LST) $(REL) $(RST) $(SYM)
258 rm -f $(PCDB) $(PLNK) $(PMAP) $(PMEM) $(PAOM)