Make use of KERNEL_MAKE in kernel packages were easily possible.
This moves some more code to common places and reduces the number of
lines.
It is defined like this:
KERNEL_MAKE = $(MAKE) $(KERNEL_MAKEOPTS)
KERNEL_MAKEOPTS = -C $(LINUX_DIR) $(KERNEL_MAKE_FLAGS)
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
endif
define Build/Compile
- +$(MAKE) $(CT_MAKEDEFS) $(PKG_JOBS) -C "$(LINUX_DIR)" \
- $(KERNEL_MAKE_FLAGS) \
+ +$(KERNEL_MAKE) $(CT_MAKEDEFS) $(PKG_JOBS) \
M="$(PKG_BUILD_DIR)/ath10k$(CT_KVER)" \
NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \
modules
proprietary Broadcom wl driver.
endef
-MAKE_KMOD := $(MAKE) -C "$(LINUX_DIR)" \
- $(KERNEL_MAKE_FLAGS) \
+MAKE_KMOD := $(KERNEL_MAKE) \
PATH="$(TARGET_PATH)" \
M="$(PKG_BUILD_DIR)/kmod" \
an overkill for OpenWrt simple needs.
endef
-MAKE_OPTS:= \
- $(KERNEL_MAKE_FLAGS) \
- M="$(PKG_BUILD_DIR)"
-
define Build/Compile
- $(MAKE) -C "$(LINUX_DIR)" \
- $(MAKE_OPTS) \
- modules
+ $(KERNEL_MAKE) M="$(PKG_BUILD_DIR)" modules
endef
$(eval $(call KernelPackage,gpio-button-hotplug))
$(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=m,%,$(filter %=m,$(EXTRA_KCONFIG)))) \
$(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=y,%,$(filter %=y,$(EXTRA_KCONFIG)))) \
-MAKE_OPTS:= \
- $(KERNEL_MAKE_FLAGS) \
- M="$(PKG_BUILD_DIR)" \
- EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
- $(EXTRA_KCONFIG)
-
define Build/Compile
- $(MAKE) -C "$(LINUX_DIR)" \
- $(MAKE_OPTS) \
+ $(KERNEL_MAKE) \
+ M="$(PKG_BUILD_DIR)" \
+ EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
+ $(EXTRA_KCONFIG) \
modules
endef
endef
define Build/Compile
- $(MAKE) -C "$(LINUX_DIR)" \
- $(KERNEL_MAKE_FLAGS) \
+ $(KERNEL_MAKE) \
M="$(PKG_BUILD_DIR)" \
EXTRA_CFLAGS="$(BUILDFLAGS)" \
modules
endef
define Build/Compile
- +$(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" \
- $(KERNEL_MAKE_FLAGS) \
+ +$(KERNEL_MAKE) $(PKG_JOBS) \
M="$(PKG_BUILD_DIR)/$(MAKE_PATH)" \
modules
endef
endif
define Build/Compile
- +$(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" \
- $(KERNEL_MAKE_FLAGS) \
+ +$(KERNEL_MAKE) $(PKG_JOBS) \
$(PKG_MAKE_FLAGS) \
M="$(PKG_BUILD_DIR)" \
NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \
-Wno-unused-result
define Build/Compile
- +$(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" \
- $(KERNEL_MAKE_FLAGS) \
+ +$(KERNEL_MAKE) $(PKG_JOBS) \
M="$(PKG_BUILD_DIR)" \
NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \
modules
endef
define Build/Compile
- $(MAKE) -C "$(LINUX_DIR)" \
- $(KERNEL_MAKE_FLAGS) \
+ $(KERNEL_MAKE) \
M="$(PKG_BUILD_DIR)" \
EXTRA_CFLAGS="$(BUILDFLAGS)" \
modules
NOSTDINC_FLAGS+=-DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT -DBUILD_OPENWRT
define Build/Compile
- +$(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" \
- $(KERNEL_MAKE_FLAGS) \
+ +$(KERNEL_MAKE) $(PKG_JOBS) \
M="$(PKG_BUILD_DIR)" \
NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \
modules