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)
75 # Debug dongle driver (only on TI)
81 # Drivers only on TeleMetrum
89 # 25LC1024 driver source
94 # AT45DB161D driver source
105 # Skytraq driver source
111 # Tasks run on TeleMetrum
123 # Base sources for TeleMetrum
127 $(ALTOS_DRIVER_SRC) \
138 # All sources for the TI debug dongle
142 $(ALTOS_DRIVER_SRC) \
143 $(TELE_RECEIVER_SRC) \
151 # All sources for TeleTerra
155 $(ALTOS_DRIVER_SRC) \
156 $(TELE_RECEIVER_SRC) \
163 # Sources for TeleDongle
174 $(ALTOS_DRIVER_SRC) \
175 $(TELE_RECEIVER_SRC) \
180 include Makefile.defs
182 CFLAGS += $(PRODUCT_DEF) -I.
185 CHECK_STACK=sh ../check-stack
187 REL=$(SRC:.c=.rel) ao_product.rel
195 PCDB=$(PROG:.ihx=.cdb)
196 PLNK=$(PROG:.ihx=.lnk)
197 PMAP=$(PROG:.ihx=.map)
198 PMEM=$(PROG:.ihx=.mem)
202 # The user has explicitly enabled quiet compilation.
204 quiet = @printf " $1 $2 $@\n"; $($1)
206 # Otherwise, print the full command line.
210 $(call quiet,CC,$(PRODUCT_DEF)) $(CFLAGS) -c -o$@ $<
214 ../$(PROG): $(REL) Makefile Makefile.defs ../Makefile.proto
215 $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(REL) && cp $(PROG) $(PMAP) ..
216 $(call quiet,CHECK_STACK) ../ao.h $(PMEM)
218 ../altitude.h: make-altitude
221 ao_product.h: ao-make-product.5c ../Version
222 $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@
224 ao_product.rel: ao_product.c ao_product.h
225 $(call quiet,CC) -c $(CFLAGS) -D PRODUCT_DEFS='\"ao_product.h\"' -o$@ $<
230 rm -f $(ADB) $(ASM) $(LNK) $(LST) $(REL) $(RST) $(SYM)
231 rm -f $(PCDB) $(PLNK) $(PMAP) $(PMEM) $(PAOM)