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 HOST_PROGS=ao_flight_test
158 PCDB=$(PROGS:.ihx=.cdb)
159 PLNK=$(PROGS:.ihx=.lnk)
160 PMAP=$(PROGS:.ihx=.map)
161 PMEM=$(PROGS:.ihx=.mem)
165 $(CC) -c $(CFLAGS) -o$*.rel $*.c
167 all: $(PROGS) $(HOST_PROGS)
169 telemetrum.ihx: $(TM_REL) Makefile
170 $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(TM_REL)
171 sh check-stack ao.h telemetrum.mem
173 tidongle.ihx: $(TI_REL) Makefile
174 $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(TI_REL)
175 sh check-stack ao.h tidongle.mem
177 tidongle.ihx: telemetrum.ihx
179 teleterra.ihx: $(TT_REL) Makefile
180 $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(TT_REL)
181 sh check-stack ao.h teleterra.mem
183 teleterra.ihx: tidongle.ihx
185 teledongle.ihx: $(TD_REL) Makefile
186 $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(TD_REL)
187 sh check-stack ao.h teledongle.mem
189 teledongle.ihx: teleterra.ihx
191 altitude.h: make-altitude
192 nickle make-altitude > altitude.h
195 rm -f $(ADB) $(ASM) $(LNK) $(LST) $(REL) $(RST) $(SYM)
196 rm -f $(PROGS) $(PCDB) $(PLNK) $(PMAP) $(PMEM) $(PAOM)
200 ao_flight_test: ao_flight.c ao_flight_test.c
201 cc -g -o $@ ao_flight_test.c