diff options
| author | Robert Norton | 2018-05-23 16:15:07 +0100 |
|---|---|---|
| committer | Robert Norton | 2018-05-23 16:15:07 +0100 |
| commit | 28256ae0215b4fd1fefebf24f6b5dd3516fa8fcf (patch) | |
| tree | cf19ffc135b86fc7e4228111c877e38e0973e236 /riscv/Makefile | |
| parent | 0c583ea8feec9bc2aed441a976449974ff9350cc (diff) | |
Fix riscv build for older versions of ocamlbuild (e.g. 4.02.3) by copying platform ocaml files into _sbuild directory generated by sail and then running ocamlbuild there.
Diffstat (limited to 'riscv/Makefile')
| -rw-r--r-- | riscv/Makefile | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/riscv/Makefile b/riscv/Makefile index 4bdbb71a..8d9c3d6d 100644 --- a/riscv/Makefile +++ b/riscv/Makefile @@ -1,20 +1,22 @@ SAIL_SRCS = prelude.sail riscv_types.sail riscv_sys.sail riscv_platform.sail riscv_mem.sail riscv_vmem.sail riscv.sail riscv_step.sail +PLATFORM_OCAML_SRCS = platform.ml platform_impl.ml platform_main.ml SAIL_DIR ?= $(realpath ..) export SAIL_DIR -all: riscv.ml platform Riscv.thy +all: platform Riscv.thy check: $(SAIL_SRCS) main.sail Makefile $(SAIL_DIR)/sail $(SAIL_SRCS) main.sail -riscv.ml: $(SAIL_SRCS) Makefile main.sail +_sbuild/riscv.ml: $(SAIL_SRCS) Makefile main.sail $(SAIL_DIR)/sail -ocaml -ocaml-nobuild -o riscv $(SAIL_SRCS) -platform_main.native: riscv.ml platform.ml platform_main.ml Makefile _tags - ocamlbuild -use-ocamlfind $@ +_sbuild/platform_main.native: _sbuild/riscv.ml _tags $(PLATFORM_OCAML_SRCS) Makefile + cp _tags $(PLATFORM_OCAML_SRCS) _sbuild + cd _sbuild && ocamlbuild -use-ocamlfind platform_main.native -platform: platform_main.native +platform: _sbuild/platform_main.native rm -f $@ && ln -s $^ $@ riscv_duopod_ocaml: prelude.sail riscv_duopod.sail |
