2008-02-27 23:52:44 +03:00
|
|
|
subdir-m += spl
|
|
|
|
subdir-m += splat
|
|
|
|
|
2009-03-10 20:57:52 +03:00
|
|
|
INSTALL=/usr/bin/install
|
|
|
|
|
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@ $@
|
|
|
|
|
|
|
|
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
|
2009-06-26 02:31:53 +04:00
|
|
|
$(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` \
|
|
|
|
INSTALL_MOD_PATH=$(DESTDIR) \
|
|
|
|
INSTALL_MOD_DIR=addon/spl $@
|
2011-07-20 08:06:50 +04:00
|
|
|
@# Remove extraneous build products when packaging
|
|
|
|
if [ -n "$(DESTDIR)" ]; then \
|
|
|
|
find $(DESTDIR)/lib/modules/@LINUX_VERSION@ \
|
|
|
|
-name 'modules.*' | xargs $(RM); \
|
|
|
|
fi
|
2010-09-02 23:12:39 +04:00
|
|
|
sysmap=$(DESTDIR)/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
|
|
|
|
$(RM) -R $(DESTDIR)/lib/modules/@LINUX_VERSION@/addon/spl
|
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:
|