7 CFLAGS=--model-small --debug --opt-code-speed
9 LDFLAGS=--out-fmt-ihx --code-loc 0x0000 --code-size 0x8000 \
10 --xram-loc 0xf000 --xram-size 0xda2 --iram-size 0xff
19 # Common AltOS sources
32 # Shared AltOS drivers
52 # Shared Tele drivers (on TeleMetrum, TeleTerra, TeleDongle)
61 # Drivers for partially-flled boards (TT, TD and TI)
68 # Drivers only on TeleMetrum
77 # Tasks run on TeleMetrum
87 # All sources for TeleMetrum
93 $(TELE_RECEIVER_SRC) \
102 # All sources for the TI debug dongle
106 $(ALTOS_DRIVER_SRC) \
107 $(TELE_RECEIVER_SRC) \
115 # All sources for TeleTerra
119 $(ALTOS_DRIVER_SRC) \
120 $(TELE_RECEIVER_SRC) \
128 # Sources for TeleDongle
136 $(ALTOS_DRIVER_SRC) \
137 $(TELE_RECEIVER_SRC) \
144 $(ALTOS_DRIVER_SRC) \
146 $(TELE_RECEIVER_SRC) \
155 TM_REL=$(TM_SRC:.c=.rel)
156 TI_REL=$(TI_SRC:.c=.rel)
157 TT_REL=$(TT_SRC:.c=.rel)
158 TD_REL=$(TD_SRC:.c=.rel)
168 PROGS=telemetrum.ihx tidongle.ihx teleterra.ihx teledongle.ihx
170 HOST_PROGS=ao_flight_test
172 PCDB=$(PROGS:.ihx=.cdb)
173 PLNK=$(PROGS:.ihx=.lnk)
174 PMAP=$(PROGS:.ihx=.map)
175 PMEM=$(PROGS:.ihx=.mem)
179 $(CC) -c $(CFLAGS) -o$*.rel $*.c
181 all: $(PROGS) $(HOST_PROGS)
183 telemetrum.ihx: $(TM_REL) Makefile
184 $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(TM_REL)
185 sh check-stack ao.h telemetrum.mem
187 tidongle.ihx: $(TI_REL) Makefile
188 $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(TI_REL)
189 sh check-stack ao.h tidongle.mem
191 tidongle.ihx: telemetrum.ihx
193 teleterra.ihx: $(TT_REL) Makefile
194 $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(TT_REL)
195 sh check-stack ao.h teleterra.mem
197 teleterra.ihx: tidongle.ihx
199 teledongle.ihx: $(TD_REL) Makefile
200 $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(TD_REL)
201 sh check-stack ao.h teledongle.mem
203 teledongle.ihx: teleterra.ihx
205 altitude.h: make-altitude
206 nickle make-altitude > altitude.h
209 rm -f $(ADB) $(ASM) $(LNK) $(LST) $(REL) $(RST) $(SYM)
210 rm -f $(PROGS) $(PCDB) $(PLNK) $(PMAP) $(PMEM) $(PAOM)
214 ao_flight_test: ao_flight.c ao_flight_test.c
215 cc -g -o $@ ao_flight_test.c