]> git.proxmox.com Git - mirror_zfs-debian.git/blame - module/Makefile.in
Fix gcc array subscript above bounds warning
[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
c9c0d073 7
2ee4a18b
ED
8ZFS_MODULE_CFLAGS += -include @SPL_OBJ@/spl_config.h
9ZFS_MODULE_CFLAGS += -include @abs_top_builddir@/zfs_config.h
10ZFS_MODULE_CFLAGS += -I@abs_top_srcdir@/include -I@SPL@/include -I@SPL@
11export ZFS_MODULE_CFLAGS
12
c9c0d073 13modules:
6283f55e
BB
14 @# Make the exported SPL symbols available to these modules.
15 @# They may be in the root of SPL_OBJ when building against
16 @# installed devel headers, or they may be in the module
17 @# subdirectory when building against the spl source tree.
18 @if [ -f @SPL_OBJ@/@SPL_SYMBOLS@ ]; then \
19 /bin/cp @SPL_OBJ@/@SPL_SYMBOLS@ .; \
20 elif [ -f @SPL_OBJ@/module/@SPL_SYMBOLS@ ]; then \
21 /bin/cp @SPL_OBJ@/module/@SPL_SYMBOLS@ .; \
22 else \
23 echo -e "\n" \
24 "*** Missing spl symbols ensure you have built the spl:\n" \
25 "*** - @SPL_OBJ@/@SPL_SYMBOLS@, or\n" \
26 "*** - @SPL_OBJ@/module/@SPL_SYMBOLS@\n"; \
27 exit 1; \
28 fi
2ee4a18b 29 $(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` @KERNELMAKE_PARAMS@ CONFIG_ZFS=m $@
c9c0d073
BB
30
31clean:
d433c206
BB
32 @# Only cleanup the kernel build directories when CONFIG_KERNEL
33 @# is defined. This indicates that kernel modules should be built.
34@CONFIG_KERNEL_TRUE@ $(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` @KERNELMAKE_PARAMS@ $@
35
c9c0d073
BB
36 if [ -f @SPL_SYMBOLS@ ]; then $(RM) @SPL_SYMBOLS@; fi
37 if [ -f @LINUX_SYMBOLS@ ]; then $(RM) @LINUX_SYMBOLS@; fi
38 if [ -f Module.markers ]; then $(RM) Module.markers; fi
39
40modules_install:
6283f55e 41 @# Install the kernel modules
c9c0d073
BB
42 $(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` \
43 INSTALL_MOD_PATH=$(DESTDIR) \
44 INSTALL_MOD_DIR=addon/zfs $@
fe0ed8f9
BB
45 @# Remove extraneous build products when packaging
46 if [ -n "$(DESTDIR)" ]; then \
47 find $(DESTDIR)/lib/modules/@LINUX_VERSION@ \
48 -name 'modules.*' | xargs $(RM); \
49 fi
6283f55e 50 sysmap=$(DESTDIR)/boot/System.map-@LINUX_VERSION@; \
c9c0d073
BB
51 if [ -f $$sysmap ]; then \
52 depmod -ae -F $$sysmap @LINUX_VERSION@; \
53 fi
c9c0d073
BB
54
55modules_uninstall:
6283f55e
BB
56 @# Uninstall the kernel modules
57 $(RM) -R $(DESTDIR)/lib/modules/@LINUX_VERSION@/addon/zfs
c9c0d073
BB
58
59distdir:
c9c0d073
BB
60
61distclean maintainer-clean: clean
62install: modules_install
63uninstall: modules_uninstall
64all: modules
65check: