From ace25dd3db97284502e890181ddecf227f0ac116 Mon Sep 17 00:00:00 2001 From: Miguel Bernal Marin Date: Wed, 16 May 2018 14:21:45 -0500 Subject: [PATCH] Makefile: implement make install The make install target was missing. This commits adds the intall target which uses the install target from subprojects. Also a make install target was created in each tool program. Signed-off-by: Miguel Bernal Marin --- Makefile | 12 ++++++++++++ tools/acrn-manager/Makefile | 6 +++++- tools/acrnlog/Makefile | 6 +++++- tools/acrntrace/Makefile | 6 +++++- 4 files changed, 27 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index c4f1cfb92..03602e39e 100644 --- a/Makefile +++ b/Makefile @@ -30,5 +30,17 @@ tools: clean: rm -rf $(ROOT_OUT) +.PHONY: install +install: hypervisor-install devicemodel-install tools-intall +hypervisor-install: + make -C $(T)/hypervisor HV_OBJDIR=$(HV_OUT) PLATFORM=$(PLAT) RELEASE=$(RELEASE) install + +devicemodel-install: + make -C $(T)/devicemodel DM_OBJDIR=$(DM_OUT) install + +tools-intall: + make -C $(T)/tools/acrnlog OUT_DIR=$(TOOLS_OUT) install + make -C $(T)/tools/acrn-manager OUT_DIR=$(TOOLS_OUT) install + make -C $(T)/tools/acrntrace OUT_DIR=$(TOOLS_OUT) install diff --git a/tools/acrn-manager/Makefile b/tools/acrn-manager/Makefile index 53f8bcaef..c5fe3adb1 100644 --- a/tools/acrn-manager/Makefile +++ b/tools/acrn-manager/Makefile @@ -5,4 +5,8 @@ all: acrnctl.c gcc -o $(OUT_DIR)/acrnctl acrnctl.c -I../../devicemodel/include -Wall -g clean: - rm -f acrnctl + rm -f $(OUT_DIR)/acrnctl + +install: $(OUT_DIR)/acrnctl + install -d $(DESTDIR)/usr/bin + install -t $(DESTDIR)/usr/bin $(OUT_DIR)/acrnctl diff --git a/tools/acrnlog/Makefile b/tools/acrnlog/Makefile index ea5bf09d2..ef088c76a 100644 --- a/tools/acrnlog/Makefile +++ b/tools/acrnlog/Makefile @@ -5,4 +5,8 @@ all: gcc -g acrnlog.c -o $(OUT_DIR)/acrnlog -lpthread clean: - rm acrnlog + rm $(OUT_DIR)/acrnlog + +install: $(OUT_DIR)/acrnlog + install -d $(DESTDIR)/usr/bin + install -t $(DESTDIR)/usr/bin $(OUT_DIR)/acrnlog diff --git a/tools/acrntrace/Makefile b/tools/acrntrace/Makefile index e62ec2e31..1c02cd4f9 100644 --- a/tools/acrntrace/Makefile +++ b/tools/acrntrace/Makefile @@ -5,4 +5,8 @@ all: gcc -o $(OUT_DIR)/acrntrace acrntrace.c sbuf.c -I. -lpthread clean: - rm acrntrace + rm $(OUT_DIR)/acrntrace + +install: $(OUT_DIR)/acrntrace + install -d $(DESTDIR)/usr/bin + install -t $(DESTDIR)/usr/bin $(OUT_DIR)/acrntrace