Makefile 4.79 KB
Newer Older
1
# SPDX-License-Identifier: GPL-2.0
2 3 4 5 6
#
# Copyright (c) 2000-2005 Silicon Graphics, Inc.
# All Rights Reserved.
#

7 8
ccflags-y += -I $(srctree)/$(src)		# needed for trace events
ccflags-y += -I $(srctree)/$(src)/libxfs
9

10
obj-$(CONFIG_XFS_FS)		+= xfs.o
11

12 13
# this one should be compiled first, as the tracing macros can easily blow up
xfs-y				+= xfs_trace.o
14

15 16
# build the libxfs code first
xfs-y				+= $(addprefix libxfs/, \
17
				   xfs_ag.o \
Dave Chinner's avatar
Dave Chinner committed
18 19 20 21 22
				   xfs_alloc.o \
				   xfs_alloc_btree.o \
				   xfs_attr.o \
				   xfs_attr_leaf.o \
				   xfs_attr_remote.o \
Dave Chinner's avatar
Dave Chinner committed
23
				   xfs_bit.o \
Dave Chinner's avatar
Dave Chinner committed
24 25 26
				   xfs_bmap.o \
				   xfs_bmap_btree.o \
				   xfs_btree.o \
27
				   xfs_btree_staging.o \
Dave Chinner's avatar
Dave Chinner committed
28
				   xfs_da_btree.o \
29
				   xfs_defer.o \
Dave Chinner's avatar
Dave Chinner committed
30 31 32 33 34 35 36 37 38
				   xfs_dir2.o \
				   xfs_dir2_block.o \
				   xfs_dir2_data.o \
				   xfs_dir2_leaf.o \
				   xfs_dir2_node.o \
				   xfs_dir2_sf.o \
				   xfs_dquot_buf.o \
				   xfs_ialloc.o \
				   xfs_ialloc_btree.o \
39
				   xfs_iext_tree.o \
Dave Chinner's avatar
Dave Chinner committed
40 41 42
				   xfs_inode_fork.o \
				   xfs_inode_buf.o \
				   xfs_log_rlimit.o \
43
				   xfs_ag_resv.o \
44
				   xfs_rmap.o \
45
				   xfs_rmap_btree.o \
46
				   xfs_refcount.o \
47
				   xfs_refcount_btree.o \
48
				   xfs_sb.o \
Dave Chinner's avatar
Dave Chinner committed
49
				   xfs_symlink_remote.o \
50
				   xfs_trans_inode.o \
Dave Chinner's avatar
Dave Chinner committed
51
				   xfs_trans_resv.o \
52
				   xfs_types.o \
Dave Chinner's avatar
Dave Chinner committed
53 54 55 56
				   )
# xfs_rtbitmap is shared with libxfs
xfs-$(CONFIG_XFS_RT)		+= $(addprefix libxfs/, \
				   xfs_rtbitmap.o \
57 58
				   )

59 60
# highlevel code
xfs-y				+= xfs_aops.o \
61
				   xfs_attr_inactive.o \
62
				   xfs_attr_list.o \
63
				   xfs_bmap_util.o \
64
				   xfs_bio_io.o \
65
				   xfs_buf.o \
66
				   xfs_dahash_test.o \
67
				   xfs_dir2_readdir.o \
68 69 70
				   xfs_discard.o \
				   xfs_error.o \
				   xfs_export.o \
71
				   xfs_extent_busy.o \
72 73
				   xfs_file.o \
				   xfs_filestream.o \
74
				   xfs_fsmap.o \
75 76
				   xfs_fsops.o \
				   xfs_globals.o \
77
				   xfs_health.o \
78
				   xfs_icache.o \
79 80 81
				   xfs_ioctl.o \
				   xfs_iomap.o \
				   xfs_iops.o \
Dave Chinner's avatar
Dave Chinner committed
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

97 98 99
# low-level transaction/log code
xfs-y				+= xfs_log.o \
				   xfs_log_cil.o \
100
				   xfs_bmap_item.o \
101
				   xfs_buf_item.o \
102 103
				   xfs_buf_item_recover.o \
				   xfs_dquot_item_recover.o \
104
				   xfs_extfree_item.o \
105
				   xfs_attr_item.o \
Dave Chinner's avatar
Dave Chinner committed
106
				   xfs_icreate_item.o \
107
				   xfs_inode_item.o \
108
				   xfs_inode_item_recover.o \
109
				   xfs_iunlink_item.o \
110
				   xfs_refcount_item.o \
111
				   xfs_rmap_item.o \
Dave Chinner's avatar
Dave Chinner committed
112
				   xfs_log_recover.o \
113
				   xfs_trans_ail.o \
114
				   xfs_trans_buf.o
115

116 117 118 119 120 121 122 123
# optional features
xfs-$(CONFIG_XFS_QUOTA)		+= xfs_dquot.o \
				   xfs_dquot_item.o \
				   xfs_trans_dquot.o \
				   xfs_qm_syscalls.o \
				   xfs_qm_bhv.o \
				   xfs_qm.o \
				   xfs_quotaops.o
124 125

# xfs_rtbitmap is shared with libxfs
Dave Chinner's avatar
Dave Chinner committed
126
xfs-$(CONFIG_XFS_RT)		+= xfs_rtalloc.o
127

128 129 130
xfs-$(CONFIG_XFS_POSIX_ACL)	+= xfs_acl.o
xfs-$(CONFIG_SYSCTL)		+= xfs_sysctl.o
xfs-$(CONFIG_COMPAT)		+= xfs_ioctl32.o
131
xfs-$(CONFIG_EXPORTFS_BLOCK_OPS)	+= xfs_pnfs.o
132

133 134 135 136 137
# notify failure
ifeq ($(CONFIG_MEMORY_FAILURE),y)
xfs-$(CONFIG_FS_DAX)		+= xfs_notify_failure.o
endif

138
xfs-$(CONFIG_XFS_DRAIN_INTENTS)	+= xfs_drain.o
139
xfs-$(CONFIG_XFS_LIVE_HOOKS)	+= xfs_hooks.o
140
xfs-$(CONFIG_XFS_MEMORY_BUFS)	+= xfs_buf_mem.o
141

142 143 144 145 146 147 148
# online scrub/repair
ifeq ($(CONFIG_XFS_ONLINE_SCRUB),y)

# Tracepoints like to blow up, so build that before everything else

xfs-y				+= $(addprefix scrub/, \
				   trace.o \
149
				   agb_bitmap.o \
150
				   agheader.o \
151
				   alloc.o \
152
				   attr.o \
153
				   bitmap.o \
154
				   bmap.o \
155
				   btree.o \
156
				   common.o \
157
				   dabtree.o \
158
				   dir.o \
159
				   fscounters.o \
160
				   health.o \
Darrick J. Wong's avatar
Darrick J. Wong committed
161
				   ialloc.o \
Darrick J. Wong's avatar
Darrick J. Wong committed
162
				   inode.o \
163
				   iscan.o \
164
				   nlinks.o \
165
				   parent.o \
166
				   readdir.o \
167
				   refcount.o \
Darrick J. Wong's avatar
Darrick J. Wong committed
168
				   rmap.o \
169
				   scrub.o \
170
				   symlink.o \
171 172
				   xfarray.o \
				   xfile.o \
173
				   )
174

175
xfs-$(CONFIG_XFS_ONLINE_SCRUB_STATS) += scrub/stats.o
176 177 178 179 180 181

xfs-$(CONFIG_XFS_RT)		+= $(addprefix scrub/, \
				   rtbitmap.o \
				   rtsummary.o \
				   )

182 183 184
xfs-$(CONFIG_XFS_QUOTA)		+= $(addprefix scrub/, \
				   dqiterate.o \
				   quota.o \
185
				   quotacheck.o \
186
				   )
187 188 189 190

# online repair
ifeq ($(CONFIG_XFS_ONLINE_REPAIR),y)
xfs-y				+= $(addprefix scrub/, \
Darrick J. Wong's avatar
Darrick J. Wong committed
191
				   agheader_repair.o \
192
				   alloc_repair.o \
193
				   bmap_repair.o \
194
				   cow_repair.o \
195
				   fscounters_repair.o \
196
				   ialloc_repair.o \
197
				   inode_repair.o \
198
				   newbt.o \
199
				   nlinks_repair.o \
200
				   reap.o \
201
				   refcount_repair.o \
202 203
				   repair.o \
				   )
204 205 206 207

xfs-$(CONFIG_XFS_RT)		+= $(addprefix scrub/, \
				   rtbitmap_repair.o \
				   )
Darrick J. Wong's avatar
Darrick J. Wong committed
208 209 210

xfs-$(CONFIG_XFS_QUOTA)		+= $(addprefix scrub/, \
				   quota_repair.o \
211
				   quotacheck_repair.o \
Darrick J. Wong's avatar
Darrick J. Wong committed
212
				   )
213
endif
214
endif