]> matita.cs.unibo.it Git - pkg-cerco/acc-trusted.git/blobdiff - Makefile
Merge tag 'upstream/0.1'
[pkg-cerco/acc-trusted.git] / Makefile
diff --git a/Makefile b/Makefile
new file mode 100755 (executable)
index 0000000..cbe432e
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,33 @@
+OCAMLC=ocamlc -I cparser
+OCAMLOPT=ocamlopt -I cparser
+
+CMOS=extracted.cmo clightFromC.cmo clightParser.cmo IntelHex.cmo clightPrinter.cmo rTLabsPrinter.cmo ASMPrinter.cmo printer.cmo error.cmo optionsParsing.cmo options.cmo acc.cmo
+
+CMXS=$(CMOS:.cmo=.cmx)
+
+byte:
+       make -C cparser cparser.cma
+       make -C extracted byte
+       cp extracted/_build/extracted.cm[io] .
+       ${OCAMLC} -c -g *.mli
+       ${OCAMLC} -c -g error.ml
+       ${OCAMLC} -c -g optionsParsing.ml
+       ${OCAMLC} -c -g options.ml
+       ${OCAMLC} -c -g *.ml
+       ${OCAMLC} -custom -g cparser/cparser.cma ${CMOS} -o acc
+
+opt:
+       make -C cparser cparser.cmxa
+       make -C extracted opt
+       cp extracted/_build/extracted.cm[ix] extracted/_build/extracted.o .
+       ${OCAMLOPT} -c -g *.mli
+       ${OCAMLOPT} -c -g error.ml
+       ${OCAMLOPT} -c -g optionsParsing.ml
+       ${OCAMLOPT} -c -g options.ml
+       ${OCAMLOPT} -c -g *.ml
+       ${OCAMLOPT} -g cparser/cparser.cmxa ${CMXS} -o acc.opt
+
+clean:
+       make -C cparser clean
+       make -C extracted clean
+       rm -f *.cmi *.cmo *.cmx acc