RESULT := civicc GLOBALS := types globals stringify util PHASES := load parse print desug context typecheck dimreduce boolop extern \ constprop index assemble peephole output SOURCES := $(addsuffix .mli,$(GLOBALS)) $(addsuffix .ml,$(GLOBALS)) \ lexer.mll parser.mly \ $(patsubst %,phases/%.mli,$(PHASES)) $(patsubst %,phases/%.ml,$(PHASES)) \ main.ml PRE_TARGETS := types.ml $(addsuffix .cmi,$(GLOBALS)) LIBS := str unix # Set debugging flag to enable exception backtraces for OCAMLRUNPARAM=b 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 # The Types module needs an implementation to stop ocamlc from complaining types.ml: types.mli cp $< $@ 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 $@ $^ --exclude=types.ml include OCamlMakefile