RESULT := civicc PHASES := load parse print desug context typecheck dimreduce boolop extern \ constprop index assemble peephole output SOURCES := types.ml stringify.mli stringify.ml util.mli util.ml lexer.mll \ parser.mly $(patsubst %,phases/%.ml,$(PHASES)) main.ml PRE_TARGETS := types.cmi types.o stringify.cmi stringify.o util.cmi util.o LIBS := str unix OCAMLFLAGS := -g OCAMLYACC := menhir YFLAGS := --infer --explain CIVAS := ../bin32/civas CIVVM := ../bin32/civvm CIVCC := ../civicc DIST_TGT := civicaml.tgz DIST_FILES := $(RESULT) $(SOURCES) Makefile OCamlMakefile README.md test .PHONY: myclean check dist all: native-code clean:: myclean myclean: rm -f a.out $(DIST_TGT) check: all @cd test; CIVAS=$(CIVAS) CIVVM=$(CIVVM) CIVCC=$(CIVCC) bash run.bash dist: $(DIST_TGT) $(DIST_TGT): $(DIST_FILES) tar -czvf $@ $^ include OCamlMakefile