Returned drifblim to makefile

This commit is contained in:
Devine Lu Linvega 2024-01-12 13:05:21 -08:00
parent 8e3281cd41
commit 9f3e3b9361
2 changed files with 32 additions and 18 deletions

View File

@ -29,4 +29,3 @@ _Drifblim is strong enough to lift Pokemon or people but has no control over its
- Assembled with [itself](https://git.sr.ht/~rabbits/drifblim)
- Linted with [uxnlin.rom](https://git.sr.ht/~rabbits/uxnlin)
- Formatted with [uxnfor](https://git.sr.ht/~rabbits/uxnfor)

View File

@ -1,31 +1,46 @@
ID=drifloon
DIR=~/roms
ASM=uxnasm
LIN=uxncli ${DIR}/uxnlin.rom
BAL=uxncli ${DIR}/uxnbal.rom
EMU=uxncli
ROM=bin/${ID}.rom
SRC=src/${ID}.tal
all: ${ROM}
all: bin/drifloon.rom bin/drifblim.rom
clean:
@ rm -f ${ROM} ${ROM}.sym
lint:
@ ${LIN} ${SRC}
bal:
@ ${BAL} ${SRC}
run: all
@ cat ${SRC} | ${EMU} ${ROM} > bin/drifloon-bootstrap.rom
run: run-drifloon run-drifblim
run-drifblim: bin/drifblim.rom
@ printf "@@ Assemble drifblim-bootstrap from itself\n\n"
@ ${EMU} bin/drifblim.rom src/drifblim.tal bin/drifblim-bootstrap.rom
@ printf "\n@@ Test drifblim-bootstrap\n\n"
@ ${EMU} bin/drifblim.rom examples/coverage.tal bin/res.rom
@ ${EMU} bin/res.rom
run-drifloon: bin/drifloon.rom
@ printf "@@ Assemble drifloon-bootstrap from itself\n\n"
@ cat src/drifloon.tal | ${EMU} bin/drifloon.rom > bin/drifloon-bootstrap.rom
@ printf "\n@@ Test drifloon-bootstrap\n\n"
@ cat examples/coverage.tal | ${EMU} bin/drifloon-bootstrap.rom > bin/res.rom
@ ${EMU} bin/res.rom
clean:
@ rm -fr bin
lint:
@ ${LIN} src/drifloon.tal
@ ${LIN} src/drifblim.tal
bal:
@ ${BAL} src/drifloon.tal
@ ${BAL} src/drifblim.tal
install: all
@ cp ${ROM} ${DIR}
@ cp bin/drifloon.rom ${DIR}
@ cp bin/drifblim.rom ${DIR}
uninstall:
@ rm -f ${DIR}/${ID}.rom
@ rm -f ${DIR}/drifloon.rom
@ rm -f ${DIR}/drifblim.rom
.PHONY: all clean lint run install uninstall
.PHONY: all clean lint run install uninstall run-drifloon run-drifblim
${ROM}: ${SRC}
bin/drifloon.rom: src/drifloon.tal
@ mkdir -p bin
@ ${ASM} ${SRC} ${ROM}
@ ${ASM} src/drifloon.tal bin/drifloon.rom
bin/drifblim.rom: src/drifblim.tal
@ mkdir -p bin
@ ${ASM} src/drifblim.tal bin/drifblim.rom