2008-02-27 23:52:44 +03:00
|
|
|
subdir-m += spl
|
|
|
|
subdir-m += splat
|
|
|
|
|
2013-02-13 03:56:02 +04:00
|
|
|
INSTALL_MOD_DIR ?= extra
|
2009-03-10 20:57:52 +03:00
|
|
|
|
2012-07-09 13:10:31 +04:00
|
|
|
SPL_MODULE_CFLAGS = -I@abs_top_srcdir@/include
|
|
|
|
SPL_MODULE_CFLAGS += -include @abs_top_builddir@/spl_config.h
|
|
|
|
export SPL_MODULE_CFLAGS
|
|
|
|
|
2010-03-09 00:08:09 +03:00
|
|
|
modules:
|
2012-07-09 13:10:31 +04:00
|
|
|
$(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` @KERNELMAKE_PARAMS@ CONFIG_SPL=m $@
|
2008-02-27 23:52:44 +03:00
|
|
|
|
2010-03-09 00:08:09 +03:00
|
|
|
clean:
|
2012-01-14 08:20:07 +04:00
|
|
|
@# Only cleanup the kernel build directories when CONFIG_KERNEL
|
|
|
|
@# is defined. This indicates that kernel modules should be built.
|
|
|
|
@CONFIG_KERNEL_TRUE@ $(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` @KERNELMAKE_PARAMS@ $@
|
|
|
|
|
2013-02-13 03:56:02 +04:00
|
|
|
if [ -f @LINUX_SYMBOLS@ ]; then $(RM) @LINUX_SYMBOLS@; fi
|
2010-03-09 00:08:09 +03:00
|
|
|
if [ -f Module.markers ]; then $(RM) Module.markers; fi
|
|
|
|
|
2009-03-05 20:08:07 +03:00
|
|
|
modules_install:
|
2010-09-02 23:12:39 +04:00
|
|
|
@# Install the kernel modules
|
2013-02-13 03:56:02 +04:00
|
|
|
$(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` $@ \
|
|
|
|
INSTALL_MOD_PATH=$(DESTDIR)$(INSTALL_MOD_PATH) \
|
2014-10-28 19:48:50 +03:00
|
|
|
INSTALL_MOD_DIR=$(INSTALL_MOD_DIR) \
|
|
|
|
KERNELRELEASE=@LINUX_VERSION@
|
2011-07-20 08:06:50 +04:00
|
|
|
@# Remove extraneous build products when packaging
|
2013-02-13 03:56:02 +04:00
|
|
|
kmoddir=$(DESTDIR)$(INSTALL_MOD_PATH)/lib/modules/@LINUX_VERSION@; \
|
2015-11-20 04:39:56 +03:00
|
|
|
if [ -n "$(DESTDIR)" ]; then \
|
2013-02-13 03:56:02 +04:00
|
|
|
find $$kmoddir -name 'modules.*' | xargs $(RM); \
|
2011-07-20 08:06:50 +04:00
|
|
|
fi
|
2013-02-13 03:56:02 +04:00
|
|
|
sysmap=$(DESTDIR)$(INSTALL_MOD_PATH)/boot/System.map-@LINUX_VERSION@; \
|
2010-07-29 00:59:18 +04:00
|
|
|
if [ -f $$sysmap ]; then \
|
|
|
|
depmod -ae -F $$sysmap @LINUX_VERSION@; \
|
|
|
|
fi
|
|
|
|
|
|
|
|
modules_uninstall:
|
2010-09-02 23:12:39 +04:00
|
|
|
@# Uninstall the kernel modules
|
2013-02-13 03:56:02 +04:00
|
|
|
kmoddir=$(DESTDIR)$(INSTALL_MOD_PATH)/lib/modules/@LINUX_VERSION@
|
|
|
|
list='$(subdir-m)'; for subdir in $$list; do \
|
|
|
|
$(RM) -R $$kmoddir/$(INSTALL_MOD_DIR)/$$subdir; \
|
|
|
|
done
|
2009-03-05 20:08:07 +03:00
|
|
|
|
|
|
|
distdir:
|
|
|
|
list='$(subdir-m)'; for subdir in $$list; do \
|
2010-09-02 23:12:39 +04:00
|
|
|
(find @top_srcdir@/module/$$subdir -name '*.c' -o -name '*.h' |\
|
2009-03-05 20:08:07 +03:00
|
|
|
xargs /bin/cp -t $$distdir/$$subdir); \
|
|
|
|
done
|
|
|
|
|
|
|
|
distclean maintainer-clean: clean
|
|
|
|
install: modules_install
|
2010-07-29 00:59:18 +04:00
|
|
|
uninstall: modules_uninstall
|
2009-03-05 20:08:07 +03:00
|
|
|
all: modules
|
2008-02-28 03:16:24 +03:00
|
|
|
check:
|