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
67 # Shared Tele drivers (on TeleMetrum, TeleTerra, TeleDongle)
81 # Debug dongle driver (only on TI)
87 # Drivers only on TeleMetrum
95 # 25LC1024 driver source
101 # AT45DB161D driver source
108 # Numonyx M25P80 driver source
121 # Skytraq driver source
127 # Tasks run on TeleMetrum
139 # Base sources for TeleMetrum
143 $(ALTOS_DRIVER_SRC) \
154 # All sources for the TI debug dongle
158 $(ALTOS_DRIVER_SRC) \
159 $(TELE_RECEIVER_SRC) \
167 # All sources for TeleTerra
171 $(ALTOS_DRIVER_SRC) \
172 $(TELE_RECEIVER_SRC) \
179 # Sources for TeleDongle
187 $(ALTOS_DRIVER_SRC) \
188 $(TELE_RECEIVER_SRC) \
192 include Makefile.defs
194 CFLAGS += $(PRODUCT_DEF) -I.
197 CHECK_STACK=sh ../check-stack
199 REL=$(SRC:.c=.rel) ao_product.rel
207 PCDB=$(PROG:.ihx=.cdb)
208 PLNK=$(PROG:.ihx=.lnk)
209 PMAP=$(PROG:.ihx=.map)
210 PMEM=$(PROG:.ihx=.mem)
214 # The user has explicitly enabled quiet compilation.
216 quiet = @printf " $1 $2 $@\n"; $($1)
218 # Otherwise, print the full command line.
222 $(call quiet,CC,$(PRODUCT_DEF)) $(CFLAGS) -c -o$@ $<
226 ../$(PROG): $(REL) Makefile Makefile.defs ../Makefile.proto
227 $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(REL) && cp $(PROG) $(PMAP) ..
228 $(call quiet,CHECK_STACK) ../ao.h $(PMEM)
230 ../altitude.h: make-altitude
233 ao_product.h: ao-make-product.5c ../Version
234 $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@
236 ao_product.rel: ao_product.c ao_product.h
237 $(call quiet,CC) -c $(CFLAGS) -D PRODUCT_DEFS='\"ao_product.h\"' -o$@ $<
242 rm -f $(ADB) $(ASM) $(LNK) $(LST) $(REL) $(RST) $(SYM)
243 rm -f $(PCDB) $(PLNK) $(PMAP) $(PMEM) $(PAOM)