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
100 # AT45DB161D driver source
111 # Skytraq driver source
117 # Tasks run on TeleMetrum
129 # Base sources for TeleMetrum
133 $(ALTOS_DRIVER_SRC) \
144 # All sources for the TI debug dongle
148 $(ALTOS_DRIVER_SRC) \
149 $(TELE_RECEIVER_SRC) \
165 # All sources for TeleTerra
169 $(ALTOS_DRIVER_SRC) \
170 $(TELE_RECEIVER_SRC) \
178 # Sources for TeleDongle
186 $(ALTOS_DRIVER_SRC) \
187 $(TELE_RECEIVER_SRC) \
191 include Makefile.defs
193 CFLAGS += $(PRODUCT_DEF) -I.
196 CHECK_STACK=sh ../check-stack
198 REL=$(SRC:.c=.rel) ao_product.rel
206 PCDB=$(PROG:.ihx=.cdb)
207 PLNK=$(PROG:.ihx=.lnk)
208 PMAP=$(PROG:.ihx=.map)
209 PMEM=$(PROG:.ihx=.mem)
213 # The user has explicitly enabled quiet compilation.
215 quiet = @printf " $1 $2 $@\n"; $($1)
217 # Otherwise, print the full command line.
221 $(call quiet,CC,$(PRODUCT_DEF)) $(CFLAGS) -c -o$@ $<
225 ../$(PROG): $(REL) Makefile Makefile.defs ../Makefile.proto
226 $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(REL) && cp $(PROG) $(PMAP) ..
227 $(call quiet,CHECK_STACK) ../ao.h $(PMEM)
229 ../altitude.h: make-altitude
232 ao_product.h: ao-make-product.5c ../Version
233 $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@
235 ao_product.rel: ao_product.c ao_product.h
236 $(call quiet,CC) -c $(CFLAGS) -D PRODUCT_DEFS='\"ao_product.h\"' -o$@ $<
241 rm -f $(ADB) $(ASM) $(LNK) $(LST) $(REL) $(RST) $(SYM)
242 rm -f $(PCDB) $(PLNK) $(PMAP) $(PMEM) $(PAOM)