zed: Control NVMe fault LEDs
[zfs.git] / module / Kbuild.in
blob1507965c575048fc07f21bbab060df36f47a9a4e
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/
14 # The rest is only relevant when run by kbuild
15 ifneq ($(KERNELRELEASE),)
17 obj-$(CONFIG_ZFS) := $(ZFS_MODULES)
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@
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
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@
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
44 subdir-asflags-y := $(ZFS_MODULE_CFLAGS) $(ZFS_MODULE_CPPFLAGS)
45 subdir-ccflags-y := $(ZFS_MODULE_CFLAGS) $(ZFS_MODULE_CPPFLAGS)
47 endif