Skip to content

Commit

Permalink
Makefile: fix build target directory
Browse files Browse the repository at this point in the history
Signed-off-by: Xynnn007 <[email protected]>
  • Loading branch information
Xynnn007 committed Nov 10, 2023
1 parent ec0b649 commit 385b38b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion attestation-service/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ PROJDIR := $(shell readlink -f ..)
TOP_DIR := .
CUR_DIR := $(shell pwd)
PREFIX := /usr/local
TARGET_DIR := target
TARGET_DIR := ../target
BIN_NAMES := grpc-as

DEBUG ?=
Expand Down
22 changes: 11 additions & 11 deletions kbs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,29 @@ build: background-check-kbs

.PHONY: background-check-kbs
background-check-kbs:
cargo build --locked --release --no-default-features --features $(AS_FEATURE),resource,$(HTTPS_CRYPTO),$(POLICY_ENGINE)
cargo build -p kbs --locked --release --no-default-features --features $(AS_FEATURE),resource,$(HTTPS_CRYPTO),$(POLICY_ENGINE)

.PHONY: passport-issuer-kbs
passport-issuer-kbs:
cargo build --locked --release --no-default-features --features $(AS_FEATURE),$(HTTPS_CRYPTO)
mv target/release/kbs target/release/issuer-kbs
cargo build -p kbs --locked --release --no-default-features --features $(AS_FEATURE),$(HTTPS_CRYPTO)
mv ../target/release/kbs ../target/release/issuer-kbs

.PHONY: passport-resource-kbs
passport-resource-kbs:
cargo build --locked --release --no-default-features --features $(HTTPS_CRYPTO),resource,$(POLICY_ENGINE)
mv target/release/kbs target/release/resource-kbs
cargo build -p kbs --locked --release --no-default-features --features $(HTTPS_CRYPTO),resource,$(POLICY_ENGINE)
mv ../target/release/kbs ../target/release/resource-kbs

install-kbs:
install -D -m0755 target/release/kbs $(INSTALL_DESTDIR)
install -D -m0755 target/release/kbs-client $(INSTALL_DESTDIR)
install -D -m0755 ../target/release/kbs $(INSTALL_DESTDIR)
install -D -m0755 ../target/release/kbs-client $(INSTALL_DESTDIR)

install-issuer-kbs:
install -D -m0755 target/release/issuer-kbs $(INSTALL_DESTDIR)
install -D -m0755 target/release/kbs-client $(INSTALL_DESTDIR)
install -D -m0755 ../target/release/issuer-kbs $(INSTALL_DESTDIR)
install -D -m0755 ../target/release/kbs-client $(INSTALL_DESTDIR)

install-resource-kbs:
install -D -m0755 target/release/resource-kbs $(INSTALL_DESTDIR)
install -D -m0755 target/release/kbs-client $(INSTALL_DESTDIR)
install -D -m0755 ../target/release/resource-kbs $(INSTALL_DESTDIR)
install -D -m0755 ../target/release/kbs-client $(INSTALL_DESTDIR)

uninstall:
rm -rf $(INSTALL_DESTDIR)/kbs $(INSTALL_DESTDIR)/kbs-client $(INSTALL_DESTDIR)/issuer-kbs $(INSTALL_DESTDIR)/resource-kbs
Expand Down
6 changes: 3 additions & 3 deletions kbs/test/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,18 @@ install-dependencies:
kbs:
cd $(PROJECT_DIR) && \
make background-check-kbs POLICY_ENGINE=opa && \
install -D --compare $(PROJECT_DIR)/target/release/kbs $(CURDIR)/kbs
install -D --compare $(PROJECT_DIR)/../target/release/kbs $(CURDIR)/kbs

resource-kbs:
cd $(PROJECT_DIR) && \
make passport-resource-kbs POLICY_ENGINE=opa && \
install -D --compare $(PROJECT_DIR)/target/release/resource-kbs $(CURDIR)/resource-kbs
install -D --compare $(PROJECT_DIR)/../target/release/resource-kbs $(CURDIR)/resource-kbs

client:
cd $(PROJECT_DIR) && \
cargo build -p kbs-client --release \
--features api-server/coco-as-builtin,api-server/rustls && \
install -D --compare $(PROJECT_DIR)/target/release/kbs-client $(CURDIR)/client
install -D --compare $(PROJECT_DIR)/../target/release/kbs-client $(CURDIR)/client

.PHONY: bins
bins: kbs resource-kbs client
Expand Down

0 comments on commit 385b38b

Please sign in to comment.