module: add shared lib deps for all modules.

This will allow us to link individually against dpdk module libraries
without having to define those libraries dependencies.

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

(cherry picked from commit 7e1881cef9)
Change-Id: Ief2140ec0fadd970aba990dab333d603dfb46317
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466982
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
Seth Howell 2019-08-16 16:20:15 -07:00 committed by Jim Harris
parent 4d8f7fae21
commit ec06de31cf
3 changed files with 76 additions and 1 deletions

View File

@ -77,3 +77,66 @@ 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
# ------------------------------------------------------------------------
# Start module/ directory - This section extends the organizational pattern from
# above. However, it introduces several more groupings which may not strictly follow
# the ordering pattern above. These are used for convenience and to help quickly
# determine the unique dependencies of a given module. It is also grouped by directory.
BDEV_DEPS = log util $(JSON_LIBS) bdev
BDEV_DEPS_CONF = $(BDEV_DEPS) conf
BDEV_DEPS_THREAD = $(BDEV_DEPS) thread
BDEV_DEPS_CONF_THREAD = $(BDEV_DEPS) conf thread
# module/blob
DEPDIRS-blob_bdev := log thread bdev
# module/copy
DEPDIRS-copy_ioat := log ioat conf thread $(JSON_LIBS) copy
# module/sock
DEPDIRS-sock_posix := log sock
DEPDIRS-sock_vpp := log sock util thread
# module/bdev
DEPDIRS-bdev_gpt := bdev conf json log thread util
DEPDIRS-bdev_lvol := $(BDEV_DEPS) lvol blob blob_bdev
DEPDIRS-bdev_rpc := $(BDEV_DEPS)
DEPDIRS-bdev_error := $(BDEV_DEPS_CONF)
DEPDIRS-bdev_malloc := $(BDEV_DEPS_CONF) copy
DEPDIRS-bdev_split := $(BDEV_DEPS_CONF)
DEPDIRS-bdev_compress := $(BDEV_DEPS_THREAD) reduce
DEPDIRS-bdev_delay := $(BDEV_DEPS_THREAD)
DEPDIRS-bdev_aio := $(BDEV_DEPS_CONF_THREAD)
DEPDIRS-bdev_crypto := $(BDEV_DEPS_CONF_THREAD)
DEPDIRS-bdev_iscsi := $(BDEV_DEPS_CONF_THREAD)
DEPDIRS-bdev_null := $(BDEV_DEPS_CONF_THREAD)
DEPDIRS-bdev_nvme = $(BDEV_DEPS_CONF_THREAD) nvme
ifeq ($(OS),Linux)
DEPDIRS-bdev_nvme += ftl
endif
DEPDIRS-bdev_passthru := $(BDEV_DEPS_CONF_THREAD)
DEPDIRS-bdev_pmem := $(BDEV_DEPS_CONF_THREAD)
DEPDIRS-bdev_raid := $(BDEV_DEPS_CONF_THREAD)
DEPDIRS-bdev_rbd := $(BDEV_DEPS_CONF_THREAD)
DEPDIRS-bdev_virtio := $(BDEV_DEPS_CONF_THREAD) virtio
# module/event
# module/event/app
DEPDIRS-app_rpc := event $(JSON_LIBS) thread util
#module/event/subsystems
DEPDIRS-event_bdev := bdev event
DEPDIRS-event_copy := copy event
DEPDIRS-event_iscsi := event iscsi
DEPDIRS-event_nbd := event nbd
DEPDIRS-event_net := sock net event
DEPDIRS-event_nvmf := $(BDEV_DEPS_CONF_THREAD) event nvme nvmf
DEPDIRS-event_scsi := event scsi
DEPDIRS-event_vhost := event vhost
DEPDIRS-event_vmd := conf vmd event

View File

@ -36,6 +36,12 @@ include $(SPDK_ROOT_DIR)/mk/spdk.common.mk
DIRS-y = bdev blob copy event sock
DEPDIRS-blob :=
DEPDIRS-copy :=
DEPDIRS-sock :=
DEPDIRS-bdev := blob
DEPDIRS-event := bdev blob
.PHONY: all clean $(DIRS-y)
all: $(DIRS-y)

View File

@ -34,7 +34,13 @@
SPDK_ROOT_DIR := $(abspath $(CURDIR)/../../..)
include $(SPDK_ROOT_DIR)/mk/spdk.common.mk
DIRS-y += bdev copy iscsi nbd net nvmf scsi vhost vmd
DIRS-y += bdev copy iscsi net nvmf scsi vmd
ifeq ($(OS),Linux)
DIRS-y += nbd
endif
DIRS-$(CONFIG_VHOST) += vhost
.PHONY: all clean $(DIRS-y)