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
171 $(ALTOS_DRIVER_SRC) \
172 $(TELE_RECEIVER_SRC) \
176 include Makefile.defs
178 CFLAGS += $(PRODUCT_DEF) -I.
181 CHECK_STACK=sh ../check-stack
183 REL=$(SRC:.c=.rel) ao_product.rel
191 PCDB=$(PROG:.ihx=.cdb)
192 PLNK=$(PROG:.ihx=.lnk)
193 PMAP=$(PROG:.ihx=.map)
194 PMEM=$(PROG:.ihx=.mem)
198 # The user has explicitly enabled quiet compilation.
200 quiet = @printf " $1 $2 $@\n"; $($1)
202 # Otherwise, print the full command line.
206 $(call quiet,CC,$(PRODUCT_DEF)) $(CFLAGS) -c -o$@ $<
210 ../$(PROG): $(REL) Makefile Makefile.defs ../Makefile.proto
211 $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(REL) && cp $(PROG) $(PMAP) ..
212 $(call quiet,CHECK_STACK) ../ao.h $(PMEM)
214 ../altitude.h: make-altitude
217 ao_product.h: ao-make-product.5c ../Version
218 $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@
220 ao_product.rel: ao_product.c ao_product.h
221 $(call quiet,CC) -c $(CFLAGS) -D PRODUCT_DEFS='\"ao_product.h\"' -o$@ $<
226 rm -f $(ADB) $(ASM) $(LNK) $(LST) $(REL) $(RST) $(SYM)
227 rm -f $(PCDB) $(PLNK) $(PMAP) $(PMEM) $(PAOM)