]> git.proxmox.com Git - mirror_zfs.git/blame - module/Makefile.in
Honour sync=disabled when relinking tpmfiles
[mirror_zfs.git] / module / Makefile.in
CommitLineData
ff4b68ee
DP
1obj-m += avl/
2obj-m += icp/
3obj-m += lua/
4obj-m += nvpair/
5obj-m += spl/
bced7e3a 6obj-m += os/linux/spl/
ff4b68ee
DP
7obj-m += unicode/
8obj-m += zcommon/
9obj-m += zfs/
bced7e3a 10obj-m += os/linux/zfs/
c9c0d073 11
d09f98a9
BB
12INSTALL_MOD_DIR ?= extra
13
fed90353
BB
14ZFS_MODULE_CFLAGS += -std=gnu99 -Wno-declaration-after-statement
15ZFS_MODULE_CFLAGS += @KERNEL_DEBUG_CFLAGS@
2ee4a18b 16ZFS_MODULE_CFLAGS += -include @abs_top_builddir@/zfs_config.h
006e9a40
MM
17ZFS_MODULE_CFLAGS += -I@abs_top_srcdir@/include/os/linux/kernel
18ZFS_MODULE_CFLAGS += -I@abs_top_srcdir@/include/os/linux/spl
19ZFS_MODULE_CFLAGS += -I@abs_top_srcdir@/include/os/linux/zfs
93ce2b4c 20ZFS_MODULE_CFLAGS += -I@abs_top_srcdir@/include
93ce2b4c 21ZFS_MODULE_CPPFLAGS += -D_KERNEL
fed90353
BB
22ZFS_MODULE_CPPFLAGS += @KERNEL_DEBUG_CPPFLAGS@
23
6a9d6359 24@CONFIG_QAT_TRUE@ZFS_MODULE_CFLAGS += -I@QAT_SRC@/include
25@CONFIG_QAT_TRUE@KBUILD_EXTRA_SYMBOLS += @QAT_SYMBOLS@
fed90353
BB
26
27export ZFS_MODULE_CFLAGS ZFS_MODULE_CPPFLAGS
2ee4a18b 28
d99a0153 29SUBDIR_TARGETS = icp lua
0b04990a 30
bced7e3a
MM
31all: modules
32distclean maintainer-clean: clean
33install: modules_install
34uninstall: modules_uninstall
35check:
36
37modules-Linux:
0b04990a
TC
38 list='$(SUBDIR_TARGETS)'; for targetdir in $$list; do \
39 $(MAKE) -C $$targetdir; \
40 done
bced7e3a
MM
41 $(MAKE) -C @LINUX_OBJ@ M=`pwd` @KERNEL_MAKE@ CONFIG_ZFS=m modules
42
43modules-unknown:
44 @true
45
46modules: modules-@ac_system@
c9c0d073 47
bced7e3a 48clean-Linux:
d433c206
BB
49 @# Only cleanup the kernel build directories when CONFIG_KERNEL
50 @# is defined. This indicates that kernel modules should be built.
bced7e3a 51@CONFIG_KERNEL_TRUE@ $(MAKE) -C @LINUX_OBJ@ M=`pwd` @KERNEL_MAKE@ clean
d433c206 52
c9c0d073
BB
53 if [ -f @LINUX_SYMBOLS@ ]; then $(RM) @LINUX_SYMBOLS@; fi
54 if [ -f Module.markers ]; then $(RM) Module.markers; fi
55
b669ab83
BB
56 find . -name '*.ur-safe' -type f -print | xargs $(RM)
57
bced7e3a
MM
58clean: clean-@ac_system@
59
60modules_install-Linux:
6283f55e 61 @# Install the kernel modules
bced7e3a 62 $(MAKE) -C @LINUX_OBJ@ M=`pwd` modules_install \
d09f98a9 63 INSTALL_MOD_PATH=$(DESTDIR)$(INSTALL_MOD_PATH) \
bb9d808c
AP
64 INSTALL_MOD_DIR=$(INSTALL_MOD_DIR) \
65 KERNELRELEASE=@LINUX_VERSION@
fe0ed8f9 66 @# Remove extraneous build products when packaging
d09f98a9 67 kmoddir=$(DESTDIR)$(INSTALL_MOD_PATH)/lib/modules/@LINUX_VERSION@; \
b0fe1ade 68 if [ -n "$(DESTDIR)" ]; then \
d09f98a9 69 find $$kmoddir -name 'modules.*' | xargs $(RM); \
fe0ed8f9 70 fi
d09f98a9 71 sysmap=$(DESTDIR)$(INSTALL_MOD_PATH)/boot/System.map-@LINUX_VERSION@; \
c9c0d073
BB
72 if [ -f $$sysmap ]; then \
73 depmod -ae -F $$sysmap @LINUX_VERSION@; \
74 fi
c9c0d073 75
bced7e3a
MM
76CTAGS: ctags
77ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
78 $(am__define_uniq_tagged_files); \
79 test -z "$(CTAGS_ARGS)$$unique" \
80 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
81 $$unique
82
83GTAGS:
84 here=`$(am__cd) $(top_builddir) && pwd` \
85 && $(am__cd) $(top_srcdir) \
86 && gtags -i $(GTAGS_ARGS) "$$here"
87cscopelist: cscopelist-recursive
88
89cscopelist-am: $(am__tagged_files)
90 list='$(am__tagged_files)'; \
91 case "$(srcdir)" in \
92 [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
93 *) sdir=$(subdir)/$(srcdir) ;; \
94 esac; \
95 for i in $$list; do \
96 if test -f "$$i"; then \
97 echo "$(subdir)/$$i"; \
98 else \
99 echo "$$sdir/$$i"; \
100 fi; \
101 done >> $(top_builddir)/cscope.files
102
103modules_install: modules_install-@ac_system@
104
105modules_uninstall-Linux:
6283f55e 106 @# Uninstall the kernel modules
d09f98a9 107 kmoddir=$(DESTDIR)$(INSTALL_MOD_PATH)/lib/modules/@LINUX_VERSION@
ff4b68ee
DP
108 list='$(obj-m)'; for objdir in $$list; do \
109 $(RM) -R $$kmoddir/$(INSTALL_MOD_DIR)/$$objdir; \
d09f98a9 110 done
c9c0d073 111
bced7e3a
MM
112modules_uninstall: modules_uninstall-@ac_system@
113
c9c0d073 114distdir:
ff4b68ee
DP
115 list='$(obj-m)'; for objdir in $$list; do \
116 (cd @top_srcdir@/module && find $$objdir \
8f12a4f8 117 -name '*.c' -o -name '*.h' -o -name '*.S' | \
7b509298 118 xargs -r cp --parents -t @abs_top_builddir@/module/$$distdir); \
47a4a6fd 119 done