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 0xf00 --iram-size 0xff
19 # Common AltOS sources
32 # Shared AltOS drivers
51 # Shared Tele drivers (on TeleMetrum, TeleTerra, TeleDongle)
60 # Drivers only on TeleMetrum
67 # Tasks run on TeleMetrum
77 # All sources for TeleMetrum
91 # All sources for the TI debug dongle
96 $(TELE_RECEIVER_SRC) \
103 # All sources for TeleTerra
107 $(ALTOS_DRIVER_SRC) \
108 $(TELE_RECEIVER_SRC) \
116 $(ALTOS_DRIVER_SRC) \
118 $(TELE_RECEIVER_SRC) \
125 TM_REL=$(TM_SRC:.c=.rel)
126 TI_REL=$(TI_SRC:.c=.rel)
127 TT_REL=$(TT_SRC:.c=.rel)
137 PROGS=telemetrum.ihx tidongle.ihx teleterra.ihx
138 PCDB=$(PROGS:.ihx=.cdb)
139 PLNK=$(PROGS:.ihx=.lnk)
140 PMAP=$(PROGS:.ihx=.map)
141 PMEM=$(PROGS:.ihx=.mem)
145 $(CC) -c $(CFLAGS) -o$*.rel $*.c
149 telemetrum.ihx: $(TM_REL) Makefile
150 $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(TM_REL)
151 sh check-stack ao.h telemetrum.mem
153 tidongle.ihx: $(TI_REL) Makefile
154 $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(TI_REL)
155 sh check-stack ao.h tidongle.mem
157 tidongle.ihx: telemetrum.ihx
159 teleterra.ihx: $(TT_REL) Makefile
160 $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(TT_REL)
161 sh check-stack ao.h teleterra.mem
163 teleterra.ihx: tidongle.ihx
165 altitude.h: make-altitude
166 nickle make-altitude > altitude.h
169 rm -f $(ADB) $(ASM) $(LNK) $(LST) $(REL) $(RST) $(SYM)
170 rm -f $(PROGS) $(PCDB) $(PLNK) $(PMAP) $(PMEM) $(PAOM)