Add linux zpios support
[zfs.git] / module / Makefile.in
1 subdir-m += avl
2 subdir-m += nvpair
3 subdir-m += unicode
4 subdir-m += zcommon
5 subdir-m += zfs
6 subdir-m += zpios
7
8 modules:
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@ $@
12
13 clean:
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
18
19 modules_install:
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@; \
28         fi
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
34
35 modules_uninstall:
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; \
41         $(RM) -R $$instdest
42
43 distdir:
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; \
49         done
50
51 distclean maintainer-clean: clean
52 install: modules_install
53 uninstall: modules_uninstall
54 all: modules
55 check: