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
51 # Shared Tele drivers (on TeleMetrum, TeleTerra, TeleDongle)
60 # Drivers only on TeleMetrum
68 # Tasks run on TeleMetrum
78 # All sources for TeleMetrum
92 # All sources for the TI debug dongle
97 $(TELE_RECEIVER_SRC) \
104 # All sources for TeleTerra
108 $(ALTOS_DRIVER_SRC) \
109 $(TELE_RECEIVER_SRC) \
116 # Sources for TeleDongle
124 $(ALTOS_DRIVER_SRC) \
125 $(TELE_RECEIVER_SRC) \
131 $(ALTOS_DRIVER_SRC) \
133 $(TELE_RECEIVER_SRC) \
141 TM_REL=$(TM_SRC:.c=.rel)
142 TI_REL=$(TI_SRC:.c=.rel)
143 TT_REL=$(TT_SRC:.c=.rel)
144 TD_REL=$(TD_SRC:.c=.rel)
154 PROGS=telemetrum.ihx tidongle.ihx teleterra.ihx teledongle.ihx
156 PCDB=$(PROGS:.ihx=.cdb)
157 PLNK=$(PROGS:.ihx=.lnk)
158 PMAP=$(PROGS:.ihx=.map)
159 PMEM=$(PROGS:.ihx=.mem)
163 $(CC) -c $(CFLAGS) -o$*.rel $*.c
167 telemetrum.ihx: $(TM_REL) Makefile
168 $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(TM_REL)
169 sh check-stack ao.h telemetrum.mem
171 tidongle.ihx: $(TI_REL) Makefile
172 $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(TI_REL)
173 sh check-stack ao.h tidongle.mem
175 tidongle.ihx: telemetrum.ihx
177 teleterra.ihx: $(TT_REL) Makefile
178 $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(TT_REL)
179 sh check-stack ao.h teleterra.mem
181 teleterra.ihx: tidongle.ihx
183 teledongle.ihx: $(TD_REL) Makefile
184 $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(TD_REL)
185 sh check-stack ao.h teledongle.mem
187 teledongle.ihx: teleterra.ihx
189 altitude.h: make-altitude
190 nickle make-altitude > altitude.h
193 rm -f $(ADB) $(ASM) $(LNK) $(LST) $(REL) $(RST) $(SYM)
194 rm -f $(PROGS) $(PCDB) $(PLNK) $(PMAP) $(PMEM) $(PAOM)
198 ao_flight_test: ao_flight.c ao_flight_test.c
199 cc -g -o $@ ao_flight_test.c