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