Makefile 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  1. # SPDX-License-Identifier: GPL-2.0
  2. #
  3. # Copyright (c) 2000-2005 Silicon Graphics, Inc.
  4. # All Rights Reserved.
  5. #
  6. ccflags-y += -I $(src) # needed for trace events
  7. ccflags-y += -I $(src)/libxfs
  8. obj-$(CONFIG_XFS_FS) += xfs.o
  9. # this one should be compiled first, as the tracing macros can easily blow up
  10. xfs-y += xfs_trace.o
  11. # build the libxfs code first
  12. xfs-y += $(addprefix libxfs/, \
  13. xfs_ag.o \
  14. xfs_alloc.o \
  15. xfs_alloc_btree.o \
  16. xfs_attr.o \
  17. xfs_attr_leaf.o \
  18. xfs_attr_remote.o \
  19. xfs_bit.o \
  20. xfs_bmap.o \
  21. xfs_bmap_btree.o \
  22. xfs_btree.o \
  23. xfs_btree_staging.o \
  24. xfs_da_btree.o \
  25. xfs_defer.o \
  26. xfs_dir2.o \
  27. xfs_dir2_block.o \
  28. xfs_dir2_data.o \
  29. xfs_dir2_leaf.o \
  30. xfs_dir2_node.o \
  31. xfs_dir2_sf.o \
  32. xfs_dquot_buf.o \
  33. xfs_exchmaps.o \
  34. xfs_ialloc.o \
  35. xfs_ialloc_btree.o \
  36. xfs_iext_tree.o \
  37. xfs_inode_fork.o \
  38. xfs_inode_buf.o \
  39. xfs_inode_util.o \
  40. xfs_log_rlimit.o \
  41. xfs_ag_resv.o \
  42. xfs_parent.o \
  43. xfs_rmap.o \
  44. xfs_rmap_btree.o \
  45. xfs_refcount.o \
  46. xfs_refcount_btree.o \
  47. xfs_sb.o \
  48. xfs_symlink_remote.o \
  49. xfs_trans_inode.o \
  50. xfs_trans_resv.o \
  51. xfs_trans_space.o \
  52. xfs_types.o \
  53. )
  54. # xfs_rtbitmap is shared with libxfs
  55. xfs-$(CONFIG_XFS_RT) += $(addprefix libxfs/, \
  56. xfs_rtbitmap.o \
  57. )
  58. # highlevel code
  59. xfs-y += xfs_aops.o \
  60. xfs_attr_inactive.o \
  61. xfs_attr_list.o \
  62. xfs_bmap_util.o \
  63. xfs_bio_io.o \
  64. xfs_buf.o \
  65. xfs_dahash_test.o \
  66. xfs_dir2_readdir.o \
  67. xfs_discard.o \
  68. xfs_error.o \
  69. xfs_exchrange.o \
  70. xfs_export.o \
  71. xfs_extent_busy.o \
  72. xfs_file.o \
  73. xfs_filestream.o \
  74. xfs_fsmap.o \
  75. xfs_fsops.o \
  76. xfs_globals.o \
  77. xfs_handle.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. # low-level transaction/log code
  98. xfs-y += xfs_log.o \
  99. xfs_log_cil.o \
  100. xfs_bmap_item.o \
  101. xfs_buf_item.o \
  102. xfs_buf_item_recover.o \
  103. xfs_dquot_item_recover.o \
  104. xfs_exchmaps_item.o \
  105. xfs_extfree_item.o \
  106. xfs_attr_item.o \
  107. xfs_icreate_item.o \
  108. xfs_inode_item.o \
  109. xfs_inode_item_recover.o \
  110. xfs_iunlink_item.o \
  111. xfs_refcount_item.o \
  112. xfs_rmap_item.o \
  113. xfs_log_recover.o \
  114. xfs_trans_ail.o \
  115. xfs_trans_buf.o
  116. # optional features
  117. xfs-$(CONFIG_XFS_QUOTA) += xfs_dquot.o \
  118. xfs_dquot_item.o \
  119. xfs_trans_dquot.o \
  120. xfs_qm_syscalls.o \
  121. xfs_qm_bhv.o \
  122. xfs_qm.o \
  123. xfs_quotaops.o
  124. # xfs_rtbitmap is shared with libxfs
  125. xfs-$(CONFIG_XFS_RT) += xfs_rtalloc.o
  126. xfs-$(CONFIG_XFS_POSIX_ACL) += xfs_acl.o
  127. xfs-$(CONFIG_SYSCTL) += xfs_sysctl.o
  128. xfs-$(CONFIG_COMPAT) += xfs_ioctl32.o
  129. xfs-$(CONFIG_EXPORTFS_BLOCK_OPS) += xfs_pnfs.o
  130. # notify failure
  131. ifeq ($(CONFIG_MEMORY_FAILURE),y)
  132. xfs-$(CONFIG_FS_DAX) += xfs_notify_failure.o
  133. endif
  134. xfs-$(CONFIG_XFS_DRAIN_INTENTS) += xfs_drain.o
  135. xfs-$(CONFIG_XFS_LIVE_HOOKS) += xfs_hooks.o
  136. xfs-$(CONFIG_XFS_MEMORY_BUFS) += xfs_buf_mem.o
  137. xfs-$(CONFIG_XFS_BTREE_IN_MEM) += libxfs/xfs_btree_mem.o
  138. # online scrub/repair
  139. ifeq ($(CONFIG_XFS_ONLINE_SCRUB),y)
  140. # Tracepoints like to blow up, so build that before everything else
  141. xfs-y += $(addprefix scrub/, \
  142. trace.o \
  143. agb_bitmap.o \
  144. agheader.o \
  145. alloc.o \
  146. attr.o \
  147. bitmap.o \
  148. bmap.o \
  149. btree.o \
  150. common.o \
  151. dabtree.o \
  152. dir.o \
  153. dirtree.o \
  154. fscounters.o \
  155. health.o \
  156. ialloc.o \
  157. inode.o \
  158. iscan.o \
  159. listxattr.o \
  160. nlinks.o \
  161. parent.o \
  162. readdir.o \
  163. refcount.o \
  164. rmap.o \
  165. scrub.o \
  166. symlink.o \
  167. xfarray.o \
  168. xfblob.o \
  169. xfile.o \
  170. )
  171. xfs-$(CONFIG_XFS_ONLINE_SCRUB_STATS) += scrub/stats.o
  172. xfs-$(CONFIG_XFS_RT) += $(addprefix scrub/, \
  173. rtbitmap.o \
  174. rtsummary.o \
  175. )
  176. xfs-$(CONFIG_XFS_QUOTA) += $(addprefix scrub/, \
  177. dqiterate.o \
  178. quota.o \
  179. quotacheck.o \
  180. )
  181. # online repair
  182. ifeq ($(CONFIG_XFS_ONLINE_REPAIR),y)
  183. xfs-y += $(addprefix scrub/, \
  184. agheader_repair.o \
  185. alloc_repair.o \
  186. attr_repair.o \
  187. bmap_repair.o \
  188. cow_repair.o \
  189. dir_repair.o \
  190. dirtree_repair.o \
  191. findparent.o \
  192. fscounters_repair.o \
  193. ialloc_repair.o \
  194. inode_repair.o \
  195. newbt.o \
  196. nlinks_repair.o \
  197. orphanage.o \
  198. parent_repair.o \
  199. rcbag_btree.o \
  200. rcbag.o \
  201. reap.o \
  202. refcount_repair.o \
  203. repair.o \
  204. rmap_repair.o \
  205. symlink_repair.o \
  206. tempfile.o \
  207. )
  208. xfs-$(CONFIG_XFS_RT) += $(addprefix scrub/, \
  209. rtbitmap_repair.o \
  210. rtsummary_repair.o \
  211. )
  212. xfs-$(CONFIG_XFS_QUOTA) += $(addprefix scrub/, \
  213. quota_repair.o \
  214. quotacheck_repair.o \
  215. )
  216. endif
  217. endif