Makefile 858 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. RESULT := civicc
  2. PHASES := load parse print desug constant_propagation context_analysis \
  3. expand_dims typecheck dim_reduce bool_op extern_vars assemble
  4. SOURCES := ast.ml stringify.mli stringify.ml util.mli util.ml lexer.mll \
  5. parser.mly $(patsubst %,phases/%.ml,$(PHASES)) main.ml
  6. PRE_TARGETS := ast.cmi ast.o stringify.cmi stringify.o util.cmi util.o
  7. LIBS := str unix
  8. OCAMLFLAGS := -g
  9. OCAMLYACC := menhir
  10. YFLAGS := --infer
  11. CIVAS := ../bin32/civas
  12. CIVVM := ../bin32/civvm
  13. CIVCC := ../civicc
  14. DIST_TGT := civicaml.tgz
  15. DIST_FILES := $(RESULT) $(SOURCES) Makefile OCamlMakefile README.md test
  16. .PHONY: myclean check dist
  17. all: native-code
  18. clean:: myclean
  19. myclean:
  20. rm -f a.out $(DIST_TGT)
  21. check:
  22. @cd test; CIVAS=$(CIVAS) CIVVM=$(CIVVM) CIVCC=$(CIVCC) bash run.bash
  23. dist: $(DIST_TGT)
  24. $(DIST_TGT): $(DIST_FILES)
  25. tar -czvf $@ $^
  26. include OCamlMakefile