ti83-sdk/Makefile

33 lines
705 B
Makefile
Raw Normal View History

2023-10-07 23:32:30 +00:00
CC=sdcc
CFLAGS=-Ilib83 -c -mz80 --std-sdcc2x --no-std-crt0 --reserve-regs-iy --opt-code-size
OBJS=_crt0.rel clrscr.rel putchar.rel puts.rel exit.rel gotoxy.rel __assert_fail.rel \
getchar.rel put_int.rel ctype.rel \
main.rel
.PHONY: all clean try
all: main.8xk
clean:
rm -f * main.ihx main.bin main.8xk
try: main.8xk
tilem2 --rom=ti83pv116.bin
%.rel: lib83/%.c
$(CC) $(CFLAGS) $< -o obj/$@
%.rel: %.c
$(CC) $(CFLAGS) $< -o obj/$@
main.ihx: $(OBJS)
cd obj && $(CC) -mz80 --no-std-crt0 --code-loc 0x4000 --code-size 0x4000 --xram-loc 0x9D95 --xram-size 0x6060 $^ -o ../$@ && cd ..
main.bin: main.ihx
objcopy -Iihex -Obinary $< $@
main.8xk: main.bin
rabbitsign -v -P -p -t 8xk -g $<