summaryrefslogtreecommitdiff
path: root/src/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'src/Makefile')
-rw-r--r--src/Makefile13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/Makefile b/src/Makefile
index b67d9f5e..1e9ca694 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -17,9 +17,12 @@ test: sail interpreter
ocamlbuild test/run_tests.native
./run_tests.native
-LEM = ~/bitbucket/lem/lem
-LEMLIBOCAML = ~/bitbucket/lem/ocaml-lib/
-ELFDIR= ~/bitbucket/linksem
+THIS_MAKEFILE := $(realpath $(lastword $(MAKEFILE_LIST)))
+BITBUCKET_ROOT=$(realpath $(dir $(THIS_MAKEFILE))../..)
+
+LEM = $(BITBUCKET_ROOT)/lem/lem
+LEMLIBOCAML = $(BITBUCKET_ROOT)/lem/ocaml-lib
+ELFDIR= $(BITBUCKET_ROOT)/linksem
elf:
make -C $(ELFDIR)
@@ -45,9 +48,7 @@ _build/mips.lem: _build/mips.sail ./sail.native
$(LEM) -only_changed_output -ocaml -lib lem_interp/ $<
run_mips.native: _build/mips.ml _build/mips_extras.ml _build/run_with_elf.ml interpreter
- env OCAMLRUNPARAM=l=100M ocamlfind ocamlopt -g -package zarith -package num -package uint -I $(LEMLIBOCAML) -I _build/lem_interp/ -I $(ELFDIR)/src -I $(ELFDIR)/src/adaptors -I $(ELFDIR)/src/abis/mips64 -I _build -linkpkg $(LEMLIBOCAML)extract.cmxa $(ELFDIR)/src/linksem.cmxa _build/pprint/src/PPrintLib.cmxa _build/lem_interp/extract.cmxa _build/mips.ml _build/mips_extras.ml _build/run_with_elf.ml -o run_mips.native
-
-#-package batteries
+ env OCAMLRUNPARAM=l=100M ocamlfind ocamlopt -g -package num -package str -package unix -I $(ELFDIR)/contrib/ocaml-uint/_build/lib -I $(LEMLIBOCAML) -I $(LEMLIBOCAML)/dependencies/zarith -I _build/lem_interp/ -I $(ELFDIR)/src -I $(ELFDIR)/src/adaptors -I $(ELFDIR)/src/abis/mips64 -I _build -linkpkg $(LEMLIBOCAML)/dependencies/zarith/zarith.cmxa $(LEMLIBOCAML)/extract.cmxa $(ELFDIR)/contrib/ocaml-uint/_build/lib/uint.cmxa $(ELFDIR)/src/linksem.cmxa _build/pprint/src/PPrintLib.cmxa _build/lem_interp/extract.cmxa _build/mips.ml _build/mips_extras.ml _build/run_with_elf.ml -o run_mips.native
mips: elf run_mips.native