blob: 372b499a0f3575d8118651609ae0c0a8028c55d8 (
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 FreeBSD,$(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
|