xref: /linux/fs/xfs/Makefile (revision 71e2f4dd5a65bd8dbca0b77661e75eea471168f8)
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_da_format.o \
31				   xfs_defer.o \
32				   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 \
41				   xfs_iext_tree.o \
42				   xfs_inode_fork.o \
43				   xfs_inode_buf.o \
44				   xfs_log_rlimit.o \
45				   xfs_ag_resv.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_types.o \
55				   )
56# xfs_rtbitmap is shared with libxfs
57xfs-$(CONFIG_XFS_RT)		+= $(addprefix libxfs/, \
58				   xfs_rtbitmap.o \
59				   )
60
61# highlevel code
62xfs-y				+= xfs_aops.o \
63				   xfs_attr_inactive.o \
64				   xfs_attr_list.o \
65				   xfs_bmap_util.o \
66				   xfs_bio_io.o \
67				   xfs_buf.o \
68				   xfs_dir2_readdir.o \
69				   xfs_discard.o \
70				   xfs_error.o \
71				   xfs_export.o \
72				   xfs_extent_busy.o \
73				   xfs_file.o \
74				   xfs_filestream.o \
75				   xfs_fsmap.o \
76				   xfs_fsops.o \
77				   xfs_globals.o \
78				   xfs_health.o \
79				   xfs_icache.o \
80				   xfs_ioctl.o \
81				   xfs_iomap.o \
82				   xfs_iops.o \
83				   xfs_inode.o \
84				   xfs_itable.o \
85				   xfs_iwalk.o \
86				   xfs_message.o \
87				   xfs_mount.o \
88				   xfs_mru_cache.o \
89				   xfs_pwork.o \
90				   xfs_reflink.o \
91				   xfs_stats.o \
92				   xfs_super.o \
93				   xfs_symlink.o \
94				   xfs_sysfs.o \
95				   xfs_trans.o \
96				   xfs_xattr.o \
97				   kmem.o
98
99# low-level transaction/log code
100xfs-y				+= xfs_log.o \
101				   xfs_log_cil.o \
102				   xfs_bmap_item.o \
103				   xfs_buf_item.o \
104				   xfs_extfree_item.o \
105				   xfs_icreate_item.o \
106				   xfs_inode_item.o \
107				   xfs_refcount_item.o \
108				   xfs_rmap_item.o \
109				   xfs_log_recover.o \
110				   xfs_trans_ail.o \
111				   xfs_trans_buf.o
112
113# 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
121
122# xfs_rtbitmap is shared with libxfs
123xfs-$(CONFIG_XFS_RT)		+= xfs_rtalloc.o
124
125xfs-$(CONFIG_XFS_POSIX_ACL)	+= xfs_acl.o
126xfs-$(CONFIG_SYSCTL)		+= xfs_sysctl.o
127xfs-$(CONFIG_COMPAT)		+= xfs_ioctl32.o
128xfs-$(CONFIG_EXPORTFS_BLOCK_OPS)	+= xfs_pnfs.o
129
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 \
137				   agheader.o \
138				   alloc.o \
139				   attr.o \
140				   bmap.o \
141				   btree.o \
142				   common.o \
143				   dabtree.o \
144				   dir.o \
145				   fscounters.o \
146				   health.o \
147				   ialloc.o \
148				   inode.o \
149				   parent.o \
150				   refcount.o \
151				   rmap.o \
152				   scrub.o \
153				   symlink.o \
154				   )
155
156xfs-$(CONFIG_XFS_RT)		+= scrub/rtbitmap.o
157xfs-$(CONFIG_XFS_QUOTA)		+= scrub/quota.o
158
159# online repair
160ifeq ($(CONFIG_XFS_ONLINE_REPAIR),y)
161xfs-y				+= $(addprefix scrub/, \
162				   agheader_repair.o \
163				   bitmap.o \
164				   repair.o \
165				   )
166endif
167endif
168