snake6502/Makefile

59 lines
1.6 KiB
Makefile
Raw Permalink Normal View History

2020-04-01 19:11:08 +00:00
.POSIX:
2020-04-01 19:11:08 +00:00
ASM=$(wildcard src/*.asm)
2021-11-07 17:14:59 +00:00
RES=res.bin/amour2.sid res.bin/levels.bin res.bin/unlzg.bin
2020-09-15 12:57:10 +00:00
.PHONY: debug env clean all
2020-04-01 19:11:08 +00:00
all: bin/snake6502.bin bin/snake6502.d64
bin/snake6502.bin: bin/snake.pack.lz
2021-11-07 20:09:27 +00:00
dasm src/cart.asm -Isrc/ -f3 -T1 -sbuild/cart.symbols.txt -obin/snake6502.bin
bin/snake6502.d64: bin/loader.prg
c1541 -format "snake6502,01" d64 bin/snake6502.d64
c1541 -attach bin/snake6502.d64 -write bin/loader.prg loader
c1541 -attach bin/snake6502.d64 -write bin/snake.pack.lz.prg packlz
bin/loader.prg: bin/snake.pack.lz.prg
2021-11-07 20:09:27 +00:00
dasm src/loader.asm -Isrc/ -f1 -sbuild/loader.sybols.txt -obin/loader.prg
bin/snake.prg: bin/snake.pack
2021-11-07 20:09:27 +00:00
dasm src/prg.asm -Isrc/ -f1 -T1 -sbuild/prg.symbols.txt -obin/snake.prg
bin/snake.pack: env $(ASM) $(RES) bin/explodefont
2021-11-07 20:09:27 +00:00
dasm src/main.asm -Isrc/ -DSYSTEM=64 -DDEBUG=$(DEBUG) -f3 -T1 -sbuild/pack.symbols.txt -obin/snake.pack
bin/snake.pack.lz: bin/snake.pack liblzg/src/tools/lzg
liblzg/src/tools/lzg bin/snake.pack > bin/snake.pack.lz
bin/snake.pack.lz.prg: bin/snake.pack.lz
echo -n -e "\x00\x80" > bin/snake.pack.lz.prg
cat bin/snake.pack.lz >> bin/snake.pack.lz.prg
liblzg/src/tools/lzg:
cd liblzg/src && make
2020-04-01 19:11:08 +00:00
clean:
2020-04-01 23:13:10 +00:00
rm -rf {build,bin,res.bin}
2020-04-01 19:11:08 +00:00
env:
2020-04-01 23:13:10 +00:00
mkdir -p {build,bin,res.bin}
2020-04-01 19:11:08 +00:00
2020-09-15 12:57:10 +00:00
bin/explodefont: util/explodefont.cpp
2020-04-01 19:11:08 +00:00
g++ -o bin/explodefont util/explodefont.cpp
2021-11-07 17:14:59 +00:00
res.bin/amour2.sid:
cp res.org/amour2.sid res.bin/amour2.sid
2020-04-01 23:13:10 +00:00
res.bin/levels.bin: bin/level res.org/levels.txt
bin/level < res.org/levels.txt > res.bin/levels.bin
res.bin/unlzg.bin:
cp res.org/unlzg.bin res.bin/unlzg.bin
2020-04-01 23:13:10 +00:00
bin/level: util/rlevel.cpp
g++ -o bin/level util/rlevel.cpp