xref: /linux/drivers/md/Makefile (revision 79790b6818e96c58fe2bffee1b418c16e64e7b80)
1# SPDX-License-Identifier: GPL-2.0
2#
3# Makefile for the kernel software RAID and LVM drivers.
4#
5
6dm-mod-y	+= dm.o dm-table.o dm-target.o dm-linear.o dm-stripe.o \
7		   dm-ioctl.o dm-io.o dm-kcopyd.o dm-sysfs.o dm-stats.o \
8		   dm-rq.o dm-io-rewind.o
9dm-multipath-y	+= dm-path-selector.o dm-mpath.o
10dm-historical-service-time-y += dm-ps-historical-service-time.o
11dm-io-affinity-y += dm-ps-io-affinity.o
12dm-queue-length-y += dm-ps-queue-length.o
13dm-round-robin-y += dm-ps-round-robin.o
14dm-service-time-y += dm-ps-service-time.o
15dm-snapshot-y	+= dm-snap.o dm-exception-store.o dm-snap-transient.o \
16		    dm-snap-persistent.o
17dm-mirror-y	+= dm-raid1.o
18dm-log-userspace-y += dm-log-userspace-base.o dm-log-userspace-transfer.o
19dm-bio-prison-y += dm-bio-prison-v1.o dm-bio-prison-v2.o
20dm-thin-pool-y	+= dm-thin.o dm-thin-metadata.o
21dm-cache-y	+= dm-cache-target.o dm-cache-metadata.o dm-cache-policy.o \
22		    dm-cache-background-tracker.o
23dm-cache-smq-y	+= dm-cache-policy-smq.o
24dm-ebs-y	+= dm-ebs-target.o
25dm-era-y	+= dm-era-target.o
26dm-clone-y	+= dm-clone-target.o dm-clone-metadata.o
27dm-verity-y	+= dm-verity-target.o
28dm-zoned-y	+= dm-zoned-target.o dm-zoned-metadata.o dm-zoned-reclaim.o
29
30md-mod-y	+= md.o md-bitmap.o
31raid456-y	+= raid5.o raid5-cache.o raid5-ppl.o
32
33# Note: link order is important.  All raid personalities
34# and must come before md.o, as they each initialise
35# themselves, and md.o may use the personalities when it
36# auto-initialised.
37
38obj-$(CONFIG_MD_RAID0)		+= raid0.o
39obj-$(CONFIG_MD_RAID1)		+= raid1.o
40obj-$(CONFIG_MD_RAID10)		+= raid10.o
41obj-$(CONFIG_MD_RAID456)	+= raid456.o
42obj-$(CONFIG_MD_CLUSTER)	+= md-cluster.o
43obj-$(CONFIG_BCACHE)		+= bcache/
44obj-$(CONFIG_BLK_DEV_MD)	+= md-mod.o
45ifeq ($(CONFIG_BLK_DEV_MD),y)
46obj-y				+= md-autodetect.o
47endif
48obj-$(CONFIG_BLK_DEV_DM)	+= dm-mod.o
49obj-$(CONFIG_BLK_DEV_DM_BUILTIN) += dm-builtin.o
50obj-$(CONFIG_DM_UNSTRIPED)	+= dm-unstripe.o
51obj-$(CONFIG_DM_BUFIO)		+= dm-bufio.o
52obj-$(CONFIG_DM_BIO_PRISON)	+= dm-bio-prison.o
53obj-$(CONFIG_DM_CRYPT)		+= dm-crypt.o
54obj-$(CONFIG_DM_DELAY)		+= dm-delay.o
55obj-$(CONFIG_DM_DUST)		+= dm-dust.o
56obj-$(CONFIG_DM_FLAKEY)		+= dm-flakey.o
57obj-$(CONFIG_DM_MULTIPATH)	+= dm-multipath.o dm-round-robin.o
58obj-$(CONFIG_DM_MULTIPATH_QL)	+= dm-queue-length.o
59obj-$(CONFIG_DM_MULTIPATH_ST)	+= dm-service-time.o
60obj-$(CONFIG_DM_MULTIPATH_HST)	+= dm-historical-service-time.o
61obj-$(CONFIG_DM_MULTIPATH_IOA)	+= dm-io-affinity.o
62obj-$(CONFIG_DM_SWITCH)		+= dm-switch.o
63obj-$(CONFIG_DM_SNAPSHOT)	+= dm-snapshot.o
64obj-$(CONFIG_DM_PERSISTENT_DATA) += persistent-data/
65obj-$(CONFIG_DM_MIRROR)		+= dm-mirror.o dm-log.o dm-region-hash.o
66obj-$(CONFIG_DM_LOG_USERSPACE)	+= dm-log-userspace.o
67obj-$(CONFIG_DM_ZERO)		+= dm-zero.o
68obj-$(CONFIG_DM_RAID)		+= dm-raid.o
69obj-$(CONFIG_DM_THIN_PROVISIONING) += dm-thin-pool.o
70obj-$(CONFIG_DM_VERITY)		+= dm-verity.o
71obj-$(CONFIG_DM_VDO)            += dm-vdo/
72obj-$(CONFIG_DM_CACHE)		+= dm-cache.o
73obj-$(CONFIG_DM_CACHE_SMQ)	+= dm-cache-smq.o
74obj-$(CONFIG_DM_EBS)		+= dm-ebs.o
75obj-$(CONFIG_DM_ERA)		+= dm-era.o
76obj-$(CONFIG_DM_CLONE)		+= dm-clone.o
77obj-$(CONFIG_DM_LOG_WRITES)	+= dm-log-writes.o
78obj-$(CONFIG_DM_INTEGRITY)	+= dm-integrity.o
79obj-$(CONFIG_DM_ZONED)		+= dm-zoned.o
80obj-$(CONFIG_DM_WRITECACHE)	+= dm-writecache.o
81obj-$(CONFIG_SECURITY_LOADPIN_VERITY)	+= dm-verity-loadpin.o
82
83ifeq ($(CONFIG_DM_INIT),y)
84dm-mod-objs			+= dm-init.o
85endif
86
87ifeq ($(CONFIG_DM_UEVENT),y)
88dm-mod-objs			+= dm-uevent.o
89endif
90
91ifeq ($(CONFIG_BLK_DEV_ZONED),y)
92dm-mod-objs			+= dm-zone.o
93endif
94
95ifeq ($(CONFIG_IMA),y)
96dm-mod-objs			+= dm-ima.o
97endif
98
99ifeq ($(CONFIG_DM_VERITY_FEC),y)
100dm-verity-objs			+= dm-verity-fec.o
101endif
102
103ifeq ($(CONFIG_DM_VERITY_VERIFY_ROOTHASH_SIG),y)
104dm-verity-objs			+= dm-verity-verify-sig.o
105endif
106
107ifeq ($(CONFIG_DM_AUDIT),y)
108dm-mod-objs			+= dm-audit.o
109endif
110