Skip to content

Commit

Permalink
Makefile: implement make install
Browse files Browse the repository at this point in the history
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 <miguel.bernal.marin@linux.intel.com>
  • Loading branch information
miguelinux authored and lijinxia committed May 17, 2018
1 parent f7a93d8 commit ace25dd
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 3 deletions.
12 changes: 12 additions & 0 deletions Makefile
Expand Up @@ -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

6 changes: 5 additions & 1 deletion tools/acrn-manager/Makefile
Expand Up @@ -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
6 changes: 5 additions & 1 deletion tools/acrnlog/Makefile
Expand Up @@ -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
6 changes: 5 additions & 1 deletion tools/acrntrace/Makefile
Expand Up @@ -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

0 comments on commit ace25dd

Please sign in to comment.