summaryrefslogtreecommitdiffstats
path: root/store/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'store/Makefile')
-rw-r--r--store/Makefile24
1 files changed, 24 insertions, 0 deletions
diff --git a/store/Makefile b/store/Makefile
new file mode 100644
index 00000000..2b907289
--- /dev/null
+++ b/store/Makefile
@@ -0,0 +1,24 @@
+# Configuration.
+CARGO_TARGET_DIR ?= $(shell pwd)/../target
+# We currently only support absolute paths.
+CARGO_TARGET_DIR := $(abspath $(CARGO_TARGET_DIR))
+
+# Tools.
+CARGO ?= cargo
+ifeq ($(shell uname -s), Darwin)
+ INSTALL ?= ginstall
+else
+ INSTALL ?= install
+endif
+
+# Installation.
+.PHONY: build-release
+build-release:
+ CARGO_TARGET_DIR=$(CARGO_TARGET_DIR) \
+ $(CARGO) build $(CARGO_FLAGS) --release --package sequoia-store
+
+.PHONY: install
+install: build-release
+ $(INSTALL) -d $(DESTDIR)$(PREFIX)/lib/sequoia
+ $(INSTALL) -t $(DESTDIR)$(PREFIX)/lib/sequoia \
+ $(CARGO_TARGET_DIR)/release/sequoia-public-key-store