Makefile 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. # SPDX-License-Identifier: GPL-2.0
  2. # Subset of W=1 warnings
  3. subdir-ccflags-y += -Wextra -Wunused -Wno-unused-parameter
  4. subdir-ccflags-y += -Wmissing-declarations
  5. subdir-ccflags-y += -Wmissing-format-attribute
  6. subdir-ccflags-y += -Wmissing-prototypes
  7. subdir-ccflags-y += -Wold-style-definition
  8. subdir-ccflags-y += -Wmissing-include-dirs
  9. condflags := \
  10. $(call cc-option, -Wunused-but-set-variable) \
  11. $(call cc-option, -Wunused-const-variable) \
  12. $(call cc-option, -Wpacked-not-aligned) \
  13. $(call cc-option, -Wstringop-truncation) \
  14. $(call cc-option, -Wmaybe-uninitialized)
  15. subdir-ccflags-y += $(condflags)
  16. # The following turn off the warnings enabled by -Wextra
  17. subdir-ccflags-y += -Wno-missing-field-initializers
  18. subdir-ccflags-y += -Wno-sign-compare
  19. subdir-ccflags-y += -Wno-shift-negative-value
  20. obj-$(CONFIG_BTRFS_FS) := btrfs.o
  21. btrfs-y += super.o ctree.o extent-tree.o print-tree.o root-tree.o dir-item.o \
  22. file-item.o inode-item.o disk-io.o \
  23. transaction.o inode.o file.o defrag.o \
  24. extent_map.o sysfs.o accessors.o xattr.o ordered-data.o \
  25. extent_io.o volumes.o async-thread.o ioctl.o locking.o orphan.o \
  26. export.o tree-log.o free-space-cache.o zlib.o lzo.o zstd.o \
  27. compression.o delayed-ref.o relocation.o delayed-inode.o scrub.o \
  28. backref.o ulist.o qgroup.o send.o dev-replace.o raid56.o \
  29. uuid-tree.o props.o free-space-tree.o tree-checker.o space-info.o \
  30. block-rsv.o delalloc-space.o block-group.o discard.o reflink.o \
  31. subpage.o tree-mod-log.o extent-io-tree.o fs.o messages.o bio.o \
  32. lru_cache.o raid-stripe-tree.o fiemap.o direct-io.o
  33. btrfs-$(CONFIG_BTRFS_FS_POSIX_ACL) += acl.o
  34. btrfs-$(CONFIG_BTRFS_DEBUG) += ref-verify.o
  35. btrfs-$(CONFIG_BLK_DEV_ZONED) += zoned.o
  36. btrfs-$(CONFIG_FS_VERITY) += verity.o
  37. btrfs-$(CONFIG_BTRFS_FS_RUN_SANITY_TESTS) += tests/free-space-tests.o \
  38. tests/extent-buffer-tests.o tests/btrfs-tests.o \
  39. tests/extent-io-tests.o tests/inode-tests.o tests/qgroup-tests.o \
  40. tests/free-space-tree-tests.o tests/extent-map-tests.o \
  41. tests/raid-stripe-tree-tests.o tests/delayed-refs-tests.o \
  42. tests/chunk-allocation-tests.o