9 # Make the exported SPL symbols available to these modules.
10 cp @SPL_OBJ@/@SPL_SYMBOLS@ .
11 $(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` @KERNELMAKE_PARAMS@ $@
14 $(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` @KERNELMAKE_PARAMS@ $@
15 if [ -f @SPL_SYMBOLS@ ]; then $(RM) @SPL_SYMBOLS@; fi
16 if [ -f @LINUX_SYMBOLS@ ]; then $(RM) @LINUX_SYMBOLS@; fi
17 if [ -f Module.markers ]; then $(RM) Module.markers; fi
20 # Install the kernel modules
21 $(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` \
22 INSTALL_MOD_PATH=$(DESTDIR) \
23 INSTALL_MOD_DIR=addon/zfs $@
24 find ${DESTDIR}/lib/modules/ -name 'modules.*' | xargs ${RM}
25 sysmap=${DESTDIR}/boot/System.map-@LINUX_VERSION@; \
26 if [ -f $$sysmap ]; then \
27 depmod -ae -F $$sysmap @LINUX_VERSION@; \
29 # Install the required headers in to the kernel source
30 destname=zfs-@ZFS_META_VERSION@/@LINUX_VERSION@; \
31 instdest=$(DESTDIR)/usr/src/$$destname; \
32 (find . -mindepth 3 -name '*.h' | xargs -Ihdr sh -c \
33 "DEST=hdr && install -D hdr $$instdest/\$${DEST#*/*/*/}") || exit 1
36 # Uninstall the kernel modules
37 $(RM) -R ${DESTDIR}/lib/modules/@LINUX_VERSION@/addon/zfs
38 # Uninstall the required headers from the kernel source
39 destname=zfs-@ZFS_META_VERSION@/@LINUX_VERSION@; \
40 instdest=$(DESTDIR)/usr/src/$$destname; \
44 distfiles=`find . -name '*.c' -o -name '*.h'`; \
45 for distfile in $$distfiles; do \
46 distpath=`dirname $$distdir/$$distfile`; \
47 (/bin/mkdir -p $$distpath && \
48 /bin/cp $$distfile $$distdir/$$distfile) || exit 1; \
51 distclean maintainer-clean: clean
52 install: modules_install
53 uninstall: modules_uninstall