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