kernel: Make use of KERNEL_MAKE
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>
This commit is contained in:
		@@ -111,8 +111,7 @@ ifneq ($(findstring c,$(OPENWRT_VERBOSE)),)
 | 
				
			|||||||
endif
 | 
					endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
define Build/Compile
 | 
					define Build/Compile
 | 
				
			||||||
	+$(MAKE) $(CT_MAKEDEFS) $(PKG_JOBS) -C "$(LINUX_DIR)" \
 | 
						+$(KERNEL_MAKE) $(CT_MAKEDEFS) $(PKG_JOBS) \
 | 
				
			||||||
		$(KERNEL_MAKE_FLAGS) \
 | 
					 | 
				
			||||||
		M="$(PKG_BUILD_DIR)/ath10k$(CT_KVER)" \
 | 
							M="$(PKG_BUILD_DIR)/ath10k$(CT_KVER)" \
 | 
				
			||||||
		NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \
 | 
							NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \
 | 
				
			||||||
		modules
 | 
							modules
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -99,8 +99,7 @@ define Package/nas/description
 | 
				
			|||||||
 proprietary Broadcom wl driver.
 | 
					 proprietary Broadcom wl driver.
 | 
				
			||||||
endef
 | 
					endef
 | 
				
			||||||
 | 
					
 | 
				
			||||||
MAKE_KMOD := $(MAKE) -C "$(LINUX_DIR)" \
 | 
					MAKE_KMOD := $(KERNEL_MAKE) \
 | 
				
			||||||
		$(KERNEL_MAKE_FLAGS) \
 | 
					 | 
				
			||||||
		PATH="$(TARGET_PATH)" \
 | 
							PATH="$(TARGET_PATH)" \
 | 
				
			||||||
		M="$(PKG_BUILD_DIR)/kmod" \
 | 
							M="$(PKG_BUILD_DIR)/kmod" \
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -32,14 +32,8 @@ define KernelPackage/gpio-button-hotplug/description
 | 
				
			|||||||
 an overkill for OpenWrt simple needs.
 | 
					 an overkill for OpenWrt simple needs.
 | 
				
			||||||
endef
 | 
					endef
 | 
				
			||||||
 | 
					
 | 
				
			||||||
MAKE_OPTS:= \
 | 
					 | 
				
			||||||
	$(KERNEL_MAKE_FLAGS) \
 | 
					 | 
				
			||||||
	M="$(PKG_BUILD_DIR)"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
define Build/Compile
 | 
					define Build/Compile
 | 
				
			||||||
	$(MAKE) -C "$(LINUX_DIR)" \
 | 
						$(KERNEL_MAKE) M="$(PKG_BUILD_DIR)" modules
 | 
				
			||||||
		$(MAKE_OPTS) \
 | 
					 | 
				
			||||||
		modules
 | 
					 | 
				
			||||||
endef
 | 
					endef
 | 
				
			||||||
 | 
					
 | 
				
			||||||
$(eval $(call KernelPackage,gpio-button-hotplug))
 | 
					$(eval $(call KernelPackage,gpio-button-hotplug))
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -36,15 +36,11 @@ EXTRA_CFLAGS:= \
 | 
				
			|||||||
	$(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=m,%,$(filter %=m,$(EXTRA_KCONFIG)))) \
 | 
						$(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=m,%,$(filter %=m,$(EXTRA_KCONFIG)))) \
 | 
				
			||||||
	$(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=y,%,$(filter %=y,$(EXTRA_KCONFIG)))) \
 | 
						$(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=y,%,$(filter %=y,$(EXTRA_KCONFIG)))) \
 | 
				
			||||||
 | 
					
 | 
				
			||||||
MAKE_OPTS:= \
 | 
					define Build/Compile
 | 
				
			||||||
	$(KERNEL_MAKE_FLAGS) \
 | 
						 $(KERNEL_MAKE) \
 | 
				
			||||||
		M="$(PKG_BUILD_DIR)" \
 | 
							M="$(PKG_BUILD_DIR)" \
 | 
				
			||||||
		EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
 | 
							EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
 | 
				
			||||||
	$(EXTRA_KCONFIG)
 | 
							$(EXTRA_KCONFIG) \
 | 
				
			||||||
 | 
					 | 
				
			||||||
define Build/Compile
 | 
					 | 
				
			||||||
	 $(MAKE) -C "$(LINUX_DIR)" \
 | 
					 | 
				
			||||||
		$(MAKE_OPTS) \
 | 
					 | 
				
			||||||
		modules
 | 
							modules
 | 
				
			||||||
endef
 | 
					endef
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -19,8 +19,7 @@ define KernelPackage/hwmon-gsc/description
 | 
				
			|||||||
endef
 | 
					endef
 | 
				
			||||||
 | 
					
 | 
				
			||||||
define Build/Compile
 | 
					define Build/Compile
 | 
				
			||||||
	$(MAKE) -C "$(LINUX_DIR)" \
 | 
						$(KERNEL_MAKE) \
 | 
				
			||||||
		$(KERNEL_MAKE_FLAGS) \
 | 
					 | 
				
			||||||
		M="$(PKG_BUILD_DIR)" \
 | 
							M="$(PKG_BUILD_DIR)" \
 | 
				
			||||||
		EXTRA_CFLAGS="$(BUILDFLAGS)" \
 | 
							EXTRA_CFLAGS="$(BUILDFLAGS)" \
 | 
				
			||||||
		modules
 | 
							modules
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -51,8 +51,7 @@ define Build/Configure
 | 
				
			|||||||
endef
 | 
					endef
 | 
				
			||||||
 | 
					
 | 
				
			||||||
define Build/Compile
 | 
					define Build/Compile
 | 
				
			||||||
	+$(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" \
 | 
						+$(KERNEL_MAKE) $(PKG_JOBS) \
 | 
				
			||||||
		$(KERNEL_MAKE_FLAGS) \
 | 
					 | 
				
			||||||
		M="$(PKG_BUILD_DIR)/$(MAKE_PATH)" \
 | 
							M="$(PKG_BUILD_DIR)/$(MAKE_PATH)" \
 | 
				
			||||||
		modules
 | 
							modules
 | 
				
			||||||
endef
 | 
					endef
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -379,8 +379,7 @@ ifdef CONFIG_PACKAGE_kmod-mt7921e
 | 
				
			|||||||
endif
 | 
					endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
define Build/Compile
 | 
					define Build/Compile
 | 
				
			||||||
	+$(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" \
 | 
						+$(KERNEL_MAKE) $(PKG_JOBS) \
 | 
				
			||||||
		$(KERNEL_MAKE_FLAGS) \
 | 
					 | 
				
			||||||
		$(PKG_MAKE_FLAGS) \
 | 
							$(PKG_MAKE_FLAGS) \
 | 
				
			||||||
		M="$(PKG_BUILD_DIR)" \
 | 
							M="$(PKG_BUILD_DIR)" \
 | 
				
			||||||
		NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \
 | 
							NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -45,8 +45,7 @@ NOSTDINC_FLAGS := \
 | 
				
			|||||||
	-Wno-unused-result
 | 
						-Wno-unused-result
 | 
				
			||||||
 | 
					
 | 
				
			||||||
define Build/Compile
 | 
					define Build/Compile
 | 
				
			||||||
	+$(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" \
 | 
						+$(KERNEL_MAKE) $(PKG_JOBS) \
 | 
				
			||||||
		$(KERNEL_MAKE_FLAGS) \
 | 
					 | 
				
			||||||
		M="$(PKG_BUILD_DIR)" \
 | 
							M="$(PKG_BUILD_DIR)" \
 | 
				
			||||||
		NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \
 | 
							NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \
 | 
				
			||||||
		modules
 | 
							modules
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -22,8 +22,7 @@ define KernelPackage/rtc-rv5c386a
 | 
				
			|||||||
endef
 | 
					endef
 | 
				
			||||||
 | 
					
 | 
				
			||||||
define Build/Compile
 | 
					define Build/Compile
 | 
				
			||||||
	$(MAKE) -C "$(LINUX_DIR)" \
 | 
						$(KERNEL_MAKE) \
 | 
				
			||||||
		$(KERNEL_MAKE_FLAGS) \
 | 
					 | 
				
			||||||
		M="$(PKG_BUILD_DIR)" \
 | 
							M="$(PKG_BUILD_DIR)" \
 | 
				
			||||||
		EXTRA_CFLAGS="$(BUILDFLAGS)" \
 | 
							EXTRA_CFLAGS="$(BUILDFLAGS)" \
 | 
				
			||||||
		modules
 | 
							modules
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -44,8 +44,7 @@ NOSTDINC_FLAGS := \
 | 
				
			|||||||
NOSTDINC_FLAGS+=-DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT -DBUILD_OPENWRT
 | 
					NOSTDINC_FLAGS+=-DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT -DBUILD_OPENWRT
 | 
				
			||||||
 | 
					
 | 
				
			||||||
define Build/Compile
 | 
					define Build/Compile
 | 
				
			||||||
	+$(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" \
 | 
						+$(KERNEL_MAKE) $(PKG_JOBS) \
 | 
				
			||||||
		$(KERNEL_MAKE_FLAGS) \
 | 
					 | 
				
			||||||
		M="$(PKG_BUILD_DIR)" \
 | 
							M="$(PKG_BUILD_DIR)" \
 | 
				
			||||||
		NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \
 | 
							NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \
 | 
				
			||||||
		modules
 | 
							modules
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user