]> git.proxmox.com Git - mirror_zfs-debian.git/blame - module/Makefile.in
Incorporate DebianPT.org Portuguese translation
[mirror_zfs-debian.git] / module / Makefile.in
CommitLineData
c9c0d073
BB
1subdir-m += avl
2subdir-m += nvpair
3subdir-m += unicode
4subdir-m += zcommon
5subdir-m += zfs
302ef151 6subdir-m += zpios
cae5b340 7subdir-m += icp
c9c0d073 8
d09f98a9
BB
9INSTALL_MOD_DIR ?= extra
10
2ee4a18b
ED
11ZFS_MODULE_CFLAGS += -include @SPL_OBJ@/spl_config.h
12ZFS_MODULE_CFLAGS += -include @abs_top_builddir@/zfs_config.h
13ZFS_MODULE_CFLAGS += -I@abs_top_srcdir@/include -I@SPL@/include -I@SPL@
cae5b340
AX
14@CONFIG_QAT_TRUE@ZFS_MODULE_CFLAGS += -I@QAT_SRC@/include
15@CONFIG_QAT_TRUE@KBUILD_EXTRA_SYMBOLS += @QAT_SYMBOLS@
2ee4a18b
ED
16export ZFS_MODULE_CFLAGS
17
cae5b340
AX
18SUBDIR_TARGETS = icp
19
c9c0d073 20modules:
6283f55e
BB
21 @# Make the exported SPL symbols available to these modules.
22 @# They may be in the root of SPL_OBJ when building against
23 @# installed devel headers, or they may be in the module
24 @# subdirectory when building against the spl source tree.
25 @if [ -f @SPL_OBJ@/@SPL_SYMBOLS@ ]; then \
cae5b340 26 cp @SPL_OBJ@/@SPL_SYMBOLS@ .; \
6283f55e 27 elif [ -f @SPL_OBJ@/module/@SPL_SYMBOLS@ ]; then \
cae5b340 28 cp @SPL_OBJ@/module/@SPL_SYMBOLS@ .; \
6283f55e
BB
29 else \
30 echo -e "\n" \
31 "*** Missing spl symbols ensure you have built the spl:\n" \
32 "*** - @SPL_OBJ@/@SPL_SYMBOLS@, or\n" \
33 "*** - @SPL_OBJ@/module/@SPL_SYMBOLS@\n"; \
34 exit 1; \
35 fi
cae5b340
AX
36 list='$(SUBDIR_TARGETS)'; for targetdir in $$list; do \
37 $(MAKE) -C $$targetdir; \
38 done
2ee4a18b 39 $(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` @KERNELMAKE_PARAMS@ CONFIG_ZFS=m $@
c9c0d073
BB
40
41clean:
d433c206
BB
42 @# Only cleanup the kernel build directories when CONFIG_KERNEL
43 @# is defined. This indicates that kernel modules should be built.
44@CONFIG_KERNEL_TRUE@ $(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` @KERNELMAKE_PARAMS@ $@
45
c9c0d073
BB
46 if [ -f @SPL_SYMBOLS@ ]; then $(RM) @SPL_SYMBOLS@; fi
47 if [ -f @LINUX_SYMBOLS@ ]; then $(RM) @LINUX_SYMBOLS@; fi
48 if [ -f Module.markers ]; then $(RM) Module.markers; fi
49
50modules_install:
6283f55e 51 @# Install the kernel modules
d09f98a9
BB
52 $(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` $@ \
53 INSTALL_MOD_PATH=$(DESTDIR)$(INSTALL_MOD_PATH) \
ea04106b
AX
54 INSTALL_MOD_DIR=$(INSTALL_MOD_DIR) \
55 KERNELRELEASE=@LINUX_VERSION@
fe0ed8f9 56 @# Remove extraneous build products when packaging
d09f98a9 57 kmoddir=$(DESTDIR)$(INSTALL_MOD_PATH)/lib/modules/@LINUX_VERSION@; \
94a40997 58 if [ -n "$(DESTDIR)" ]; then \
d09f98a9 59 find $$kmoddir -name 'modules.*' | xargs $(RM); \
fe0ed8f9 60 fi
d09f98a9 61 sysmap=$(DESTDIR)$(INSTALL_MOD_PATH)/boot/System.map-@LINUX_VERSION@; \
c9c0d073
BB
62 if [ -f $$sysmap ]; then \
63 depmod -ae -F $$sysmap @LINUX_VERSION@; \
64 fi
c9c0d073
BB
65
66modules_uninstall:
6283f55e 67 @# Uninstall the kernel modules
d09f98a9
BB
68 kmoddir=$(DESTDIR)$(INSTALL_MOD_PATH)/lib/modules/@LINUX_VERSION@
69 list='$(subdir-m)'; for subdir in $$list; do \
70 $(RM) -R $$kmoddir/$(INSTALL_MOD_DIR)/$$subdir; \
71 done
c9c0d073
BB
72
73distdir:
e10b0808 74 list='$(subdir-m)'; for subdir in $$list; do \
cae5b340
AX
75 (cd @top_srcdir@/module && find $$subdir -name '*.c' -o -name '*.h' -o -name '*.S' |\
76 xargs cp --parents -t $$distdir); \
e10b0808 77 done
c9c0d073
BB
78
79distclean maintainer-clean: clean
80install: modules_install
81uninstall: modules_uninstall
82all: modules
83check: