]> git.proxmox.com Git - mirror_spl.git/blame - module/Makefile.in
config: allow --with-linux without --with-linux-obj
[mirror_spl.git] / module / Makefile.in
CommitLineData
a0aadf56 1subdir-m += spl
2subdir-m += splat
3
0298f3d6 4INSTALL_MOD_DIR ?= extra
0c617c9a 5
c167aadb
ED
6SPL_MODULE_CFLAGS = -I@abs_top_srcdir@/include
7SPL_MODULE_CFLAGS += -include @abs_top_builddir@/spl_config.h
8export SPL_MODULE_CFLAGS
9
21006d08 10modules:
c167aadb 11 $(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` @KERNELMAKE_PARAMS@ CONFIG_SPL=m $@
a0aadf56 12
21006d08 13clean:
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
0298f3d6 18 if [ -f @LINUX_SYMBOLS@ ]; then $(RM) @LINUX_SYMBOLS@; fi
21006d08
BB
19 if [ -f Module.markers ]; then $(RM) Module.markers; fi
20
c5f70460 21modules_install:
a7958f7e 22 @# Install the kernel modules
0298f3d6
BB
23 $(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` $@ \
24 INSTALL_MOD_PATH=$(DESTDIR)$(INSTALL_MOD_PATH) \
3f4a13c4
AP
25 INSTALL_MOD_DIR=$(INSTALL_MOD_DIR) \
26 KERNELRELEASE=@LINUX_VERSION@
e80cd06b 27 @# Remove extraneous build products when packaging
0298f3d6 28 kmoddir=$(DESTDIR)$(INSTALL_MOD_PATH)/lib/modules/@LINUX_VERSION@; \
d28c5c4f 29 if [ -n "$(DESTDIR)" ]; then \
0298f3d6 30 find $$kmoddir -name 'modules.*' | xargs $(RM); \
e80cd06b 31 fi
0298f3d6 32 sysmap=$(DESTDIR)$(INSTALL_MOD_PATH)/boot/System.map-@LINUX_VERSION@; \
099dc9c2
BB
33 if [ -f $$sysmap ]; then \
34 depmod -ae -F $$sysmap @LINUX_VERSION@; \
35 fi
36
37modules_uninstall:
a7958f7e 38 @# Uninstall the kernel modules
0298f3d6
BB
39 kmoddir=$(DESTDIR)$(INSTALL_MOD_PATH)/lib/modules/@LINUX_VERSION@
40 list='$(subdir-m)'; for subdir in $$list; do \
41 $(RM) -R $$kmoddir/$(INSTALL_MOD_DIR)/$$subdir; \
42 done
c5f70460
BB
43
44distdir:
45 list='$(subdir-m)'; for subdir in $$list; do \
a7958f7e 46 (find @top_srcdir@/module/$$subdir -name '*.c' -o -name '*.h' |\
c5f70460
BB
47 xargs /bin/cp -t $$distdir/$$subdir); \
48 done
49
50distclean maintainer-clean: clean
51install: modules_install
099dc9c2 52uninstall: modules_uninstall
c5f70460 53all: modules
07d339d4 54check: