make: add dependencies for the rte_vhost build.

The dependencies between vhost and rte_vhost were not added during
earlier changes. This change moves the rte_vhost directory up to the
level of the other libraries and adds the proper dependencies for when
it is linked.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467700 (master)

(cherry picked from commit 28099e0ed9)
Change-Id: I089de1cd945062b64975a0011887700c0e38bb0f
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467947
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Seth Howell 2019-09-06 09:34:34 -07:00 committed by Ben Walker
parent 84584d081f
commit 092a64abce
14 changed files with 12 additions and 8 deletions

View File

@ -49,6 +49,7 @@ endif
DIRS-$(CONFIG_VHOST) += vhost
DIRS-$(CONFIG_VIRTIO) += virtio
DIRS-$(CONFIG_REDUCE) += reduce
DIRS-$(CONFIG_VHOST_INTERNAL_LIB) += rte_vhost
# If CONFIG_ENV is pointing at a directory in lib, build it.
# Out-of-tree env implementations must be built separately by the user.

View File

@ -31,7 +31,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
SPDK_ROOT_DIR := $(abspath $(CURDIR)/../../..)
SPDK_ROOT_DIR := $(abspath $(CURDIR)/../..)
include $(SPDK_ROOT_DIR)/mk/spdk.common.mk
CFLAGS += -I.

View File

@ -41,8 +41,7 @@ C_SRCS = vhost.c vhost_rpc.c vhost_scsi.c vhost_blk.c rte_vhost_compat.c
ifeq ($(CONFIG_VHOST_INTERNAL_LIB),y)
C_SRCS += vhost_nvme.c
DIRS-y += rte_vhost
CFLAGS := -Irte_vhost $(CFLAGS)
CFLAGS := -I../rte_vhost $(CFLAGS)
endif
LIBNAME = vhost

View File

@ -42,6 +42,7 @@ JSON_LIBS := json jsonrpc rpc
DEPDIRS-env_ocf :=
DEPDIRS-log :=
DEPDIRS-rte_vhost :=
DEPDIRS-ioat := log
DEPDIRS-sock := log
@ -77,7 +78,10 @@ DEPDIRS-nvmf := log sock util json nvme thread trace bdev
DEPDIRS-scsi := log util thread $(JSON_LIBS) trace bdev
DEPDIRS-iscsi := log sock util conf thread $(JSON_LIBS) trace event scsi
DEPDIRS-vhost := log util conf thread $(JSON_LIBS) bdev event scsi
DEPDIRS-vhost = log util conf thread $(JSON_LIBS) bdev event scsi
ifeq ($(CONFIG_VHOST_INTERNAL_LIB),y)
DEPDIRS-vhost += rte_vhost
endif
# ------------------------------------------------------------------------
# Start module/ directory - This section extends the organizational pattern from

View File

@ -107,7 +107,7 @@ fi
echo -n "Checking comment style..."
git grep --line-number -e '/[*][^ *-]' -- '*.[ch]' > comment.log || true
git grep --line-number -e '[^ ][*]/' -- '*.[ch]' ':!lib/vhost/rte_vhost*/*' >> comment.log || true
git grep --line-number -e '[^ ][*]/' -- '*.[ch]' ':!lib/rte_vhost*/*' >> comment.log || true
git grep --line-number -e '^[*]' -- '*.[ch]' >> comment.log || true
git grep --line-number -e '\s//' -- '*.[ch]' >> comment.log || true
git grep --line-number -e '^//' -- '*.[ch]' >> comment.log || true
@ -147,7 +147,7 @@ rm -f whitespace.log
echo -n "Checking for use of forbidden library functions..."
git grep --line-number -w '\(atoi\|atol\|atoll\|strncpy\|strcpy\|strcat\|sprintf\|vsprintf\)' -- './*.c' ':!lib/vhost/rte_vhost*/**' > badfunc.log || true
git grep --line-number -w '\(atoi\|atol\|atoll\|strncpy\|strcpy\|strcat\|sprintf\|vsprintf\)' -- './*.c' ':!lib/rte_vhost*/**' > badfunc.log || true
if [ -s badfunc.log ]; then
echo " Forbidden library functions detected"
cat badfunc.log
@ -182,7 +182,7 @@ fi
rm -f eofnl.log
echo -n "Checking for POSIX includes..."
git grep -I -i -f scripts/posix.txt -- './*' ':!include/spdk/stdinc.h' ':!include/linux/**' ':!lib/vhost/rte_vhost*/**' ':!scripts/posix.txt' ':!*.patch' > scripts/posix.log || true
git grep -I -i -f scripts/posix.txt -- './*' ':!include/spdk/stdinc.h' ':!include/linux/**' ':!lib/rte_vhost*/**' ':!scripts/posix.txt' ':!*.patch' > scripts/posix.log || true
if [ -s scripts/posix.log ]; then
echo "POSIX includes detected. Please include spdk/stdinc.h instead."
cat scripts/posix.log

View File

@ -35,7 +35,7 @@ SPDK_ROOT_DIR := $(abspath $(CURDIR)/../../../../..)
include $(SPDK_ROOT_DIR)/mk/config.mk
ifeq ($(CONFIG_VHOST_INTERNAL_LIB),y)
CFLAGS += -I$(SPDK_ROOT_DIR)/lib/vhost/rte_vhost
CFLAGS += -I$(SPDK_ROOT_DIR)/lib/rte_vhost
endif
CFLAGS += $(ENV_CFLAGS)