From 57d6a933f6b7054085c80d2d0e3d437005b80073 Mon Sep 17 00:00:00 2001 From: "Yan, Like" Date: Wed, 13 Jun 2018 15:54:22 +0800 Subject: [PATCH] tools: correct several Makefile problems 1. mkdir ./tools/build if it does not exist; 2. correct static lib path for acrn-manager; 3. do not remove acrnlog.service if build under source code dir by default. Reviewed-by: Geoffroy VanCutsem Signed-off-by: Yan, Like --- tools/Makefile | 2 +- tools/acrn-manager/Makefile | 2 +- tools/acrnlog/Makefile | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/Makefile b/tools/Makefile index 60da86655..94bbf7096 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -1,5 +1,5 @@ T := $(CURDIR) -OUT_DIR ?= $(T)/build +OUT_DIR ?= $(shell mkdir -p $(T)/build;cd $(T)/build;pwd) .PHONY: all acrn-crashlog acrnlog acrn-manager acrntrace acrnbridge all: acrn-crashlog acrnlog acrn-manager acrntrace acrnbridge diff --git a/tools/acrn-manager/Makefile b/tools/acrn-manager/Makefile index 3de3ac26e..821f9bac2 100644 --- a/tools/acrn-manager/Makefile +++ b/tools/acrn-manager/Makefile @@ -7,7 +7,7 @@ ifeq ($(RELEASE),0) CFLAGS += -g -DMNGR_DEBUG endif -LDFLAGS := -L$(TOOLS_OUT) +LDFLAGS := -L$(OUT_DIR) LDFLAGS += -lacrn-mngr LDFLAGS += -lpthread diff --git a/tools/acrnlog/Makefile b/tools/acrnlog/Makefile index dcc7b612e..ee47cc189 100644 --- a/tools/acrnlog/Makefile +++ b/tools/acrnlog/Makefile @@ -7,7 +7,9 @@ all: clean: rm -f $(OUT_DIR)/acrnlog +ifneq ($(OUT_DIR),.) rm -f $(OUT_DIR)/acrnlog.service +endif install: $(OUT_DIR)/acrnlog install -d $(DESTDIR)/usr/bin