.PHONY: all build test bench clean graphs

all: build

build:
	./scripts/env cabal v1-build

test: build
	./scripts/env cabal v1-test

bench: build
	./scripts/env cabal v1-bench

graphs: build
	./scripts/env ./dist/build/tessera/tessera compile examples/protocol.tess --function classify -o artifacts/protocol.tree
	./scripts/env ./dist/build/tessera/tessera graph artifacts/protocol.tree -o artifacts/protocol-decision-tree.dot
	dot -Tsvg artifacts/protocol-decision-tree.dot -o artifacts/protocol-decision-tree.svg

clean:
	rm -rf dist artifacts/protocol.tree artifacts/protocol-decision-tree.dot
