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) \
124 TM_REL=$(TM_SRC:.c=.rel)
125 TI_REL=$(TI_SRC:.c=.rel)
126 TT_REL=$(TT_SRC:.c=.rel)
136 PROGS=telemetrum.ihx tidongle.ihx teleterra.ihx
137 PCDB=$(PROGS:.ihx=.cdb)
138 PLNK=$(PROGS:.ihx=.lnk)
139 PMAP=$(PROGS:.ihx=.map)
140 PMEM=$(PROGS:.ihx=.mem)
144 $(CC) -c $(CFLAGS) -o$*.rel $*.c
148 telemetrum.ihx: $(TM_REL) Makefile
149 $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(TM_REL)
150 sh check-stack ao.h telemetrum.mem
152 tidongle.ihx: $(TI_REL) Makefile
153 $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(TI_REL)
154 sh check-stack ao.h tidongle.mem
156 tidongle.ihx: telemetrum.ihx
158 teleterra.ihx: $(TT_REL) Makefile
159 $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(TT_REL)
160 sh check-stack ao.h teleterra.mem
162 teleterra.ihx: tidongle.ihx
164 altitude.h: make-altitude
165 nickle make-altitude > altitude.h
168 rm -f $(ADB) $(ASM) $(LNK) $(LST) $(REL) $(RST) $(SYM)
169 rm -f $(PROGS) $(PCDB) $(PLNK) $(PMAP) $(PMEM) $(PAOM)