blob: c9827d568b85c77633095cafec2609fbee0c6e7e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# Configuration.
CARGO_TARGET_DIR ?= $(shell pwd)/../target
# We currently only support absolute paths.
CARGO_TARGET_DIR := $(abspath $(CARGO_TARGET_DIR))
SOP ?= $(CARGO_TARGET_DIR)/debug/sqop
# Tools.
CARGO ?= cargo
ifneq ($(filter Darwin %BSD,$(shell uname -s)),)
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-sop
.PHONY: install
install: build-release
$(INSTALL) -d $(DESTDIR)$(PREFIX)/bin
$(INSTALL) -t $(DESTDIR)$(PREFIX)/bin $(CARGO_TARGET_DIR)/release/sqop
|