]> git.proxmox.com Git - mirror_zfs.git/blame - module/Makefile.in
Support custom build directories and move includes
[mirror_zfs.git] / module / Makefile.in
CommitLineData
c9c0d073
BB
1subdir-m += avl
2subdir-m += nvpair
3subdir-m += unicode
4subdir-m += zcommon
5subdir-m += zfs
302ef151 6subdir-m += zpios
c9c0d073
BB
7
8modules:
6283f55e
BB
9 @# Make the exported SPL symbols available to these modules.
10 @# They may be in the root of SPL_OBJ when building against
11 @# installed devel headers, or they may be in the module
12 @# subdirectory when building against the spl source tree.
13 @if [ -f @SPL_OBJ@/@SPL_SYMBOLS@ ]; then \
14 /bin/cp @SPL_OBJ@/@SPL_SYMBOLS@ .; \
15 elif [ -f @SPL_OBJ@/module/@SPL_SYMBOLS@ ]; then \
16 /bin/cp @SPL_OBJ@/module/@SPL_SYMBOLS@ .; \
17 else \
18 echo -e "\n" \
19 "*** Missing spl symbols ensure you have built the spl:\n" \
20 "*** - @SPL_OBJ@/@SPL_SYMBOLS@, or\n" \
21 "*** - @SPL_OBJ@/module/@SPL_SYMBOLS@\n"; \
22 exit 1; \
23 fi
c9c0d073
BB
24 $(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` @KERNELMAKE_PARAMS@ $@
25
26clean:
27 $(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` @KERNELMAKE_PARAMS@ $@
28 if [ -f @SPL_SYMBOLS@ ]; then $(RM) @SPL_SYMBOLS@; fi
29 if [ -f @LINUX_SYMBOLS@ ]; then $(RM) @LINUX_SYMBOLS@; fi
30 if [ -f Module.markers ]; then $(RM) Module.markers; fi
31
32modules_install:
6283f55e 33 @# Install the kernel modules
c9c0d073
BB
34 $(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` \
35 INSTALL_MOD_PATH=$(DESTDIR) \
36 INSTALL_MOD_DIR=addon/zfs $@
6283f55e
BB
37 find $(DESTDIR)/lib/modules/ -name 'modules.*' | xargs $(RM)
38 sysmap=$(DESTDIR)/boot/System.map-@LINUX_VERSION@; \
c9c0d073
BB
39 if [ -f $$sysmap ]; then \
40 depmod -ae -F $$sysmap @LINUX_VERSION@; \
41 fi
c9c0d073
BB
42
43modules_uninstall:
6283f55e
BB
44 @# Uninstall the kernel modules
45 $(RM) -R $(DESTDIR)/lib/modules/@LINUX_VERSION@/addon/zfs
c9c0d073
BB
46
47distdir:
c9c0d073
BB
48
49distclean maintainer-clean: clean
50install: modules_install
51uninstall: modules_uninstall
52all: modules
53check: