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