summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorRobert Norton2018-04-26 11:14:11 +0100
committerRobert Norton2018-04-26 11:49:57 +0100
commit1bd54ce4c7d85b150f2200abeed0dff67087837c (patch)
tree9b2a1d727e98317deb2226c5bdb9f0a5fe4f1eb7 /Makefile
parente18d8f85058f50043e600c4a0c32937a24777438 (diff)
Opam packaging: add install and uninstall targets and code to find various files in installed location.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile15
1 files changed, 15 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index fe7206f7..a343e257 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,7 @@
.PHONY: all sail language clean archs isabelle-lib apply_header
+INSTALL_DIR ?= .
+
all: sail
sail:
@@ -10,6 +12,19 @@ isail:
$(MAKE) -C src isail
ln -f -s src/isail.native sail
+install:
+ mkdir -p $(INSTALL_DIR)/bin
+ cp src/isail.native $(INSTALL_DIR)/bin/sail
+ mkdir -p $(INSTALL_DIR)/share/sail
+ cp -r lib $(INSTALL_DIR)/share/sail
+ mkdir -p $(INSTALL_DIR)/share/sail/src
+ cp src/elf_loader.ml $(INSTALL_DIR)/share/sail/src
+ cp src/sail_lib.ml $(INSTALL_DIR)/share/sail/src
+
+uninstall:
+ rm -f $(INSTALL_DIR)/bin/sail
+ rm -rf $(INSTALL_DIR)/share/sail
+
language:
$(MAKE) -C language