build: add KERNEL_MAKE and KERNEL_MAKE_FLAGS variables and move to kernel.mk

This allows packages to use kernel make options without the forced
-C $(LINUX_DIR). It also makes it more clear that it to be called from
kernel module packages directly.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
Felix Fietkau
2017-03-16 09:53:30 +01:00
parent 00639586fd
commit 0aed054bec
5 changed files with 37 additions and 33 deletions

View File

@@ -32,7 +32,7 @@ endef
include $(INCLUDE_DIR)/kernel-defaults.mk
define Build/Compile
$(MAKE) $(KERNEL_MAKEOPTS) SUBDIRS="$(PKG_BUILD_DIR)" modules
$(KERNEL_MAKE) SUBDIRS="$(PKG_BUILD_DIR)" modules
endef
define KernelPackage/trelay/conffiles