~rabbits/adelie

0ded36b4dea88782de256cd16a48123b60e7924a — neauoire 10 months ago 23cd3e9
Removed bash script, added makefile
2 files changed, 24 insertions(+), 27 deletions(-)

D build.sh
A makefile
D build.sh => build.sh +0 -27
@@ 1,27 0,0 @@
#!/bin/sh -e

ID="adelie"
ASM="uxnasm"
EMU="uxnemu"
LIN="uxncli $HOME/roms/uxnlin.rom"
SRC="src/${ID}.tal"
DST="bin/${ID}.rom"
CPY="$HOME/roms"
ARG="slides"

rm -rf bin
mkdir bin

if [[ "$*" == *"--lint"* ]]
then
	$LIN $SRC
fi

$ASM $SRC $DST

if [[ "$*" == *"--save"* ]]
then
	cp $DST $CPY
fi

$EMU $DST $ARG

A makefile => makefile +24 -0
@@ 0,0 1,24 @@
ID=adelie
DIR=~/roms
ASM=uxncli ${DIR}/drifblim.rom
LIN=uxncli ${DIR}/uxnlin.rom
EMU=uxnemu
ROM=bin/${ID}.rom

all: ${ROM}

clean:
	@ rm -f ${ROM} ${ROM}.sym
lint:
	@ ${LIN} src/${ID}.tal
run: ${ROM}
	@ ${EMU} ${ROM} slides
install: ${ROM}
	@ cp ${ROM} ${DIR}
uninstall:
	@ rm -f ${DIR}/${ID}.rom

.PHONY: all clean lint run install uninstall

${ROM}: src/${ID}.tal
	@ mkdir -p bin && ${ASM} src/${ID}.tal ${ROM}