2008-02-27 20:52:44 +00:00
|
|
|
subdir-m += spl
|
|
|
|
subdir-m += splat
|
|
|
|
|
2013-02-12 23:56:02 +00:00
|
|
|
INSTALL_MOD_DIR ?= extra
|
2009-03-10 17:57:52 +00:00
|
|
|
|
2012-07-09 09:10:31 +00: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-08 21:08:09 +00:00
|
|
|
modules:
|
2012-07-09 09:10:31 +00:00
|
|
|
$(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` @KERNELMAKE_PARAMS@ CONFIG_SPL=m $@
|
2008-02-27 20:52:44 +00:00
|
|
|
|
2010-03-08 21:08:09 +00:00
|
|
|
clean:
|
2012-01-14 04:20:07 +00: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-12 23:56:02 +00:00
|
|
|
if [ -f @LINUX_SYMBOLS@ ]; then $(RM) @LINUX_SYMBOLS@; fi
|
2010-03-08 21:08:09 +00:00
|
|
|
if [ -f Module.markers ]; then $(RM) Module.markers; fi
|
|
|
|
|
2009-03-05 17:08:07 +00:00
|
|
|
modules_install:
|
2010-09-02 19:12:39 +00:00
|
|
|
@# Install the kernel modules
|
2013-02-12 23:56:02 +00:00
|
|
|
$(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` $@ \
|
|
|
|
INSTALL_MOD_PATH=$(DESTDIR)$(INSTALL_MOD_PATH) \
|
|
|
|
INSTALL_MOD_DIR=$(INSTALL_MOD_DIR)
|
2011-07-20 04:06:50 +00:00
|
|
|
@# Remove extraneous build products when packaging
|
2013-02-12 23:56:02 +00:00
|
|
|
kmoddir=$(DESTDIR)$(INSTALL_MOD_PATH)/lib/modules/@LINUX_VERSION@; \
|
|
|
|
if [ -n $$kmoddir ]; then \
|
|
|
|
find $$kmoddir -name 'modules.*' | xargs $(RM); \
|
2011-07-20 04:06:50 +00:00
|
|
|
fi
|
2013-02-12 23:56:02 +00:00
|
|
|
sysmap=$(DESTDIR)$(INSTALL_MOD_PATH)/boot/System.map-@LINUX_VERSION@; \
|
2010-07-28 20:59:18 +00:00
|
|
|
if [ -f $$sysmap ]; then \
|
|
|
|
depmod -ae -F $$sysmap @LINUX_VERSION@; \
|
|
|
|
fi
|
|
|
|
|
|
|
|
modules_uninstall:
|
2010-09-02 19:12:39 +00:00
|
|
|
@# Uninstall the kernel modules
|
2013-02-12 23:56:02 +00: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 17:08:07 +00:00
|
|
|
|
|
|
|
distdir:
|
|
|
|
list='$(subdir-m)'; for subdir in $$list; do \
|
2010-09-02 19:12:39 +00:00
|
|
|
(find @top_srcdir@/module/$$subdir -name '*.c' -o -name '*.h' |\
|
2009-03-05 17:08:07 +00:00
|
|
|
xargs /bin/cp -t $$distdir/$$subdir); \
|
|
|
|
done
|
|
|
|
|
|
|
|
distclean maintainer-clean: clean
|
|
|
|
install: modules_install
|
2010-07-28 20:59:18 +00:00
|
|
|
uninstall: modules_uninstall
|
2009-03-05 17:08:07 +00:00
|
|
|
all: modules
|
2008-02-28 00:16:24 +00:00
|
|
|
check:
|