Created
March 21, 2017 09:39
-
-
Save kodewdle/3537b45981392dc4e403cbe005374957 to your computer and use it in GitHub Desktop.
rtl8812au makefile for https://github.com/lede-project/source/commit/1f12a3daaaa8f3525741bef2bc2be7c5c6c77b50
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Copyright (C) 2006 OpenWrt.org | |
# | |
# This is free software, licensed under the GNU General Public License v2. | |
# See /LICENSE for more information. | |
# | |
# $Id$ | |
include $(TOPDIR)/rules.mk | |
include $(INCLUDE_DIR)/kernel.mk | |
include $(INCLUDE_DIR)/kernel-defaults.mk | |
include version.mk | |
include $(INCLUDE_DIR)/package.mk | |
define Build/Prepare | |
mkdir -p $(PKG_BUILD_DIR) | |
$(CP) -rf ./src $(PKG_BUILD_DIR)/ | |
endef | |
CONFIGURE_PATH:=src | |
MAKE_PATH:=src | |
define KernelPackage/rtl8812au | |
SUBMENU:=Wireless Drivers | |
TITLE:=Driver for RTL8812AU wireless chipsets | |
DEPENDS:= @USB_SUPPORT +kmod-cfg80211 +kmod-lib80211 +kmod-usb-core | |
VERSION:=1.0 | |
FILES:= $(PKG_BUILD_DIR)/src/8812au.ko | |
# AUTOLOAD:=$(call AutoLoad,rtl8812au) | |
endef | |
USER_EXTRA_CFLAGS = -DBACKPORT | |
ifneq ($(LINUX_KARCH), x86) | |
USER_EXTRA_CFLAGS += -DCONFIG_MINIMAL_MEMORY_USAGE | |
endif | |
# | |
# Debugging trace flags | |
# | |
# USER_EXTRA_CFLAGS += -DCONFIG_DEBUG | |
# USER_EXTRA_CFLAGS += -DCONFIG_DEBUG_RTL871X | |
# USER_EXTRA_CFLAGS += -DCONFIG_DEBUG_CFG80211 | |
# USER_EXTRA_CFLAGS += -DCONFIG_PROC_DEBUG | |
# USER_EXTRA_CFLAGS += -DDBG_MEM_ALLOC | |
USER_EXTRA_CFLAGS += -D_LINUX_BYTEORDER_SWAB_H | |
USER_EXTRA_CFLAGS += -DCONFIG_BIG_ENDIAN | |
USER_EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 | |
USER_EXTRA_CFLAGS += -DRTW_USE_CFG80211_STA_EVENT | |
MAKE_FEATURES:= \ | |
CONFIG_PLATFORM_I386_PC="n" \ | |
CONFIG_PLATFORM_GENERIC="n" \ | |
CONFIG_POWER_SAVING="n" | |
NOSTDINC_FLAGS = \ | |
-I$(STAGING_DIR)/usr/include/mac80211 \ | |
-I$(STAGING_DIR)/usr/include/mac80211/uapi \ | |
-I$(STAGING_DIR)/usr/include/mac80211-backport \ | |
-include backport/backport.h | |
RUN_STUFF:= \ | |
ARCH="$(LINUX_KARCH)" \ | |
CROSS_COMPILE="$(KERNEL_CROSS)" \ | |
KSRC="$(LINUX_DIR)" \ | |
KVER="$(LINUX_VERSION)" \ | |
MODULE_NAME="8812au" \ | |
M="$(PKG_BUILD_DIR)/src" \ | |
USER_EXTRA_CFLAGS="$(USER_EXTRA_CFLAGS)" \ | |
NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \ | |
KBUILD_EXTRA_SYMBOLS="${STAGING_DIR}/usr/include/mac80211/Module.symvers" \ | |
$(MAKE_FEATURES) | |
define Build/Compile | |
$(CP) $(KERNEL_BUILD_DIR)/compat-wireless-*/Module.symvers $(STAGING_DIR)/usr/include/mac80211/ | |
$(MAKE) $(KERNEL_MAKEOPTS) -C $(PKG_BUILD_DIR)/src $(RUN_STUFF) | |
endef | |
$(eval $(call KernelPackage,rtl8812au)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment