diff options
author | Robert Norton <rmn30@cam.ac.uk> | 2019-05-24 11:18:51 +0100 |
---|---|---|
committer | Robert Norton <rmn30@cam.ac.uk> | 2019-05-24 12:55:18 +0100 |
commit | f70de87e8444b8783446768ba2b6669c858bf50f (patch) | |
tree | 39ab8fac933cc76761c2a00014fba814a3dd8395 | |
parent | 8f2883bc2c1674fd0cf9b1097bca333fad2448b5 (diff) | |
download | sail-riscv-f70de87e8444b8783446768ba2b6669c858bf50f.zip sail-riscv-f70de87e8444b8783446768ba2b6669c858bf50f.tar.gz sail-riscv-f70de87e8444b8783446768ba2b6669c858bf50f.tar.bz2 |
Attempt to fix opam build with opam2: use a .install file and don't rely on opam being in path to get SAIL_DIR (which seems to be unreliable).
-rw-r--r-- | Makefile | 6 | ||||
-rw-r--r-- | descr | 2 | ||||
-rw-r--r-- | opam | 7 | ||||
-rw-r--r-- | sail-riscv.install | 1 |
4 files changed, 7 insertions, 9 deletions
@@ -77,7 +77,7 @@ SAIL:=$(SAIL_DIR)/sail export SAIL_DIR else # Use sail from opam package -SAIL_DIR=$(shell opam config var sail:share) +SAIL_DIR:=$(shell opam config var sail:share) SAIL:=sail endif SAIL_LIB_DIR:=$(SAIL_DIR)/lib @@ -328,8 +328,8 @@ generated_definitions/for-rmem/riscv.defs: $(SAIL_RMEM_SRCS) #include $(SAIL_DIR)/etc/loc.mk opam-build: - make ARCH=64 c_emulator/riscv_sim_RV64 - make ARCH=32 c_emulator/riscv_sim_RV32 + $(MAKE) ARCH=64 c_emulator/riscv_sim_RV64 + $(MAKE) ARCH=32 c_emulator/riscv_sim_RV32 opam-install: if [ -z "$(INSTALL_DIR)" ]; then echo INSTALL_DIR is unset; false; fi @@ -1 +1 @@ -This package installs a RISC-V emulator (32 and 64 bits) built form the Sail model at https://github.com/rems-project/sail-riscv .
\ No newline at end of file +This package installs a RISC-V emulator (32 and 64 bits) built form the Sail model at https://github.com/rems-project/sail-riscv @@ -17,14 +17,11 @@ homepage: "https://github.com/rems-project/sail-riscv/" bug-reports: "https://github.com/rems-project/sail-riscv/issues" license: "BSD3" dev-repo: "https://github.com/rems-project/sail-riscv.git" -build: [make "INSTALL_DIR=%{prefix}%" "opam-build"] -install: [make "INSTALL_DIR=%{prefix}%" "opam-install"] -remove: [ - make "INSTALL_DIR=%{prefix}%" "opam-uninstall" -] +build: [make "LEM_DIR=%{lem:share}%" "SAIL_DIR=%{sail:share}%" "SAIL=sail" "opam-build"] depends: [ "ocamlfind" "ocamlbuild" + "lem" "sail" {>= "0.9"} "linksem" {>= "0.3"} "conf-gmp" diff --git a/sail-riscv.install b/sail-riscv.install new file mode 100644 index 0000000..63d985a --- /dev/null +++ b/sail-riscv.install @@ -0,0 +1 @@ +bin: ["c_emulator/riscv_sim_RV32" "c_emulator/riscv_sim_RV64"] |