From d132ee3531c89ea8bdf068f2e0b556bf1ccb86f4 Mon Sep 17 00:00:00 2001 From: Jim Harris Date: Fri, 11 Dec 2020 20:41:37 +0000 Subject: [PATCH] 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 Change-Id: Icdaf6f749a6908df2c2ce2db22631a4af4ff3a9e Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5553 Community-CI: Broadcom CI Tested-by: SPDK CI Jenkins Reviewed-by: Changpeng Liu Reviewed-by: Shuhei Matsumoto --- app/iscsi_tgt/Makefile | 7 ++----- app/iscsi_top/Makefile | 2 +- app/nvmf_tgt/Makefile | 7 ++----- app/spdk_dd/Makefile | 5 +---- app/spdk_lspci/Makefile | 10 +--------- app/spdk_tgt/Makefile | 15 +++++---------- app/spdk_top/Makefile | 2 +- app/vhost/Makefile | 8 +------- examples/accel/perf/Makefile | 5 +---- examples/bdev/fio_plugin/Makefile | 4 +--- examples/bdev/hello_world/Makefile | 4 +--- examples/blob/cli/Makefile | 5 +---- examples/blob/hello_world/Makefile | 5 +---- examples/interrupt_tgt/Makefile | 12 +++++------- examples/ioat/perf/Makefile | 2 +- examples/ioat/verify/Makefile | 2 +- examples/nvme/fio_plugin/Makefile | 7 +------ examples/nvmf/nvmf/Makefile | 4 +--- examples/sock/hello_world/Makefile | 2 +- lib/rocksdb/spdk.rocksdb.mk | 4 +--- mk/nvme.libtest.mk | 7 +------ mk/spdk.app_vars.mk | 25 +++++++++++++++++++++++-- test/app/bdev_svc/Makefile | 7 ++----- test/app/fuzz/iscsi_fuzz/Makefile | 3 +-- test/app/fuzz/nvme_fuzz/Makefile | 7 +------ test/app/fuzz/vhost_fuzz/Makefile | 2 +- test/app/stub/Makefile | 7 +------ test/bdev/bdevio/Makefile | 4 +--- test/bdev/bdevperf/Makefile | 7 ++----- test/blobfs/fuse/Makefile | 5 +---- test/blobfs/mkfs/Makefile | 5 +---- test/event/app_repeat/Makefile | 4 +--- test/event/event_perf/Makefile | 2 +- test/event/reactor/Makefile | 2 +- test/event/reactor_perf/Makefile | 2 +- test/rpc_client/Makefile | 2 +- 36 files changed, 70 insertions(+), 133 deletions(-) diff --git a/app/iscsi_tgt/Makefile b/app/iscsi_tgt/Makefile index 00cec78cd..31a273610 100644 --- a/app/iscsi_tgt/Makefile +++ b/app/iscsi_tgt/Makefile @@ -43,17 +43,14 @@ CFLAGS += -I$(SPDK_ROOT_DIR)/lib C_SRCS := iscsi_tgt.c -SPDK_LIB_LIST = $(ALL_MODULES_LIST) -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 +SPDK_LIB_LIST = $(ALL_MODULES_LIST) event_iscsi event_net ifeq ($(SPDK_ROOT_DIR)/lib/env_dpdk,$(CONFIG_ENV)) SPDK_LIB_LIST += env_dpdk_rpc endif ifeq ($(OS),Linux) -SPDK_LIB_LIST += event_nbd nbd +SPDK_LIB_LIST += event_nbd endif include $(SPDK_ROOT_DIR)/mk/spdk.app.mk diff --git a/app/iscsi_top/Makefile b/app/iscsi_top/Makefile index 079a7f13a..6dd6d94d9 100644 --- a/app/iscsi_top/Makefile +++ b/app/iscsi_top/Makefile @@ -37,7 +37,7 @@ include $(SPDK_ROOT_DIR)/mk/spdk.modules.mk APP = iscsi_top -SPDK_LIB_LIST = jsonrpc json rpc log util +SPDK_LIB_LIST = rpc CFLAGS += -I$(SPDK_ROOT_DIR)/lib diff --git a/app/nvmf_tgt/Makefile b/app/nvmf_tgt/Makefile index a20737cec..ed3780cb2 100644 --- a/app/nvmf_tgt/Makefile +++ b/app/nvmf_tgt/Makefile @@ -39,17 +39,14 @@ APP = nvmf_tgt C_SRCS := nvmf_main.c -SPDK_LIB_LIST = $(ALL_MODULES_LIST) -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 +SPDK_LIB_LIST = $(ALL_MODULES_LIST) event_nvmf ifeq ($(SPDK_ROOT_DIR)/lib/env_dpdk,$(CONFIG_ENV)) SPDK_LIB_LIST += env_dpdk_rpc endif ifeq ($(OS),Linux) -SPDK_LIB_LIST += event_nbd nbd +SPDK_LIB_LIST += event_nbd endif ifeq ($(CONFIG_FC),y) diff --git a/app/spdk_dd/Makefile b/app/spdk_dd/Makefile index 3bd99f639..f2b614dd5 100644 --- a/app/spdk_dd/Makefile +++ b/app/spdk_dd/Makefile @@ -39,9 +39,6 @@ APP = spdk_dd C_SRCS := spdk_dd.c -SPDK_LIB_LIST = $(ALL_MODULES_LIST) -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 +SPDK_LIB_LIST = $(ALL_MODULES_LIST) event_bdev include $(SPDK_ROOT_DIR)/mk/spdk.app.mk diff --git a/app/spdk_lspci/Makefile b/app/spdk_lspci/Makefile index ce16e01ae..0a447e34b 100644 --- a/app/spdk_lspci/Makefile +++ b/app/spdk_lspci/Makefile @@ -38,14 +38,6 @@ APP = spdk_lspci C_SRCS := spdk_lspci.c -SPDK_LIB_LIST = $(SOCK_MODULES_LIST) -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 +SPDK_LIB_LIST = $(SOCK_MODULES_LIST) nvme vmd include $(SPDK_ROOT_DIR)/mk/spdk.app.mk diff --git a/app/spdk_tgt/Makefile b/app/spdk_tgt/Makefile index ea08539d4..446ba8234 100644 --- a/app/spdk_tgt/Makefile +++ b/app/spdk_tgt/Makefile @@ -41,22 +41,17 @@ C_SRCS := spdk_tgt.c SPDK_LIB_LIST = $(ALL_MODULES_LIST) -ifeq ($(OS),Linux) -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 +SPDK_LIB_LIST += event_iscsi event_nvmf ifeq ($(SPDK_ROOT_DIR)/lib/env_dpdk,$(CONFIG_ENV)) SPDK_LIB_LIST += env_dpdk_rpc endif 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 ifeq ($(CONFIG_FC),y) diff --git a/app/spdk_top/Makefile b/app/spdk_top/Makefile index b5dfc4f19..e2b58bffc 100644 --- a/app/spdk_top/Makefile +++ b/app/spdk_top/Makefile @@ -38,7 +38,7 @@ APP = spdk_top C_SRCS := spdk_top.c -SPDK_LIB_LIST = jsonrpc json rpc log util +SPDK_LIB_LIST = rpc LIBS=-lncurses -lpanel -lmenu include $(SPDK_ROOT_DIR)/mk/spdk.app.mk diff --git a/app/vhost/Makefile b/app/vhost/Makefile index c4228562c..7df6b0a9b 100644 --- a/app/vhost/Makefile +++ b/app/vhost/Makefile @@ -39,13 +39,7 @@ APP = vhost C_SRCS := vhost.c -SPDK_LIB_LIST = $(ALL_MODULES_LIST) -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 +SPDK_LIB_LIST = $(ALL_MODULES_LIST) event_vhost event_nbd ifeq ($(SPDK_ROOT_DIR)/lib/env_dpdk,$(CONFIG_ENV)) SPDK_LIB_LIST += env_dpdk_rpc diff --git a/examples/accel/perf/Makefile b/examples/accel/perf/Makefile index b28f7c412..53b9ae6cb 100644 --- a/examples/accel/perf/Makefile +++ b/examples/accel/perf/Makefile @@ -39,9 +39,6 @@ APP = accel_perf C_SRCS := accel_perf.c -SPDK_LIB_LIST = $(ALL_MODULES_LIST) -SPDK_LIB_LIST += $(EVENT_BDEV_SUBSYSTEM) -SPDK_LIB_LIST += bdev accel event thread util conf trace \ - log jsonrpc json rpc sock notify +SPDK_LIB_LIST = $(ACCEL_MODULES_LIST) event_accel include $(SPDK_ROOT_DIR)/mk/spdk.app.mk diff --git a/examples/bdev/fio_plugin/Makefile b/examples/bdev/fio_plugin/Makefile index 109745e49..1d48d1e99 100644 --- a/examples/bdev/fio_plugin/Makefile +++ b/examples/bdev/fio_plugin/Makefile @@ -40,8 +40,6 @@ FIO_PLUGIN := spdk_bdev C_SRCS = fio_plugin.c -SPDK_LIB_LIST = $(ALL_MODULES_LIST) -SPDK_LIB_LIST += thread util bdev conf accel rpc jsonrpc json log sock trace notify -SPDK_LIB_LIST += event $(EVENT_BDEV_SUBSYSTEM) +SPDK_LIB_LIST = $(ALL_MODULES_LIST) event_bdev include $(SPDK_ROOT_DIR)/mk/spdk.fio.mk diff --git a/examples/bdev/hello_world/Makefile b/examples/bdev/hello_world/Makefile index 8b853dbeb..e2848a7ce 100644 --- a/examples/bdev/hello_world/Makefile +++ b/examples/bdev/hello_world/Makefile @@ -37,8 +37,6 @@ APP = hello_bdev C_SRCS := hello_bdev.c -SPDK_LIB_LIST = $(ALL_MODULES_LIST) -SPDK_LIB_LIST += $(EVENT_BDEV_SUBSYSTEM) -SPDK_LIB_LIST += bdev accel event thread util conf trace log jsonrpc json rpc sock notify +SPDK_LIB_LIST = $(ALL_MODULES_LIST) event_bdev include $(SPDK_ROOT_DIR)/mk/spdk.app.mk diff --git a/examples/blob/cli/Makefile b/examples/blob/cli/Makefile index 3c3ff1f26..e658ebc87 100644 --- a/examples/blob/cli/Makefile +++ b/examples/blob/cli/Makefile @@ -38,9 +38,6 @@ APP = blobcli C_SRCS := blobcli.c # 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 += $(EVENT_BDEV_SUBSYSTEM) -SPDK_LIB_LIST += bdev accel event thread util conf trace \ - log jsonrpc json rpc sock notify +SPDK_LIB_LIST = $(filter-out bdev_lvol,$(ALL_MODULES_LIST)) event_bdev include $(SPDK_ROOT_DIR)/mk/spdk.app.mk diff --git a/examples/blob/hello_world/Makefile b/examples/blob/hello_world/Makefile index 0b5e89396..ad6c814cc 100644 --- a/examples/blob/hello_world/Makefile +++ b/examples/blob/hello_world/Makefile @@ -37,9 +37,6 @@ APP = hello_blob C_SRCS := hello_blob.c -SPDK_LIB_LIST = $(ALL_MODULES_LIST) -SPDK_LIB_LIST += $(EVENT_BDEV_SUBSYSTEM) -SPDK_LIB_LIST += bdev accel event thread util conf trace \ - log jsonrpc json rpc sock notify +SPDK_LIB_LIST = $(ALL_MODULES_LIST) event_bdev include $(SPDK_ROOT_DIR)/mk/spdk.app.mk diff --git a/examples/interrupt_tgt/Makefile b/examples/interrupt_tgt/Makefile index 960a1ba24..b86fa1e9c 100644 --- a/examples/interrupt_tgt/Makefile +++ b/examples/interrupt_tgt/Makefile @@ -40,15 +40,13 @@ APP = interrupt_tgt C_SRCS := interrupt_tgt.c # Basic libaries to support spdk application -SPDK_LIB_LIST += event thread -SPDK_LIB_LIST += jsonrpc json rpc trace conf util log +SPDK_LIB_LIST += event # Basic bdev libraries -SPDK_LIB_LIST += bdev notify accel vmd sock -SPDK_LIB_LIST += $(EVENT_BDEV_SUBSYSTEM) # event_bdev depends on some other event modules, but they dont support edriven yet +SPDK_LIB_LIST += event_bdev # Aio bdev library SPDK_LIB_LIST += bdev_aio # 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 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 @@ -56,8 +54,8 @@ SPDK_LIB_LIST += bdev_lvol lvol blob_bdev blob # blobfs libraries SPDK_LIB_LIST += blobfs blobfs_bdev # vhost blk related libraries. -SPDK_LIB_LIST += vhost 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_vhost +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)) SPDK_LIB_LIST += env_dpdk_rpc diff --git a/examples/ioat/perf/Makefile b/examples/ioat/perf/Makefile index 5586b8120..560437231 100644 --- a/examples/ioat/perf/Makefile +++ b/examples/ioat/perf/Makefile @@ -38,6 +38,6 @@ APP = ioat_perf C_SRCS := perf.c -SPDK_LIB_LIST = ioat thread util log +SPDK_LIB_LIST = ioat util include $(SPDK_ROOT_DIR)/mk/spdk.app.mk diff --git a/examples/ioat/verify/Makefile b/examples/ioat/verify/Makefile index 50cfc6665..844353939 100644 --- a/examples/ioat/verify/Makefile +++ b/examples/ioat/verify/Makefile @@ -38,6 +38,6 @@ APP = verify C_SRCS := verify.c -SPDK_LIB_LIST = ioat thread util log +SPDK_LIB_LIST = ioat util include $(SPDK_ROOT_DIR)/mk/spdk.app.mk diff --git a/examples/nvme/fio_plugin/Makefile b/examples/nvme/fio_plugin/Makefile index 75caa3d78..e67641aad 100644 --- a/examples/nvme/fio_plugin/Makefile +++ b/examples/nvme/fio_plugin/Makefile @@ -40,11 +40,6 @@ FIO_PLUGIN := spdk_nvme C_SRCS = fio_plugin.c -SPDK_LIB_LIST = $(SOCK_MODULES_LIST) -SPDK_LIB_LIST += nvme thread util log sock vmd jsonrpc json rpc - -ifeq ($(CONFIG_RDMA),y) -SPDK_LIB_LIST += rdma -endif +SPDK_LIB_LIST = $(SOCK_MODULES_LIST) nvme vmd include $(SPDK_ROOT_DIR)/mk/spdk.fio.mk diff --git a/examples/nvmf/nvmf/Makefile b/examples/nvmf/nvmf/Makefile index ccf5273be..e12170a36 100644 --- a/examples/nvmf/nvmf/Makefile +++ b/examples/nvmf/nvmf/Makefile @@ -38,9 +38,7 @@ include $(SPDK_ROOT_DIR)/mk/spdk.modules.mk APP := nvmf C_SRCS := nvmf.c -SPDK_LIB_LIST = $(ALL_MODULES_LIST) -SPDK_LIB_LIST += nvmf thread util bdev conf accel rpc jsonrpc json log sock trace notify -SPDK_LIB_LIST += event $(EVENT_BDEV_SUBSYSTEM) +SPDK_LIB_LIST = $(ALL_MODULES_LIST) event_bdev nvmf ifeq ($(CONFIG_FC),y) ifneq ($(strip $(CONFIG_FC_PATH)),) diff --git a/examples/sock/hello_world/Makefile b/examples/sock/hello_world/Makefile index e326bf26b..f86df44cc 100644 --- a/examples/sock/hello_world/Makefile +++ b/examples/sock/hello_world/Makefile @@ -38,6 +38,6 @@ APP = hello_sock C_SRCS := hello_sock.c 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 diff --git a/lib/rocksdb/spdk.rocksdb.mk b/lib/rocksdb/spdk.rocksdb.mk index a54efe41e..6916e27ea 100644 --- a/lib/rocksdb/spdk.rocksdb.mk +++ b/lib/rocksdb/spdk.rocksdb.mk @@ -53,9 +53,7 @@ ifeq ($(CONFIG_ASAN),y) CXXFLAGS += -fno-sanitize=address endif -SPDK_LIB_LIST = $(ALL_MODULES_LIST) -SPDK_LIB_LIST += $(EVENT_BDEV_SUBSYSTEM) -SPDK_LIB_LIST += bdev accel event util conf trace log jsonrpc json rpc sock thread notify +SPDK_LIB_LIST = $(ALL_MODULES_LIST) event_bdev AM_LINK += $(SPDK_LIB_LINKER_ARGS) $(ENV_LINKER_ARGS) AM_LINK += $(SYS_LIBS) diff --git a/mk/nvme.libtest.mk b/mk/nvme.libtest.mk index 6fc8f9a4d..201db5037 100644 --- a/mk/nvme.libtest.mk +++ b/mk/nvme.libtest.mk @@ -38,11 +38,6 @@ include $(SPDK_ROOT_DIR)/mk/spdk.modules.mk C_SRCS := $(APP:%=%.c) -SPDK_LIB_LIST = $(SOCK_MODULES_LIST) -SPDK_LIB_LIST += nvme thread util log sock vmd jsonrpc json rpc - -ifeq ($(CONFIG_RDMA),y) -SPDK_LIB_LIST += rdma -endif +SPDK_LIB_LIST = $(SOCK_MODULES_LIST) nvme vmd include $(SPDK_ROOT_DIR)/mk/spdk.app.mk diff --git a/mk/spdk.app_vars.mk b/mk/spdk.app_vars.mk index fb1b3b1e3..059a56ec3 100644 --- a/mk/spdk.app_vars.mk +++ b/mk/spdk.app_vars.mk @@ -31,12 +31,33 @@ # 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 = \ -L$(SPDK_ROOT_DIR)/build/lib \ -Wl,--whole-archive \ -Wl,--no-as-needed \ - $(SPDK_LIB_LIST:%=-lspdk_%) \ + $(SPDK_DEPLIB_LIST:%=-lspdk_%) \ -Wl,--no-whole-archive # This is primarily used for unit tests to ensure they link when shared library diff --git a/test/app/bdev_svc/Makefile b/test/app/bdev_svc/Makefile index 2427f90cf..9cc362701 100644 --- a/test/app/bdev_svc/Makefile +++ b/test/app/bdev_svc/Makefile @@ -39,13 +39,10 @@ APP = bdev_svc C_SRCS := bdev_svc.c -SPDK_LIB_LIST = $(ALL_MODULES_LIST) -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 +SPDK_LIB_LIST = $(ALL_MODULES_LIST) event_bdev ifeq ($(OS),Linux) -SPDK_LIB_LIST += event_nbd nbd +SPDK_LIB_LIST += event_nbd endif ifeq ($(CONFIG_FC),y) diff --git a/test/app/fuzz/iscsi_fuzz/Makefile b/test/app/fuzz/iscsi_fuzz/Makefile index 0131e089a..fc992b9e9 100644 --- a/test/app/fuzz/iscsi_fuzz/Makefile +++ b/test/app/fuzz/iscsi_fuzz/Makefile @@ -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 += $(ISCSI_OBJS:%=$(SPDK_ROOT_DIR)/lib/iscsi/%.o) -SPDK_LIB_LIST += $(SOCK_MODULES_LIST) -SPDK_LIB_LIST += conf event json jsonrpc log scsi bdev notify rpc sock thread trace util +SPDK_LIB_LIST += $(SOCK_MODULES_LIST) event scsi include $(SPDK_ROOT_DIR)/mk/spdk.app.mk diff --git a/test/app/fuzz/nvme_fuzz/Makefile b/test/app/fuzz/nvme_fuzz/Makefile index b7ad5e172..e004f82ee 100644 --- a/test/app/fuzz/nvme_fuzz/Makefile +++ b/test/app/fuzz/nvme_fuzz/Makefile @@ -39,11 +39,6 @@ CFLAGS += -I$(SPDK_ROOT_DIR)/test/app/fuzz/common C_SRCS := nvme_fuzz.c -SPDK_LIB_LIST += $(SOCK_MODULES_LIST) -SPDK_LIB_LIST += conf event json jsonrpc log nvme rpc sock thread trace util - -ifeq ($(CONFIG_RDMA),y) -SPDK_LIB_LIST += rdma -endif +SPDK_LIB_LIST += $(SOCK_MODULES_LIST) event nvme conf include $(SPDK_ROOT_DIR)/mk/spdk.app.mk diff --git a/test/app/fuzz/vhost_fuzz/Makefile b/test/app/fuzz/vhost_fuzz/Makefile index 69b8d1866..0fda5fe3d 100644 --- a/test/app/fuzz/vhost_fuzz/Makefile +++ b/test/app/fuzz/vhost_fuzz/Makefile @@ -38,5 +38,5 @@ CFLAGS += -I$(SPDK_ROOT_DIR)/test/app/fuzz/common 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 diff --git a/test/app/stub/Makefile b/test/app/stub/Makefile index 79ca8a912..4780bf492 100644 --- a/test/app/stub/Makefile +++ b/test/app/stub/Makefile @@ -39,11 +39,6 @@ APP = stub C_SRCS := stub.c -SPDK_LIB_LIST = $(SOCK_MODULES_LIST) -SPDK_LIB_LIST += event conf nvme log trace rpc jsonrpc json thread util sock notify - -ifeq ($(CONFIG_RDMA),y) -SPDK_LIB_LIST += rdma -endif +SPDK_LIB_LIST = $(SOCK_MODULES_LIST) event nvme include $(SPDK_ROOT_DIR)/mk/spdk.app.mk diff --git a/test/bdev/bdevio/Makefile b/test/bdev/bdevio/Makefile index c64e2774a..a42ded076 100644 --- a/test/bdev/bdevio/Makefile +++ b/test/bdev/bdevio/Makefile @@ -39,9 +39,7 @@ APP = bdevio C_SRCS := bdevio.c -SPDK_LIB_LIST = $(ALL_MODULES_LIST) -SPDK_LIB_LIST += $(EVENT_BDEV_SUBSYSTEM) -SPDK_LIB_LIST += bdev accel event trace log conf thread util rpc jsonrpc json sock notify +SPDK_LIB_LIST = $(ALL_MODULES_LIST) event_bdev LIBS += -lcunit diff --git a/test/bdev/bdevperf/Makefile b/test/bdev/bdevperf/Makefile index f6cd81a5e..ef100188d 100644 --- a/test/bdev/bdevperf/Makefile +++ b/test/bdev/bdevperf/Makefile @@ -39,13 +39,10 @@ APP = bdevperf C_SRCS := bdevperf.c -SPDK_LIB_LIST = $(ALL_MODULES_LIST) -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 +SPDK_LIB_LIST = $(ALL_MODULES_LIST) event_bdev conf ifeq ($(OS),Linux) -SPDK_LIB_LIST += event_nbd nbd +SPDK_LIB_LIST += event_nbd endif ifeq ($(SPDK_ROOT_DIR)/lib/env_dpdk,$(CONFIG_ENV)) diff --git a/test/blobfs/fuse/Makefile b/test/blobfs/fuse/Makefile index 88835cdae..d484f6d24 100644 --- a/test/blobfs/fuse/Makefile +++ b/test/blobfs/fuse/Makefile @@ -39,9 +39,6 @@ APP = fuse C_SRCS := fuse.c -SPDK_LIB_LIST = $(ALL_MODULES_LIST) -SPDK_LIB_LIST += $(EVENT_BDEV_SUBSYSTEM) -SPDK_LIB_LIST += bdev accel event thread util conf trace \ - log jsonrpc json rpc sock notify +SPDK_LIB_LIST = $(ALL_MODULES_LIST) event_bdev include $(SPDK_ROOT_DIR)/mk/spdk.app.mk diff --git a/test/blobfs/mkfs/Makefile b/test/blobfs/mkfs/Makefile index 52bf45abc..775e49d98 100644 --- a/test/blobfs/mkfs/Makefile +++ b/test/blobfs/mkfs/Makefile @@ -39,9 +39,6 @@ APP = mkfs C_SRCS := mkfs.c -SPDK_LIB_LIST = $(ALL_MODULES_LIST) -SPDK_LIB_LIST += $(EVENT_BDEV_SUBSYSTEM) -SPDK_LIB_LIST += bdev accel event thread util conf trace \ - log jsonrpc json rpc sock notify +SPDK_LIB_LIST = $(ALL_MODULES_LIST) event_bdev include $(SPDK_ROOT_DIR)/mk/spdk.app.mk diff --git a/test/event/app_repeat/Makefile b/test/event/app_repeat/Makefile index f7c9b2747..f73b4403c 100644 --- a/test/event/app_repeat/Makefile +++ b/test/event/app_repeat/Makefile @@ -41,9 +41,7 @@ C_SRCS := app_repeat.c # Some of the modules and libaries are not repeatable yet, only organize # the repeatable ones. 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 += notify -SPDK_LIB_LIST += event_nbd nbd +SPDK_LIB_LIST += event_nbd BLOCKDEV_LIST = bdev_malloc bdev_null BLOCKDEV_LIST += bdev_aio diff --git a/test/event/event_perf/Makefile b/test/event/event_perf/Makefile index 464709396..06a0e3875 100644 --- a/test/event/event_perf/Makefile +++ b/test/event/event_perf/Makefile @@ -37,6 +37,6 @@ include $(SPDK_ROOT_DIR)/mk/spdk.common.mk APP = event_perf 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 diff --git a/test/event/reactor/Makefile b/test/event/reactor/Makefile index b5d94dcb1..71bd4d5db 100644 --- a/test/event/reactor/Makefile +++ b/test/event/reactor/Makefile @@ -37,6 +37,6 @@ include $(SPDK_ROOT_DIR)/mk/spdk.common.mk APP = reactor 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 diff --git a/test/event/reactor_perf/Makefile b/test/event/reactor_perf/Makefile index 74b56dcf8..1d506512d 100644 --- a/test/event/reactor_perf/Makefile +++ b/test/event/reactor_perf/Makefile @@ -37,6 +37,6 @@ include $(SPDK_ROOT_DIR)/mk/spdk.common.mk APP = reactor_perf 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 diff --git a/test/rpc_client/Makefile b/test/rpc_client/Makefile index e26b17470..8c9fff54f 100644 --- a/test/rpc_client/Makefile +++ b/test/rpc_client/Makefile @@ -39,6 +39,6 @@ APP = rpc_client_test 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