cmd_syscalls= \
$(if $(__package_mk),KBUILD_EXTRA_SYMBOLS="$(wildcard $(PKG_SYMVERS_DIR)/*.symvers)")
+KERNEL_NOSTDINC_FLAGS = \
+ -nostdinc $(if $(DUMP),, -isystem $(shell $(TARGET_CC) -print-file-name=include))
+
ifeq ($(call qstrip,$(CONFIG_EXTERNAL_KERNEL_TREE))$(call qstrip,$(CONFIG_KERNEL_GIT_CLONE_URI)),)
KERNEL_MAKE_FLAGS += \
KERNELRELEASE=$(LINUX_VERSION)
VARIANT:=smallbuffers
endef
-NOSTDINC_FLAGS = \
+NOSTDINC_FLAGS := \
+ $(KERNEL_NOSTDINC_FLAGS) \
-I$(PKG_BUILD_DIR) \
-I$(STAGING_DIR)/usr/include/mac80211-backport/uapi \
-I$(STAGING_DIR)/usr/include/mac80211-backport \
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/libnl-tiny
-NOSTDINC_FLAGS = \
+NOSTDINC_FLAGS := \
+ $(KERNEL_NOSTDINC_FLAGS) \
-I$(PKG_BUILD_DIR) \
-I$(STAGING_DIR)/usr/include/mac80211-backport/uapi \
-I$(STAGING_DIR)/usr/include/mac80211-backport \
AUTOLOAD:=$(call AutoLoad,50,mwlwifi)
endef
-NOSTDINC_FLAGS = \
+NOSTDINC_FLAGS := \
+ $(KERNEL_NOSTDINC_FLAGS) \
-I$(PKG_BUILD_DIR) \
-I$(STAGING_DIR)/usr/include/mac80211-backport/uapi \
-I$(STAGING_DIR)/usr/include/mac80211-backport \
PROVIDES:=kmod-rtl8812au
endef
-NOSTDINC_FLAGS = \
+NOSTDINC_FLAGS := \
+ $(KERNEL_NOSTDINC_FLAGS) \
-I$(PKG_BUILD_DIR) \
-I$(PKG_BUILD_DIR)/include \
-I$(STAGING_DIR)/usr/include/mac80211-backport \