| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- RESULT := civicc
- GLOBALS := types globals stringify util
- PHASES := load parse print desug context typecheck extern dimreduce boolop \
- constprop index assemble peephole output
- SOURCES := $(addsuffix .mli,$(GLOBALS)) $(addsuffix .ml,$(GLOBALS)) \
- lexer.mll parser.mly main.mli \
- $(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 bin32
- .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
|