X-Git-Url: https://git.rrq.au/?a=blobdiff_plain;f=Makefile;h=78e6c72f49c072b8b4766ca908340fea7367f534;hb=83c6612bf07228f70d25136c850f660721379632;hp=9385631e5592d1fcf997de1881e51ebee857ae8c;hpb=163b9cb735045668e51c044db38a98beddbe93f1;p=rrq%2Fjonesforth.git diff --git a/Makefile b/Makefile index 9385631..78e6c72 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,37 @@ -# $Id: Makefile,v 1.1 2007-09-07 23:40:52 rich Exp $ +# $Id: Makefile,v 1.6 2007-10-07 11:07:15 rich Exp $ -all: - gcc -m32 -nostdlib -static -Wl,-Ttext,0 -o jonesforth jonesforth.S +SHELL := /bin/bash + +all: jonesforth + +jonesforth: jonesforth.S + gcc -m32 -nostdlib -static -Wl,-Ttext,0 -Wl,--build-id=none -o $@ $< run: - ./jonesforth \ No newline at end of file + cat jonesforth.f $(PROG) - | ./jonesforth + +clean: + rm -f jonesforth *~ core .test_* + +TESTS := $(patsubst %.f,%.test,$(wildcard test_*.f)) + +test check: $(TESTS) + +test_%.test: test_%.f jonesforth + @echo -n "$< ... " + @rm -f .$@ + @cat <(echo ': TEST-MODE ;') jonesforth.f $< <(echo 'TEST') | \ + ./jonesforth 2>&1 | \ + sed 's/DSP=[0-9]*//g' > .$@ + @diff -u .$@ $<.out + @rm -f .$@ + @echo "ok" + +.SUFFIXES: .f .test +.PHONY: test check + +remote: + scp jonesforth.S jonesforth.f rjones@oirase:Desktop/ + ssh rjones@oirase sh -c '"rm -f Desktop/jonesforth; \ + gcc -m32 -nostdlib -static -Wl,-Ttext,0 -o Desktop/jonesforth Desktop/jonesforth.S; \ + cat Desktop/jonesforth.f - | Desktop/jonesforth arg1 arg2 arg3"'