Dave Chinner | 0b61f8a | 2018-06-05 19:42:14 -0700 | [diff] [blame] | 1 | # SPDX-License-Identifier: GPL-2.0 |
Andi Kleen | 58b7983 | 2007-11-27 16:53:47 +1100 | [diff] [blame] | 2 | # |
3 | # Copyright (c) 2000-2005 Silicon Graphics, Inc. | ||||
4 | # All Rights Reserved. | ||||
5 | # | ||||
Andi Kleen | 58b7983 | 2007-11-27 16:53:47 +1100 | [diff] [blame] | 6 | |
Masahiro Yamada | 9cc342f | 2019-05-13 15:22:16 +0900 | [diff] [blame] | 7 | ccflags-y += -I $(srctree)/$(src) # needed for trace events |
8 | ccflags-y += -I $(srctree)/$(src)/libxfs | ||||
Christoph Hellwig | b6bede3 | 2011-08-14 17:13:00 +0000 | [diff] [blame] | 9 | |
Andi Kleen | 58b7983 | 2007-11-27 16:53:47 +1100 | [diff] [blame] | 10 | obj-$(CONFIG_XFS_FS) += xfs.o |
Lachlan McIlroy | 269cdfa | 2007-11-28 18:28:09 +1100 | [diff] [blame] | 11 | |
Christoph Hellwig | c59d87c | 2011-08-12 16:21:35 -0500 | [diff] [blame] | 12 | # this one should be compiled first, as the tracing macros can easily blow up |
13 | xfs-y += xfs_trace.o | ||||
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 14 | |
Dave Chinner | 69116a1 | 2014-06-25 14:57:22 +1000 | [diff] [blame] | 15 | # build the libxfs code first |
16 | xfs-y += $(addprefix libxfs/, \ | ||||
Dave Chinner | b16817b | 2018-05-13 23:10:08 -0700 | [diff] [blame] | 17 | xfs_ag.o \ |
Dave Chinner | 30f712c | 2014-06-25 14:57:53 +1000 | [diff] [blame] | 18 | xfs_alloc.o \ |
19 | xfs_alloc_btree.o \ | ||||
20 | xfs_attr.o \ | ||||
21 | xfs_attr_leaf.o \ | ||||
22 | xfs_attr_remote.o \ | ||||
Dave Chinner | 1cfc4a9 | 2015-07-29 11:52:08 +1000 | [diff] [blame] | 23 | xfs_bit.o \ |
Dave Chinner | 30f712c | 2014-06-25 14:57:53 +1000 | [diff] [blame] | 24 | xfs_bmap.o \ |
25 | xfs_bmap_btree.o \ | ||||
26 | xfs_btree.o \ | ||||
Darrick J. Wong | e06536a | 2020-03-11 10:40:26 -0700 | [diff] [blame] | 27 | xfs_btree_staging.o \ |
Dave Chinner | 30f712c | 2014-06-25 14:57:53 +1000 | [diff] [blame] | 28 | xfs_da_btree.o \ |
Darrick J. Wong | 4e0cc29 | 2016-08-03 11:12:25 +1000 | [diff] [blame] | 29 | xfs_defer.o \ |
Dave Chinner | 30f712c | 2014-06-25 14:57:53 +1000 | [diff] [blame] | 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 \ | ||||
Christoph Hellwig | 6bdcf26 | 2017-11-03 10:34:46 -0700 | [diff] [blame] | 39 | xfs_iext_tree.o \ |
Dave Chinner | 30f712c | 2014-06-25 14:57:53 +1000 | [diff] [blame] | 40 | xfs_inode_fork.o \ |
41 | xfs_inode_buf.o \ | ||||
42 | xfs_log_rlimit.o \ | ||||
Darrick J. Wong | 3fd129b | 2016-09-19 10:30:52 +1000 | [diff] [blame] | 43 | xfs_ag_resv.o \ |
Darrick J. Wong | 673930c | 2016-08-03 11:33:43 +1000 | [diff] [blame] | 44 | xfs_rmap.o \ |
Darrick J. Wong | 035e00a | 2016-08-03 11:36:07 +1000 | [diff] [blame] | 45 | xfs_rmap_btree.o \ |
Darrick J. Wong | bdf2863 | 2016-10-03 09:11:19 -0700 | [diff] [blame] | 46 | xfs_refcount.o \ |
Darrick J. Wong | 1946b91 | 2016-10-03 09:11:18 -0700 | [diff] [blame] | 47 | xfs_refcount_btree.o \ |
Dave Chinner | 69116a1 | 2014-06-25 14:57:22 +1000 | [diff] [blame] | 48 | xfs_sb.o \ |
Dave Chinner | 30f712c | 2014-06-25 14:57:53 +1000 | [diff] [blame] | 49 | xfs_symlink_remote.o \ |
Eric Sandeen | 3f6d70e | 2019-07-12 15:07:05 -0700 | [diff] [blame] | 50 | xfs_trans_inode.o \ |
Dave Chinner | 30f712c | 2014-06-25 14:57:53 +1000 | [diff] [blame] | 51 | xfs_trans_resv.o \ |
Dave Chinner | 86210fb | 2018-06-07 07:53:33 -0700 | [diff] [blame] | 52 | xfs_types.o \ |
Dave Chinner | 30f712c | 2014-06-25 14:57:53 +1000 | [diff] [blame] | 53 | ) |
54 | # xfs_rtbitmap is shared with libxfs | ||||
55 | xfs-$(CONFIG_XFS_RT) += $(addprefix libxfs/, \ | ||||
56 | xfs_rtbitmap.o \ | ||||
Dave Chinner | 69116a1 | 2014-06-25 14:57:22 +1000 | [diff] [blame] | 57 | ) |
58 | |||||
Christoph Hellwig | c59d87c | 2011-08-12 16:21:35 -0500 | [diff] [blame] | 59 | # highlevel code |
60 | xfs-y += xfs_aops.o \ | ||||
Dave Chinner | fde2227 | 2013-08-12 20:49:39 +1000 | [diff] [blame] | 61 | xfs_attr_inactive.o \ |
Dave Chinner | abec5f2 | 2013-08-12 20:49:38 +1000 | [diff] [blame] | 62 | xfs_attr_list.o \ |
Dave Chinner | 6898811 | 2013-08-12 20:49:42 +1000 | [diff] [blame] | 63 | xfs_bmap_util.o \ |
Christoph Hellwig | 6ad5b32 | 2019-06-28 19:27:26 -0700 | [diff] [blame] | 64 | xfs_bio_io.o \ |
Christoph Hellwig | c59d87c | 2011-08-12 16:21:35 -0500 | [diff] [blame] | 65 | xfs_buf.o \ |
Dave Chinner | 4a8af27 | 2013-08-12 20:49:36 +1000 | [diff] [blame] | 66 | xfs_dir2_readdir.o \ |
Christoph Hellwig | c59d87c | 2011-08-12 16:21:35 -0500 | [diff] [blame] | 67 | xfs_discard.o \ |
68 | xfs_error.o \ | ||||
69 | xfs_export.o \ | ||||
Dave Chinner | efc27b5 | 2012-04-29 10:39:43 +0000 | [diff] [blame] | 70 | xfs_extent_busy.o \ |
Christoph Hellwig | c59d87c | 2011-08-12 16:21:35 -0500 | [diff] [blame] | 71 | xfs_file.o \ |
72 | xfs_filestream.o \ | ||||
Darrick J. Wong | e89c041 | 2017-03-28 14:56:37 -0700 | [diff] [blame] | 73 | xfs_fsmap.o \ |
Christoph Hellwig | c59d87c | 2011-08-12 16:21:35 -0500 | [diff] [blame] | 74 | xfs_fsops.o \ |
Christoph Hellwig | c59d87c | 2011-08-12 16:21:35 -0500 | [diff] [blame] | 75 | xfs_globals.o \ |
Darrick J. Wong | 6772c1f | 2019-04-12 07:40:25 -0700 | [diff] [blame] | 76 | xfs_health.o \ |
Dave Chinner | 6d8b79c | 2012-10-08 21:56:09 +1100 | [diff] [blame] | 77 | xfs_icache.o \ |
Christoph Hellwig | c59d87c | 2011-08-12 16:21:35 -0500 | [diff] [blame] | 78 | xfs_ioctl.o \ |
79 | xfs_iomap.o \ | ||||
80 | xfs_iops.o \ | ||||
Dave Chinner | 30f712c | 2014-06-25 14:57:53 +1000 | [diff] [blame] | 81 | xfs_inode.o \ |
Christoph Hellwig | c59d87c | 2011-08-12 16:21:35 -0500 | [diff] [blame] | 82 | xfs_itable.o \ |
Darrick J. Wong | a211432 | 2019-07-02 09:39:38 -0700 | [diff] [blame] | 83 | xfs_iwalk.o \ |
Christoph Hellwig | c59d87c | 2011-08-12 16:21:35 -0500 | [diff] [blame] | 84 | xfs_message.o \ |
Dave Chinner | ff55068 | 2013-08-12 20:49:41 +1000 | [diff] [blame] | 85 | xfs_mount.o \ |
Christoph Hellwig | c59d87c | 2011-08-12 16:21:35 -0500 | [diff] [blame] | 86 | xfs_mru_cache.o \ |
Darrick J. Wong | 4078671 | 2019-07-03 07:33:26 -0700 | [diff] [blame] | 87 | xfs_pwork.o \ |
Darrick J. Wong | 3993bae | 2016-10-03 09:11:32 -0700 | [diff] [blame] | 88 | xfs_reflink.o \ |
Dave Chinner | 985ef4d | 2015-10-19 08:42:46 +1100 | [diff] [blame] | 89 | xfs_stats.o \ |
Dave Chinner | 19de735 | 2013-04-03 16:11:18 +1100 | [diff] [blame] | 90 | xfs_super.o \ |
Dave Chinner | 1fb7e48d | 2013-08-12 20:49:40 +1000 | [diff] [blame] | 91 | xfs_symlink.o \ |
Brian Foster | a31b1d3 | 2014-07-15 08:07:01 +1000 | [diff] [blame] | 92 | xfs_sysfs.o \ |
Dave Chinner | 7fd36c4 | 2013-08-12 20:49:32 +1000 | [diff] [blame] | 93 | xfs_trans.o \ |
Dave Chinner | 19de735 | 2013-04-03 16:11:18 +1100 | [diff] [blame] | 94 | xfs_xattr.o \ |
Amir Goldstein | d905fda | 2017-05-04 16:26:23 +0300 | [diff] [blame] | 95 | kmem.o |
Lachlan McIlroy | 269cdfa | 2007-11-28 18:28:09 +1100 | [diff] [blame] | 96 | |
Christoph Hellwig | c59d87c | 2011-08-12 16:21:35 -0500 | [diff] [blame] | 97 | # low-level transaction/log code |
98 | xfs-y += xfs_log.o \ | ||||
99 | xfs_log_cil.o \ | ||||
Darrick J. Wong | 6413a01 | 2016-10-03 09:11:25 -0700 | [diff] [blame] | 100 | xfs_bmap_item.o \ |
Christoph Hellwig | c59d87c | 2011-08-12 16:21:35 -0500 | [diff] [blame] | 101 | xfs_buf_item.o \ |
Darrick J. Wong | 86ffa47 | 2020-05-01 16:00:45 -0700 | [diff] [blame] | 102 | xfs_buf_item_recover.o \ |
103 | xfs_dquot_item_recover.o \ | ||||
Christoph Hellwig | c59d87c | 2011-08-12 16:21:35 -0500 | [diff] [blame] | 104 | xfs_extfree_item.o \ |
Dave Chinner | 30f712c | 2014-06-25 14:57:53 +1000 | [diff] [blame] | 105 | xfs_icreate_item.o \ |
Christoph Hellwig | c59d87c | 2011-08-12 16:21:35 -0500 | [diff] [blame] | 106 | xfs_inode_item.o \ |
Darrick J. Wong | 86ffa47 | 2020-05-01 16:00:45 -0700 | [diff] [blame] | 107 | xfs_inode_item_recover.o \ |
Darrick J. Wong | baf4bcac | 2016-10-03 09:11:20 -0700 | [diff] [blame] | 108 | xfs_refcount_item.o \ |
Darrick J. Wong | 5880f2d7 | 2016-08-03 12:04:45 +1000 | [diff] [blame] | 109 | xfs_rmap_item.o \ |
Dave Chinner | 30f712c | 2014-06-25 14:57:53 +1000 | [diff] [blame] | 110 | xfs_log_recover.o \ |
Andi Kleen | 58b7983 | 2007-11-27 16:53:47 +1100 | [diff] [blame] | 111 | xfs_trans_ail.o \ |
Eric Sandeen | 3f6d70e | 2019-07-12 15:07:05 -0700 | [diff] [blame] | 112 | xfs_trans_buf.o |
Andi Kleen | 58b7983 | 2007-11-27 16:53:47 +1100 | [diff] [blame] | 113 | |
Christoph Hellwig | c59d87c | 2011-08-12 16:21:35 -0500 | [diff] [blame] | 114 | # optional features |
115 | xfs-$(CONFIG_XFS_QUOTA) += xfs_dquot.o \ | ||||
116 | xfs_dquot_item.o \ | ||||
117 | xfs_trans_dquot.o \ | ||||
118 | xfs_qm_syscalls.o \ | ||||
119 | xfs_qm_bhv.o \ | ||||
120 | xfs_qm.o \ | ||||
121 | xfs_quotaops.o | ||||
Dave Chinner | c963c61 | 2013-10-15 09:17:56 +1100 | [diff] [blame] | 122 | |
123 | # xfs_rtbitmap is shared with libxfs | ||||
Dave Chinner | 30f712c | 2014-06-25 14:57:53 +1000 | [diff] [blame] | 124 | xfs-$(CONFIG_XFS_RT) += xfs_rtalloc.o |
Dave Chinner | c963c61 | 2013-10-15 09:17:56 +1100 | [diff] [blame] | 125 | |
Christoph Hellwig | c59d87c | 2011-08-12 16:21:35 -0500 | [diff] [blame] | 126 | xfs-$(CONFIG_XFS_POSIX_ACL) += xfs_acl.o |
Christoph Hellwig | c59d87c | 2011-08-12 16:21:35 -0500 | [diff] [blame] | 127 | xfs-$(CONFIG_SYSCTL) += xfs_sysctl.o |
128 | xfs-$(CONFIG_COMPAT) += xfs_ioctl32.o | ||||
Benjamin Coddington | 15d66ac | 2016-07-08 09:53:20 -0400 | [diff] [blame] | 129 | xfs-$(CONFIG_EXPORTFS_BLOCK_OPS) += xfs_pnfs.o |
Darrick J. Wong | 36fd6e8 | 2017-10-17 21:37:34 -0700 | [diff] [blame] | 130 | |
131 | # online scrub/repair | ||||
132 | ifeq ($(CONFIG_XFS_ONLINE_SCRUB),y) | ||||
133 | |||||
134 | # Tracepoints like to blow up, so build that before everything else | ||||
135 | |||||
136 | xfs-y += $(addprefix scrub/, \ | ||||
137 | trace.o \ | ||||
Darrick J. Wong | 21fb4cb | 2017-10-17 21:37:38 -0700 | [diff] [blame] | 138 | agheader.o \ |
Darrick J. Wong | efa7a99 | 2017-10-17 21:37:40 -0700 | [diff] [blame] | 139 | alloc.o \ |
Darrick J. Wong | eec0482 | 2017-10-17 21:37:45 -0700 | [diff] [blame] | 140 | attr.o \ |
Darrick J. Wong | 99d9d8d | 2017-10-17 21:37:43 -0700 | [diff] [blame] | 141 | bmap.o \ |
Darrick J. Wong | 537964bc | 2017-10-17 21:37:37 -0700 | [diff] [blame] | 142 | btree.o \ |
Darrick J. Wong | dcb660f | 2017-10-17 21:37:36 -0700 | [diff] [blame] | 143 | common.o \ |
Darrick J. Wong | 7c4a07a | 2017-10-17 21:37:43 -0700 | [diff] [blame] | 144 | dabtree.o \ |
Darrick J. Wong | a5c46e5 | 2017-10-17 21:37:44 -0700 | [diff] [blame] | 145 | dir.o \ |
Darrick J. Wong | 75efa57 | 2019-04-25 18:26:24 -0700 | [diff] [blame] | 146 | fscounters.o \ |
Darrick J. Wong | 4860a05 | 2019-04-16 08:22:00 -0700 | [diff] [blame] | 147 | health.o \ |
Darrick J. Wong | 3daa664 | 2017-10-17 21:37:40 -0700 | [diff] [blame] | 148 | ialloc.o \ |
Darrick J. Wong | 80e4e12 | 2017-10-17 21:37:42 -0700 | [diff] [blame] | 149 | inode.o \ |
Darrick J. Wong | 0f28b25 | 2017-10-17 21:37:46 -0700 | [diff] [blame] | 150 | parent.o \ |
Darrick J. Wong | edc09b5 | 2017-10-17 21:37:41 -0700 | [diff] [blame] | 151 | refcount.o \ |
Darrick J. Wong | c7e693d | 2017-10-17 21:37:41 -0700 | [diff] [blame] | 152 | rmap.o \ |
Darrick J. Wong | 36fd6e8 | 2017-10-17 21:37:34 -0700 | [diff] [blame] | 153 | scrub.o \ |
Darrick J. Wong | 2a721db | 2017-10-17 21:37:45 -0700 | [diff] [blame] | 154 | symlink.o \ |
Darrick J. Wong | 36fd6e8 | 2017-10-17 21:37:34 -0700 | [diff] [blame] | 155 | ) |
Darrick J. Wong | 29b0767 | 2017-10-17 21:37:46 -0700 | [diff] [blame] | 156 | |
157 | xfs-$(CONFIG_XFS_RT) += scrub/rtbitmap.o | ||||
Darrick J. Wong | c2fc338 | 2017-10-17 21:37:47 -0700 | [diff] [blame] | 158 | xfs-$(CONFIG_XFS_QUOTA) += scrub/quota.o |
Darrick J. Wong | 84d42ea | 2018-05-14 06:34:36 -0700 | [diff] [blame] | 159 | |
160 | # online repair | ||||
161 | ifeq ($(CONFIG_XFS_ONLINE_REPAIR),y) | ||||
162 | xfs-y += $(addprefix scrub/, \ | ||||
Darrick J. Wong | d25522f | 2018-05-29 22:18:12 -0700 | [diff] [blame] | 163 | agheader_repair.o \ |
Darrick J. Wong | bc270b5 | 2018-07-29 22:37:09 -0700 | [diff] [blame] | 164 | bitmap.o \ |
Darrick J. Wong | 84d42ea | 2018-05-14 06:34:36 -0700 | [diff] [blame] | 165 | repair.o \ |
166 | ) | ||||
167 | endif | ||||
Darrick J. Wong | 36fd6e8 | 2017-10-17 21:37:34 -0700 | [diff] [blame] | 168 | endif |