
SOURCES = stree.ml options.ml syntax.ml eval.ml
EXEC = windowsill windowshell
DOC = README.html Lisp2k.html

all: windowsill doc
doc: $(DOC)

%.html: %
	gather_stx_titles -f txt -t html Lisp2k.txt | stx2any - $< >$@
%.html: %.txt
	stx2any $< >$@

windowsill: $(SOURCES) main.ml
	ocamlc -o $@ -pp camlp4o $^

windowshell: $(SOURCES)
	ocamlmktop -o $@ -pp camlp4o $^

clean: gc
	-rm $(EXEC) $(DOC)

gc:
	-rm *.cmi *.cmo a.out

.PHONY: all doc clean gc
