]> git.proxmox.com Git - mirror_zfs.git/blame - module/Makefile.in
ztest: scrub ddt repair
[mirror_zfs.git] / module / Makefile.in
CommitLineData
c9c0d073 1subdir-m += avl
fed90353 2subdir-m += icp
d99a0153 3subdir-m += lua
c9c0d073 4subdir-m += nvpair
93ce2b4c 5subdir-m += spl
c9c0d073
BB
6subdir-m += unicode
7subdir-m += zcommon
8subdir-m += zfs
9
d09f98a9
BB
10INSTALL_MOD_DIR ?= extra
11
fed90353
BB
12ZFS_MODULE_CFLAGS += -std=gnu99 -Wno-declaration-after-statement
13ZFS_MODULE_CFLAGS += @KERNEL_DEBUG_CFLAGS@
2ee4a18b 14ZFS_MODULE_CFLAGS += -include @abs_top_builddir@/zfs_config.h
93ce2b4c
BB
15ZFS_MODULE_CFLAGS += -I@abs_top_srcdir@/include/spl
16ZFS_MODULE_CFLAGS += -I@abs_top_srcdir@/include
fed90353 17
93ce2b4c 18ZFS_MODULE_CPPFLAGS += -D_KERNEL
fed90353
BB
19ZFS_MODULE_CPPFLAGS += @KERNEL_DEBUG_CPPFLAGS@
20
6a9d6359 21@CONFIG_QAT_TRUE@ZFS_MODULE_CFLAGS += -I@QAT_SRC@/include
22@CONFIG_QAT_TRUE@KBUILD_EXTRA_SYMBOLS += @QAT_SYMBOLS@
fed90353
BB
23
24export ZFS_MODULE_CFLAGS ZFS_MODULE_CPPFLAGS
2ee4a18b 25
d99a0153 26SUBDIR_TARGETS = icp lua
0b04990a 27
c9c0d073 28modules:
0b04990a
TC
29 list='$(SUBDIR_TARGETS)'; for targetdir in $$list; do \
30 $(MAKE) -C $$targetdir; \
31 done
fed90353 32 $(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` @KERNEL_MAKE@ CONFIG_ZFS=m $@
c9c0d073
BB
33
34clean:
d433c206
BB
35 @# Only cleanup the kernel build directories when CONFIG_KERNEL
36 @# is defined. This indicates that kernel modules should be built.
fed90353 37@CONFIG_KERNEL_TRUE@ $(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` @KERNEL_MAKE@ $@
d433c206 38
c9c0d073
BB
39 if [ -f @LINUX_SYMBOLS@ ]; then $(RM) @LINUX_SYMBOLS@; fi
40 if [ -f Module.markers ]; then $(RM) Module.markers; fi
41
b669ab83
BB
42 find . -name '*.ur-safe' -type f -print | xargs $(RM)
43
c9c0d073 44modules_install:
6283f55e 45 @# Install the kernel modules
d09f98a9
BB
46 $(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` $@ \
47 INSTALL_MOD_PATH=$(DESTDIR)$(INSTALL_MOD_PATH) \
bb9d808c
AP
48 INSTALL_MOD_DIR=$(INSTALL_MOD_DIR) \
49 KERNELRELEASE=@LINUX_VERSION@
fe0ed8f9 50 @# Remove extraneous build products when packaging
d09f98a9 51 kmoddir=$(DESTDIR)$(INSTALL_MOD_PATH)/lib/modules/@LINUX_VERSION@; \
b0fe1ade 52 if [ -n "$(DESTDIR)" ]; then \
d09f98a9 53 find $$kmoddir -name 'modules.*' | xargs $(RM); \
fe0ed8f9 54 fi
d09f98a9 55 sysmap=$(DESTDIR)$(INSTALL_MOD_PATH)/boot/System.map-@LINUX_VERSION@; \
c9c0d073
BB
56 if [ -f $$sysmap ]; then \
57 depmod -ae -F $$sysmap @LINUX_VERSION@; \
58 fi
c9c0d073
BB
59
60modules_uninstall:
6283f55e 61 @# Uninstall the kernel modules
d09f98a9
BB
62 kmoddir=$(DESTDIR)$(INSTALL_MOD_PATH)/lib/modules/@LINUX_VERSION@
63 list='$(subdir-m)'; for subdir in $$list; do \
64 $(RM) -R $$kmoddir/$(INSTALL_MOD_DIR)/$$subdir; \
65 done
c9c0d073
BB
66
67distdir:
47a4a6fd 68 list='$(subdir-m)'; for subdir in $$list; do \
0b04990a 69 (cd @top_srcdir@/module && find $$subdir -name '*.c' -o -name '*.h' -o -name '*.S' |\
e254c8d8 70 xargs cp --parents -t $$distdir); \
47a4a6fd 71 done
c9c0d073
BB
72
73distclean maintainer-clean: clean
74install: modules_install
75uninstall: modules_uninstall
76all: modules
77check: