initial commit

This commit is contained in:
Norman Bos
2024-04-10 19:04:35 +02:00
parent b670bdf5ed
commit 388fba7590
10 changed files with 381 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
GBDK_HOME = gbdk
CC = $(GBDK_HOME)/bin/lcc -mz80:sms -Wm-yoA -Wl-j
BINS = BiffBolton.sms
all: $(BINS)
ASRC = $(wildcard *.s)
CSRC = $(wildcard *.c)
OBJS = $(CSRC:%.c=%.o) $(ASRC:%.s=%.o)
compile.bat: Makefile
@echo "REM Automatically generated from Makefile" > compile.bat
@make -sn | sed y/\\//\\\\/ | sed s/mkdir\ -p\/mkdir\/ | grep -v make >> compile.bat
# Compile and link single file in one pass
%.o: %.c
$(CC) -c -o $@ $<
%.o: %.s
$(CC) -c -o $@ $<
$(BINS): $(OBJS)
$(CC) -Wm-yS -o $@ $^
rm -f *.map *.noi *.ihx *.lst
clean:
rm -f *.o *.lst *.map *.sms *~ *.rel *.cdb *.ihx *.lnk *.sym *.asm *.noi