aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Norton <rmn30@cam.ac.uk>2019-05-20 11:42:41 +0100
committerRobert Norton <rmn30@cam.ac.uk>2019-05-20 11:42:41 +0100
commit38b73dd4ad25c8d3af4624519e1ba3a916508356 (patch)
treec6ef1b9e97021ce626051113708a318648a63498
parentd297b03a4aa9630f6548b553989d336e972faa50 (diff)
downloadsail-riscv-38b73dd4ad25c8d3af4624519e1ba3a916508356.zip
sail-riscv-38b73dd4ad25c8d3af4624519e1ba3a916508356.tar.gz
sail-riscv-38b73dd4ad25c8d3af4624519e1ba3a916508356.tar.bz2
Add opam file and make targets to build and install C emulator (32 and 64 bit).
-rw-r--r--Makefile15
-rw-r--r--opam33
2 files changed, 48 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 8935803..2486f68 100644
--- a/Makefile
+++ b/Makefile
@@ -323,6 +323,21 @@ generated_definitions/for-rmem/riscv.defs: $(SAIL_RMEM_SRCS)
#LOC_FILES:=$(SAIL_SRCS) main.sail
#include $(SAIL_DIR)/etc/loc.mk
+opam-build:
+ 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
+ mkdir -p $(INSTALL_DIR)/bin
+ cp c_emulator/riscv_sim_RV64 $(INSTALL_DIR)/bin
+ cp c_emulator/riscv_sim_RV32 $(INSTALL_DIR)/bin
+
+opam-uninstall:
+ if [ -z "$(INSTALL_DIR)" ]; then echo INSTALL_DIR is unset; false; fi
+ rm $(INSTALL_DIR)/bin/riscv_sim_RV64
+ rm $(INSTALL_DIR)/bin/riscv_sim_RV32
+
clean:
-rm -rf generated_definitions/ocaml/* generated_definitions/c/* generated_definitions/latex/*
-rm -rf generated_definitions/lem/* generated_definitions/isabelle/* generated_definitions/hol4/* generated_definitions/coq/*
diff --git a/opam b/opam
new file mode 100644
index 0000000..dc44622
--- /dev/null
+++ b/opam
@@ -0,0 +1,33 @@
+opam-version: "1.2"
+name: "sail-riscv"
+version: "0.1"
+maintainer: "Sail Devs <cl-sail-dev@lists.cam.ac.uk>"
+authors: [
+ "Alasdair Armstrong"
+ "Thomas Bauereiss"
+ "Brian Campbell"
+ "Shaked Flur"
+ "Jonathan French"
+ "Prashanth Mundkur"
+ "Robert Norton"
+ "Christopher Pulte"
+ "Peter Sewell"
+]
+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"
+]
+depends: [
+ "ocamlfind"
+ "ocamlbuild"
+ "sail" {>= "0.9"}
+ "linksem" {>= "0.3"}
+ "conf-gmp"
+ "conf-zlib"
+]
+available: [ocaml-version >= "4.06.1"]