Makefile 898 B

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