]> matita.cs.unibo.it Git - pkg-cerco/acc-trusted.git/commitdiff
Imported Upstream version 0.1 upstream/0.1
authorEnrico Tassi <gares@fettunta.org>
Thu, 4 Apr 2013 10:05:27 +0000 (12:05 +0200)
committerEnrico Tassi <gares@fettunta.org>
Thu, 4 Apr 2013 10:05:27 +0000 (12:05 +0200)
Makefile [new file with mode: 0755]
build [deleted file]
extracted/Makefile [new file with mode: 0755]
extracted/build [deleted file]

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
diff --git a/build b/build
deleted file mode 100755 (executable)
index 75fe30a..0000000
--- a/build
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/sh
-
-# A crappy build script that needs to be replaced by some proper structure.
-
-OCAMLC="ocamlc -I cparser"
-
-make -C cparser
-(cd extracted; ./build)
-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 extracted.cmo cparser/cparser.cma clightFromC.cmo clightParser.cmo IntelHex.cmo clightPrinter.cmo rTLabsPrinter.cmo ASMPrinter.cmo printer.cmo error.cmo optionsParsing.cmo options.cmo acc.cmo -o acc
diff --git a/extracted/Makefile b/extracted/Makefile
new file mode 100755 (executable)
index 0000000..3673895
--- /dev/null
@@ -0,0 +1,15 @@
+byte: pre
+       ocamlbuild -Is untrusted -tag debug extracted.cmo
+
+opt: pre
+       ocamlbuild -Is untrusted -tag debug extracted.cmx
+pre:
+       # The untrusted ones replace the extracted ones
+       rm -f set_adt.ml set_adt.mli
+       # Uses a GNU sed extension
+       for i in `ls *.ml untrusted/*.ml`; do basename $$i | sed -e 's/\(.\)\(.*\)\.ml/\U\1\E\2/'; done > extracted.mlpack
+       for i in `ls *.ml untrusted/*.ml`; do echo "<"$${i%%.ml}".cmx>: for-pack(Extracted)"; done > _tags
+
+
+clean:
+       ocamlbuild -clean
diff --git a/extracted/build b/extracted/build
deleted file mode 100755 (executable)
index 228201f..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-# The untrusted ones replace the extracted ones
-rm -f set_adt.ml set_adt.mli
-# Uses a GNU sed extension
-for i in `ls *.ml untrusted/*.ml`; do basename $i | sed -e 's/\(.\)\(.*\)\.ml/\U\1\E\2/'; done > extracted.mlpack
-for i in `ls *.ml untrusted/*.ml`; do echo "<"${i%%.ml}".cmx>: for-pack(Extracted)"; done > _tags
-ocamlbuild -Is untrusted -tag debug extracted.cmo extracted.cmx