From 858f411b1045710009f8f1261ab9a82908b03e98 Mon Sep 17 00:00:00 2001 From: Miguel Bernal Marin Date: Wed, 7 Mar 2018 22:21:59 -0600 Subject: [PATCH] makefile: install the demo scripts The demos scripts are not installed when "make install" is invoked. This patch adds a rule to copy them to /usr/share/acrn Signed-off-by: Miguel Bernal Marin --- Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 531aa2c84..0cbfee007 100644 --- a/Makefile +++ b/Makefile @@ -80,6 +80,8 @@ DISTCLEAN_OBJS := $(shell find $(BASEDIR) -name '*.o') PROGRAM := acrn-dm +SAMPLES := $(wildcard samples/*) + all: include/version.h $(PROGRAM) @echo -n "" @@ -117,5 +119,9 @@ $(DM_OBJDIR)/%.o: %.c $(HEADERS) [ ! -e $@ ] && mkdir -p $(dir $@); \ $(CC) $(CFLAGS) -c $< -o $@ -install: $(DM_OBJDIR)/$(PROGRAM) +install: $(DM_OBJDIR)/$(PROGRAM) install-samples install -D $(DM_OBJDIR)/$(PROGRAM) $(DESTDIR)/usr/bin/$(PROGRAM) + +install-samples: $(SAMPLES) + install -d $(DESTDIR)/usr/share/acrn/demo + install -t $(DESTDIR)/usr/share/acrn/demo $^