.PHONY: all clean utop format

all: handlex.exe handlex0.exe lexlex.exe olex.exe piglatin.exe

%.exe: code/handlex.ml code/handlex0.ml code/olex.mll code/lexlex.mll code/piglatin.mll
	dune build
	cp code/$@ .

.FORCE:

format:
	dune build @fmt --auto-promote

clean:
	dune clean
	rm -rf *.exe

utop: handlex.exe handlex0.exe
	dune utop

