From 1e009f5025e267ed6d2917e989407659d4e5e5e8 Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Sun, 14 Jan 2024 10:53:48 -0800 Subject: [PATCH] Added makefile --- build.sh | 35 ----------------------------------- makefile | 31 +++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 35 deletions(-) delete mode 100755 build.sh create mode 100644 makefile diff --git a/build.sh b/build.sh deleted file mode 100755 index 5f65fa8..0000000 --- a/build.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh -e - -ID="dexe" -ASM="uxncli $HOME/roms/drifblim.rom" -EMU="uxnemu" -LIN="uxncli $HOME/roms/uxnlin.rom" -APP="$HOME/Applications/butler push" -SRC="src/${ID}.tal" -DST="bin/${ID}.rom" - -CPY="$HOME/roms" -ARG="etc/hello.rom" -APPID="hundredrabbits/dexe:uxn" - -rm -rf bin -mkdir bin - -if [[ "$*" == *"--lint"* ]] -then - $LIN $SRC -fi - -$ASM $SRC $DST - -if [[ "$*" == *"--save"* ]] -then - cp $DST $CPY -fi - -if [[ "$*" == *"--push"* ]] -then - $APP $DST $APPID -fi - -$EMU $DST $ARG diff --git a/makefile b/makefile new file mode 100644 index 0000000..79b701b --- /dev/null +++ b/makefile @@ -0,0 +1,31 @@ +ID=dexe +DIR=~/roms +ASM=uxncli ${DIR}/drifblim.rom +LIN=uxncli ${DIR}/uxnlin.rom +EMU=uxnemu +ROM=bin/${ID}.rom + +all: ${ROM} + +lint: + @ ${LIN} src/${ID}.tal +test: + @ ${EMU} ${ROM} etc/hello.rom +run: all + @ ${EMU} ${ROM} +clean: + @ rm -f ${ROM} ${ROM}.sym +install: all + @ cp ${ROM} ${DIR} +uninstall: + @ rm -f ${DIR}/${ID}.rom +archive: all + @ cat src/${ID}.tal src/manifest.tal src/assets.tal | sed 's/~[^[:space:]]\+//' > bin/res.tal + @ ${ASM} bin/res.tal bin/res.rom && ${EMU} bin/res.rom etc/hello.rom + @ cp bin/res.tal ../oscean/etc/${ID}.tal.txt + +.PHONY: all clean lint run install uninstall archive + +${ROM}: src/* + @ mkdir -p bin + @ ${ASM} src/${ID}.tal ${ROM} -- 2.45.2