2015-01-21 16:03:59 +00:00
|
|
|
SHELL := /bin/bash
|
2013-05-08 21:45:39 +00:00
|
|
|
EXTRA_CFLAGS += $(USER_EXTRA_CFLAGS)
|
|
|
|
EXTRA_CFLAGS += -O1
|
|
|
|
|
|
|
|
EXTRA_CFLAGS += -Wno-unused-variable
|
|
|
|
EXTRA_CFLAGS += -Wno-unused-value
|
|
|
|
EXTRA_CFLAGS += -Wno-unused-label
|
|
|
|
EXTRA_CFLAGS += -Wno-unused-parameter
|
|
|
|
EXTRA_CFLAGS += -Wno-unused-function
|
|
|
|
EXTRA_CFLAGS += -Wno-unused
|
|
|
|
|
|
|
|
EXTRA_CFLAGS += -Wno-uninitialized
|
|
|
|
|
|
|
|
EXTRA_CFLAGS += -I$(src)/include
|
|
|
|
|
2013-05-28 02:57:40 +00:00
|
|
|
ccflags-y += -D__CHECK_ENDIAN__
|
|
|
|
|
2013-05-08 21:45:39 +00:00
|
|
|
CONFIG_AUTOCFG_CP = n
|
|
|
|
|
2015-07-29 17:33:33 +00:00
|
|
|
CONFIG_RTL8188EU = m
|
2013-05-08 21:45:39 +00:00
|
|
|
|
|
|
|
CONFIG_USB_HCI = y
|
|
|
|
|
|
|
|
CONFIG_BT_COEXIST = n
|
|
|
|
CONFIG_WOWLAN = n
|
|
|
|
|
|
|
|
export TopDIR ?= $(shell pwd)
|
|
|
|
|
2019-11-04 21:29:27 +00:00
|
|
|
MSG="Directory .git does not exist indicating that you downloaded the source as a zip file. Only the 'git clone' method is now supported."
|
2013-05-08 21:45:39 +00:00
|
|
|
|
2013-07-11 15:59:02 +00:00
|
|
|
OUTSRC_FILES := \
|
|
|
|
hal/HalHWImg8188E_MAC.o \
|
|
|
|
hal/HalHWImg8188E_BB.o \
|
|
|
|
hal/HalHWImg8188E_RF.o \
|
|
|
|
hal/HalPhyRf_8188e.o \
|
|
|
|
hal/HalPwrSeqCmd.o \
|
|
|
|
hal/Hal8188EPwrSeq.o \
|
|
|
|
hal/Hal8188ERateAdaptive.o\
|
|
|
|
hal/hal_intf.o \
|
|
|
|
hal/hal_com.o \
|
|
|
|
hal/odm.o \
|
|
|
|
hal/odm_HWConfig.o \
|
|
|
|
hal/odm_RegConfig8188E.o\
|
|
|
|
hal/odm_RTL8188E.o \
|
|
|
|
hal/rtl8188e_cmd.o \
|
|
|
|
hal/rtl8188e_dm.o \
|
|
|
|
hal/rtl8188e_hal_init.o \
|
|
|
|
hal/rtl8188e_phycfg.o \
|
|
|
|
hal/rtl8188e_rf6052.o \
|
|
|
|
hal/rtl8188e_rxdesc.o \
|
|
|
|
hal/rtl8188e_xmit.o \
|
|
|
|
hal/rtl8188eu_recv.o \
|
|
|
|
hal/rtl8188eu_xmit.o \
|
|
|
|
hal/usb_halinit.o \
|
|
|
|
hal/usb_ops_linux.o
|
2013-05-08 21:45:39 +00:00
|
|
|
|
|
|
|
RTL871X = rtl8188e
|
|
|
|
|
2013-07-11 15:59:02 +00:00
|
|
|
HCI_NAME = usb
|
2013-05-08 21:45:39 +00:00
|
|
|
|
2013-07-11 15:59:02 +00:00
|
|
|
_OS_INTFS_FILES := \
|
|
|
|
os_dep/ioctl_linux.o \
|
|
|
|
os_dep/mlme_linux.o \
|
|
|
|
os_dep/os_intfs.o \
|
|
|
|
os_dep/osdep_service.o \
|
|
|
|
os_dep/recv_linux.o \
|
|
|
|
os_dep/usb_intf.o \
|
|
|
|
os_dep/usb_ops_linux.o \
|
|
|
|
os_dep/xmit_linux.o
|
2013-05-08 21:45:39 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-07-11 15:59:02 +00:00
|
|
|
_HAL_INTFS_FILES += $(OUTSRC_FILES)
|
2013-05-08 21:45:39 +00:00
|
|
|
|
|
|
|
|
|
|
|
ifeq ($(CONFIG_AUTOCFG_CP), y)
|
|
|
|
|
2013-05-09 21:10:39 +00:00
|
|
|
$(shell cp $(TopDIR)/autoconf_rtl8188e_usb_linux.h $(TopDIR)/include/autoconf.h)
|
2013-05-08 21:45:39 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(CONFIG_BT_COEXIST), y)
|
|
|
|
EXTRA_CFLAGS += -DCONFIG_BT_COEXIST
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(CONFIG_WOWLAN), y)
|
|
|
|
EXTRA_CFLAGS += -DCONFIG_WOWLAN
|
|
|
|
endif
|
|
|
|
|
2020-02-02 15:23:59 +00:00
|
|
|
SUBARCH := $(shell uname -m | sed -e "s/i.86/i386/; s/ppc.*/powerpc/; s/armv.l/arm/; s/aarch64/arm64/;")
|
2013-05-15 18:57:38 +00:00
|
|
|
|
2013-05-08 21:45:39 +00:00
|
|
|
ARCH ?= $(SUBARCH)
|
|
|
|
CROSS_COMPILE ?=
|
2020-05-10 17:05:40 +00:00
|
|
|
KVER ?= $(if $(KERNELRELEASE),$(KERNELRELEASE),$(shell uname -r))
|
2020-09-10 14:15:21 +00:00
|
|
|
KSRC ?= $(if $(KERNEL_SRC),$(KERNEL_SRC),/lib/modules/$(KVER)/build)
|
2014-01-01 07:00:00 +00:00
|
|
|
MODDESTDIR := /lib/modules/$(KVER)/kernel/drivers/net/wireless
|
2013-05-08 21:45:39 +00:00
|
|
|
INSTALL_PREFIX :=
|
|
|
|
|
|
|
|
ifneq ($(KERNELRELEASE),)
|
|
|
|
|
2013-07-11 15:59:02 +00:00
|
|
|
rtk_core := \
|
2022-06-08 23:46:35 +00:00
|
|
|
hal/HalHWImg8188E_MAC.o \
|
|
|
|
hal/HalHWImg8188E_BB.o \
|
|
|
|
hal/HalHWImg8188E_RF.o \
|
|
|
|
hal/HalPhyRf_8188e.o \
|
|
|
|
hal/HalPwrSeqCmd.o \
|
|
|
|
hal/Hal8188EPwrSeq.o \
|
|
|
|
hal/Hal8188ERateAdaptive.o \
|
|
|
|
hal/hal_intf.o \
|
|
|
|
hal/hal_com.o \
|
|
|
|
hal/odm.o \
|
|
|
|
hal/odm_HWConfig.o \
|
|
|
|
hal/odm_RegConfig8188E.o \
|
|
|
|
hal/odm_RTL8188E.o \
|
|
|
|
hal/rtl8188e_cmd.o \
|
|
|
|
hal/rtl8188e_dm.o \
|
|
|
|
hal/rtl8188e_hal_init.o \
|
|
|
|
hal/rtl8188e_phycfg.o \
|
|
|
|
hal/rtl8188e_rf6052.o \
|
|
|
|
hal/rtl8188e_rxdesc.o \
|
|
|
|
hal/rtl8188e_xmit.o \
|
|
|
|
hal/rtl8188eu_recv.o \
|
|
|
|
hal/rtl8188eu_xmit.o \
|
|
|
|
hal/usb_halinit.o \
|
|
|
|
hal/usb_ops_linux.o \
|
|
|
|
os_dep/ioctl_linux.o \
|
|
|
|
os_dep/mlme_linux.o \
|
|
|
|
os_dep/os_intfs.o \
|
|
|
|
os_dep/osdep_service.o \
|
|
|
|
os_dep/recv_linux.o \
|
|
|
|
os_dep/usb_intf.o \
|
|
|
|
os_dep/usb_ops_linux.o \
|
|
|
|
os_dep/xmit_linux.o \
|
|
|
|
core/rtw_ap.o \
|
|
|
|
core/rtw_br_ext.o \
|
|
|
|
core/rtw_cmd.o \
|
|
|
|
core/rtw_efuse.o \
|
|
|
|
core/rtw_fw.o \
|
|
|
|
core/rtw_ieee80211.o \
|
|
|
|
core/rtw_ioctl_set.o \
|
|
|
|
core/rtw_iol.o \
|
|
|
|
core/rtw_led.o \
|
|
|
|
core/rtw_mlme.o \
|
|
|
|
core/rtw_mlme_ext.o \
|
|
|
|
core/rtw_pwrctrl.o \
|
|
|
|
core/rtw_p2p.o \
|
|
|
|
core/rtw_recv.o \
|
|
|
|
core/rtw_rf.o \
|
|
|
|
core/rtw_security.o \
|
|
|
|
core/rtw_sta_mgt.o \
|
|
|
|
core/rtw_wlan_util.o \
|
2021-07-23 20:22:16 +00:00
|
|
|
core/rtw_xmit.o
|
2013-07-11 15:59:02 +00:00
|
|
|
|
|
|
|
8188eu-y += $(rtk_core)
|
|
|
|
|
|
|
|
obj-$(CONFIG_RTL8188EU) := 8188eu.o
|
2013-05-08 21:45:39 +00:00
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
export CONFIG_RTL8188EU = m
|
|
|
|
|
2015-07-29 17:33:33 +00:00
|
|
|
obj-$(CONFIG_RTL8188EU) := 8188eu.o
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
2019-11-04 21:29:27 +00:00
|
|
|
all: test modules
|
|
|
|
|
|
|
|
test:
|
|
|
|
@if [ ! -e ./.git ] ; then echo $(MSG); exit 1; fi;
|
2013-05-08 21:45:39 +00:00
|
|
|
|
|
|
|
modules:
|
|
|
|
$(MAKE) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) -C $(KSRC) M=$(shell pwd) modules
|
|
|
|
|
|
|
|
strip:
|
2013-07-11 15:59:02 +00:00
|
|
|
$(CROSS_COMPILE)strip 8188eu.ko --strip-unneeded
|
2013-05-08 21:45:39 +00:00
|
|
|
|
|
|
|
install:
|
2022-01-10 19:01:21 +00:00
|
|
|
@mkdir -p $(MODDESTDIR)
|
2015-01-11 17:11:31 +00:00
|
|
|
install -p -m 644 8188eu.ko $(MODDESTDIR)
|
2015-01-15 01:34:09 +00:00
|
|
|
@if [ -a /lib/modules/$(KVER)/kernel/drivers/staging/rtl8188eu/r8188eu.ko ] ; then modprobe -r r8188eu; fi;
|
2015-01-11 17:11:31 +00:00
|
|
|
@echo "blacklist r8188eu" > /etc/modprobe.d/50-8188eu.conf
|
|
|
|
cp rtl8188eufw.bin /lib/firmware/.
|
2013-05-08 21:45:39 +00:00
|
|
|
/sbin/depmod -a ${KVER}
|
2013-11-29 19:36:03 +00:00
|
|
|
mkdir -p /lib/firmware/rtlwifi
|
2015-09-16 14:53:55 +00:00
|
|
|
cp rtl8188eufw.bin /lib/firmware/rtlwifi/.
|
2013-05-08 21:45:39 +00:00
|
|
|
|
2018-11-15 04:15:16 +00:00
|
|
|
modules_install:
|
|
|
|
$(MAKE) -C $(KSRC) M=$(shell pwd) modules_install
|
|
|
|
|
2013-05-08 21:45:39 +00:00
|
|
|
uninstall:
|
2013-07-11 15:59:02 +00:00
|
|
|
rm -f $(MODDESTDIR)/8188eu.ko
|
2013-05-08 21:45:39 +00:00
|
|
|
/sbin/depmod -a ${KVER}
|
2015-01-11 17:11:31 +00:00
|
|
|
@rm /etc/modprobe.d/50-8188eu.conf
|
2013-05-08 21:45:39 +00:00
|
|
|
|
|
|
|
config_r:
|
|
|
|
@echo "make config"
|
|
|
|
/bin/bash script/Configure script/config.in
|
|
|
|
|
|
|
|
.PHONY: modules clean clean_odm-8192c
|
|
|
|
|
|
|
|
clean_odm-8192c:
|
|
|
|
cd hal/OUTSRC/rtl8192c ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
|
|
|
|
|
|
|
|
clean: $(clean_more)
|
|
|
|
rm -fr *.mod.c *.mod *.o .*.cmd *.ko *~
|
|
|
|
rm -fr .tmp_versions
|
|
|
|
rm -fr Module.symvers ; rm -fr Module.markers ; rm -fr modules.order
|
|
|
|
cd core ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
|
|
|
|
cd hal ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
|
|
|
|
cd os_dep ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
|