# This Makefile is provided for convenience.  This project is compiled using
# Dune, but course at Swarthmore typically provide projects which support
# "make".

.PHONY: build
build:
	dune build
	@[ -f _build/default/src/example/example.bc ] && ( rm -f ./example; ln -s _build/default/src/example/example.bc ./example )
	@[ -f _build/default/src/test/tests.bc ] && ( rm -f ./tests; ln -s _build/default/src/test/tests.bc ./tests )

.PHONY: test
test: build
	./tests

.PHONY: clean
clean:
	dune clean
	rm -rf _build
	rm -f ./tests
	rm -f ./example
