9 @
# Make the exported SPL symbols available to these modules.
10 @
# They may be in the root of SPL_OBJ when building against
11 @
# installed devel headers, or they may be in the module
12 @
# subdirectory when building against the spl source tree.
13 @if
[ -f @SPL_OBJ@
/@SPL_SYMBOLS@
]; then \
14 /bin
/cp @SPL_OBJ@
/@SPL_SYMBOLS@ .
; \
15 elif
[ -f @SPL_OBJ@
/module
/@SPL_SYMBOLS@
]; then \
16 /bin
/cp @SPL_OBJ@
/module
/@SPL_SYMBOLS@ .
; \
19 "*** Missing spl symbols ensure you have built the spl:\n" \
20 "*** - @SPL_OBJ@/@SPL_SYMBOLS@, or\n" \
21 "*** - @SPL_OBJ@/module/@SPL_SYMBOLS@\n"; \
24 $(MAKE
) -C @LINUX_OBJ@ SUBDIRS
=`pwd` @KERNELMAKE_PARAMS@
$@
27 @
# Only cleanup the kernel build directories when CONFIG_KERNEL
28 @
# is defined. This indicates that kernel modules should be built.
29 @CONFIG_KERNEL_TRUE@
$(MAKE
) -C @LINUX_OBJ@ SUBDIRS
=`pwd` @KERNELMAKE_PARAMS@
$@
31 if
[ -f @SPL_SYMBOLS@
]; then
$(RM
) @SPL_SYMBOLS@
; fi
32 if
[ -f @LINUX_SYMBOLS@
]; then
$(RM
) @LINUX_SYMBOLS@
; fi
33 if
[ -f Module.markers
]; then
$(RM
) Module.markers
; fi
36 @
# Install the kernel modules
37 $(MAKE
) -C @LINUX_OBJ@ SUBDIRS
=`pwd` \
38 INSTALL_MOD_PATH
=$(DESTDIR
) \
39 INSTALL_MOD_DIR
=addon
/zfs
$@
40 @
# Remove extraneous build products when packaging
41 if
[ -n
"$(DESTDIR)" ]; then \
42 find
$(DESTDIR
)/lib
/modules
/@LINUX_VERSION@ \
43 -name
'modules.*' | xargs
$(RM
); \
45 sysmap
=$(DESTDIR
)/boot
/System.map-@LINUX_VERSION@
; \
46 if
[ -f
$$sysmap ]; then \
47 depmod
-ae
-F
$$sysmap @LINUX_VERSION@
; \
51 @
# Uninstall the kernel modules
52 $(RM
) -R
$(DESTDIR
)/lib
/modules
/@LINUX_VERSION@
/addon
/zfs
56 distclean maintainer-clean
: clean
57 install: modules_install
58 uninstall: modules_uninstall