MMC ?= mmc
PYTHON ?= python3
.PHONY: build runtime test compare shell paper
build:
	cd src && $(MMC) --grade hlc.gc --mercury-linkage static --c-include-directory . --make scope
	cp src/scope bin/scope-local
runtime:
	sh tools/get-runtime.sh
shell:
	./bin/scope run examples/shell.scope
test:
	$(PYTHON) tests/check.py
compare:
	$(PYTHON) tools/size.py
paper:
	cd paper && pdflatex -halt-on-error -interaction=nonstopmode manuscript.tex && pdflatex -halt-on-error -interaction=nonstopmode manuscript.tex
