rtl_wifi: add missing kernel nostdinc flags

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit d6d00ec0701f2fdee36cae91fa86e71c9a66a0d2)
This commit is contained in:
Tianling Shen 2022-12-27 16:17:32 +08:00
parent 0bada4eed0
commit 87266b3f7e
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
5 changed files with 17 additions and 28 deletions

View File

@ -29,6 +29,7 @@ define KernelPackage/rtl8188eu
endef
NOSTDINC_FLAGS:= \
$(KERNEL_NOSTDINC_FLAGS) \
-I$(PKG_BUILD_DIR) \
-I$(PKG_BUILD_DIR)/include \
-I$(PKG_BUILD_DIR)/platform \

View File

@ -30,6 +30,7 @@ define KernelPackage/rtl8189es
endef
NOSTDINC_FLAGS:= \
$(KERNEL_NOSTDINC_FLAGS) \
-I$(PKG_BUILD_DIR) \
-I$(PKG_BUILD_DIR)/include \
-I$(STAGING_DIR)/usr/include/mac80211-backport \

View File

@ -29,6 +29,7 @@ define KernelPackage/rtl8192eu
endef
NOSTDINC_FLAGS:= \
$(KERNEL_NOSTDINC_FLAGS) \
-I$(PKG_BUILD_DIR) \
-I$(PKG_BUILD_DIR)/include \
-I$(STAGING_DIR)/usr/include/mac80211-backport \

View File

@ -37,6 +37,7 @@ define KernelPackage/rtl8812au-ac
endef
NOSTDINC_FLAGS:= \
$(KERNEL_NOSTDINC_FLAGS) \
-I$(PKG_BUILD_DIR) \
-I$(PKG_BUILD_DIR)/include \
-I$(STAGING_DIR)/usr/include/mac80211-backport \

View File

@ -1,10 +1,6 @@
# SDPX-License-Identifier: GPL-2.0-only
#
# Copyright (C) 2021 ImmortalWrt
# <https://immortalwrt.org>
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# Copyright (C) 2021-2022 ImmortalWrt.org
include $(TOPDIR)/rules.mk
@ -17,9 +13,8 @@ PKG_SOURCE_DATE:=2022-04-09
PKG_SOURCE_VERSION:=8c2226a74ae718439d56248bd2e44ccf717086d5
PKG_MIRROR_HASH:=3353a3bc4c73652eceaab95809aab27c3ae8bbf7e915b73488361a061ba91b84
PKG_LICENSE:=GPL-2.0
PKG_LICENSE:=GPL-2.0-only
PKG_LICENSE_FILES:=LICENSE
PKG_MAINTAINTER:=CN_SZTL <cnsztl@immortalwrt.org>
PKG_BUILD_PARALLEL:=1
@ -37,7 +32,8 @@ define KernelPackage/rtl8821cu
PROVIDES:=kmod-rtl8821cu
endef
NOSTDINC_FLAGS = \
NOSTDINC_FLAGS:= \
$(KERNEL_NOSTDINC_FLAGS) \
-I$(PKG_BUILD_DIR) \
-I$(PKG_BUILD_DIR)/include \
-I$(STAGING_DIR)/usr/include/mac80211-backport \
@ -47,15 +43,7 @@ NOSTDINC_FLAGS = \
-include backport/autoconf.h \
-include backport/backport.h
EXTRA_KCONFIG:= \
CONFIG_RTL8821CU=m \
USER_MODULE_NAME=rtl8821cu
ifeq ($(ARCH),aarch64)
EXTRA_KCONFIG += CONFIG_MP_VHT_HW_TX_MODE=n
endif
EXTRA_CFLAGS:= \
NOSTDINC_FLAGS+= \
-DRTW_SINGLE_WIPHY \
-DRTW_USE_CFG80211_STA_EVENT \
-DCONFIG_IOCTL_CFG80211 \
@ -63,19 +51,16 @@ EXTRA_CFLAGS:= \
-DBUILD_OPENWRT
ifeq ($(BOARD),x86)
EXTRA_CFLAGS += -mhard-float
NOSTDINC_FLAGS+= -mhard-float
endif
MAKE_OPTS:= \
$(KERNEL_MAKE_FLAGS) \
M="$(PKG_BUILD_DIR)" \
NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \
USER_EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
$(EXTRA_KCONFIG)
define Build/Compile
+$(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" \
$(MAKE_OPTS) \
+$(KERNEL_MAKE) $(PKG_JOBS) \
M="$(PKG_BUILD_DIR)" \
NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \
CONFIG_RTL8821CU=m \
$(if $(CONFIG_aarch64),CONFIG_MP_VHT_HW_TX_MODE=n) \
USER_MODULE_NAME=rtl8821cu \
modules
endef