xref: /openbmc/linux/fs/xfs/Makefile (revision ba61bb17)
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
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_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_buf.o \
66				   xfs_dir2_readdir.o \
67				   xfs_discard.o \
68				   xfs_error.o \
69				   xfs_export.o \
70				   xfs_extent_busy.o \
71				   xfs_file.o \
72				   xfs_filestream.o \
73				   xfs_fsmap.o \
74				   xfs_fsops.o \
75				   xfs_globals.o \
76				   xfs_icache.o \
77				   xfs_ioctl.o \
78				   xfs_iomap.o \
79				   xfs_iops.o \
80				   xfs_inode.o \
81				   xfs_itable.o \
82				   xfs_message.o \
83				   xfs_mount.o \
84				   xfs_mru_cache.o \
85				   xfs_reflink.o \
86				   xfs_stats.o \
87				   xfs_super.o \
88				   xfs_symlink.o \
89				   xfs_sysfs.o \
90				   xfs_trans.o \
91				   xfs_xattr.o \
92				   kmem.o
93
94# low-level transaction/log code
95xfs-y				+= xfs_log.o \
96				   xfs_log_cil.o \
97				   xfs_bmap_item.o \
98				   xfs_buf_item.o \
99				   xfs_extfree_item.o \
100				   xfs_icreate_item.o \
101				   xfs_inode_item.o \
102				   xfs_refcount_item.o \
103				   xfs_rmap_item.o \
104				   xfs_log_recover.o \
105				   xfs_trans_ail.o \
106				   xfs_trans_bmap.o \
107				   xfs_trans_buf.o \
108				   xfs_trans_extfree.o \
109				   xfs_trans_inode.o \
110				   xfs_trans_refcount.o \
111				   xfs_trans_rmap.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				   ialloc.o \
146				   inode.o \
147				   parent.o \
148				   refcount.o \
149				   rmap.o \
150				   scrub.o \
151				   symlink.o \
152				   )
153
154xfs-$(CONFIG_XFS_RT)		+= scrub/rtbitmap.o
155xfs-$(CONFIG_XFS_QUOTA)		+= scrub/quota.o
156
157# online repair
158ifeq ($(CONFIG_XFS_ONLINE_REPAIR),y)
159xfs-y				+= $(addprefix scrub/, \
160				   agheader_repair.o \
161				   repair.o \
162				   )
163endif
164endif
165