]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - module/Kbuild.in
Vendor import of openzfs master @ 184df27eef0abdc7ab2105b21257f753834b936b
[FreeBSD/FreeBSD.git] / module / Kbuild.in
1 # When integrated in to a monolithic kernel the spl module must appear
2 # first.  This ensures its module initialization function is run before
3 # any of the other module initialization functions which depend on it.
4 ZFS_MODULES += spl/
5 ZFS_MODULES += avl/
6 ZFS_MODULES += icp/
7 ZFS_MODULES += lua/
8 ZFS_MODULES += nvpair/
9 ZFS_MODULES += unicode/
10 ZFS_MODULES += zcommon/
11 ZFS_MODULES += zfs/
12 ZFS_MODULES += zstd/
13
14 # The rest is only relevant when run by kbuild
15 ifneq ($(KERNELRELEASE),)
16
17 obj-$(CONFIG_ZFS) := $(ZFS_MODULES)
18
19 ZFS_MODULE_CFLAGS += -std=gnu99 -Wno-declaration-after-statement
20 ZFS_MODULE_CFLAGS += -Wmissing-prototypes
21 ZFS_MODULE_CFLAGS += @KERNEL_DEBUG_CFLAGS@  @NO_FORMAT_ZERO_LENGTH@
22
23 ifneq ($(KBUILD_EXTMOD),)
24 zfs_include = @abs_top_srcdir@/include
25 ZFS_MODULE_CFLAGS += -include @abs_top_builddir@/zfs_config.h
26 ZFS_MODULE_CFLAGS += -I@abs_top_builddir@/include
27 else
28 zfs_include = $(srctree)/include/zfs
29 ZFS_MODULE_CFLAGS += -include $(zfs_include)/zfs_config.h
30 endif
31
32 ZFS_MODULE_CFLAGS += -I$(zfs_include)/os/linux/kernel
33 ZFS_MODULE_CFLAGS += -I$(zfs_include)/os/linux/spl
34 ZFS_MODULE_CFLAGS += -I$(zfs_include)/os/linux/zfs
35 ZFS_MODULE_CFLAGS += -I$(zfs_include)
36 ZFS_MODULE_CPPFLAGS += -D_KERNEL
37 ZFS_MODULE_CPPFLAGS += @KERNEL_DEBUG_CPPFLAGS@
38
39 ifneq ($(KBUILD_EXTMOD),)
40 @CONFIG_QAT_TRUE@ZFS_MODULE_CFLAGS += -I@QAT_SRC@/include
41 @CONFIG_QAT_TRUE@KBUILD_EXTRA_SYMBOLS += @QAT_SYMBOLS@
42 endif
43
44 subdir-asflags-y := $(ZFS_MODULE_CFLAGS) $(ZFS_MODULE_CPPFLAGS)
45 subdir-ccflags-y := $(ZFS_MODULE_CFLAGS) $(ZFS_MODULE_CPPFLAGS)
46
47 endif