# 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/main.bc ] && ( rm -f ./main; ln -s _build/default/src/main.bc ./main )
	@[ -f _build/default/src/tests.bc ] && ( rm -f ./tests; ln -s _build/default/src/tests.bc ./tests )

.PHONY: test
test: build
	./tests

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