4 INSTALL_MOD_DIR ?
= extra
6 SPL_MODULE_CFLAGS
= -I@abs_top_srcdir@
/include
7 SPL_MODULE_CFLAGS
+= -include @abs_top_builddir@
/spl_config.h
8 export SPL_MODULE_CFLAGS
11 $(MAKE
) -C @LINUX_OBJ@ SUBDIRS
=`pwd` @KERNELMAKE_PARAMS@ CONFIG_SPL
=m
$@
14 @
# Only cleanup the kernel build directories when CONFIG_KERNEL
15 @
# is defined. This indicates that kernel modules should be built.
16 @CONFIG_KERNEL_TRUE@
$(MAKE
) -C @LINUX_OBJ@ SUBDIRS
=`pwd` @KERNELMAKE_PARAMS@
$@
18 if
[ -f @LINUX_SYMBOLS@
]; then
$(RM
) @LINUX_SYMBOLS@
; fi
19 if
[ -f Module.markers
]; then
$(RM
) Module.markers
; fi
22 @
# Install the kernel modules
23 $(MAKE
) -C @LINUX_OBJ@ SUBDIRS
=`pwd` $@ \
24 INSTALL_MOD_PATH
=$(DESTDIR
)$(INSTALL_MOD_PATH
) \
25 INSTALL_MOD_DIR
=$(INSTALL_MOD_DIR
)
26 @
# Remove extraneous build products when packaging
27 kmoddir
=$(DESTDIR
)$(INSTALL_MOD_PATH
)/lib
/modules
/@LINUX_VERSION@
; \
28 if
[ -n
$$kmoddir ]; then \
29 find
$$kmoddir -name
'modules.*' | xargs
$(RM
); \
31 sysmap
=$(DESTDIR
)$(INSTALL_MOD_PATH
)/boot
/System.map-@LINUX_VERSION@
; \
32 if
[ -f
$$sysmap ]; then \
33 depmod
-ae
-F
$$sysmap @LINUX_VERSION@
; \
37 @
# Uninstall the kernel modules
38 kmoddir
=$(DESTDIR
)$(INSTALL_MOD_PATH
)/lib
/modules
/@LINUX_VERSION@
39 list
='$(subdir-m)'; for subdir in
$$list; do \
40 $(RM
) -R
$$kmoddir/$(INSTALL_MOD_DIR
)/$$subdir; \
44 list
='$(subdir-m)'; for subdir in
$$list; do \
45 (find @top_srcdir@
/module
/$$subdir -name
'*.c' -o
-name
'*.h' |\
46 xargs
/bin
/cp
-t
$$distdir/$$subdir); \
49 distclean maintainer-clean
: clean
50 install: modules_install
51 uninstall: modules_uninstall