app/spdk_tgt: add 'make install' rule

Change-Id: Ib76031972824231ed824e53a327c7d648842ad6a
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/403224
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This commit is contained in:
Daniel Verkamp 2018-03-08 15:29:44 -07:00 committed by Jim Harris
parent 5175ce96cd
commit 245e2e9855
2 changed files with 10 additions and 0 deletions

View File

@ -62,4 +62,7 @@ $(APP): $(OBJS) $(SPDK_LIB_FILES) $(SPDK_WHOLE_LIBS) $(BLOCKDEV_MODULES_FILES) $
clean:
$(CLEAN_C) $(APP)
install: $(APP)
$(INSTALL_APP)
include $(SPDK_ROOT_DIR)/mk/spdk.deps.mk

View File

@ -48,6 +48,7 @@ ifneq ($(prefix),)
CONFIG_PREFIX=$(prefix)
endif
bindir?=$(CONFIG_PREFIX)/bin
libdir?=$(CONFIG_PREFIX)/lib
includedir?=$(CONFIG_PREFIX)/include
@ -206,6 +207,12 @@ INSTALL_LIB=\
install -d -m 755 "$(DESTDIR)$(libdir)"; \
install -m 644 "$(LIB)" "$(DESTDIR)$(libdir)/"
# Install an app binary
INSTALL_APP=\
$(Q)echo " INSTALL $(DESTDIR)$(bindir)/$(APP)"; \
install -d -m 755 "$(DESTDIR)$(bindir)"; \
install -m 755 "$(APP)" "$(DESTDIR)$(bindir)/"
# Install a header
INSTALL_HEADER=\
$(Q)echo " INSTALL $@"; \