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 $(srctree)/$(src) # needed for trace events 8ccflags-y += -I $(srctree)/$(src)/libxfs 9 10ccflags-$(CONFIG_XFS_DEBUG) += -g 11 12obj-$(CONFIG_XFS_FS) += xfs.o 13 14# this one should be compiled first, as the tracing macros can easily blow up 15xfs-y += xfs_trace.o 16 17# build the libxfs code first 18xfs-y += $(addprefix libxfs/, \ 19 xfs_ag.o \ 20 xfs_alloc.o \ 21 xfs_alloc_btree.o \ 22 xfs_attr.o \ 23 xfs_attr_leaf.o \ 24 xfs_attr_remote.o \ 25 xfs_bit.o \ 26 xfs_bmap.o \ 27 xfs_bmap_btree.o \ 28 xfs_btree.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_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_rmap.o \ 46 xfs_rmap_btree.o \ 47 xfs_refcount.o \ 48 xfs_refcount_btree.o \ 49 xfs_sb.o \ 50 xfs_symlink_remote.o \ 51 xfs_trans_inode.o \ 52 xfs_trans_resv.o \ 53 xfs_types.o \ 54 ) 55# xfs_rtbitmap is shared with libxfs 56xfs-$(CONFIG_XFS_RT) += $(addprefix libxfs/, \ 57 xfs_rtbitmap.o \ 58 ) 59 60# highlevel code 61xfs-y += xfs_aops.o \ 62 xfs_attr_inactive.o \ 63 xfs_attr_list.o \ 64 xfs_bmap_util.o \ 65 xfs_bio_io.o \ 66 xfs_buf.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 kmem.o 97 98# low-level transaction/log code 99xfs-y += xfs_log.o \ 100 xfs_log_cil.o \ 101 xfs_bmap_item.o \ 102 xfs_buf_item.o \ 103 xfs_extfree_item.o \ 104 xfs_icreate_item.o \ 105 xfs_inode_item.o \ 106 xfs_refcount_item.o \ 107 xfs_rmap_item.o \ 108 xfs_log_recover.o \ 109 xfs_trans_ail.o \ 110 xfs_trans_buf.o 111 112# optional features 113xfs-$(CONFIG_XFS_QUOTA) += xfs_dquot.o \ 114 xfs_dquot_item.o \ 115 xfs_trans_dquot.o \ 116 xfs_qm_syscalls.o \ 117 xfs_qm_bhv.o \ 118 xfs_qm.o \ 119 xfs_quotaops.o 120 121# xfs_rtbitmap is shared with libxfs 122xfs-$(CONFIG_XFS_RT) += xfs_rtalloc.o 123 124xfs-$(CONFIG_XFS_POSIX_ACL) += xfs_acl.o 125xfs-$(CONFIG_SYSCTL) += xfs_sysctl.o 126xfs-$(CONFIG_COMPAT) += xfs_ioctl32.o 127xfs-$(CONFIG_EXPORTFS_BLOCK_OPS) += xfs_pnfs.o 128 129# online scrub/repair 130ifeq ($(CONFIG_XFS_ONLINE_SCRUB),y) 131 132# Tracepoints like to blow up, so build that before everything else 133 134xfs-y += $(addprefix scrub/, \ 135 trace.o \ 136 agheader.o \ 137 alloc.o \ 138 attr.o \ 139 bmap.o \ 140 btree.o \ 141 common.o \ 142 dabtree.o \ 143 dir.o \ 144 fscounters.o \ 145 health.o \ 146 ialloc.o \ 147 inode.o \ 148 parent.o \ 149 refcount.o \ 150 rmap.o \ 151 scrub.o \ 152 symlink.o \ 153 ) 154 155xfs-$(CONFIG_XFS_RT) += scrub/rtbitmap.o 156xfs-$(CONFIG_XFS_QUOTA) += scrub/quota.o 157 158# online repair 159ifeq ($(CONFIG_XFS_ONLINE_REPAIR),y) 160xfs-y += $(addprefix scrub/, \ 161 agheader_repair.o \ 162 bitmap.o \ 163 repair.o \ 164 ) 165endif 166endif 167