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