amitsp21

Untitled

Dec 19th, 2018
283
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Make 1.14 KB | None | 0 0
  1. # "make test" Compiles everything and runs the regression tests
  2.  
  3. .PHONY : test
  4. test : all testall.sh
  5.     ./testall.sh
  6.  
  7. # "make all" builds the executable as well as the "printbig" library designed
  8. # to test linking external code
  9.  
  10. .PHONY : all
  11. all : ap_plusplus.native
  12.  
  13. # "make ap_plusplus.native" compiles the compiler
  14. #
  15. # The _tags file controls the operation of ocamlbuild, e.g., by including
  16. # packages, enabling warnings
  17. #
  18. # See https://github.com/ocaml/ocamlbuild/blob/master/manual/manual.adoc
  19.  
  20. ap_plusplus.native :
  21.     opam config exec -- \
  22.     ocamlbuild -use-ocamlfind ap_plusplus.native
  23.  
  24. # "make clean" removes all generated files
  25.  
  26. .PHONY : clean
  27. clean :
  28.     ocamlbuild -clean
  29.     rm -rf testall.log ocamlllvm *.diff
  30.  
  31. printbig : printbig.c
  32.     cc -o printbig -DBUILD_TEST printbig.c
  33.  
  34. # Building the tarball
  35.  
  36. TESTS = \
  37.   helloworld
  38.  
  39. TESTFILES = $(TESTS:%=test-%.mc) $(TESTS:%=test-%.out)
  40.  
  41. TARFILES = scanner.mll parser.mly ast.ml sast.ml semant.ml codegen.ml Makefile ap_plusplus.ml testall.sh \
  42.     _tags \
  43.     printbig.c \
  44.     $(TESTFILES:%=tests/%)
  45.  
  46. ap++.tar.gz : $(TARFILES)
  47.     cd .. && tar czf ap++/ap++.tar.gz \
  48.         $(TARFILES:%=ap++/%)
Add Comment
Please, Sign In to add comment