From 1862cb9dc98b1bcb570cf7b5ebe7324ff945fb41 Mon Sep 17 00:00:00 2001 From: Xynnn007 Date: Fri, 3 Nov 2023 17:10:30 +0800 Subject: [PATCH] Makefile: fix build target directory Signed-off-by: Xynnn007 --- attestation-service/Makefile | 2 +- kbs/Makefile | 22 +++++++++++----------- kbs/test/Makefile | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/attestation-service/Makefile b/attestation-service/Makefile index 0242b937e5..56d50989d0 100644 --- a/attestation-service/Makefile +++ b/attestation-service/Makefile @@ -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 ?= diff --git a/kbs/Makefile b/kbs/Makefile index ed4a0fd93a..685c9d7c3c 100644 --- a/kbs/Makefile +++ b/kbs/Makefile @@ -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 diff --git a/kbs/test/Makefile b/kbs/test/Makefile index 98ed37dc87..a6a925e419 100644 --- a/kbs/test/Makefile +++ b/kbs/test/Makefile @@ -4,7 +4,7 @@ SGX_REPO_URL := https://download.01.org/intel-sgx/sgx_repo/ubuntu KBS_REPO_PATH := ./data/repository KBS_CONFIG_PATH := ./data/e2e MAKEFILE_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST)))) -PROJECT_DIR := $(MAKEFILE_DIR)/.. +PROJECT_DIR := $(MAKEFILE_DIR)/../.. BOLD := $(shell tput bold) SGR0 := $(shell tput sgr0)