Tianling Shen a875052d23
license: re-license Project ImmortalWrt under GPL-2.0-only
This fixes license conflict with upstream OpenWrt.

Reviewed-at: https://github.com/immortalwrt/immortalwrt/pull/839.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit eb782c08339bfc301f382026046d027a523f9ebb)
2022-12-24 10:44:52 +08:00

83 lines
2.0 KiB
Makefile

#
# Copyright (C) 2021 ImmortalWrt
# <https://immortalwrt.org>
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=rtl8821cu
PKG_RELEASE:=1
PKG_SOURCE_URL:=https://github.com/brektrou/rtl8821CU.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_DATE:=2022-04-09
PKG_SOURCE_VERSION:=8c2226a74ae718439d56248bd2e44ccf717086d5
PKG_MIRROR_HASH:=3353a3bc4c73652eceaab95809aab27c3ae8bbf7e915b73488361a061ba91b84
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=LICENSE
PKG_MAINTAINTER:=CN_SZTL <cnsztl@immortalwrt.org>
PKG_BUILD_PARALLEL:=1
STAMP_CONFIGURED_DEPENDS := $(STAGING_DIR)/usr/include/mac80211-backport/backport/autoconf.h
include $(INCLUDE_DIR)/kernel.mk
include $(INCLUDE_DIR)/package.mk
define KernelPackage/rtl8821cu
SUBMENU:=Wireless Drivers
TITLE:=Realtek RTL8811CU/RTL8821CU support
DEPENDS:=+kmod-cfg80211 +kmod-usb-core +@DRIVER_11N_SUPPORT +@DRIVER_11AC_SUPPORT
FILES:=$(PKG_BUILD_DIR)/rtl8821cu.ko
AUTOLOAD:=$(call AutoProbe,rtl8821cu)
PROVIDES:=kmod-rtl8821cu
endef
NOSTDINC_FLAGS = \
-I$(PKG_BUILD_DIR) \
-I$(PKG_BUILD_DIR)/include \
-I$(STAGING_DIR)/usr/include/mac80211-backport \
-I$(STAGING_DIR)/usr/include/mac80211-backport/uapi \
-I$(STAGING_DIR)/usr/include/mac80211 \
-I$(STAGING_DIR)/usr/include/mac80211/uapi \
-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:= \
-DRTW_SINGLE_WIPHY \
-DRTW_USE_CFG80211_STA_EVENT \
-DCONFIG_IOCTL_CFG80211 \
-DCONFIG_CONCURRENT_MODE \
-DBUILD_OPENWRT
ifeq ($(BOARD),x86)
EXTRA_CFLAGS += -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) \
modules
endef
$(eval $(call KernelPackage,rtl8821cu))