Makefile 519 B

12345678910111213141516171819202122232425262728
  1. RESULT := civicc
  2. SOURCES := ast.ml lexer.mll parser.mly util.mli util.ml stringify.mli \
  3. stringify.ml \
  4. phases/parse.ml phases/print.ml phases/desug.ml \
  5. phases/context_analysis.ml phases/test.ml \
  6. main.ml
  7. PRE_TARGETS := ast.cmi
  8. LIBS := str
  9. OCAMLFLAGS := -g
  10. OCAMLYACC := menhir
  11. YFLAGS := --infer
  12. all: native-code
  13. parser.mly: parser.cpp.mly
  14. cpp -o $@ $<
  15. line=`grep -m 1 -n '%{' $@ | head -c -4`; \
  16. sed -i "1,$$(($$line - 1))d" $@
  17. clean:: myclean
  18. .PHONY: myclean
  19. myclean:
  20. rm -f a.out
  21. include OCamlMakefile