summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Makefile11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/Makefile b/src/Makefile
index 1abb6d00..4b1f116b 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,7 +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 batteries -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
+ env OCAMLRUNPARAM=l=100M ocamlfind ocamlopt -g -package zarith -package num -package batteries -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
mips: elf run_mips.native