Makefile 501 B

123456789101112131415161718192021222324252627
  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 phases/context_analysis.ml \
  5. main.ml
  6. PRE_TARGETS := ast.cmi
  7. LIBS := str
  8. OCAMLFLAGS := -g
  9. OCAMLYACC := menhir
  10. YFLAGS := --infer
  11. all: native-code
  12. parser.mly: parser.cpp.mly
  13. cpp -o $@ $<
  14. line=`grep -m 1 -n '%{' $@ | head -c -4`; \
  15. sed -i "1,$$(($$line - 1))d" $@
  16. clean:: myclean
  17. .PHONY: myclean
  18. myclean:
  19. rm -f a.out
  20. include OCamlMakefile