diff options
author | Robert Norton <rmn30@cam.ac.uk> | 2019-05-20 11:42:41 +0100 |
---|---|---|
committer | Robert Norton <rmn30@cam.ac.uk> | 2019-05-20 11:42:41 +0100 |
commit | 38b73dd4ad25c8d3af4624519e1ba3a916508356 (patch) | |
tree | c6ef1b9e97021ce626051113708a318648a63498 /Makefile | |
parent | d297b03a4aa9630f6548b553989d336e972faa50 (diff) | |
download | sail-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).
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -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/* |