build: use DEPDIRS variables to build SPDK_LIB_LIST
All of our Makefiles duplicate huge lists of libraries in SPDK_LIB_LIST. We have a very precise and accurate accounting of the library dependencies in mk/spdk.lib_deps.mk which can be used to generate the full list if the app specifies the modules and subsystem libraries it wishes to link. I did a first pass through all of the existing Makefiles to take advantage of this new functionality. There may be more optimizations we can make later but don't want to hold up this patch for all of them. Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: Icdaf6f749a6908df2c2ce2db22631a4af4ff3a9e Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5553 Community-CI: Broadcom CI Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
parent
27c2daff1d
commit
d132ee3531
@ -43,17 +43,14 @@ CFLAGS += -I$(SPDK_ROOT_DIR)/lib
|
|||||||
|
|
||||||
C_SRCS := iscsi_tgt.c
|
C_SRCS := iscsi_tgt.c
|
||||||
|
|
||||||
SPDK_LIB_LIST = $(ALL_MODULES_LIST)
|
SPDK_LIB_LIST = $(ALL_MODULES_LIST) event_iscsi event_net
|
||||||
SPDK_LIB_LIST += $(EVENT_BDEV_SUBSYSTEM) event_iscsi event_net event_scsi event
|
|
||||||
SPDK_LIB_LIST += jsonrpc json rpc bdev iscsi scsi accel trace conf
|
|
||||||
SPDK_LIB_LIST += thread util log net sock notify
|
|
||||||
|
|
||||||
ifeq ($(SPDK_ROOT_DIR)/lib/env_dpdk,$(CONFIG_ENV))
|
ifeq ($(SPDK_ROOT_DIR)/lib/env_dpdk,$(CONFIG_ENV))
|
||||||
SPDK_LIB_LIST += env_dpdk_rpc
|
SPDK_LIB_LIST += env_dpdk_rpc
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(OS),Linux)
|
ifeq ($(OS),Linux)
|
||||||
SPDK_LIB_LIST += event_nbd nbd
|
SPDK_LIB_LIST += event_nbd
|
||||||
endif
|
endif
|
||||||
|
|
||||||
include $(SPDK_ROOT_DIR)/mk/spdk.app.mk
|
include $(SPDK_ROOT_DIR)/mk/spdk.app.mk
|
||||||
|
@ -37,7 +37,7 @@ include $(SPDK_ROOT_DIR)/mk/spdk.modules.mk
|
|||||||
|
|
||||||
APP = iscsi_top
|
APP = iscsi_top
|
||||||
|
|
||||||
SPDK_LIB_LIST = jsonrpc json rpc log util
|
SPDK_LIB_LIST = rpc
|
||||||
|
|
||||||
CFLAGS += -I$(SPDK_ROOT_DIR)/lib
|
CFLAGS += -I$(SPDK_ROOT_DIR)/lib
|
||||||
|
|
||||||
|
@ -39,17 +39,14 @@ APP = nvmf_tgt
|
|||||||
|
|
||||||
C_SRCS := nvmf_main.c
|
C_SRCS := nvmf_main.c
|
||||||
|
|
||||||
SPDK_LIB_LIST = $(ALL_MODULES_LIST)
|
SPDK_LIB_LIST = $(ALL_MODULES_LIST) event_nvmf
|
||||||
SPDK_LIB_LIST += $(EVENT_BDEV_SUBSYSTEM) event_nvmf event_net
|
|
||||||
SPDK_LIB_LIST += nvmf event log trace conf thread util bdev accel rpc jsonrpc json net sock
|
|
||||||
SPDK_LIB_LIST += notify
|
|
||||||
|
|
||||||
ifeq ($(SPDK_ROOT_DIR)/lib/env_dpdk,$(CONFIG_ENV))
|
ifeq ($(SPDK_ROOT_DIR)/lib/env_dpdk,$(CONFIG_ENV))
|
||||||
SPDK_LIB_LIST += env_dpdk_rpc
|
SPDK_LIB_LIST += env_dpdk_rpc
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(OS),Linux)
|
ifeq ($(OS),Linux)
|
||||||
SPDK_LIB_LIST += event_nbd nbd
|
SPDK_LIB_LIST += event_nbd
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_FC),y)
|
ifeq ($(CONFIG_FC),y)
|
||||||
|
@ -39,9 +39,6 @@ APP = spdk_dd
|
|||||||
|
|
||||||
C_SRCS := spdk_dd.c
|
C_SRCS := spdk_dd.c
|
||||||
|
|
||||||
SPDK_LIB_LIST = $(ALL_MODULES_LIST)
|
SPDK_LIB_LIST = $(ALL_MODULES_LIST) event_bdev
|
||||||
SPDK_LIB_LIST += event_sock event_bdev event_accel event_vmd
|
|
||||||
SPDK_LIB_LIST += bdev accel event thread util conf trace \
|
|
||||||
log jsonrpc json rpc sock notify
|
|
||||||
|
|
||||||
include $(SPDK_ROOT_DIR)/mk/spdk.app.mk
|
include $(SPDK_ROOT_DIR)/mk/spdk.app.mk
|
||||||
|
@ -38,14 +38,6 @@ APP = spdk_lspci
|
|||||||
|
|
||||||
C_SRCS := spdk_lspci.c
|
C_SRCS := spdk_lspci.c
|
||||||
|
|
||||||
SPDK_LIB_LIST = $(SOCK_MODULES_LIST)
|
SPDK_LIB_LIST = $(SOCK_MODULES_LIST) nvme vmd
|
||||||
SPDK_LIB_LIST += nvme thread util log sock vmd jsonrpc json rpc
|
|
||||||
|
|
||||||
ifeq ($(CONFIG_RDMA),y)
|
|
||||||
SPDK_LIB_LIST += rdma
|
|
||||||
ifeq ($(CONFIG_RDMA_PROV),mlx5_dv)
|
|
||||||
SYS_LIBS += -lmlx5
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
include $(SPDK_ROOT_DIR)/mk/spdk.app.mk
|
include $(SPDK_ROOT_DIR)/mk/spdk.app.mk
|
||||||
|
@ -41,22 +41,17 @@ C_SRCS := spdk_tgt.c
|
|||||||
|
|
||||||
SPDK_LIB_LIST = $(ALL_MODULES_LIST)
|
SPDK_LIB_LIST = $(ALL_MODULES_LIST)
|
||||||
|
|
||||||
ifeq ($(OS),Linux)
|
SPDK_LIB_LIST += event_iscsi event_nvmf
|
||||||
ifeq ($(CONFIG_VHOST),y)
|
|
||||||
SPDK_LIB_LIST += vhost event_vhost
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
SPDK_LIB_LIST += $(EVENT_BDEV_SUBSYSTEM) event_iscsi event_net event_scsi event_nvmf event
|
|
||||||
SPDK_LIB_LIST += nvmf trace log conf thread util bdev iscsi scsi accel rpc jsonrpc json
|
|
||||||
SPDK_LIB_LIST += net sock notify
|
|
||||||
|
|
||||||
ifeq ($(SPDK_ROOT_DIR)/lib/env_dpdk,$(CONFIG_ENV))
|
ifeq ($(SPDK_ROOT_DIR)/lib/env_dpdk,$(CONFIG_ENV))
|
||||||
SPDK_LIB_LIST += env_dpdk_rpc
|
SPDK_LIB_LIST += env_dpdk_rpc
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(OS),Linux)
|
ifeq ($(OS),Linux)
|
||||||
SPDK_LIB_LIST += event_nbd nbd
|
SPDK_LIB_LIST += event_nbd
|
||||||
|
ifeq ($(CONFIG_VHOST),y)
|
||||||
|
SPDK_LIB_LIST += event_vhost
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_FC),y)
|
ifeq ($(CONFIG_FC),y)
|
||||||
|
@ -38,7 +38,7 @@ APP = spdk_top
|
|||||||
|
|
||||||
C_SRCS := spdk_top.c
|
C_SRCS := spdk_top.c
|
||||||
|
|
||||||
SPDK_LIB_LIST = jsonrpc json rpc log util
|
SPDK_LIB_LIST = rpc
|
||||||
LIBS=-lncurses -lpanel -lmenu
|
LIBS=-lncurses -lpanel -lmenu
|
||||||
|
|
||||||
include $(SPDK_ROOT_DIR)/mk/spdk.app.mk
|
include $(SPDK_ROOT_DIR)/mk/spdk.app.mk
|
||||||
|
@ -39,13 +39,7 @@ APP = vhost
|
|||||||
|
|
||||||
C_SRCS := vhost.c
|
C_SRCS := vhost.c
|
||||||
|
|
||||||
SPDK_LIB_LIST = $(ALL_MODULES_LIST)
|
SPDK_LIB_LIST = $(ALL_MODULES_LIST) event_vhost event_nbd
|
||||||
SPDK_LIB_LIST += vhost event_vhost
|
|
||||||
|
|
||||||
SPDK_LIB_LIST += $(EVENT_BDEV_SUBSYSTEM) event_net event_scsi event
|
|
||||||
SPDK_LIB_LIST += jsonrpc json rpc bdev scsi accel trace conf
|
|
||||||
SPDK_LIB_LIST += thread util log
|
|
||||||
SPDK_LIB_LIST += event_nbd nbd net sock notify
|
|
||||||
|
|
||||||
ifeq ($(SPDK_ROOT_DIR)/lib/env_dpdk,$(CONFIG_ENV))
|
ifeq ($(SPDK_ROOT_DIR)/lib/env_dpdk,$(CONFIG_ENV))
|
||||||
SPDK_LIB_LIST += env_dpdk_rpc
|
SPDK_LIB_LIST += env_dpdk_rpc
|
||||||
|
@ -39,9 +39,6 @@ APP = accel_perf
|
|||||||
|
|
||||||
C_SRCS := accel_perf.c
|
C_SRCS := accel_perf.c
|
||||||
|
|
||||||
SPDK_LIB_LIST = $(ALL_MODULES_LIST)
|
SPDK_LIB_LIST = $(ACCEL_MODULES_LIST) event_accel
|
||||||
SPDK_LIB_LIST += $(EVENT_BDEV_SUBSYSTEM)
|
|
||||||
SPDK_LIB_LIST += bdev accel event thread util conf trace \
|
|
||||||
log jsonrpc json rpc sock notify
|
|
||||||
|
|
||||||
include $(SPDK_ROOT_DIR)/mk/spdk.app.mk
|
include $(SPDK_ROOT_DIR)/mk/spdk.app.mk
|
||||||
|
@ -40,8 +40,6 @@ FIO_PLUGIN := spdk_bdev
|
|||||||
|
|
||||||
C_SRCS = fio_plugin.c
|
C_SRCS = fio_plugin.c
|
||||||
|
|
||||||
SPDK_LIB_LIST = $(ALL_MODULES_LIST)
|
SPDK_LIB_LIST = $(ALL_MODULES_LIST) event_bdev
|
||||||
SPDK_LIB_LIST += thread util bdev conf accel rpc jsonrpc json log sock trace notify
|
|
||||||
SPDK_LIB_LIST += event $(EVENT_BDEV_SUBSYSTEM)
|
|
||||||
|
|
||||||
include $(SPDK_ROOT_DIR)/mk/spdk.fio.mk
|
include $(SPDK_ROOT_DIR)/mk/spdk.fio.mk
|
||||||
|
@ -37,8 +37,6 @@ APP = hello_bdev
|
|||||||
|
|
||||||
C_SRCS := hello_bdev.c
|
C_SRCS := hello_bdev.c
|
||||||
|
|
||||||
SPDK_LIB_LIST = $(ALL_MODULES_LIST)
|
SPDK_LIB_LIST = $(ALL_MODULES_LIST) event_bdev
|
||||||
SPDK_LIB_LIST += $(EVENT_BDEV_SUBSYSTEM)
|
|
||||||
SPDK_LIB_LIST += bdev accel event thread util conf trace log jsonrpc json rpc sock notify
|
|
||||||
|
|
||||||
include $(SPDK_ROOT_DIR)/mk/spdk.app.mk
|
include $(SPDK_ROOT_DIR)/mk/spdk.app.mk
|
||||||
|
@ -38,9 +38,6 @@ APP = blobcli
|
|||||||
C_SRCS := blobcli.c
|
C_SRCS := blobcli.c
|
||||||
|
|
||||||
# Don't link bdev_lvol in blobcli - otherwise this utility cannot operate on an lvolstore
|
# Don't link bdev_lvol in blobcli - otherwise this utility cannot operate on an lvolstore
|
||||||
SPDK_LIB_LIST = $(filter-out bdev_lvol,$(ALL_MODULES_LIST))
|
SPDK_LIB_LIST = $(filter-out bdev_lvol,$(ALL_MODULES_LIST)) event_bdev
|
||||||
SPDK_LIB_LIST += $(EVENT_BDEV_SUBSYSTEM)
|
|
||||||
SPDK_LIB_LIST += bdev accel event thread util conf trace \
|
|
||||||
log jsonrpc json rpc sock notify
|
|
||||||
|
|
||||||
include $(SPDK_ROOT_DIR)/mk/spdk.app.mk
|
include $(SPDK_ROOT_DIR)/mk/spdk.app.mk
|
||||||
|
@ -37,9 +37,6 @@ APP = hello_blob
|
|||||||
|
|
||||||
C_SRCS := hello_blob.c
|
C_SRCS := hello_blob.c
|
||||||
|
|
||||||
SPDK_LIB_LIST = $(ALL_MODULES_LIST)
|
SPDK_LIB_LIST = $(ALL_MODULES_LIST) event_bdev
|
||||||
SPDK_LIB_LIST += $(EVENT_BDEV_SUBSYSTEM)
|
|
||||||
SPDK_LIB_LIST += bdev accel event thread util conf trace \
|
|
||||||
log jsonrpc json rpc sock notify
|
|
||||||
|
|
||||||
include $(SPDK_ROOT_DIR)/mk/spdk.app.mk
|
include $(SPDK_ROOT_DIR)/mk/spdk.app.mk
|
||||||
|
@ -40,15 +40,13 @@ APP = interrupt_tgt
|
|||||||
C_SRCS := interrupt_tgt.c
|
C_SRCS := interrupt_tgt.c
|
||||||
|
|
||||||
# Basic libaries to support spdk application
|
# Basic libaries to support spdk application
|
||||||
SPDK_LIB_LIST += event thread
|
SPDK_LIB_LIST += event
|
||||||
SPDK_LIB_LIST += jsonrpc json rpc trace conf util log
|
|
||||||
# Basic bdev libraries
|
# Basic bdev libraries
|
||||||
SPDK_LIB_LIST += bdev notify accel vmd sock
|
SPDK_LIB_LIST += event_bdev
|
||||||
SPDK_LIB_LIST += $(EVENT_BDEV_SUBSYSTEM) # event_bdev depends on some other event modules, but they dont support edriven yet
|
|
||||||
# Aio bdev library
|
# Aio bdev library
|
||||||
SPDK_LIB_LIST += bdev_aio
|
SPDK_LIB_LIST += bdev_aio
|
||||||
# NBD libraries
|
# NBD libraries
|
||||||
SPDK_LIB_LIST += nbd event_nbd
|
SPDK_LIB_LIST += event_nbd
|
||||||
# some bdev modules don't have pollers, so they can be directly runnning in edriven mode
|
# some bdev modules don't have pollers, so they can be directly runnning in edriven mode
|
||||||
SPDK_LIB_LIST += bdev_malloc bdev_passthru bdev_error bdev_gpt bdev_split bdev_raid
|
SPDK_LIB_LIST += bdev_malloc bdev_passthru bdev_error bdev_gpt bdev_split bdev_raid
|
||||||
# logical volume and blobstore can directly run in edriven mode
|
# logical volume and blobstore can directly run in edriven mode
|
||||||
@ -56,8 +54,8 @@ SPDK_LIB_LIST += bdev_lvol lvol blob_bdev blob
|
|||||||
# blobfs libraries
|
# blobfs libraries
|
||||||
SPDK_LIB_LIST += blobfs blobfs_bdev
|
SPDK_LIB_LIST += blobfs blobfs_bdev
|
||||||
# vhost blk related libraries.
|
# vhost blk related libraries.
|
||||||
SPDK_LIB_LIST += vhost event_vhost
|
SPDK_LIB_LIST += event_vhost
|
||||||
SPDK_LIB_LIST += scsi event_scsi # vhost-scsi is not supported, just because vhost lib requires scsi related libs
|
SPDK_LIB_LIST += event_scsi # vhost-scsi is not supported, just because vhost lib requires scsi related libs
|
||||||
|
|
||||||
ifeq ($(SPDK_ROOT_DIR)/lib/env_dpdk,$(CONFIG_ENV))
|
ifeq ($(SPDK_ROOT_DIR)/lib/env_dpdk,$(CONFIG_ENV))
|
||||||
SPDK_LIB_LIST += env_dpdk_rpc
|
SPDK_LIB_LIST += env_dpdk_rpc
|
||||||
|
@ -38,6 +38,6 @@ APP = ioat_perf
|
|||||||
|
|
||||||
C_SRCS := perf.c
|
C_SRCS := perf.c
|
||||||
|
|
||||||
SPDK_LIB_LIST = ioat thread util log
|
SPDK_LIB_LIST = ioat util
|
||||||
|
|
||||||
include $(SPDK_ROOT_DIR)/mk/spdk.app.mk
|
include $(SPDK_ROOT_DIR)/mk/spdk.app.mk
|
||||||
|
@ -38,6 +38,6 @@ APP = verify
|
|||||||
|
|
||||||
C_SRCS := verify.c
|
C_SRCS := verify.c
|
||||||
|
|
||||||
SPDK_LIB_LIST = ioat thread util log
|
SPDK_LIB_LIST = ioat util
|
||||||
|
|
||||||
include $(SPDK_ROOT_DIR)/mk/spdk.app.mk
|
include $(SPDK_ROOT_DIR)/mk/spdk.app.mk
|
||||||
|
@ -40,11 +40,6 @@ FIO_PLUGIN := spdk_nvme
|
|||||||
|
|
||||||
C_SRCS = fio_plugin.c
|
C_SRCS = fio_plugin.c
|
||||||
|
|
||||||
SPDK_LIB_LIST = $(SOCK_MODULES_LIST)
|
SPDK_LIB_LIST = $(SOCK_MODULES_LIST) nvme vmd
|
||||||
SPDK_LIB_LIST += nvme thread util log sock vmd jsonrpc json rpc
|
|
||||||
|
|
||||||
ifeq ($(CONFIG_RDMA),y)
|
|
||||||
SPDK_LIB_LIST += rdma
|
|
||||||
endif
|
|
||||||
|
|
||||||
include $(SPDK_ROOT_DIR)/mk/spdk.fio.mk
|
include $(SPDK_ROOT_DIR)/mk/spdk.fio.mk
|
||||||
|
@ -38,9 +38,7 @@ include $(SPDK_ROOT_DIR)/mk/spdk.modules.mk
|
|||||||
APP := nvmf
|
APP := nvmf
|
||||||
|
|
||||||
C_SRCS := nvmf.c
|
C_SRCS := nvmf.c
|
||||||
SPDK_LIB_LIST = $(ALL_MODULES_LIST)
|
SPDK_LIB_LIST = $(ALL_MODULES_LIST) event_bdev nvmf
|
||||||
SPDK_LIB_LIST += nvmf thread util bdev conf accel rpc jsonrpc json log sock trace notify
|
|
||||||
SPDK_LIB_LIST += event $(EVENT_BDEV_SUBSYSTEM)
|
|
||||||
|
|
||||||
ifeq ($(CONFIG_FC),y)
|
ifeq ($(CONFIG_FC),y)
|
||||||
ifneq ($(strip $(CONFIG_FC_PATH)),)
|
ifneq ($(strip $(CONFIG_FC_PATH)),)
|
||||||
|
@ -38,6 +38,6 @@ APP = hello_sock
|
|||||||
C_SRCS := hello_sock.c
|
C_SRCS := hello_sock.c
|
||||||
|
|
||||||
SPDK_LIB_LIST = $(SOCK_MODULES_LIST)
|
SPDK_LIB_LIST = $(SOCK_MODULES_LIST)
|
||||||
SPDK_LIB_LIST += event_net net event thread util conf trace log jsonrpc json rpc sock notify
|
SPDK_LIB_LIST += event_net sock
|
||||||
|
|
||||||
include $(SPDK_ROOT_DIR)/mk/spdk.app.mk
|
include $(SPDK_ROOT_DIR)/mk/spdk.app.mk
|
||||||
|
@ -53,9 +53,7 @@ ifeq ($(CONFIG_ASAN),y)
|
|||||||
CXXFLAGS += -fno-sanitize=address
|
CXXFLAGS += -fno-sanitize=address
|
||||||
endif
|
endif
|
||||||
|
|
||||||
SPDK_LIB_LIST = $(ALL_MODULES_LIST)
|
SPDK_LIB_LIST = $(ALL_MODULES_LIST) event_bdev
|
||||||
SPDK_LIB_LIST += $(EVENT_BDEV_SUBSYSTEM)
|
|
||||||
SPDK_LIB_LIST += bdev accel event util conf trace log jsonrpc json rpc sock thread notify
|
|
||||||
|
|
||||||
AM_LINK += $(SPDK_LIB_LINKER_ARGS) $(ENV_LINKER_ARGS)
|
AM_LINK += $(SPDK_LIB_LINKER_ARGS) $(ENV_LINKER_ARGS)
|
||||||
AM_LINK += $(SYS_LIBS)
|
AM_LINK += $(SYS_LIBS)
|
||||||
|
@ -38,11 +38,6 @@ include $(SPDK_ROOT_DIR)/mk/spdk.modules.mk
|
|||||||
|
|
||||||
C_SRCS := $(APP:%=%.c)
|
C_SRCS := $(APP:%=%.c)
|
||||||
|
|
||||||
SPDK_LIB_LIST = $(SOCK_MODULES_LIST)
|
SPDK_LIB_LIST = $(SOCK_MODULES_LIST) nvme vmd
|
||||||
SPDK_LIB_LIST += nvme thread util log sock vmd jsonrpc json rpc
|
|
||||||
|
|
||||||
ifeq ($(CONFIG_RDMA),y)
|
|
||||||
SPDK_LIB_LIST += rdma
|
|
||||||
endif
|
|
||||||
|
|
||||||
include $(SPDK_ROOT_DIR)/mk/spdk.app.mk
|
include $(SPDK_ROOT_DIR)/mk/spdk.app.mk
|
||||||
|
@ -31,12 +31,33 @@
|
|||||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#
|
#
|
||||||
|
|
||||||
SPDK_LIB_FILES = $(call spdk_lib_list_to_static_libs,$(SPDK_LIB_LIST))
|
include $(SPDK_ROOT_DIR)/mk/spdk.lib_deps.mk
|
||||||
|
|
||||||
|
# _uniq returns the unique elements from the list specified. It does
|
||||||
|
# not change the order of the elements. If the same element occurs
|
||||||
|
# multiple times in the list, the last instance is kept and the others
|
||||||
|
# removed.
|
||||||
|
# Example: _uniq(conf log json log util util log util) = conf json log util
|
||||||
|
define _uniq
|
||||||
|
$(if $1,$(call _uniq,$(filter-out $(lastword $1),$1)) $(lastword $1))
|
||||||
|
endef
|
||||||
|
|
||||||
|
define _deplibs
|
||||||
|
$(if $1,$(foreach d,$1,$(d) $(call _deplibs,$(DEPDIRS-$(d)))))
|
||||||
|
endef
|
||||||
|
|
||||||
|
define deplibs
|
||||||
|
$(call _uniq,$(call _deplibs,$1))
|
||||||
|
endef
|
||||||
|
|
||||||
|
SPDK_DEPLIB_LIST += $(call deplibs,$(SPDK_LIB_LIST))
|
||||||
|
|
||||||
|
SPDK_LIB_FILES = $(call spdk_lib_list_to_static_libs,$(SPDK_DEPLIB_LIST))
|
||||||
SPDK_LIB_LINKER_ARGS = \
|
SPDK_LIB_LINKER_ARGS = \
|
||||||
-L$(SPDK_ROOT_DIR)/build/lib \
|
-L$(SPDK_ROOT_DIR)/build/lib \
|
||||||
-Wl,--whole-archive \
|
-Wl,--whole-archive \
|
||||||
-Wl,--no-as-needed \
|
-Wl,--no-as-needed \
|
||||||
$(SPDK_LIB_LIST:%=-lspdk_%) \
|
$(SPDK_DEPLIB_LIST:%=-lspdk_%) \
|
||||||
-Wl,--no-whole-archive
|
-Wl,--no-whole-archive
|
||||||
|
|
||||||
# This is primarily used for unit tests to ensure they link when shared library
|
# This is primarily used for unit tests to ensure they link when shared library
|
||||||
|
@ -39,13 +39,10 @@ APP = bdev_svc
|
|||||||
|
|
||||||
C_SRCS := bdev_svc.c
|
C_SRCS := bdev_svc.c
|
||||||
|
|
||||||
SPDK_LIB_LIST = $(ALL_MODULES_LIST)
|
SPDK_LIB_LIST = $(ALL_MODULES_LIST) event_bdev
|
||||||
SPDK_LIB_LIST += $(EVENT_BDEV_SUBSYSTEM)
|
|
||||||
SPDK_LIB_LIST += nvmf event log trace conf thread util bdev accel rpc jsonrpc json sock
|
|
||||||
SPDK_LIB_LIST += notify
|
|
||||||
|
|
||||||
ifeq ($(OS),Linux)
|
ifeq ($(OS),Linux)
|
||||||
SPDK_LIB_LIST += event_nbd nbd
|
SPDK_LIB_LIST += event_nbd
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_FC),y)
|
ifeq ($(CONFIG_FC),y)
|
||||||
|
@ -45,7 +45,6 @@ ISCSI_OBJS = md5 param conn tgt_node init_grp portal_grp
|
|||||||
LIBS += $(SCSI_OBJS:%=$(SPDK_ROOT_DIR)/lib/scsi/%.o)
|
LIBS += $(SCSI_OBJS:%=$(SPDK_ROOT_DIR)/lib/scsi/%.o)
|
||||||
LIBS += $(ISCSI_OBJS:%=$(SPDK_ROOT_DIR)/lib/iscsi/%.o)
|
LIBS += $(ISCSI_OBJS:%=$(SPDK_ROOT_DIR)/lib/iscsi/%.o)
|
||||||
|
|
||||||
SPDK_LIB_LIST += $(SOCK_MODULES_LIST)
|
SPDK_LIB_LIST += $(SOCK_MODULES_LIST) event scsi
|
||||||
SPDK_LIB_LIST += conf event json jsonrpc log scsi bdev notify rpc sock thread trace util
|
|
||||||
|
|
||||||
include $(SPDK_ROOT_DIR)/mk/spdk.app.mk
|
include $(SPDK_ROOT_DIR)/mk/spdk.app.mk
|
||||||
|
@ -39,11 +39,6 @@ CFLAGS += -I$(SPDK_ROOT_DIR)/test/app/fuzz/common
|
|||||||
|
|
||||||
C_SRCS := nvme_fuzz.c
|
C_SRCS := nvme_fuzz.c
|
||||||
|
|
||||||
SPDK_LIB_LIST += $(SOCK_MODULES_LIST)
|
SPDK_LIB_LIST += $(SOCK_MODULES_LIST) event nvme conf
|
||||||
SPDK_LIB_LIST += conf event json jsonrpc log nvme rpc sock thread trace util
|
|
||||||
|
|
||||||
ifeq ($(CONFIG_RDMA),y)
|
|
||||||
SPDK_LIB_LIST += rdma
|
|
||||||
endif
|
|
||||||
|
|
||||||
include $(SPDK_ROOT_DIR)/mk/spdk.app.mk
|
include $(SPDK_ROOT_DIR)/mk/spdk.app.mk
|
||||||
|
@ -38,5 +38,5 @@ CFLAGS += -I$(SPDK_ROOT_DIR)/test/app/fuzz/common
|
|||||||
|
|
||||||
C_SRCS := vhost_fuzz_rpc.c vhost_fuzz.c
|
C_SRCS := vhost_fuzz_rpc.c vhost_fuzz.c
|
||||||
|
|
||||||
SPDK_LIB_LIST += event conf json jsonrpc rpc util log sock trace thread virtio
|
SPDK_LIB_LIST += event conf rpc sock virtio
|
||||||
include $(SPDK_ROOT_DIR)/mk/spdk.app.mk
|
include $(SPDK_ROOT_DIR)/mk/spdk.app.mk
|
||||||
|
@ -39,11 +39,6 @@ APP = stub
|
|||||||
|
|
||||||
C_SRCS := stub.c
|
C_SRCS := stub.c
|
||||||
|
|
||||||
SPDK_LIB_LIST = $(SOCK_MODULES_LIST)
|
SPDK_LIB_LIST = $(SOCK_MODULES_LIST) event nvme
|
||||||
SPDK_LIB_LIST += event conf nvme log trace rpc jsonrpc json thread util sock notify
|
|
||||||
|
|
||||||
ifeq ($(CONFIG_RDMA),y)
|
|
||||||
SPDK_LIB_LIST += rdma
|
|
||||||
endif
|
|
||||||
|
|
||||||
include $(SPDK_ROOT_DIR)/mk/spdk.app.mk
|
include $(SPDK_ROOT_DIR)/mk/spdk.app.mk
|
||||||
|
@ -39,9 +39,7 @@ APP = bdevio
|
|||||||
|
|
||||||
C_SRCS := bdevio.c
|
C_SRCS := bdevio.c
|
||||||
|
|
||||||
SPDK_LIB_LIST = $(ALL_MODULES_LIST)
|
SPDK_LIB_LIST = $(ALL_MODULES_LIST) event_bdev
|
||||||
SPDK_LIB_LIST += $(EVENT_BDEV_SUBSYSTEM)
|
|
||||||
SPDK_LIB_LIST += bdev accel event trace log conf thread util rpc jsonrpc json sock notify
|
|
||||||
|
|
||||||
LIBS += -lcunit
|
LIBS += -lcunit
|
||||||
|
|
||||||
|
@ -39,13 +39,10 @@ APP = bdevperf
|
|||||||
|
|
||||||
C_SRCS := bdevperf.c
|
C_SRCS := bdevperf.c
|
||||||
|
|
||||||
SPDK_LIB_LIST = $(ALL_MODULES_LIST)
|
SPDK_LIB_LIST = $(ALL_MODULES_LIST) event_bdev conf
|
||||||
SPDK_LIB_LIST += $(EVENT_BDEV_SUBSYSTEM)
|
|
||||||
SPDK_LIB_LIST += bdev accel event trace log conf thread util sock notify
|
|
||||||
SPDK_LIB_LIST += rpc jsonrpc json
|
|
||||||
|
|
||||||
ifeq ($(OS),Linux)
|
ifeq ($(OS),Linux)
|
||||||
SPDK_LIB_LIST += event_nbd nbd
|
SPDK_LIB_LIST += event_nbd
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(SPDK_ROOT_DIR)/lib/env_dpdk,$(CONFIG_ENV))
|
ifeq ($(SPDK_ROOT_DIR)/lib/env_dpdk,$(CONFIG_ENV))
|
||||||
|
@ -39,9 +39,6 @@ APP = fuse
|
|||||||
|
|
||||||
C_SRCS := fuse.c
|
C_SRCS := fuse.c
|
||||||
|
|
||||||
SPDK_LIB_LIST = $(ALL_MODULES_LIST)
|
SPDK_LIB_LIST = $(ALL_MODULES_LIST) event_bdev
|
||||||
SPDK_LIB_LIST += $(EVENT_BDEV_SUBSYSTEM)
|
|
||||||
SPDK_LIB_LIST += bdev accel event thread util conf trace \
|
|
||||||
log jsonrpc json rpc sock notify
|
|
||||||
|
|
||||||
include $(SPDK_ROOT_DIR)/mk/spdk.app.mk
|
include $(SPDK_ROOT_DIR)/mk/spdk.app.mk
|
||||||
|
@ -39,9 +39,6 @@ APP = mkfs
|
|||||||
|
|
||||||
C_SRCS := mkfs.c
|
C_SRCS := mkfs.c
|
||||||
|
|
||||||
SPDK_LIB_LIST = $(ALL_MODULES_LIST)
|
SPDK_LIB_LIST = $(ALL_MODULES_LIST) event_bdev
|
||||||
SPDK_LIB_LIST += $(EVENT_BDEV_SUBSYSTEM)
|
|
||||||
SPDK_LIB_LIST += bdev accel event thread util conf trace \
|
|
||||||
log jsonrpc json rpc sock notify
|
|
||||||
|
|
||||||
include $(SPDK_ROOT_DIR)/mk/spdk.app.mk
|
include $(SPDK_ROOT_DIR)/mk/spdk.app.mk
|
||||||
|
@ -41,9 +41,7 @@ C_SRCS := app_repeat.c
|
|||||||
# Some of the modules and libaries are not repeatable yet, only organize
|
# Some of the modules and libaries are not repeatable yet, only organize
|
||||||
# the repeatable ones.
|
# the repeatable ones.
|
||||||
SPDK_LIB_LIST = event_bdev event_accel event_vmd event_sock
|
SPDK_LIB_LIST = event_bdev event_accel event_vmd event_sock
|
||||||
SPDK_LIB_LIST += event log trace conf thread util bdev accel rpc jsonrpc json sock vmd
|
SPDK_LIB_LIST += event_nbd
|
||||||
SPDK_LIB_LIST += notify
|
|
||||||
SPDK_LIB_LIST += event_nbd nbd
|
|
||||||
|
|
||||||
BLOCKDEV_LIST = bdev_malloc bdev_null
|
BLOCKDEV_LIST = bdev_malloc bdev_null
|
||||||
BLOCKDEV_LIST += bdev_aio
|
BLOCKDEV_LIST += bdev_aio
|
||||||
|
@ -37,6 +37,6 @@ include $(SPDK_ROOT_DIR)/mk/spdk.common.mk
|
|||||||
APP = event_perf
|
APP = event_perf
|
||||||
C_SRCS := event_perf.c
|
C_SRCS := event_perf.c
|
||||||
|
|
||||||
SPDK_LIB_LIST = event trace conf thread util log rpc jsonrpc json sock notify
|
SPDK_LIB_LIST = event
|
||||||
|
|
||||||
include $(SPDK_ROOT_DIR)/mk/spdk.app.mk
|
include $(SPDK_ROOT_DIR)/mk/spdk.app.mk
|
||||||
|
@ -37,6 +37,6 @@ include $(SPDK_ROOT_DIR)/mk/spdk.common.mk
|
|||||||
APP = reactor
|
APP = reactor
|
||||||
C_SRCS := reactor.c
|
C_SRCS := reactor.c
|
||||||
|
|
||||||
SPDK_LIB_LIST = event trace conf thread util log rpc jsonrpc json sock notify
|
SPDK_LIB_LIST = event
|
||||||
|
|
||||||
include $(SPDK_ROOT_DIR)/mk/spdk.app.mk
|
include $(SPDK_ROOT_DIR)/mk/spdk.app.mk
|
||||||
|
@ -37,6 +37,6 @@ include $(SPDK_ROOT_DIR)/mk/spdk.common.mk
|
|||||||
APP = reactor_perf
|
APP = reactor_perf
|
||||||
C_SRCS := reactor_perf.c
|
C_SRCS := reactor_perf.c
|
||||||
|
|
||||||
SPDK_LIB_LIST = event trace conf thread util log rpc jsonrpc json sock notify
|
SPDK_LIB_LIST = event
|
||||||
|
|
||||||
include $(SPDK_ROOT_DIR)/mk/spdk.app.mk
|
include $(SPDK_ROOT_DIR)/mk/spdk.app.mk
|
||||||
|
@ -39,6 +39,6 @@ APP = rpc_client_test
|
|||||||
|
|
||||||
C_SRCS := rpc_client_test.c
|
C_SRCS := rpc_client_test.c
|
||||||
|
|
||||||
SPDK_LIB_LIST = jsonrpc json rpc log util
|
SPDK_LIB_LIST = rpc
|
||||||
|
|
||||||
include $(SPDK_ROOT_DIR)/mk/spdk.app.mk
|
include $(SPDK_ROOT_DIR)/mk/spdk.app.mk
|
||||||
|
Loading…
Reference in New Issue
Block a user