tock-mirror/cgtests.mk
Neil Brown f69030df34 Changed the names of generated tock files to have ".tock" before the extension
This helps avoid collisions with pre-existing files, especially .inc files (but also .c and .h)
2009-04-02 15:40:39 +00:00

39 lines
1011 B
Makefile

# GNUmakefile for compiling the cgtests using Tock.
BACKEND ?= cppcsp
tests = $(patsubst %.occ,%,$(wildcard cgtests/cgtest??.occ))
all: $(tests)
clean:
rm -f $(tests) cgtests/cglib.tock.inc
checkout:
svn co http://projects.cs.kent.ac.uk/projects/kroc/svn/kroc/trunk/tests/cgtests
%: %.occ cgtests/cglib.tock.inc
./tock -vk --backend=$(BACKEND) --usage-checking=off --run-indent $<
cgtests/cglib.tock.inc: cgtests/cglib.occ
./tock -vk --backend=$(BACKEND) --usage-checking=off --run-indent --no-main $<
run: $(tests)
cd cgtests && ./run-tests
run-all: $(addprefix run-,$(tests))
run-cgtests/%: cgtests/%
cgtests/$*
profile-all: $(addprefix profile-,$(tests))
# On Debian/Ubuntu, you will need the "tth" and "netpbm" packages for ps2png
profile-cgtests/%: cgtests/%.occ
./tock -vk --backend=$(BACKEND) --mode=compile cgtests/$*.occ +RTS -hc -p -s > /dev/null
mv tock.hp tock-$*.hp
mv tock.stat tock-$*.stat
mv tock.prof tock-$*.prof
hp2ps -c -s -g tock-$*.hp
ps2png tock-$*.ps tock-$*.png