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) \
157 # All sources for TeleTerra
161 $(ALTOS_DRIVER_SRC) \
162 $(TELE_RECEIVER_SRC) \
169 # Sources for TeleDongle
177 $(ALTOS_DRIVER_SRC) \
178 $(TELE_RECEIVER_SRC) \
182 include Makefile.defs
184 CFLAGS += $(PRODUCT_DEF) -I.
187 CHECK_STACK=sh ../check-stack
189 REL=$(SRC:.c=.rel) ao_product.rel
197 PCDB=$(PROG:.ihx=.cdb)
198 PLNK=$(PROG:.ihx=.lnk)
199 PMAP=$(PROG:.ihx=.map)
200 PMEM=$(PROG:.ihx=.mem)
204 # The user has explicitly enabled quiet compilation.
206 quiet = @printf " $1 $2 $@\n"; $($1)
208 # Otherwise, print the full command line.
212 $(call quiet,CC,$(PRODUCT_DEF)) $(CFLAGS) -c -o$@ $<
216 ../$(PROG): $(REL) Makefile Makefile.defs ../Makefile.proto
217 $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(REL) && cp $(PROG) $(PMAP) ..
218 $(call quiet,CHECK_STACK) ../ao.h $(PMEM)
220 ../altitude.h: make-altitude
223 ao_product.h: ao-make-product.5c ../Version
224 $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@
226 ao_product.rel: ao_product.c ao_product.h
227 $(call quiet,CC) -c $(CFLAGS) -D PRODUCT_DEFS='\"ao_product.h\"' -o$@ $<
232 rm -f $(ADB) $(ASM) $(LNK) $(LST) $(REL) $(RST) $(SYM)
233 rm -f $(PCDB) $(PLNK) $(PMAP) $(PMEM) $(PAOM)