xref: /spdk/mk/spdk.lib_deps.mk (revision 344bb69312056bf7ea1f5590bdff6186d4bc917e)
1#
2#  BSD LICENSE
3#
4#  Copyright (c) Intel Corporation.
5#  All rights reserved.
6#
7#  Redistribution and use in source and binary forms, with or without
8#  modification, are permitted provided that the following conditions
9#  are met:
10#
11#    * Redistributions of source code must retain the above copyright
12#      notice, this list of conditions and the following disclaimer.
13#    * Redistributions in binary form must reproduce the above copyright
14#      notice, this list of conditions and the following disclaimer in
15#      the documentation and/or other materials provided with the
16#      distribution.
17#    * Neither the name of Intel Corporation nor the names of its
18#      contributors may be used to endorse or promote products derived
19#      from this software without specific prior written permission.
20#
21#  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22#  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23#  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24#  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25#  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26#  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27#  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28#  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29#  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30#  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31#  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32#
33
34# A quick note on organization:
35#
36# Each grouping is independent from itself. it depends only on libraries
37# in the grouping above it. All dependencies are listed alphabetically within
38# groups. The only exception to this is the JSON_LIBS grouping which is a special
39# case since they almost always occur together.
40
41JSON_LIBS := json jsonrpc rpc
42
43DEPDIRS-env_ocf :=
44DEPDIRS-log :=
45DEPDIRS-rte_vhost :=
46
47DEPDIRS-ioat := log
48DEPDIRS-idxd := log util
49DEPDIRS-sock := log $(JSON_LIBS)
50DEPDIRS-util := log
51DEPDIRS-vmd := log
52
53DEPDIRS-conf := log util
54DEPDIRS-json := log util
55DEPDIRS-rdma := log util
56DEPDIRS-reduce := log util
57DEPDIRS-thread := log util
58
59DEPDIRS-nvme := log sock util
60ifeq ($(CONFIG_RDMA),y)
61DEPDIRS-nvme += rdma
62endif
63
64DEPDIRS-blob := log util thread
65DEPDIRS-accel := log util thread json
66DEPDIRS-jsonrpc := log util json
67DEPDIRS-virtio := log util json thread
68
69DEPDIRS-lvol := log util blob
70DEPDIRS-rpc := log util json jsonrpc
71
72DEPDIRS-net := log util $(JSON_LIBS)
73DEPDIRS-notify := log util $(JSON_LIBS)
74DEPDIRS-trace := log util $(JSON_LIBS)
75
76DEPDIRS-bdev := log util thread $(JSON_LIBS) notify trace
77DEPDIRS-blobfs := log thread blob trace
78DEPDIRS-event := log util conf thread $(JSON_LIBS) trace
79
80DEPDIRS-ftl := log util thread trace bdev
81DEPDIRS-nbd := log util thread $(JSON_LIBS) bdev
82DEPDIRS-nvmf := log sock util nvme thread $(JSON_LIBS) trace bdev
83ifeq ($(CONFIG_RDMA),y)
84DEPDIRS-nvmf += rdma
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
91# ------------------------------------------------------------------------
92# Start module/ directory - This section extends the organizational pattern from
93# above. However, it introduces several more groupings which may not strictly follow
94# the ordering pattern above. These are used for convenience and to help quickly
95# determine the unique dependencies of a given module. It is also grouped by directory.
96
97BDEV_DEPS = log util $(JSON_LIBS) bdev
98BDEV_DEPS_THREAD = $(BDEV_DEPS) thread
99
100# module/blob
101DEPDIRS-blob_bdev := log thread bdev
102
103# module/blobfs
104DEPDIRS-blobfs_bdev := $(BDEV_DEPS_THREAD) blob_bdev blobfs
105ifeq ($(CONFIG_FUSE),y)
106DEPDIRS-blobfs_bdev += event
107endif
108
109# module/accel
110DEPDIRS-accel_ioat := log ioat thread $(JSON_LIBS) accel util
111DEPDIRS-accel_idxd := log idxd thread $(JSON_LIBS) accel
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/bdev
121DEPDIRS-bdev_gpt := bdev json log thread util
122
123DEPDIRS-bdev_error := $(BDEV_DEPS)
124DEPDIRS-bdev_lvol := $(BDEV_DEPS) lvol blob blob_bdev
125DEPDIRS-bdev_malloc := $(BDEV_DEPS) accel
126DEPDIRS-bdev_rpc := $(BDEV_DEPS)
127DEPDIRS-bdev_split := $(BDEV_DEPS)
128
129DEPDIRS-bdev_aio := $(BDEV_DEPS_THREAD)
130DEPDIRS-bdev_compress := $(BDEV_DEPS_THREAD) reduce
131DEPDIRS-bdev_crypto := $(BDEV_DEPS_THREAD)
132DEPDIRS-bdev_delay := $(BDEV_DEPS_THREAD)
133DEPDIRS-bdev_iscsi := $(BDEV_DEPS_THREAD)
134DEPDIRS-bdev_null := $(BDEV_DEPS_THREAD)
135DEPDIRS-bdev_nvme = $(BDEV_DEPS_THREAD) nvme
136DEPDIRS-bdev_ocf := $(BDEV_DEPS_THREAD)
137DEPDIRS-bdev_passthru := $(BDEV_DEPS_THREAD)
138DEPDIRS-bdev_pmem := $(BDEV_DEPS_THREAD)
139DEPDIRS-bdev_raid := $(BDEV_DEPS_THREAD)
140DEPDIRS-bdev_rbd := $(BDEV_DEPS_THREAD)
141DEPDIRS-bdev_uring := $(BDEV_DEPS_THREAD)
142DEPDIRS-bdev_virtio := $(BDEV_DEPS_THREAD) virtio
143DEPDIRS-bdev_zone_block := $(BDEV_DEPS_THREAD)
144ifeq ($(OS),Linux)
145DEPDIRS-bdev_ftl := $(BDEV_DEPS_THREAD) ftl
146endif
147
148# module/event
149
150# module/event/subsystems
151# These depdirs include subsystem interdependencies which
152# are not related to symbols, but are defined directly in
153# the SPDK event subsystem code.
154DEPDIRS-event_accel := event accel
155DEPDIRS-event_net := event net
156DEPDIRS-event_vmd := event vmd $(JSON_LIBS) log thread
157
158DEPDIRS-event_bdev := event bdev event_accel event_vmd event_sock
159
160DEPDIRS-event_nbd := event nbd event_bdev
161DEPDIRS-event_nvmf := event nvmf event_bdev event_sock $(BDEV_DEPS_THREAD)
162DEPDIRS-event_scsi := event scsi event_bdev
163
164DEPDIRS-event_iscsi := event iscsi event_scsi event_sock
165DEPDIRS-event_vhost := event vhost event_scsi
166DEPDIRS-event_sock := event sock
167