]>
Commit | Line | Data |
---|---|---|
a0aadf56 | 1 | subdir-m += spl |
2 | subdir-m += splat | |
3 | ||
0c617c9a BB |
4 | INSTALL=/usr/bin/install |
5 | ||
c167aadb ED |
6 | SPL_MODULE_CFLAGS = -I@abs_top_srcdir@/include |
7 | SPL_MODULE_CFLAGS += -include @abs_top_builddir@/spl_config.h | |
8 | export SPL_MODULE_CFLAGS | |
9 | ||
21006d08 | 10 | modules: |
c167aadb | 11 | $(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` @KERNELMAKE_PARAMS@ CONFIG_SPL=m $@ |
a0aadf56 | 12 | |
21006d08 | 13 | clean: |
966e5200 DH |
14 | @# Only cleanup the kernel build directories when CONFIG_KERNEL |
15 | @# is defined. This indicates that kernel modules should be built. | |
16 | @CONFIG_KERNEL_TRUE@ $(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` @KERNELMAKE_PARAMS@ $@ | |
17 | ||
18 | if [ -f '@LINUX_SYMBOLS@' ]; then $(RM) '@LINUX_SYMBOLS@'; fi | |
21006d08 BB |
19 | if [ -f Module.markers ]; then $(RM) Module.markers; fi |
20 | ||
c5f70460 | 21 | modules_install: |
a7958f7e | 22 | @# Install the kernel modules |
31b2e0b0 BB |
23 | $(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` \ |
24 | INSTALL_MOD_PATH=$(DESTDIR) \ | |
25 | INSTALL_MOD_DIR=addon/spl $@ | |
e80cd06b BB |
26 | @# Remove extraneous build products when packaging |
27 | if [ -n "$(DESTDIR)" ]; then \ | |
28 | find $(DESTDIR)/lib/modules/@LINUX_VERSION@ \ | |
29 | -name 'modules.*' | xargs $(RM); \ | |
30 | fi | |
a7958f7e | 31 | sysmap=$(DESTDIR)/boot/System.map-@LINUX_VERSION@; \ |
099dc9c2 BB |
32 | if [ -f $$sysmap ]; then \ |
33 | depmod -ae -F $$sysmap @LINUX_VERSION@; \ | |
34 | fi | |
35 | ||
36 | modules_uninstall: | |
a7958f7e BB |
37 | @# Uninstall the kernel modules |
38 | $(RM) -R $(DESTDIR)/lib/modules/@LINUX_VERSION@/addon/spl | |
c5f70460 BB |
39 | |
40 | distdir: | |
41 | list='$(subdir-m)'; for subdir in $$list; do \ | |
a7958f7e | 42 | (find @top_srcdir@/module/$$subdir -name '*.c' -o -name '*.h' |\ |
c5f70460 BB |
43 | xargs /bin/cp -t $$distdir/$$subdir); \ |
44 | done | |
45 | ||
46 | distclean maintainer-clean: clean | |
47 | install: modules_install | |
099dc9c2 | 48 | uninstall: modules_uninstall |
c5f70460 | 49 | all: modules |
07d339d4 | 50 | check: |