Makefile 483 B

12345678910111213141516171819202122232425
  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. OCAMLYACC := menhir
  9. YFLAGS := --infer
  10. all: native-code
  11. parser.mly: parser.cpp.mly
  12. cpp -o $@ $<
  13. line=`grep -m 1 -n '%{' $@ | head -c -4`; \
  14. sed -i "1,$$(($$line - 1))d" $@
  15. clean:: myclean
  16. .PHONY: myclean
  17. myclean:
  18. rm -f a.out
  19. include OCamlMakefile