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) \
102 $(ALTOS_DRIVER_SRC) \
104 $(TELE_RECEIVER_SRC) \
110 TM_REL=$(TM_SRC:.c=.rel)
111 TI_REL=$(TI_SRC:.c=.rel)
121 PROGS=telemetrum.ihx tidongle.ihx
122 PCDB=$(PROGS:.ihx=.cdb)
123 PLNK=$(PROGS:.ihx=.lnk)
124 PMAP=$(PROGS:.ihx=.map)
125 PMEM=$(PROGS:.ihx=.mem)
129 $(CC) -c $(CFLAGS) -o$*.rel $*.c
133 telemetrum.ihx: $(TM_REL) Makefile
134 $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(TM_REL)
135 sh check-stack ao.h telemetrum.mem
137 tidongle.ihx: $(TI_REL) Makefile
138 $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(TI_REL)
139 sh check-stack ao.h tidongle.mem
141 tidongle.ihx: telemetrum.ihx
143 altitude.h: make-altitude
144 nickle make-altitude > altitude.h
147 rm -f $(ADB) $(ASM) $(LNK) $(LST) $(REL) $(RST) $(SYM)
148 rm -f $(PROGS) $(PCDB) $(PLNK) $(PMAP) $(PMEM) $(PAOM)