1# SPDX-License-Identifier: BSD-3-Clause 2# Copyright (C) 2015 Intel Corporation. 3# Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. 4# All rights reserved. 5# 6 7# A quick note on organization: 8# 9# Each grouping is independent from itself. it depends only on libraries 10# in the grouping above it. All dependencies are listed alphabetically within 11# groups. The only exception to this is the JSON_LIBS grouping which is a special 12# case since they almost always occur together. 13 14JSON_LIBS := json jsonrpc rpc 15 16DEPDIRS-env_ocf := 17DEPDIRS-log := 18DEPDIRS-rte_vhost := 19 20DEPDIRS-env_dpdk := log util 21 22DEPDIRS-ioat := log 23DEPDIRS-idxd := log util 24DEPDIRS-sock := log $(JSON_LIBS) trace 25DEPDIRS-util := log 26DEPDIRS-vmd := log util 27DEPDIRS-dma := log 28DEPDIRS-trace_parser := log 29ifeq ($(OS),Linux) 30DEPDIRS-vfio_user := log 31endif 32ifeq ($(CONFIG_VFIO_USER),y) 33DEPDIRS-vfu_tgt := log util thread $(JSON_LIBS) 34endif 35 36DEPDIRS-conf := log util 37DEPDIRS-json := log util 38DEPDIRS-rdma_utils := dma log util 39DEPDIRS-rdma_provider := log util rdma_utils 40ifeq ($(CONFIG_RDMA_PROV),mlx5_dv) 41DEPDIRS-rdma_provider += dma mlx5 42endif 43DEPDIRS-reduce := log util 44DEPDIRS-thread := log util trace 45DEPDIRS-keyring := log util $(JSON_LIBS) 46 47DEPDIRS-nvme := log keyring sock util trace dma 48ifeq ($(CONFIG_VFIO_USER),y) 49DEPDIRS-nvme += vfio_user 50endif 51ifeq ($(CONFIG_RDMA),y) 52DEPDIRS-nvme += rdma_provider rdma_utils 53endif 54 55DEPDIRS-blob := log util thread dma trace 56DEPDIRS-accel := log util thread json rpc jsonrpc dma 57DEPDIRS-jsonrpc := log util json 58DEPDIRS-virtio := log util json thread vfio_user 59 60DEPDIRS-lvol := log util blob thread 61DEPDIRS-rpc := log util json jsonrpc 62 63DEPDIRS-net := log util $(JSON_LIBS) 64DEPDIRS-notify := log util $(JSON_LIBS) 65DEPDIRS-trace := log util $(JSON_LIBS) 66 67DEPDIRS-bdev := accel log util thread $(JSON_LIBS) notify trace dma 68DEPDIRS-blobfs := log thread blob trace util 69DEPDIRS-event := log util thread $(JSON_LIBS) trace init 70DEPDIRS-init := jsonrpc json log rpc thread util 71DEPDIRS-ftl := log util thread bdev json jsonrpc 72ifeq ($(CONFIG_DEBUG),y) 73DEPDIRS-ftl += trace 74endif 75DEPDIRS-nbd := log util thread $(JSON_LIBS) bdev 76ifeq ($(CONFIG_UBLK),y) 77DEPDIRS-ublk := log util thread $(JSON_LIBS) bdev 78endif 79DEPDIRS-nvmf := accel log sock util nvme thread $(JSON_LIBS) trace bdev keyring 80ifeq ($(CONFIG_RDMA),y) 81DEPDIRS-nvmf += rdma_provider rdma_utils 82endif 83ifeq ($(CONFIG_RDMA_PROV),mlx5_dv) 84DEPDIRS-mlx5 = log rdma_utils util 85endif 86DEPDIRS-scsi := log util thread $(JSON_LIBS) trace bdev 87 88DEPDIRS-iscsi := log sock util conf thread $(JSON_LIBS) trace scsi 89DEPDIRS-vhost = log util thread $(JSON_LIBS) bdev scsi 90 91DEPDIRS-fsdev := log thread util $(JSON_LIBS) notify 92DEPDIRS-fuse_dispatcher := log thread util fsdev 93 94# ------------------------------------------------------------------------ 95# Start module/ directory - This section extends the organizational pattern from 96# above. However, it introduces several more groupings which may not strictly follow 97# the ordering pattern above. These are used for convenience and to help quickly 98# determine the unique dependencies of a given module. It is also grouped by directory. 99 100BDEV_DEPS = log util $(JSON_LIBS) bdev 101BDEV_DEPS_THREAD = $(BDEV_DEPS) thread 102 103FSDEV_DEPS = log util $(JSON_LIBS) fsdev 104FSDEV_DEPS_THREAD = $(FSDEV_DEPS) thread 105 106# module/blob 107DEPDIRS-blob_bdev := log thread bdev 108 109# module/blobfs 110DEPDIRS-blobfs_bdev := $(BDEV_DEPS_THREAD) blob_bdev blobfs 111 112# module/accel 113DEPDIRS-accel_ioat := log ioat thread $(JSON_LIBS) accel 114DEPDIRS-accel_dsa := log util idxd thread $(JSON_LIBS) accel trace 115DEPDIRS-accel_iaa := log util idxd thread $(JSON_LIBS) accel trace 116DEPDIRS-accel_dpdk_cryptodev := log thread $(JSON_LIBS) accel util 117DEPDIRS-accel_dpdk_compressdev := log thread $(JSON_LIBS) accel util 118DEPDIRS-accel_error := accel $(JSON_LIBS) thread util 119 120ifeq ($(CONFIG_RDMA_PROV),mlx5_dv) 121DEPDIRS-accel_mlx5 := accel thread log mlx5 rdma_utils util 122endif 123 124# module/env_dpdk 125DEPDIRS-env_dpdk_rpc := $(JSON_LIBS) 126 127# module/sock 128DEPDIRS-sock_posix := log sock util thread trace 129DEPDIRS-sock_uring := log sock util thread trace 130 131# module/scheduler 132DEPDIRS-scheduler_dynamic := event log thread util json 133ifeq (y,$(DPDK_POWER)) 134DEPDIRS-scheduler_dpdk_governor := event json log util 135DEPDIRS-scheduler_gscheduler := event log util 136endif 137 138# module/bdev 139ifeq ($(OS),Linux) 140DEPDIRS-bdev_ftl := $(BDEV_DEPS) ftl 141endif 142DEPDIRS-bdev_gpt := bdev json log thread util 143 144DEPDIRS-bdev_lvol := $(BDEV_DEPS) lvol blob blob_bdev 145DEPDIRS-bdev_rpc := $(BDEV_DEPS) 146DEPDIRS-bdev_split := $(BDEV_DEPS) 147 148DEPDIRS-bdev_aio := $(BDEV_DEPS_THREAD) 149DEPDIRS-bdev_compress := $(BDEV_DEPS_THREAD) reduce accel 150DEPDIRS-bdev_crypto := $(BDEV_DEPS_THREAD) accel 151DEPDIRS-bdev_delay := $(BDEV_DEPS_THREAD) 152DEPDIRS-bdev_error := $(BDEV_DEPS_THREAD) 153DEPDIRS-bdev_iscsi := $(BDEV_DEPS_THREAD) 154DEPDIRS-bdev_malloc := $(BDEV_DEPS_THREAD) accel dma 155DEPDIRS-bdev_null := $(BDEV_DEPS_THREAD) 156DEPDIRS-bdev_nvme = $(BDEV_DEPS_THREAD) accel keyring nvme trace 157DEPDIRS-bdev_ocf := $(BDEV_DEPS_THREAD) 158DEPDIRS-bdev_passthru := $(BDEV_DEPS_THREAD) 159DEPDIRS-bdev_raid := $(BDEV_DEPS_THREAD) trace 160ifeq ($(CONFIG_RAID5F),y) 161DEPDIRS-bdev_raid += accel 162endif 163DEPDIRS-bdev_rbd := $(BDEV_DEPS_THREAD) 164DEPDIRS-bdev_uring := $(BDEV_DEPS_THREAD) 165DEPDIRS-bdev_virtio := $(BDEV_DEPS_THREAD) virtio 166DEPDIRS-bdev_zone_block := $(BDEV_DEPS_THREAD) 167DEPDIRS-bdev_xnvme := $(BDEV_DEPS_THREAD) 168 169# module/fsdev 170DEPDIRS-fsdev_aio := $(FSDEV_DEPS_THREAD) 171 172# module/event 173 174# module/event/subsystems 175# These depdirs include subsystem interdependencies which 176# are not related to symbols, but are defined directly in 177# the SPDK event subsystem code. 178DEPDIRS-event_accel := init accel event_iobuf 179DEPDIRS-event_vmd := init vmd $(JSON_LIBS) log thread util 180 181DEPDIRS-event_bdev := init bdev event_accel event_vmd event_sock event_iobuf event_keyring 182 183DEPDIRS-event_scheduler := event init json log 184 185DEPDIRS-event_nbd := init nbd event_bdev 186ifeq ($(CONFIG_UBLK),y) 187DEPDIRS-event_ublk := init ublk event_bdev 188endif 189DEPDIRS-event_nvmf := init nvme nvmf event_bdev event_scheduler event_sock event_keyring \ 190 thread log bdev util $(JSON_LIBS) 191DEPDIRS-event_scsi := init scsi event_bdev 192 193DEPDIRS-event_iscsi := init iscsi event_scheduler event_scsi event_sock 194DEPDIRS-event_vhost_blk := init vhost 195DEPDIRS-event_vhost_scsi := init vhost event_scheduler event_scsi 196DEPDIRS-event_sock := init sock log 197DEPDIRS-event_vfu_tgt := init vfu_tgt 198DEPDIRS-event_iobuf := init log thread util $(JSON_LIBS) 199DEPDIRS-event_keyring := init json keyring 200DEPDIRS-event_fsdev := init fsdev 201 202# module/vfu_device 203 204ifeq ($(CONFIG_VFIO_USER),y) 205DEPDIRS-vfu_device := $(BDEV_DEPS_THREAD) scsi vfu_tgt 206ifeq ($(CONFIG_FSDEV),y) 207DEPDIRS-vfu_device += fuse_dispatcher 208endif 209endif 210 211# module/keyring 212DEPDIRS-keyring_file := log keyring util $(JSON_LIBS) 213DEPDIRS-keyring_linux := log keyring util $(JSON_LIBS) 214