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