8 vpath ao-make-product.5c ..
13 VERSION=$(shell git describe)
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
41 # Shared AltOS drivers
66 # Shared Tele drivers (on TeleMetrum, TeleTerra, TeleDongle)
74 # Debug dongle driver (only on TI)
80 # Drivers only on TeleMetrum
88 # 25LC1024 driver source
93 # AT45DB161D driver source
104 # Skytraq driver source
110 # Tasks run on TeleMetrum
122 # Base sources for TeleMetrum
126 $(ALTOS_DRIVER_SRC) \
137 # All sources for the TI debug dongle
141 $(ALTOS_DRIVER_SRC) \
142 $(TELE_RECEIVER_SRC) \
150 # All sources for TeleTerra
154 $(ALTOS_DRIVER_SRC) \
155 $(TELE_RECEIVER_SRC) \
162 # Sources for TeleDongle
170 $(ALTOS_DRIVER_SRC) \
171 $(TELE_RECEIVER_SRC) \
175 include Makefile.defs
177 CFLAGS += $(PRODUCT_DEF) -I.
181 REL=$(SRC:.c=.rel) ao_product.rel
189 PCDB=$(PROG:.ihx=.cdb)
190 PLNK=$(PROG:.ihx=.lnk)
191 PMAP=$(PROG:.ihx=.map)
192 PMEM=$(PROG:.ihx=.mem)
196 # The user has explicitly enabled quiet compilation.
198 quiet = @printf " $1 $2 $@\n"; $($1)
200 # Otherwise, print the full command line.
204 $(call quiet,CC,$(PRODUCT_DEF)) $(CFLAGS) -c -o$@ $<
208 ../$(PROG): $(REL) Makefile Makefile.defs ../Makefile.proto
209 $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(REL) && mv $(PROG) ..
211 ../altitude.h: make-altitude
214 ao_product.h: ao-make-product.5c
215 $(call quiet,NICKLE,$<) $< -m altusmetrum.org -p $(PRODUCT) -v $(VERSION) > $@
217 ao_product.rel: ao_product.c ao_product.h
218 $(call quiet,CC) -c $(CFLAGS) -D PRODUCT_DEFS='\"ao_product.h\"' -o$@ $<
223 rm -f $(ADB) $(ASM) $(LNK) $(LST) $(REL) $(RST) $(SYM)
224 rm -f $(PCDB) $(PLNK) $(PMAP) $(PMEM) $(PAOM)