]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blame - zfs/module/Makefile.in
x86/speculation/mds: Add mitigation control for MDS
[mirror_ubuntu-bionic-kernel.git] / zfs / module / Makefile.in
CommitLineData
70e083d2
TG
1subdir-m += avl
2subdir-m += nvpair
3subdir-m += unicode
4subdir-m += zcommon
5subdir-m += zfs
6subdir-m += zpios
86e3c28a 7subdir-m += icp
70e083d2
TG
8
9INSTALL_MOD_DIR ?= extra
10
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@
86e3c28a
CIK
14@CONFIG_QAT_TRUE@ZFS_MODULE_CFLAGS += -I@QAT_SRC@/include
15@CONFIG_QAT_TRUE@KBUILD_EXTRA_SYMBOLS += @QAT_SYMBOLS@
70e083d2
TG
16export ZFS_MODULE_CFLAGS
17
86e3c28a
CIK
18SUBDIR_TARGETS = icp
19
70e083d2
TG
20modules:
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 \
86e3c28a 26 cp @SPL_OBJ@/@SPL_SYMBOLS@ .; \
70e083d2 27 elif [ -f @SPL_OBJ@/module/@SPL_SYMBOLS@ ]; then \
86e3c28a 28 cp @SPL_OBJ@/module/@SPL_SYMBOLS@ .; \
70e083d2
TG
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
86e3c28a
CIK
36 list='$(SUBDIR_TARGETS)'; for targetdir in $$list; do \
37 $(MAKE) -C $$targetdir; \
38 done
70e083d2
TG
39 $(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` @KERNELMAKE_PARAMS@ CONFIG_ZFS=m $@
40
41clean:
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
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:
51 @# Install the kernel modules
52 $(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` $@ \
53 INSTALL_MOD_PATH=$(DESTDIR)$(INSTALL_MOD_PATH) \
54 INSTALL_MOD_DIR=$(INSTALL_MOD_DIR) \
55 KERNELRELEASE=@LINUX_VERSION@
56 @# Remove extraneous build products when packaging
57 kmoddir=$(DESTDIR)$(INSTALL_MOD_PATH)/lib/modules/@LINUX_VERSION@; \
58 if [ -n "$(DESTDIR)" ]; then \
59 find $$kmoddir -name 'modules.*' | xargs $(RM); \
60 fi
61 sysmap=$(DESTDIR)$(INSTALL_MOD_PATH)/boot/System.map-@LINUX_VERSION@; \
62 if [ -f $$sysmap ]; then \
63 depmod -ae -F $$sysmap @LINUX_VERSION@; \
64 fi
65
66modules_uninstall:
67 @# Uninstall the kernel modules
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
72
73distdir:
74 list='$(subdir-m)'; for subdir in $$list; do \
86e3c28a
CIK
75 (cd @top_srcdir@/module && find $$subdir -name '*.c' -o -name '*.h' -o -name '*.S' |\
76 xargs cp --parents -t $$distdir); \
70e083d2
TG
77 done
78
79distclean maintainer-clean: clean
80install: modules_install
81uninstall: modules_uninstall
82all: modules
83check: