mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-29 12:29:35 +03:00
71504277ae
The linux module can be built either as an external module, or compiled
into the kernel, using copy-builtin. The source and build directories
are slightly different between the two cases, and currently, compiling
into the kernel still refers to some files from the configured ZFS
source tree, instead of the copies inside the kernel source tree. There
is also duplication between copy-builtin, which creates a Kbuild file to
build ZFS inside the kernel tree, and the top-level module/Makefile.in.
Fix this by moving the list of modules and the CFLAGS settings into a
new module/Kbuild.in, which will be used by the kernel kbuild
infrastructure, and using KBUILD_EXTMOD to distinguish the two cases
within the Makefiles, in order to choose appropriate include
directories etc.
Module CFLAGS setting is simplified by using subdir-ccflags-y (available
since 2.6.30) to set them in the top-level Kbuild instead of each
individual module. The disabling of -Wunused-but-set-variable is removed
from the lua and zfs modules. The variable that the Makefile uses is
actually not defined, so this has no effect; and the warning has long
been disabled by the kernel Makefile itself.
The target_cpu definition in module/{zfs,zcommon} is removed as it was
replaced by use of CONFIG_SPARC64 in
commit 70835c5b75
("Unify target_cpu handling")
os/linux/{spl,zfs} are removed from obj-m, as they are not modules in
themselves, but are included by the Makefile in the spl and zfs module
directories. The vestigial Makefiles in os and os/linux are removed.
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu>
Closes #10379
Closes #10421
38 lines
1.5 KiB
Makefile
38 lines
1.5 KiB
Makefile
#
|
|
# Linux specific sources included from module/zfs/Makefile.in
|
|
#
|
|
|
|
# Suppress unused-value warnings in sparc64 architecture headers
|
|
ccflags-$(CONFIG_SPARC64) += -Wno-unused-value
|
|
|
|
$(MODULE)-objs += ../os/linux/zfs/abd_os.o
|
|
$(MODULE)-objs += ../os/linux/zfs/arc_os.o
|
|
$(MODULE)-objs += ../os/linux/zfs/mmp_os.o
|
|
$(MODULE)-objs += ../os/linux/zfs/policy.o
|
|
$(MODULE)-objs += ../os/linux/zfs/trace.o
|
|
$(MODULE)-objs += ../os/linux/zfs/qat.o
|
|
$(MODULE)-objs += ../os/linux/zfs/qat_compress.o
|
|
$(MODULE)-objs += ../os/linux/zfs/qat_crypt.o
|
|
$(MODULE)-objs += ../os/linux/zfs/spa_misc_os.o
|
|
$(MODULE)-objs += ../os/linux/zfs/spa_stats.o
|
|
$(MODULE)-objs += ../os/linux/zfs/vdev_disk.o
|
|
$(MODULE)-objs += ../os/linux/zfs/vdev_file.o
|
|
$(MODULE)-objs += ../os/linux/zfs/zfs_acl.o
|
|
$(MODULE)-objs += ../os/linux/zfs/zfs_ctldir.o
|
|
$(MODULE)-objs += ../os/linux/zfs/zfs_debug.o
|
|
$(MODULE)-objs += ../os/linux/zfs/zfs_dir.o
|
|
$(MODULE)-objs += ../os/linux/zfs/zfs_file_os.o
|
|
$(MODULE)-objs += ../os/linux/zfs/zfs_ioctl_os.o
|
|
$(MODULE)-objs += ../os/linux/zfs/zfs_sysfs.o
|
|
$(MODULE)-objs += ../os/linux/zfs/zfs_vfsops.o
|
|
$(MODULE)-objs += ../os/linux/zfs/zfs_vnops.o
|
|
$(MODULE)-objs += ../os/linux/zfs/zfs_znode.o
|
|
$(MODULE)-objs += ../os/linux/zfs/zio_crypt.o
|
|
$(MODULE)-objs += ../os/linux/zfs/zpl_ctldir.o
|
|
$(MODULE)-objs += ../os/linux/zfs/zpl_export.o
|
|
$(MODULE)-objs += ../os/linux/zfs/zpl_file.o
|
|
$(MODULE)-objs += ../os/linux/zfs/zpl_inode.o
|
|
$(MODULE)-objs += ../os/linux/zfs/zpl_super.o
|
|
$(MODULE)-objs += ../os/linux/zfs/zpl_xattr.o
|
|
$(MODULE)-objs += ../os/linux/zfs/zvol_os.o
|