GNU Linux-libre 6.9-gnu
[releases.git] / fs / xfs / Makefile
1 # SPDX-License-Identifier: GPL-2.0
2 #
3 # Copyright (c) 2000-2005 Silicon Graphics, Inc.
4 # All Rights Reserved.
5 #
6
7 ccflags-y += -I $(srctree)/$(src)               # needed for trace events
8 ccflags-y += -I $(srctree)/$(src)/libxfs
9
10 obj-$(CONFIG_XFS_FS)            += xfs.o
11
12 # this one should be compiled first, as the tracing macros can easily blow up
13 xfs-y                           += xfs_trace.o
14
15 # build the libxfs code first
16 xfs-y                           += $(addprefix libxfs/, \
17                                    xfs_ag.o \
18                                    xfs_alloc.o \
19                                    xfs_alloc_btree.o \
20                                    xfs_attr.o \
21                                    xfs_attr_leaf.o \
22                                    xfs_attr_remote.o \
23                                    xfs_bit.o \
24                                    xfs_bmap.o \
25                                    xfs_bmap_btree.o \
26                                    xfs_btree.o \
27                                    xfs_btree_staging.o \
28                                    xfs_da_btree.o \
29                                    xfs_defer.o \
30                                    xfs_dir2.o \
31                                    xfs_dir2_block.o \
32                                    xfs_dir2_data.o \
33                                    xfs_dir2_leaf.o \
34                                    xfs_dir2_node.o \
35                                    xfs_dir2_sf.o \
36                                    xfs_dquot_buf.o \
37                                    xfs_ialloc.o \
38                                    xfs_ialloc_btree.o \
39                                    xfs_iext_tree.o \
40                                    xfs_inode_fork.o \
41                                    xfs_inode_buf.o \
42                                    xfs_log_rlimit.o \
43                                    xfs_ag_resv.o \
44                                    xfs_rmap.o \
45                                    xfs_rmap_btree.o \
46                                    xfs_refcount.o \
47                                    xfs_refcount_btree.o \
48                                    xfs_sb.o \
49                                    xfs_symlink_remote.o \
50                                    xfs_trans_inode.o \
51                                    xfs_trans_resv.o \
52                                    xfs_types.o \
53                                    )
54 # xfs_rtbitmap is shared with libxfs
55 xfs-$(CONFIG_XFS_RT)            += $(addprefix libxfs/, \
56                                    xfs_rtbitmap.o \
57                                    )
58
59 # highlevel code
60 xfs-y                           += xfs_aops.o \
61                                    xfs_attr_inactive.o \
62                                    xfs_attr_list.o \
63                                    xfs_bmap_util.o \
64                                    xfs_bio_io.o \
65                                    xfs_buf.o \
66                                    xfs_dahash_test.o \
67                                    xfs_dir2_readdir.o \
68                                    xfs_discard.o \
69                                    xfs_error.o \
70                                    xfs_export.o \
71                                    xfs_extent_busy.o \
72                                    xfs_file.o \
73                                    xfs_filestream.o \
74                                    xfs_fsmap.o \
75                                    xfs_fsops.o \
76                                    xfs_globals.o \
77                                    xfs_health.o \
78                                    xfs_icache.o \
79                                    xfs_ioctl.o \
80                                    xfs_iomap.o \
81                                    xfs_iops.o \
82                                    xfs_inode.o \
83                                    xfs_itable.o \
84                                    xfs_iwalk.o \
85                                    xfs_message.o \
86                                    xfs_mount.o \
87                                    xfs_mru_cache.o \
88                                    xfs_pwork.o \
89                                    xfs_reflink.o \
90                                    xfs_stats.o \
91                                    xfs_super.o \
92                                    xfs_symlink.o \
93                                    xfs_sysfs.o \
94                                    xfs_trans.o \
95                                    xfs_xattr.o
96
97 # low-level transaction/log code
98 xfs-y                           += xfs_log.o \
99                                    xfs_log_cil.o \
100                                    xfs_bmap_item.o \
101                                    xfs_buf_item.o \
102                                    xfs_buf_item_recover.o \
103                                    xfs_dquot_item_recover.o \
104                                    xfs_extfree_item.o \
105                                    xfs_attr_item.o \
106                                    xfs_icreate_item.o \
107                                    xfs_inode_item.o \
108                                    xfs_inode_item_recover.o \
109                                    xfs_iunlink_item.o \
110                                    xfs_refcount_item.o \
111                                    xfs_rmap_item.o \
112                                    xfs_log_recover.o \
113                                    xfs_trans_ail.o \
114                                    xfs_trans_buf.o
115
116 # optional features
117 xfs-$(CONFIG_XFS_QUOTA)         += xfs_dquot.o \
118                                    xfs_dquot_item.o \
119                                    xfs_trans_dquot.o \
120                                    xfs_qm_syscalls.o \
121                                    xfs_qm_bhv.o \
122                                    xfs_qm.o \
123                                    xfs_quotaops.o
124
125 # xfs_rtbitmap is shared with libxfs
126 xfs-$(CONFIG_XFS_RT)            += xfs_rtalloc.o
127
128 xfs-$(CONFIG_XFS_POSIX_ACL)     += xfs_acl.o
129 xfs-$(CONFIG_SYSCTL)            += xfs_sysctl.o
130 xfs-$(CONFIG_COMPAT)            += xfs_ioctl32.o
131 xfs-$(CONFIG_EXPORTFS_BLOCK_OPS)        += xfs_pnfs.o
132
133 # notify failure
134 ifeq ($(CONFIG_MEMORY_FAILURE),y)
135 xfs-$(CONFIG_FS_DAX)            += xfs_notify_failure.o
136 endif
137
138 xfs-$(CONFIG_XFS_DRAIN_INTENTS) += xfs_drain.o
139 xfs-$(CONFIG_XFS_LIVE_HOOKS)    += xfs_hooks.o
140 xfs-$(CONFIG_XFS_MEMORY_BUFS)   += xfs_buf_mem.o
141 xfs-$(CONFIG_XFS_BTREE_IN_MEM)  += libxfs/xfs_btree_mem.o
142
143 # online scrub/repair
144 ifeq ($(CONFIG_XFS_ONLINE_SCRUB),y)
145
146 # Tracepoints like to blow up, so build that before everything else
147
148 xfs-y                           += $(addprefix scrub/, \
149                                    trace.o \
150                                    agb_bitmap.o \
151                                    agheader.o \
152                                    alloc.o \
153                                    attr.o \
154                                    bitmap.o \
155                                    bmap.o \
156                                    btree.o \
157                                    common.o \
158                                    dabtree.o \
159                                    dir.o \
160                                    fscounters.o \
161                                    health.o \
162                                    ialloc.o \
163                                    inode.o \
164                                    iscan.o \
165                                    nlinks.o \
166                                    parent.o \
167                                    readdir.o \
168                                    refcount.o \
169                                    rmap.o \
170                                    scrub.o \
171                                    symlink.o \
172                                    xfarray.o \
173                                    xfile.o \
174                                    )
175
176 xfs-$(CONFIG_XFS_ONLINE_SCRUB_STATS) += scrub/stats.o
177
178 xfs-$(CONFIG_XFS_RT)            += $(addprefix scrub/, \
179                                    rtbitmap.o \
180                                    rtsummary.o \
181                                    )
182
183 xfs-$(CONFIG_XFS_QUOTA)         += $(addprefix scrub/, \
184                                    dqiterate.o \
185                                    quota.o \
186                                    quotacheck.o \
187                                    )
188
189 # online repair
190 ifeq ($(CONFIG_XFS_ONLINE_REPAIR),y)
191 xfs-y                           += $(addprefix scrub/, \
192                                    agheader_repair.o \
193                                    alloc_repair.o \
194                                    bmap_repair.o \
195                                    cow_repair.o \
196                                    fscounters_repair.o \
197                                    ialloc_repair.o \
198                                    inode_repair.o \
199                                    newbt.o \
200                                    nlinks_repair.o \
201                                    rcbag_btree.o \
202                                    rcbag.o \
203                                    reap.o \
204                                    refcount_repair.o \
205                                    repair.o \
206                                    rmap_repair.o \
207                                    )
208
209 xfs-$(CONFIG_XFS_RT)            += $(addprefix scrub/, \
210                                    rtbitmap_repair.o \
211                                    )
212
213 xfs-$(CONFIG_XFS_QUOTA)         += $(addprefix scrub/, \
214                                    quota_repair.o \
215                                    quotacheck_repair.o \
216                                    )
217 endif
218 endif