~rabbits/orca-toy

6f85ba28f8deab762ae619c1f62ee09ee3505d17 — neauoire 1 year, 27 days ago 3fd9dfa
Replaced build script with makefile
2 files changed, 28 insertions(+), 35 deletions(-)

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

ID="orca"
ASM="uxncli $HOME/roms/drifblim.rom"
EMU="uxnemu"
LIN="uxncli $HOME/roms/uxnlin.rom"
SRC="src/${ID}.tal"
DST="bin/${ID}.rom"
CPY="$HOME/roms"
ARG="etc/tests.orca"

STORE="$HOME/bin/butler push"
STOREID="hundredrabbits/orca: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
	$STORE $DST $STOREID
fi

$EMU $DST $ARG

A makefile => makefile +28 -0
@@ 0,0 1,28 @@
ID=orca
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
test:
	@ ${EMU} ${ROM} etc/tests.orca
run: ${ROM}
	@ ${EMU} ${ROM}
install: ${ROM}
	@ cp ${ROM} ${DIR}
uninstall:
	@ rm -f ${DIR}/${ID}.rom
push: ${ROM}
	@ ~/bin/butler push ${ROM} hundredrabbits/${ID}:uxn

.PHONY: all clean lint run install uninstall push

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