blob: 4f95df476181903ab2615e7b18df1b7f3e957c54 [file] [log] [blame]
Dave Chinner0b61f8a2018-06-05 19:42:14 -07001# SPDX-License-Identifier: GPL-2.0
Andi Kleen58b79832007-11-27 16:53:47 +11002#
3# Copyright (c) 2000-2005 Silicon Graphics, Inc.
4# All Rights Reserved.
5#
Andi Kleen58b79832007-11-27 16:53:47 +11006
Masahiro Yamada9cc342f2019-05-13 15:22:16 +09007ccflags-y += -I $(srctree)/$(src) # needed for trace events
8ccflags-y += -I $(srctree)/$(src)/libxfs
Christoph Hellwigb6bede32011-08-14 17:13:00 +00009
matt mooney0ccd2342011-01-14 06:12:35 -080010ccflags-$(CONFIG_XFS_DEBUG) += -g
Andi Kleen58b79832007-11-27 16:53:47 +110011
Andi Kleen58b79832007-11-27 16:53:47 +110012obj-$(CONFIG_XFS_FS) += xfs.o
Lachlan McIlroy269cdfa2007-11-28 18:28:09 +110013
Christoph Hellwigc59d87c2011-08-12 16:21:35 -050014# this one should be compiled first, as the tracing macros can easily blow up
15xfs-y += xfs_trace.o
Christoph Hellwig0b1b2132009-12-14 23:14:59 +000016
Dave Chinner69116a12014-06-25 14:57:22 +100017# build the libxfs code first
18xfs-y += $(addprefix libxfs/, \
Dave Chinnerb16817b2018-05-13 23:10:08 -070019 xfs_ag.o \
Dave Chinner30f712c2014-06-25 14:57:53 +100020 xfs_alloc.o \
21 xfs_alloc_btree.o \
22 xfs_attr.o \
23 xfs_attr_leaf.o \
24 xfs_attr_remote.o \
Dave Chinner1cfc4a92015-07-29 11:52:08 +100025 xfs_bit.o \
Dave Chinner30f712c2014-06-25 14:57:53 +100026 xfs_bmap.o \
27 xfs_bmap_btree.o \
28 xfs_btree.o \
Darrick J. Wonge06536a2020-03-11 10:40:26 -070029 xfs_btree_staging.o \
Dave Chinner30f712c2014-06-25 14:57:53 +100030 xfs_da_btree.o \
Darrick J. Wong4e0cc292016-08-03 11:12:25 +100031 xfs_defer.o \
Dave Chinner30f712c2014-06-25 14:57:53 +100032 xfs_dir2.o \
33 xfs_dir2_block.o \
34 xfs_dir2_data.o \
35 xfs_dir2_leaf.o \
36 xfs_dir2_node.o \
37 xfs_dir2_sf.o \
38 xfs_dquot_buf.o \
39 xfs_ialloc.o \
40 xfs_ialloc_btree.o \
Christoph Hellwig6bdcf262017-11-03 10:34:46 -070041 xfs_iext_tree.o \
Dave Chinner30f712c2014-06-25 14:57:53 +100042 xfs_inode_fork.o \
43 xfs_inode_buf.o \
44 xfs_log_rlimit.o \
Darrick J. Wong3fd129b2016-09-19 10:30:52 +100045 xfs_ag_resv.o \
Darrick J. Wong673930c2016-08-03 11:33:43 +100046 xfs_rmap.o \
Darrick J. Wong035e00a2016-08-03 11:36:07 +100047 xfs_rmap_btree.o \
Darrick J. Wongbdf28632016-10-03 09:11:19 -070048 xfs_refcount.o \
Darrick J. Wong1946b912016-10-03 09:11:18 -070049 xfs_refcount_btree.o \
Dave Chinner69116a12014-06-25 14:57:22 +100050 xfs_sb.o \
Dave Chinner30f712c2014-06-25 14:57:53 +100051 xfs_symlink_remote.o \
Eric Sandeen3f6d70e2019-07-12 15:07:05 -070052 xfs_trans_inode.o \
Dave Chinner30f712c2014-06-25 14:57:53 +100053 xfs_trans_resv.o \
Dave Chinner86210fb2018-06-07 07:53:33 -070054 xfs_types.o \
Dave Chinner30f712c2014-06-25 14:57:53 +100055 )
56# xfs_rtbitmap is shared with libxfs
57xfs-$(CONFIG_XFS_RT) += $(addprefix libxfs/, \
58 xfs_rtbitmap.o \
Dave Chinner69116a12014-06-25 14:57:22 +100059 )
60
Christoph Hellwigc59d87c2011-08-12 16:21:35 -050061# highlevel code
62xfs-y += xfs_aops.o \
Dave Chinnerfde22272013-08-12 20:49:39 +100063 xfs_attr_inactive.o \
Dave Chinnerabec5f22013-08-12 20:49:38 +100064 xfs_attr_list.o \
Dave Chinner68988112013-08-12 20:49:42 +100065 xfs_bmap_util.o \
Christoph Hellwig6ad5b322019-06-28 19:27:26 -070066 xfs_bio_io.o \
Christoph Hellwigc59d87c2011-08-12 16:21:35 -050067 xfs_buf.o \
Dave Chinner4a8af272013-08-12 20:49:36 +100068 xfs_dir2_readdir.o \
Christoph Hellwigc59d87c2011-08-12 16:21:35 -050069 xfs_discard.o \
70 xfs_error.o \
71 xfs_export.o \
Dave Chinnerefc27b52012-04-29 10:39:43 +000072 xfs_extent_busy.o \
Christoph Hellwigc59d87c2011-08-12 16:21:35 -050073 xfs_file.o \
74 xfs_filestream.o \
Darrick J. Wonge89c0412017-03-28 14:56:37 -070075 xfs_fsmap.o \
Christoph Hellwigc59d87c2011-08-12 16:21:35 -050076 xfs_fsops.o \
Christoph Hellwigc59d87c2011-08-12 16:21:35 -050077 xfs_globals.o \
Darrick J. Wong6772c1f2019-04-12 07:40:25 -070078 xfs_health.o \
Dave Chinner6d8b79c2012-10-08 21:56:09 +110079 xfs_icache.o \
Christoph Hellwigc59d87c2011-08-12 16:21:35 -050080 xfs_ioctl.o \
81 xfs_iomap.o \
82 xfs_iops.o \
Dave Chinner30f712c2014-06-25 14:57:53 +100083 xfs_inode.o \
Christoph Hellwigc59d87c2011-08-12 16:21:35 -050084 xfs_itable.o \
Darrick J. Wonga2114322019-07-02 09:39:38 -070085 xfs_iwalk.o \
Christoph Hellwigc59d87c2011-08-12 16:21:35 -050086 xfs_message.o \
Dave Chinnerff550682013-08-12 20:49:41 +100087 xfs_mount.o \
Christoph Hellwigc59d87c2011-08-12 16:21:35 -050088 xfs_mru_cache.o \
Darrick J. Wong40786712019-07-03 07:33:26 -070089 xfs_pwork.o \
Darrick J. Wong3993bae2016-10-03 09:11:32 -070090 xfs_reflink.o \
Dave Chinner985ef4d2015-10-19 08:42:46 +110091 xfs_stats.o \
Dave Chinner19de7352013-04-03 16:11:18 +110092 xfs_super.o \
Dave Chinner1fb7e48d2013-08-12 20:49:40 +100093 xfs_symlink.o \
Brian Fostera31b1d32014-07-15 08:07:01 +100094 xfs_sysfs.o \
Dave Chinner7fd36c42013-08-12 20:49:32 +100095 xfs_trans.o \
Dave Chinner19de7352013-04-03 16:11:18 +110096 xfs_xattr.o \
Amir Goldsteind905fda2017-05-04 16:26:23 +030097 kmem.o
Lachlan McIlroy269cdfa2007-11-28 18:28:09 +110098
Christoph Hellwigc59d87c2011-08-12 16:21:35 -050099# low-level transaction/log code
100xfs-y += xfs_log.o \
101 xfs_log_cil.o \
Darrick J. Wong6413a012016-10-03 09:11:25 -0700102 xfs_bmap_item.o \
Christoph Hellwigc59d87c2011-08-12 16:21:35 -0500103 xfs_buf_item.o \
104 xfs_extfree_item.o \
Dave Chinner30f712c2014-06-25 14:57:53 +1000105 xfs_icreate_item.o \
Christoph Hellwigc59d87c2011-08-12 16:21:35 -0500106 xfs_inode_item.o \
Darrick J. Wongbaf4bcac2016-10-03 09:11:20 -0700107 xfs_refcount_item.o \
Darrick J. Wong5880f2d72016-08-03 12:04:45 +1000108 xfs_rmap_item.o \
Dave Chinner30f712c2014-06-25 14:57:53 +1000109 xfs_log_recover.o \
Andi Kleen58b79832007-11-27 16:53:47 +1100110 xfs_trans_ail.o \
Eric Sandeen3f6d70e2019-07-12 15:07:05 -0700111 xfs_trans_buf.o
Andi Kleen58b79832007-11-27 16:53:47 +1100112
Christoph Hellwigc59d87c2011-08-12 16:21:35 -0500113# optional features
114xfs-$(CONFIG_XFS_QUOTA) += xfs_dquot.o \
115 xfs_dquot_item.o \
116 xfs_trans_dquot.o \
117 xfs_qm_syscalls.o \
118 xfs_qm_bhv.o \
119 xfs_qm.o \
120 xfs_quotaops.o
Dave Chinnerc963c612013-10-15 09:17:56 +1100121
122# xfs_rtbitmap is shared with libxfs
Dave Chinner30f712c2014-06-25 14:57:53 +1000123xfs-$(CONFIG_XFS_RT) += xfs_rtalloc.o
Dave Chinnerc963c612013-10-15 09:17:56 +1100124
Christoph Hellwigc59d87c2011-08-12 16:21:35 -0500125xfs-$(CONFIG_XFS_POSIX_ACL) += xfs_acl.o
Christoph Hellwigc59d87c2011-08-12 16:21:35 -0500126xfs-$(CONFIG_SYSCTL) += xfs_sysctl.o
127xfs-$(CONFIG_COMPAT) += xfs_ioctl32.o
Benjamin Coddington15d66ac2016-07-08 09:53:20 -0400128xfs-$(CONFIG_EXPORTFS_BLOCK_OPS) += xfs_pnfs.o
Darrick J. Wong36fd6e82017-10-17 21:37:34 -0700129
130# online scrub/repair
131ifeq ($(CONFIG_XFS_ONLINE_SCRUB),y)
132
133# Tracepoints like to blow up, so build that before everything else
134
135xfs-y += $(addprefix scrub/, \
136 trace.o \
Darrick J. Wong21fb4cb2017-10-17 21:37:38 -0700137 agheader.o \
Darrick J. Wongefa7a992017-10-17 21:37:40 -0700138 alloc.o \
Darrick J. Wongeec04822017-10-17 21:37:45 -0700139 attr.o \
Darrick J. Wong99d9d8d2017-10-17 21:37:43 -0700140 bmap.o \
Darrick J. Wong537964bc2017-10-17 21:37:37 -0700141 btree.o \
Darrick J. Wongdcb660f2017-10-17 21:37:36 -0700142 common.o \
Darrick J. Wong7c4a07a2017-10-17 21:37:43 -0700143 dabtree.o \
Darrick J. Wonga5c46e52017-10-17 21:37:44 -0700144 dir.o \
Darrick J. Wong75efa572019-04-25 18:26:24 -0700145 fscounters.o \
Darrick J. Wong4860a052019-04-16 08:22:00 -0700146 health.o \
Darrick J. Wong3daa6642017-10-17 21:37:40 -0700147 ialloc.o \
Darrick J. Wong80e4e122017-10-17 21:37:42 -0700148 inode.o \
Darrick J. Wong0f28b252017-10-17 21:37:46 -0700149 parent.o \
Darrick J. Wongedc09b52017-10-17 21:37:41 -0700150 refcount.o \
Darrick J. Wongc7e693d2017-10-17 21:37:41 -0700151 rmap.o \
Darrick J. Wong36fd6e82017-10-17 21:37:34 -0700152 scrub.o \
Darrick J. Wong2a721db2017-10-17 21:37:45 -0700153 symlink.o \
Darrick J. Wong36fd6e82017-10-17 21:37:34 -0700154 )
Darrick J. Wong29b07672017-10-17 21:37:46 -0700155
156xfs-$(CONFIG_XFS_RT) += scrub/rtbitmap.o
Darrick J. Wongc2fc3382017-10-17 21:37:47 -0700157xfs-$(CONFIG_XFS_QUOTA) += scrub/quota.o
Darrick J. Wong84d42ea2018-05-14 06:34:36 -0700158
159# online repair
160ifeq ($(CONFIG_XFS_ONLINE_REPAIR),y)
161xfs-y += $(addprefix scrub/, \
Darrick J. Wongd25522f2018-05-29 22:18:12 -0700162 agheader_repair.o \
Darrick J. Wongbc270b52018-07-29 22:37:09 -0700163 bitmap.o \
Darrick J. Wong84d42ea2018-05-14 06:34:36 -0700164 repair.o \
165 )
166endif
Darrick J. Wong36fd6e82017-10-17 21:37:34 -0700167endif