From db6bb5a2f94785ebc849813bceb2185122388eae Mon Sep 17 00:00:00 2001 From: Robert Norton Date: Thu, 11 Feb 2016 13:25:06 +0000 Subject: use paths relative to current makefile for lem and linksem. --- src/Makefile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src') 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 -- cgit v1.2.3