Makefile: add a modules_install target

Allows to cleanly install the module in the standard way, as suggested by
Documentation/kbuild/modules.txt in the kernel sources.

This is needed when installing from within a build system (such as Buildroot)
that implement depmod on its own, and does not need the blacklist and other
fixups that are implemented by the 'install' target.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
This commit is contained in:
Luca Ceresoli 2015-07-03 15:51:38 +02:00
parent 7b7d6b392a
commit f7e5725ea2

View file

@ -149,6 +149,9 @@ modules:
strip: strip:
$(CROSS_COMPILE)strip 8188eu.ko --strip-unneeded $(CROSS_COMPILE)strip 8188eu.ko --strip-unneeded
modules_install:
$(MAKE) -C $(KSRC) M=`pwd` modules_install
install: install:
install -p -m 644 8188eu.ko $(MODDESTDIR) install -p -m 644 8188eu.ko $(MODDESTDIR)
@if [ -a /lib/modules/$(KVER)/kernel/drivers/staging/rtl8188eu/r8188eu.ko ] ; then modprobe -r r8188eu; fi; @if [ -a /lib/modules/$(KVER)/kernel/drivers/staging/rtl8188eu/r8188eu.ko ] ; then modprobe -r r8188eu; fi;