.PHONY: all clean utop format

all: main.exe

%.exe: code/driver.ml code/ast.ml code/astlib.ml code/lexer.mll  code/main.ml code/parser.mly code/range.ml code/platform.ml 
	dune build
	cp code/$@ .

.FORCE:

format:
	dune build @fmt --auto-promote

clean:
	dune clean
	rm -rf *.exe

utop: main.exe
	dune utop

