X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=Makefile;h=51fba1e202aed75edf5ac43c4dd56d358d61bdc7;hb=master;hp=213eaf33d770c93c0c0f3daddf813111a2fe3f65;hpb=6a3c61c79594897f2328e0e3f85aeca093c200b7;p=jonesforth.git diff --git a/Makefile b/Makefile index 213eaf3..51fba1e 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,47 @@ -# $Id: Makefile,v 1.5 2007-09-29 16:04:20 rich Exp $ +# $Id: Makefile,v 1.9 2007-10-22 18:53:12 rich Exp $ -all: - gcc -m32 -nostdlib -static -Wl,-Ttext,0 -o jonesforth jonesforth.S +#BUILD_ID_NONE := -Wl,--build-id=none +BUILD_ID_NONE := + +SHELL := /bin/bash + +all: jonesforth + +jonesforth: jonesforth.S + gcc -m32 -nostdlib -static -Wl,-Ttext,0 $(BUILD_ID_NONE) -o $@ $< run: - cat jonesforth.f - | ./jonesforth + cat jonesforth.f $(PROG) - | ./jonesforth + +clean: + rm -f jonesforth perf_dupdrop *~ core .test_* + +# Tests. + +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" + +# Performance. + +perf_dupdrop: perf_dupdrop.c + gcc -O3 -Wall -Werror -o $@ $< + +run_perf_dupdrop: jonesforth + cat <(echo ': TEST-MODE ;') jonesforth.f perf_dupdrop.f | ./jonesforth + +.SUFFIXES: .f .test +.PHONY: test check run run_perf_dupdrop remote: scp jonesforth.S jonesforth.f rjones@oirase:Desktop/