xref: /spdk/mk/spdk.lib_deps.mk (revision b3bec07939ebe2ea2e0c43931705d32aa9e06719)
1#  SPDX-License-Identifier: BSD-3-Clause
2#  Copyright (C) 2015 Intel Corporation.
3#  All rights reserved.
4#  Copyright (c) 2022-2023 NVIDIA CORPORATION & AFFILIATES. 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)
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 := log util
39DEPDIRS-reduce := log util
40DEPDIRS-thread := log util trace
41
42DEPDIRS-nvme := log sock util trace
43ifeq ($(OS),Linux)
44DEPDIRS-nvme += vfio_user
45endif
46ifeq ($(CONFIG_RDMA),y)
47DEPDIRS-nvme += rdma dma
48endif
49
50DEPDIRS-blob := log util thread dma
51DEPDIRS-accel := log util thread json rpc jsonrpc dma
52DEPDIRS-jsonrpc := log util json
53DEPDIRS-virtio := log util json thread vfio_user
54
55DEPDIRS-lvol := log util blob thread
56DEPDIRS-rpc := log util json jsonrpc
57
58DEPDIRS-net := log util $(JSON_LIBS)
59DEPDIRS-notify := log util $(JSON_LIBS)
60DEPDIRS-trace := log util $(JSON_LIBS)
61
62DEPDIRS-bdev := accel log util thread $(JSON_LIBS) notify trace dma
63DEPDIRS-blobfs := log thread blob trace util
64DEPDIRS-event := log util thread $(JSON_LIBS) trace init
65DEPDIRS-init := jsonrpc json log rpc thread util
66
67DEPDIRS-ftl := log util thread bdev trace
68DEPDIRS-nbd := log util thread $(JSON_LIBS) bdev
69ifeq ($(CONFIG_UBLK),y)
70DEPDIRS-ublk := log util thread $(JSON_LIBS) bdev
71endif
72DEPDIRS-nvmf := accel log sock util nvme thread $(JSON_LIBS) trace bdev
73ifeq ($(CONFIG_RDMA),y)
74DEPDIRS-nvmf += rdma
75endif
76ifeq ($(CONFIG_RDMA_PROV),mlx5_dv)
77DEPDIRS-mlx5 = log rdma util
78endif
79DEPDIRS-scsi := log util thread $(JSON_LIBS) trace bdev
80
81DEPDIRS-iscsi := log sock util conf thread $(JSON_LIBS) trace scsi
82DEPDIRS-vhost = log util thread $(JSON_LIBS) bdev scsi
83
84# ------------------------------------------------------------------------
85# Start module/ directory - This section extends the organizational pattern from
86# above. However, it introduces several more groupings which may not strictly follow
87# the ordering pattern above. These are used for convenience and to help quickly
88# determine the unique dependencies of a given module. It is also grouped by directory.
89
90BDEV_DEPS = log util $(JSON_LIBS) bdev
91BDEV_DEPS_THREAD = $(BDEV_DEPS) thread
92
93# module/blob
94DEPDIRS-blob_bdev := log thread bdev
95
96# module/blobfs
97DEPDIRS-blobfs_bdev := $(BDEV_DEPS_THREAD) blob_bdev blobfs
98ifeq ($(CONFIG_FUSE),y)
99DEPDIRS-blobfs_bdev += event
100endif
101
102# module/accel
103DEPDIRS-accel_ioat := log ioat thread jsonrpc rpc accel
104DEPDIRS-accel_dsa := log idxd thread $(JSON_LIBS) accel trace
105DEPDIRS-accel_iaa := log idxd thread $(JSON_LIBS) accel trace
106DEPDIRS-accel_dpdk_cryptodev := log thread $(JSON_LIBS) accel
107DEPDIRS-accel_dpdk_compressdev := log thread $(JSON_LIBS) accel util
108
109ifeq ($(CONFIG_RDMA_PROV),mlx5_dv)
110DEPDIRS-accel_mlx5 := accel thread log mlx5 rdma util
111endif
112
113# module/env_dpdk
114DEPDIRS-env_dpdk_rpc := log $(JSON_LIBS)
115
116# module/sock
117DEPDIRS-sock_posix := log sock util
118DEPDIRS-sock_uring := log sock util
119
120# module/scheduler
121DEPDIRS-scheduler_dynamic := event log thread util json
122ifeq (y,$(DPDK_POWER))
123DEPDIRS-scheduler_dpdk_governor := event log
124DEPDIRS-scheduler_gscheduler := event log
125endif
126
127# module/bdev
128ifeq ($(OS),Linux)
129DEPDIRS-bdev_ftl := $(BDEV_DEPS) ftl
130endif
131DEPDIRS-bdev_gpt := bdev json log thread util
132
133DEPDIRS-bdev_error := $(BDEV_DEPS)
134DEPDIRS-bdev_lvol := $(BDEV_DEPS) lvol blob blob_bdev
135DEPDIRS-bdev_rpc := $(BDEV_DEPS)
136DEPDIRS-bdev_split := $(BDEV_DEPS)
137
138DEPDIRS-bdev_aio := $(BDEV_DEPS_THREAD)
139DEPDIRS-bdev_compress := $(BDEV_DEPS_THREAD) reduce accel
140DEPDIRS-bdev_crypto := $(BDEV_DEPS_THREAD) accel
141DEPDIRS-bdev_delay := $(BDEV_DEPS_THREAD)
142DEPDIRS-bdev_iscsi := $(BDEV_DEPS_THREAD)
143DEPDIRS-bdev_malloc := $(BDEV_DEPS_THREAD) accel dma
144DEPDIRS-bdev_null := $(BDEV_DEPS_THREAD)
145DEPDIRS-bdev_nvme = $(BDEV_DEPS_THREAD) accel nvme trace
146DEPDIRS-bdev_ocf := $(BDEV_DEPS_THREAD)
147DEPDIRS-bdev_passthru := $(BDEV_DEPS_THREAD)
148DEPDIRS-bdev_raid := $(BDEV_DEPS_THREAD) accel
149DEPDIRS-bdev_rbd := $(BDEV_DEPS_THREAD)
150DEPDIRS-bdev_uring := $(BDEV_DEPS_THREAD)
151DEPDIRS-bdev_virtio := $(BDEV_DEPS_THREAD) virtio
152DEPDIRS-bdev_zone_block := $(BDEV_DEPS_THREAD)
153DEPDIRS-bdev_xnvme := $(BDEV_DEPS_THREAD)
154
155# module/event
156
157# module/event/subsystems
158# These depdirs include subsystem interdependencies which
159# are not related to symbols, but are defined directly in
160# the SPDK event subsystem code.
161DEPDIRS-event_accel := init accel event_iobuf
162DEPDIRS-event_vmd := init vmd $(JSON_LIBS) log thread util
163
164DEPDIRS-event_bdev := init bdev event_accel event_vmd event_sock event_iobuf
165
166DEPDIRS-event_scheduler := event init json log
167
168DEPDIRS-event_nbd := init nbd event_bdev
169ifeq ($(CONFIG_UBLK),y)
170DEPDIRS-event_ublk := init ublk event_bdev
171endif
172DEPDIRS-event_nvmf := init nvmf event_bdev event_scheduler event_sock thread log bdev util $(JSON_LIBS)
173DEPDIRS-event_scsi := init scsi event_bdev
174
175DEPDIRS-event_iscsi := init iscsi event_scheduler event_scsi event_sock
176DEPDIRS-event_vhost_blk := init vhost
177DEPDIRS-event_vhost_scsi := init vhost event_scheduler event_scsi
178DEPDIRS-event_sock := init sock
179DEPDIRS-event_vfu_tgt := init vfu_tgt
180DEPDIRS-event_iobuf := init log thread util $(JSON_LIBS)
181
182# module/vfu_device
183
184ifeq ($(CONFIG_VFIO_USER),y)
185DEPDIRS-vfu_device := $(BDEV_DEPS_THREAD) scsi vfu_tgt
186endif
187