forked from confidential-containers/trustee
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
41 lines (31 loc) · 794 Bytes
/
Makefile
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
PROJDIR := $(shell readlink -f ..)
TOP_DIR := .
CUR_DIR := $(shell pwd)
PREFIX := /usr/local
TARGET_DIR := ../target
BIN_NAMES := grpc-as restful-as
DEBUG ?=
DESTDIR ?= $(PREFIX)/bin
VERIFIER ?= all-verifier
RVPS_GRPC := true
ifeq ($(RVPS_GRPC), true)
RVPS_FEATURES := rvps-grpc
endif
ifdef DEBUG
release :=
TARGET_DIR := $(TARGET_DIR)/debug
else
release := --release
TARGET_DIR := $(TARGET_DIR)/release
endif
build: grpc-as restful-as
grpc-as:
cargo build --bin grpc-as $(release) --features grpc-bin,$(VERIFIER),$(RVPS_FEATURES)
restful-as:
cargo build --bin restful-as $(release) --features restful-bin,$(VERIFIER),$(RVPS_FEATURES)
install:
for bin_name in $(BIN_NAMES); do \
install -D -m0755 $(TARGET_DIR)/$$bin_name $(DESTDIR); \
done
clean:
cargo clean