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