working version (flake does not build correctly, should just use make)

This commit is contained in:
Dario48 2026-05-23 16:37:08 +02:00
commit 856780ccb0
4 changed files with 19 additions and 4 deletions

View file

@ -8,11 +8,22 @@ debug: OBJ_DEBUG_ARGS = --create-dep obj/nes/smb.d -v -g
debug: ROM_DEBUG_ARGS = -Wl --dbgfile,smb.nes.dbg
debug: build
obj/nes/smbdishl.o: src/smbdishl.s
obj/nes/smbdishl.o: src/smbdishl.s src/smb_chr.chr
$(cl65) -t none -c $(OBJ_DEBUG_ARGS) --include-dir src -o $@ $<
smb.nes smb.map: obj/nes/smbdishl.o src/nes.cfg
$(cl65) -t none -c --mapfile smb.map $(ROM_DEBUG_ARGS) -o smb.nes -C src/nes.cfg $<
$(cl65) -t none --mapfile smb.map $(ROM_DEBUG_ARGS) -o smb.nes -C src/nes.cfg $<
src/smb_chr.chr:
if [ -s chr/smb_chr.chr ]; then \
if [ -s src/smb_chr.chr ]; then \
cmp -s $@ chr/smb_chr.chr || cp chr/smb_chr.chr $@ \
else \
cp chr/smb_chr.chr \
fi \
else \
[ -s src/smb_chr.chr ] || $(error missing chr)\
fi
clean:
rm -f smb.nes.dbg smb.map smb.nes smb.nes.ndx obj/nes/smbdishl.o obj/nes/smb.d