From 9f3e3b9361cc279370973627cee8d04eda393d75 Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Fri, 12 Jan 2024 13:05:21 -0800 Subject: [PATCH] Returned drifblim to makefile --- README.md | 1 - makefile | 49 ++++++++++++++++++++++++++++++++----------------- 2 files changed, 32 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 936a08a..c0418ac 100644 --- a/README.md +++ b/README.md @@ -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) - diff --git a/makefile b/makefile index b86c95f..a30916b 100644 --- a/makefile +++ b/makefile @@ -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