aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2022-12-14 22:34:19 +0100
committerHauke Mehrtens <hauke@hauke-m.de>2022-12-17 20:12:31 +0100
commit243a7256c154a912d9716d98dc33e9b0dc856cb5 (patch)
tree3f147930f46a5fa8b16dbb1a19f0830c3809ab12 /package/kernel
parent06ad3adeecc27859313e60c173c435d45ac2b345 (diff)
downloadupstream-243a7256c154a912d9716d98dc33e9b0dc856cb5.tar.gz
upstream-243a7256c154a912d9716d98dc33e9b0dc856cb5.tar.bz2
upstream-243a7256c154a912d9716d98dc33e9b0dc856cb5.zip
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>
Diffstat (limited to 'package/kernel')
-rw-r--r--package/kernel/ath10k-ct/Makefile3
-rw-r--r--package/kernel/broadcom-wl/Makefile3
-rw-r--r--package/kernel/gpio-button-hotplug/Makefile8
-rw-r--r--package/kernel/gpio-nct5104d/Makefile12
-rw-r--r--package/kernel/hwmon-gsc/Makefile3
-rw-r--r--package/kernel/lantiq/ltq-vectoring/Makefile3
-rw-r--r--package/kernel/mt76/Makefile3
-rw-r--r--package/kernel/mwlwifi/Makefile3
-rw-r--r--package/kernel/rtc-rv5c386a/Makefile3
-rw-r--r--package/kernel/rtl8812au-ct/Makefile3
10 files changed, 13 insertions, 31 deletions
diff --git a/package/kernel/ath10k-ct/Makefile b/package/kernel/ath10k-ct/Makefile
index 0c1334cc46..2a8c0a421c 100644
--- a/package/kernel/ath10k-ct/Makefile
+++ b/package/kernel/ath10k-ct/Makefile
@@ -111,8 +111,7 @@ ifneq ($(findstring c,$(OPENWRT_VERBOSE)),)
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
diff --git a/package/kernel/broadcom-wl/Makefile b/package/kernel/broadcom-wl/Makefile
index dec5bcb98d..137e547bee 100644
--- a/package/kernel/broadcom-wl/Makefile
+++ b/package/kernel/broadcom-wl/Makefile
@@ -99,8 +99,7 @@ define Package/nas/description
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" \
diff --git a/package/kernel/gpio-button-hotplug/Makefile b/package/kernel/gpio-button-hotplug/Makefile
index 09f9c00e99..7ca6195a03 100644
--- a/package/kernel/gpio-button-hotplug/Makefile
+++ b/package/kernel/gpio-button-hotplug/Makefile
@@ -32,14 +32,8 @@ define KernelPackage/gpio-button-hotplug/description
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))
diff --git a/package/kernel/gpio-nct5104d/Makefile b/package/kernel/gpio-nct5104d/Makefile
index e85639c94a..72b1d58e62 100644
--- a/package/kernel/gpio-nct5104d/Makefile
+++ b/package/kernel/gpio-nct5104d/Makefile
@@ -36,15 +36,11 @@ EXTRA_CFLAGS:= \
$(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
diff --git a/package/kernel/hwmon-gsc/Makefile b/package/kernel/hwmon-gsc/Makefile
index 34c33dc581..cd7d4efb10 100644
--- a/package/kernel/hwmon-gsc/Makefile
+++ b/package/kernel/hwmon-gsc/Makefile
@@ -19,8 +19,7 @@ define KernelPackage/hwmon-gsc/description
endef
define Build/Compile
- $(MAKE) -C "$(LINUX_DIR)" \
- $(KERNEL_MAKE_FLAGS) \
+ $(KERNEL_MAKE) \
M="$(PKG_BUILD_DIR)" \
EXTRA_CFLAGS="$(BUILDFLAGS)" \
modules
diff --git a/package/kernel/lantiq/ltq-vectoring/Makefile b/package/kernel/lantiq/ltq-vectoring/Makefile
index b7b1b83a07..335cfaa1d5 100644
--- a/package/kernel/lantiq/ltq-vectoring/Makefile
+++ b/package/kernel/lantiq/ltq-vectoring/Makefile
@@ -51,8 +51,7 @@ define Build/Configure
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
diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile
index a086fed1f9..c71c7c52de 100644
--- a/package/kernel/mt76/Makefile
+++ b/package/kernel/mt76/Makefile
@@ -379,8 +379,7 @@ ifdef CONFIG_PACKAGE_kmod-mt7921e
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)" \
diff --git a/package/kernel/mwlwifi/Makefile b/package/kernel/mwlwifi/Makefile
index bb472b2a54..c806f917aa 100644
--- a/package/kernel/mwlwifi/Makefile
+++ b/package/kernel/mwlwifi/Makefile
@@ -45,8 +45,7 @@ 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
diff --git a/package/kernel/rtc-rv5c386a/Makefile b/package/kernel/rtc-rv5c386a/Makefile
index 0cca78548a..7c18942ffe 100644
--- a/package/kernel/rtc-rv5c386a/Makefile
+++ b/package/kernel/rtc-rv5c386a/Makefile
@@ -22,8 +22,7 @@ define KernelPackage/rtc-rv5c386a
endef
define Build/Compile
- $(MAKE) -C "$(LINUX_DIR)" \
- $(KERNEL_MAKE_FLAGS) \
+ $(KERNEL_MAKE) \
M="$(PKG_BUILD_DIR)" \
EXTRA_CFLAGS="$(BUILDFLAGS)" \
modules
diff --git a/package/kernel/rtl8812au-ct/Makefile b/package/kernel/rtl8812au-ct/Makefile
index eb2aaa6bf5..c8dd417067 100644
--- a/package/kernel/rtl8812au-ct/Makefile
+++ b/package/kernel/rtl8812au-ct/Makefile
@@ -44,8 +44,7 @@ NOSTDINC_FLAGS := \
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