- Apply "Shared Makefile" style as found in [1]
- Especially but not only for cross compilation:
- Accept commonly used variable KDIR to specify kernel build directory
- Additionally accept KERNEL_SRC (instead of KDIR) as used by PetaLinux/Yocto
- Route all usual external module targets through to Kbuild
- Provide "install" target as shortcut for module installation
- Use $(MAKE) as recommended in [2]
[1] https://www.kernel.org/doc/html/latest/kbuild/modules.html, section 3.1
[2] https://www.gnu.org/software/make/manual/make.html#MAKE-Variable, section 5.7.1.
Signed-off-by: Joachim Foerster <joachim.foerster@missinglinkelectronics.com>