Commit d0b2448b authored by Changpeng Liu's avatar Changpeng Liu Committed by Tomasz Zawadzki
Browse files

mk/libvfio-user: support --with-vfio-user=/usr/path



Users may not use SPDK libvfio-user submodule, so add a
library path for this case, users can still just use
'--with-vfio-user' without adding the path, for this case
a submodule default path will be used.

Change-Id: Ib0dd82ab6910056ff21b5b2d373c0d16916162c6
Signed-off-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6471


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarThanos Makatos <thanos.makatos@nutanix.com>
parent ae9f8035
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -122,6 +122,7 @@ CONFIG_VIRTIO=y

# Build custom vfio-user transport for NVMf target and NVMe initiator.
CONFIG_VFIO_USER=n
CONFIG_VFIO_USER_DIR=

# Build with PMDK backends
CONFIG_PMDK=n
+7 −1
Original line number Diff line number Diff line
@@ -59,7 +59,7 @@ function usage() {
	echo " virtio                    Build vhost initiator and virtio-pci bdev modules."
	echo "                           No path required."
	echo " vfio-user                 Build custom vfio-user transport for NVMf target and NVMe initiator."
	echo "                           No path required."
	echo "                           example: /usr/src/libvfio-user"
	echo " pmdk                      Build persistent memory bdev."
	echo "                           example: /usr/share/pmdk"
	echo " reduce                    Build vbdev compression module."
@@ -340,6 +340,12 @@ for i in "$@"; do
			;;
		--with-vfio-user)
			CONFIG[VFIO_USER]=y
			CONFIG[VFIO_USER_DIR]=""
			;;
		--with-vfio-user=*)
			CONFIG[VFIO_USER]=y
			check_dir "$i"
			CONFIG[VFIO_USER_DIR]=$(readlink -f ${i#*=})
			;;
		--without-vfio-user)
			CONFIG[VFIO_USER]=n
+5 −1
Original line number Diff line number Diff line
@@ -171,8 +171,12 @@ SYS_LIBS += -L$(ISAL_DIR)/.libs -lisal
COMMON_CFLAGS += -I$(ISAL_DIR)/..
endif

VFIO_USER_DIR=$(SPDK_ROOT_DIR)/libvfio-user
ifeq ($(CONFIG_VFIO_USER), y)
ifneq ($(CONFIG_VFIO_USER_DIR),)
VFIO_USER_DIR=$(CONFIG_VFIO_USER_DIR)
else
VFIO_USER_DIR=$(SPDK_ROOT_DIR)/libvfio-user
endif
ifeq ($(CONFIG_DEBUG), y)
VFIO_USER_BUILD_TYPE=dbg
else