You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1645 lines
49KB

  1. EXTRA_CFLAGS += $(USER_EXTRA_CFLAGS)
  2. EXTRA_CFLAGS += -O1
  3. #EXTRA_CFLAGS += -O3
  4. EXTRA_CFLAGS += -Wall
  5. #EXTRA_CFLAGS += -Wextra
  6. EXTRA_CFLAGS += -Werror
  7. #EXTRA_CFLAGS += -pedantic
  8. #EXTRA_CFLAGS += -Wshadow -Wpointer-arith -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes
  9. EXTRA_CFLAGS += -Wframe-larger-than=1536
  10. #EXTRA_CFLAGS += -Wno-unused-variable
  11. #EXTRA_CFLAGS += -Wno-unused-value
  12. #EXTRA_CFLAGS += -Wno-unused-label
  13. EXTRA_CFLAGS += -Wno-unused-parameter
  14. #EXTRA_CFLAGS += -Wno-unused-function
  15. #EXTRA_CFLAGS += -Wno-unused
  16. #EXTRA_CFLAGS += -Wno-uninitialized
  17. EXTRA_CFLAGS += -I$(src)/include
  18. EXTRA_LDFLAGS += --strip-debug
  19. CONFIG_AUTOCFG_CP = n
  20. ########################## WIFI IC ############################
  21. CONFIG_MULTIDRV = n
  22. CONFIG_RTL8192C = n
  23. CONFIG_RTL8192D = n
  24. CONFIG_RTL8723A = n
  25. CONFIG_RTL8188E = n
  26. CONFIG_RTL8812A = y
  27. CONFIG_RTL8821A = y
  28. CONFIG_RTL8192E = n
  29. CONFIG_RTL8723B = n
  30. ######################### Interface ###########################
  31. CONFIG_USB_HCI = y
  32. CONFIG_PCI_HCI = n
  33. CONFIG_SDIO_HCI = n
  34. CONFIG_GSPI_HCI = n
  35. ########################## Features ###########################
  36. CONFIG_MP_INCLUDED = y
  37. CONFIG_POWER_SAVING = y
  38. CONFIG_USB_AUTOSUSPEND = n
  39. CONFIG_HW_PWRP_DETECTION = n
  40. CONFIG_WIFI_TEST = n
  41. CONFIG_BT_COEXIST = n
  42. CONFIG_RTL8192CU_REDEFINE_1X1 = n
  43. CONFIG_INTEL_WIDI = n
  44. CONFIG_WAPI_SUPPORT = n
  45. CONFIG_EFUSE_CONFIG_FILE = n
  46. CONFIG_EXT_CLK = n
  47. CONFIG_TRAFFIC_PROTECT = y
  48. CONFIG_LOAD_PHY_PARA_FROM_FILE = y
  49. CONFIG_CALIBRATE_TX_POWER_BY_REGULATORY = n
  50. CONFIG_CALIBRATE_TX_POWER_TO_MAX = n
  51. CONFIG_RTW_ADAPTIVITY_EN = disable
  52. CONFIG_RTW_ADAPTIVITY_MODE = normal
  53. CONFIG_SKIP_SIGNAL_SCALE_MAPPING = n
  54. CONFIG_80211W = n
  55. CONFIG_REDUCE_TX_CPU_LOADING = n
  56. CONFIG_BR_EXT = y
  57. CONFIG_ANTENNA_DIVERSITY = n
  58. CONFIG_TDLS = n
  59. ######################## Wake On Lan ##########################
  60. CONFIG_WOWLAN = n
  61. CONFIG_GPIO_WAKEUP = n
  62. CONFIG_WAKEUP_GPIO_IDX = default
  63. CONFIG_PNO_SUPPORT = n
  64. CONFIG_PNO_SET_DEBUG = n
  65. CONFIG_AP_WOWLAN = n
  66. ######### Notify SDIO Host Keep Power During Syspend ##########
  67. CONFIG_RTW_SDIO_PM_KEEP_POWER = y
  68. ###################### Platform Related #######################
  69. # Jeston Nano Headers
  70. # /usr/src/linux-headers-4.9.140-tegra-ubuntu18.04_aarch64/kernel-4.9
  71. CONFIG_PLATFORM_I386_PC = y
  72. CONFIG_PLATFORM_ARM_RPI = n
  73. CONFIG_PLATFORM_ARM_JET_NANO = n
  74. CONFIG_PLATFORM_ANDROID_X86 = n
  75. CONFIG_PLATFORM_ANDROID_INTEL_X86 = n
  76. CONFIG_PLATFORM_JB_X86 = n
  77. CONFIG_PLATFORM_ARM_S3C2K4 = n
  78. CONFIG_PLATFORM_ARM_PXA2XX = n
  79. CONFIG_PLATFORM_ARM_S3C6K4 = n
  80. CONFIG_PLATFORM_MIPS_RMI = n
  81. CONFIG_PLATFORM_RTD2880B = n
  82. CONFIG_PLATFORM_MIPS_AR9132 = n
  83. CONFIG_PLATFORM_OPENWRT_NEO2 = n
  84. CONFIG_PLATFORM_RTK_DMP = n
  85. CONFIG_PLATFORM_MIPS_PLM = n
  86. CONFIG_PLATFORM_MSTAR389 = n
  87. CONFIG_PLATFORM_MT53XX = n
  88. CONFIG_PLATFORM_ARM_MX51_241H = n
  89. CONFIG_PLATFORM_FS_MX61 = n
  90. CONFIG_PLATFORM_ACTIONS_ATJ227X = n
  91. CONFIG_PLATFORM_TEGRA3_CARDHU = n
  92. CONFIG_PLATFORM_TEGRA4_DALMORE = n
  93. CONFIG_PLATFORM_ARM_TCC8900 = n
  94. CONFIG_PLATFORM_ARM_TCC8920 = n
  95. CONFIG_PLATFORM_ARM_TCC8920_JB42 = n
  96. CONFIG_PLATFORM_ARM_RK2818 = n
  97. CONFIG_PLATFORM_ARM_RK3066 = n
  98. CONFIG_PLATFORM_ARM_RK3188 = n
  99. CONFIG_PLATFORM_ARM_URBETTER = n
  100. CONFIG_PLATFORM_ARM_TI_PANDA = n
  101. CONFIG_PLATFORM_MIPS_JZ4760 = n
  102. CONFIG_PLATFORM_DMP_PHILIPS = n
  103. CONFIG_PLATFORM_MSTAR_TITANIA12 = n
  104. CONFIG_PLATFORM_MSTAR = n
  105. CONFIG_PLATFORM_SZEBOOK = n
  106. CONFIG_PLATFORM_ARM_SUNxI = n
  107. CONFIG_PLATFORM_ARM_SUN6I = n
  108. CONFIG_PLATFORM_ARM_SUN7I = n
  109. CONFIG_PLATFORM_ARM_SUN8I = n
  110. CONFIG_PLATFORM_ACTIONS_ATM702X = n
  111. CONFIG_PLATFORM_ACTIONS_ATV5201 = n
  112. CONFIG_PLATFORM_ACTIONS_ATM705X = n
  113. CONFIG_PLATFORM_ARM_RTD299X = n
  114. CONFIG_PLATFORM_ARM_SPREADTRUM_6820 = n
  115. CONFIG_PLATFORM_ARM_SPREADTRUM_8810 = n
  116. CONFIG_PLATFORM_ARM_WMT = n
  117. CONFIG_PLATFORM_TI_DM365 = n
  118. CONFIG_PLATFORM_MOZART = n
  119. CONFIG_PLATFORM_RTK119X = n
  120. CONFIG_PLATFORM_NOVATEK_NT72668 = n
  121. ########################## DEBUG ##############################
  122. CONFIG_DEBUG = n
  123. CONFIG_DEBUG_CFG80211 = n
  124. CONFIG_DEBUG_RTL871X = n
  125. ###############################################################
  126. CONFIG_DRVEXT_MODULE = n
  127. export TopDIR ?= $(shell pwd)
  128. ########### COMMON #################################
  129. ifeq ($(CONFIG_GSPI_HCI), y)
  130. HCI_NAME = gspi
  131. endif
  132. ifeq ($(CONFIG_SDIO_HCI), y)
  133. HCI_NAME = sdio
  134. endif
  135. ifeq ($(CONFIG_USB_HCI), y)
  136. HCI_NAME = usb
  137. endif
  138. ifeq ($(CONFIG_PCI_HCI), y)
  139. HCI_NAME = pci
  140. endif
  141. _OS_INTFS_FILES := os_dep/osdep_service.o \
  142. os_dep/linux/os_intfs.o \
  143. os_dep/linux/$(HCI_NAME)_intf.o \
  144. os_dep/linux/$(HCI_NAME)_ops_linux.o \
  145. os_dep/linux/ioctl_linux.o \
  146. os_dep/linux/xmit_linux.o \
  147. os_dep/linux/mlme_linux.o \
  148. os_dep/linux/recv_linux.o \
  149. os_dep/linux/ioctl_cfg80211.o \
  150. os_dep/linux/rtw_cfgvendor.o \
  151. os_dep/linux/wifi_regd.o \
  152. os_dep/linux/rtw_android.o \
  153. os_dep/linux/rtw_proc.o
  154. ifeq ($(CONFIG_SDIO_HCI), y)
  155. _OS_INTFS_FILES += os_dep/linux/custom_gpio_linux.o
  156. _OS_INTFS_FILES += os_dep/linux/$(HCI_NAME)_ops_linux.o
  157. endif
  158. ifeq ($(CONFIG_GSPI_HCI), y)
  159. _OS_INTFS_FILES += os_dep/linux/custom_gpio_linux.o
  160. _OS_INTFS_FILES += os_dep/linux/$(HCI_NAME)_ops_linux.o
  161. endif
  162. _HAL_INTFS_FILES := hal/hal_intf.o \
  163. hal/hal_com.o \
  164. hal/hal_com_phycfg.o \
  165. hal/hal_phy.o \
  166. hal/hal_dm.o \
  167. hal/hal_btcoex.o \
  168. hal/hal_hci/hal_$(HCI_NAME).o \
  169. hal/led/hal_$(HCI_NAME)_led.o
  170. _OUTSRC_FILES := hal/OUTSRC/phydm_debug.o \
  171. hal/OUTSRC/phydm_AntDiv.o\
  172. hal/OUTSRC/phydm_AntDect.o\
  173. hal/OUTSRC/phydm_interface.o\
  174. hal/OUTSRC/phydm_HWConfig.o\
  175. hal/OUTSRC/phydm.o\
  176. hal/OUTSRC/HalPhyRf.o\
  177. hal/OUTSRC/phydm_EdcaTurboCheck.o\
  178. hal/OUTSRC/phydm_DIG.o\
  179. hal/OUTSRC/phydm_PathDiv.o\
  180. hal/OUTSRC/phydm_RaInfo.o\
  181. hal/OUTSRC/phydm_DynamicBBPowerSaving.o\
  182. hal/OUTSRC/phydm_PowerTracking.o\
  183. hal/OUTSRC/phydm_DynamicTxPower.o\
  184. hal/OUTSRC/PhyDM_Adaptivity.o\
  185. hal/OUTSRC/phydm_CfoTracking.o\
  186. hal/OUTSRC/phydm_NoiseMonitor.o\
  187. hal/OUTSRC/phydm_ACS.o
  188. EXTRA_CFLAGS += -I$(src)/platform
  189. _PLATFORM_FILES := platform/platform_ops.o
  190. ifeq ($(CONFIG_BT_COEXIST), y)
  191. EXTRA_CFLAGS += -I$(src)/hal/OUTSRC-BTCoexist
  192. _OUTSRC_FILES += hal/OUTSRC-BTCoexist/HalBtc8188c2Ant.o \
  193. hal/OUTSRC-BTCoexist/HalBtc8192d2Ant.o \
  194. hal/OUTSRC-BTCoexist/HalBtc8192e1Ant.o \
  195. hal/OUTSRC-BTCoexist/HalBtc8192e2Ant.o \
  196. hal/OUTSRC-BTCoexist/HalBtc8723a1Ant.o \
  197. hal/OUTSRC-BTCoexist/HalBtc8723a2Ant.o \
  198. hal/OUTSRC-BTCoexist/HalBtc8723b1Ant.o \
  199. hal/OUTSRC-BTCoexist/HalBtc8723b2Ant.o \
  200. hal/OUTSRC-BTCoexist/HalBtc8812a1Ant.o \
  201. hal/OUTSRC-BTCoexist/HalBtc8812a2Ant.o \
  202. hal/OUTSRC-BTCoexist/HalBtc8821a1Ant.o \
  203. hal/OUTSRC-BTCoexist/HalBtc8821a2Ant.o \
  204. hal/OUTSRC-BTCoexist/HalBtc8821aCsr2Ant.o
  205. endif
  206. ########### HAL_RTL8192C #################################
  207. ifeq ($(CONFIG_RTL8192C), y)
  208. RTL871X = rtl8192c
  209. ifeq ($(CONFIG_USB_HCI), y)
  210. MODULE_NAME = 8192cu
  211. endif
  212. ifeq ($(CONFIG_PCI_HCI), y)
  213. MODULE_NAME = 8192ce
  214. endif
  215. EXTRA_CFLAGS += -DCONFIG_RTL8192C
  216. _HAL_INTFS_FILES += \
  217. hal/$(RTL871X)/$(RTL871X)_sreset.o \
  218. hal/$(RTL871X)/$(RTL871X)_xmit.o
  219. _HAL_INTFS_FILES += hal/$(RTL871X)/$(RTL871X)_hal_init.o \
  220. hal/$(RTL871X)/$(RTL871X)_phycfg.o \
  221. hal/$(RTL871X)/$(RTL871X)_rf6052.o \
  222. hal/$(RTL871X)/$(RTL871X)_dm.o \
  223. hal/$(RTL871X)/$(RTL871X)_rxdesc.o \
  224. hal/$(RTL871X)/$(RTL871X)_cmd.o \
  225. hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_halinit.o \
  226. hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_led.o \
  227. hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_xmit.o \
  228. hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_recv.o
  229. _HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops_linux.o
  230. ifeq ($(CONFIG_MP_INCLUDED), y)
  231. _HAL_INTFS_FILES += hal/$(RTL871X)/$(RTL871X)_mp.o
  232. endif
  233. _OUTSRC_FILES += hal/OUTSRC/$(RTL871X)/phydm_RTL8192C.o\
  234. hal/OUTSRC/$(RTL871X)/HalDMOutSrc8192C_CE.o
  235. ifeq ($(CONFIG_USB_HCI), y)
  236. _OUTSRC_FILES += hal/OUTSRC/$(RTL871X)/Hal8192CUFWImg_CE.o \
  237. hal/OUTSRC/$(RTL871X)/Hal8192CUPHYImg_CE.o \
  238. hal/OUTSRC/$(RTL871X)/Hal8192CUMACImg_CE.o
  239. endif
  240. ifeq ($(CONFIG_PCI_HCI), y)
  241. _OUTSRC_FILES += hal/OUTSRC/$(RTL871X)/Hal8192CEFWImg_CE.o \
  242. hal/OUTSRC/$(RTL871X)/Hal8192CEPHYImg_CE.o \
  243. hal/OUTSRC/$(RTL871X)/Hal8192CEMACImg_CE.o
  244. endif
  245. endif
  246. ########### HAL_RTL8192D #################################
  247. ifeq ($(CONFIG_RTL8192D), y)
  248. RTL871X = rtl8192d
  249. ifeq ($(CONFIG_USB_HCI), y)
  250. MODULE_NAME = 8192du
  251. endif
  252. ifeq ($(CONFIG_PCI_HCI), y)
  253. MODULE_NAME = 8192de
  254. endif
  255. EXTRA_CFLAGS += -DCONFIG_RTL8192D
  256. _HAL_INTFS_FILES += \
  257. hal/$(RTL871X)/$(RTL871X)_xmit.o
  258. _HAL_INTFS_FILES += hal/$(RTL871X)/$(RTL871X)_hal_init.o \
  259. hal/$(RTL871X)/$(RTL871X)_phycfg.o \
  260. hal/$(RTL871X)/$(RTL871X)_rf6052.o \
  261. hal/$(RTL871X)/$(RTL871X)_dm.o \
  262. hal/$(RTL871X)/$(RTL871X)_rxdesc.o \
  263. hal/$(RTL871X)/$(RTL871X)_cmd.o \
  264. hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_halinit.o \
  265. hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_led.o \
  266. hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_xmit.o \
  267. hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_recv.o
  268. _HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops_linux.o
  269. ifeq ($(CONFIG_MP_INCLUDED), y)
  270. _HAL_INTFS_FILES += hal/$(RTL871X)/$(RTL871X)_mp.o
  271. endif
  272. _OUTSRC_FILES += hal/OUTSRC/$(RTL871X)/phydm_RTL8192D.o\
  273. hal/OUTSRC/$(RTL871X)/HalDMOutSrc8192D_CE.o
  274. ifeq ($(CONFIG_USB_HCI), y)
  275. _OUTSRC_FILES += hal/OUTSRC/$(RTL871X)/Hal8192DUFWImg_CE.o \
  276. hal/OUTSRC/$(RTL871X)/Hal8192DUPHYImg_CE.o \
  277. hal/OUTSRC/$(RTL871X)/Hal8192DUMACImg_CE.o
  278. endif
  279. ifeq ($(CONFIG_PCI_HCI), y)
  280. _OUTSRC_FILES += hal/OUTSRC/$(RTL871X)/Hal8192DEFWImg_CE.o \
  281. hal/OUTSRC/$(RTL871X)/Hal8192DEPHYImg_CE.o \
  282. hal/OUTSRC/$(RTL871X)/Hal8192DEMACImg_CE.o
  283. endif
  284. endif
  285. ########### HAL_RTL8723A #################################
  286. ifeq ($(CONFIG_RTL8723A), y)
  287. RTL871X = rtl8723a
  288. ifeq ($(CONFIG_GSPI_HCI), y)
  289. MODULE_NAME = 8723as
  290. endif
  291. ifeq ($(CONFIG_SDIO_HCI), y)
  292. MODULE_NAME = 8723as
  293. endif
  294. ifeq ($(CONFIG_USB_HCI), y)
  295. MODULE_NAME = 8723au
  296. endif
  297. ifeq ($(CONFIG_PCI_HCI), y)
  298. MODULE_NAME = 8723ae
  299. endif
  300. EXTRA_CFLAGS += -DCONFIG_RTL8723A
  301. _HAL_INTFS_FILES += hal/HalPwrSeqCmd.o \
  302. hal/$(RTL871X)/Hal8723PwrSeq.o\
  303. hal/$(RTL871X)/$(RTL871X)_xmit.o \
  304. hal/$(RTL871X)/$(RTL871X)_sreset.o
  305. _HAL_INTFS_FILES += hal/$(RTL871X)/$(RTL871X)_hal_init.o \
  306. hal/$(RTL871X)/$(RTL871X)_phycfg.o \
  307. hal/$(RTL871X)/$(RTL871X)_rf6052.o \
  308. hal/$(RTL871X)/$(RTL871X)_dm.o \
  309. hal/$(RTL871X)/$(RTL871X)_rxdesc.o \
  310. hal/$(RTL871X)/$(RTL871X)_cmd.o \
  311. hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_halinit.o \
  312. hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_led.o \
  313. hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_xmit.o \
  314. hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_recv.o
  315. ifeq ($(CONFIG_SDIO_HCI), y)
  316. _HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops.o
  317. else
  318. ifeq ($(CONFIG_GSPI_HCI), y)
  319. _HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops.o
  320. else
  321. _HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops_linux.o
  322. endif
  323. endif
  324. ifeq ($(CONFIG_MP_INCLUDED), y)
  325. _HAL_INTFS_FILES += hal/$(RTL871X)/$(RTL871X)_mp.o
  326. endif
  327. ifeq ($(CONFIG_GSPI_HCI), y)
  328. _OUTSRC_FILES += hal/OUTSRC/$(RTL871X)/Hal8723SHWImg_CE.o
  329. endif
  330. ifeq ($(CONFIG_SDIO_HCI), y)
  331. _OUTSRC_FILES += hal/OUTSRC/$(RTL871X)/Hal8723SHWImg_CE.o
  332. endif
  333. ifeq ($(CONFIG_USB_HCI), y)
  334. _OUTSRC_FILES += hal/OUTSRC/$(RTL871X)/Hal8723UHWImg_CE.o
  335. endif
  336. ifeq ($(CONFIG_PCI_HCI), y)
  337. _OUTSRC_FILES += hal/OUTSRC/$(RTL871X)/Hal8723EHWImg_CE.o
  338. endif
  339. #hal/OUTSRC/$(RTL871X)/HalHWImg8723A_FW.o
  340. _OUTSRC_FILES += hal/OUTSRC/$(RTL871X)/HalHWImg8723A_BB.o\
  341. hal/OUTSRC/$(RTL871X)/HalHWImg8723A_MAC.o\
  342. hal/OUTSRC/$(RTL871X)/HalHWImg8723A_RF.o\
  343. hal/OUTSRC/$(RTL871X)/phydm_RegConfig8723A.o
  344. _OUTSRC_FILES += hal/OUTSRC/rtl8192c/HalDMOutSrc8192C_CE.o
  345. endif
  346. ########### HAL_RTL8188E #################################
  347. ifeq ($(CONFIG_RTL8188E), y)
  348. RTL871X = rtl8188e
  349. ifeq ($(CONFIG_SDIO_HCI), y)
  350. MODULE_NAME = 8189es
  351. endif
  352. ifeq ($(CONFIG_GSPI_HCI), y)
  353. MODULE_NAME = 8189es
  354. endif
  355. ifeq ($(CONFIG_USB_HCI), y)
  356. MODULE_NAME = 8188eu
  357. endif
  358. ifeq ($(CONFIG_PCI_HCI), y)
  359. MODULE_NAME = 8188ee
  360. endif
  361. EXTRA_CFLAGS += -DCONFIG_RTL8188E
  362. _HAL_INTFS_FILES += hal/HalPwrSeqCmd.o \
  363. hal/$(RTL871X)/Hal8188EPwrSeq.o\
  364. hal/$(RTL871X)/$(RTL871X)_xmit.o\
  365. hal/$(RTL871X)/$(RTL871X)_sreset.o
  366. _HAL_INTFS_FILES += hal/$(RTL871X)/$(RTL871X)_hal_init.o \
  367. hal/$(RTL871X)/$(RTL871X)_phycfg.o \
  368. hal/$(RTL871X)/$(RTL871X)_rf6052.o \
  369. hal/$(RTL871X)/$(RTL871X)_dm.o \
  370. hal/$(RTL871X)/$(RTL871X)_rxdesc.o \
  371. hal/$(RTL871X)/$(RTL871X)_cmd.o \
  372. hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_halinit.o \
  373. hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_led.o \
  374. hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_xmit.o \
  375. hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_recv.o
  376. ifeq ($(CONFIG_SDIO_HCI), y)
  377. _HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops.o
  378. else
  379. ifeq ($(CONFIG_GSPI_HCI), y)
  380. _HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops.o
  381. else
  382. _HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops_linux.o
  383. endif
  384. endif
  385. ifeq ($(CONFIG_MP_INCLUDED), y)
  386. _HAL_INTFS_FILES += hal/$(RTL871X)/$(RTL871X)_mp.o
  387. endif
  388. ifeq ($(CONFIG_USB_HCI), y)
  389. _HAL_INTFS_FILES +=hal/efuse/$(RTL871X)/HalEfuseMask8188E_USB.o
  390. endif
  391. ifeq ($(CONFIG_PCI_HCI), y)
  392. _HAL_INTFS_FILES +=hal/efuse/$(RTL871X)/HalEfuseMask8188E_PCIE.o
  393. endif
  394. ifeq ($(CONFIG_SDIO_HCI), y)
  395. _HAL_INTFS_FILES +=hal/efuse/$(RTL871X)/HalEfuseMask8188E_SDIO.o
  396. endif
  397. #hal/OUTSRC/$(RTL871X)/Hal8188EFWImg_CE.o
  398. _OUTSRC_FILES += hal/OUTSRC/$(RTL871X)/HalHWImg8188E_MAC.o\
  399. hal/OUTSRC/$(RTL871X)/HalHWImg8188E_BB.o\
  400. hal/OUTSRC/$(RTL871X)/HalHWImg8188E_RF.o\
  401. hal/OUTSRC/$(RTL871X)/HalHWImg8188E_FW.o\
  402. hal/OUTSRC/$(RTL871X)/HalPhyRf_8188e.o\
  403. hal/OUTSRC/$(RTL871X)/phydm_RegConfig8188E.o\
  404. hal/OUTSRC/$(RTL871X)/Hal8188ERateAdaptive.o\
  405. hal/OUTSRC/$(RTL871X)/phydm_RTL8188E.o
  406. endif
  407. ########### HAL_RTL8192E #################################
  408. ifeq ($(CONFIG_RTL8192E), y)
  409. RTL871X = rtl8192e
  410. ifeq ($(CONFIG_SDIO_HCI), y)
  411. MODULE_NAME = 8192es
  412. endif
  413. ifeq ($(CONFIG_USB_HCI), y)
  414. MODULE_NAME = 8192eu
  415. endif
  416. ifeq ($(CONFIG_PCI_HCI), y)
  417. MODULE_NAME = 8192ee
  418. endif
  419. EXTRA_CFLAGS += -DCONFIG_RTL8192E
  420. _HAL_INTFS_FILES += hal/HalPwrSeqCmd.o \
  421. hal/$(RTL871X)/Hal8192EPwrSeq.o\
  422. hal/$(RTL871X)/$(RTL871X)_xmit.o\
  423. hal/$(RTL871X)/$(RTL871X)_sreset.o
  424. _HAL_INTFS_FILES += hal/$(RTL871X)/$(RTL871X)_hal_init.o \
  425. hal/$(RTL871X)/$(RTL871X)_phycfg.o \
  426. hal/$(RTL871X)/$(RTL871X)_rf6052.o \
  427. hal/$(RTL871X)/$(RTL871X)_dm.o \
  428. hal/$(RTL871X)/$(RTL871X)_rxdesc.o \
  429. hal/$(RTL871X)/$(RTL871X)_cmd.o \
  430. hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_halinit.o \
  431. hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_led.o \
  432. hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_xmit.o \
  433. hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_recv.o
  434. ifeq ($(CONFIG_SDIO_HCI), y)
  435. _HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops.o
  436. else
  437. ifeq ($(CONFIG_GSPI_HCI), y)
  438. _HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops.o
  439. else
  440. _HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops_linux.o
  441. endif
  442. endif
  443. ifeq ($(CONFIG_MP_INCLUDED), y)
  444. _HAL_INTFS_FILES += hal/$(RTL871X)/$(RTL871X)_mp.o
  445. endif
  446. ifeq ($(CONFIG_USB_HCI), y)
  447. _HAL_INTFS_FILES +=hal/efuse/$(RTL871X)/HalEfuseMask8192E_USB.o
  448. endif
  449. ifeq ($(CONFIG_PCI_HCI), y)
  450. _HAL_INTFS_FILES +=hal/efuse/$(RTL871X)/HalEfuseMask8192E_PCIE.o
  451. endif
  452. #hal/OUTSRC/$(RTL871X)/HalHWImg8188E_FW.o
  453. _OUTSRC_FILES += hal/OUTSRC/$(RTL871X)/HalHWImg8192E_MAC.o\
  454. hal/OUTSRC/$(RTL871X)/HalHWImg8192E_BB.o\
  455. hal/OUTSRC/$(RTL871X)/HalHWImg8192E_RF.o\
  456. hal/OUTSRC/$(RTL871X)/HalHWImg8192E_FW.o\
  457. hal/OUTSRC/$(RTL871X)/HalPhyRf_8192e.o\
  458. hal/OUTSRC/$(RTL871X)/phydm_RegConfig8192E.o\
  459. hal/OUTSRC/$(RTL871X)/phydm_RTL8192E.o
  460. endif
  461. ########### HAL_RTL8812A_RTL8821A #################################
  462. ifneq ($(CONFIG_RTL8812A)_$(CONFIG_RTL8821A), n_n)
  463. RTL871X = rtl8812a
  464. ifeq ($(CONFIG_USB_HCI), y)
  465. MODULE_NAME = 8812au
  466. endif
  467. ifeq ($(CONFIG_PCI_HCI), y)
  468. MODULE_NAME = 8812ae
  469. endif
  470. ifeq ($(CONFIG_SDIO_HCI), y)
  471. MODULE_NAME = 8812as
  472. endif
  473. _HAL_INTFS_FILES += hal/HalPwrSeqCmd.o \
  474. hal/$(RTL871X)/Hal8812PwrSeq.o \
  475. hal/$(RTL871X)/Hal8821APwrSeq.o\
  476. hal/$(RTL871X)/$(RTL871X)_xmit.o\
  477. hal/$(RTL871X)/$(RTL871X)_sreset.o
  478. _HAL_INTFS_FILES += hal/$(RTL871X)/$(RTL871X)_hal_init.o \
  479. hal/$(RTL871X)/$(RTL871X)_phycfg.o \
  480. hal/$(RTL871X)/$(RTL871X)_rf6052.o \
  481. hal/$(RTL871X)/$(RTL871X)_dm.o \
  482. hal/$(RTL871X)/$(RTL871X)_rxdesc.o \
  483. hal/$(RTL871X)/$(RTL871X)_cmd.o \
  484. hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_halinit.o \
  485. hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_led.o \
  486. hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_xmit.o \
  487. hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_recv.o
  488. ifeq ($(CONFIG_SDIO_HCI), y)
  489. _HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops.o
  490. else
  491. ifeq ($(CONFIG_GSPI_HCI), y)
  492. _HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops.o
  493. else
  494. _HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops_linux.o
  495. endif
  496. endif
  497. ifeq ($(CONFIG_MP_INCLUDED), y)
  498. _HAL_INTFS_FILES += hal/$(RTL871X)/$(RTL871X)_mp.o
  499. endif
  500. ifeq ($(CONFIG_RTL8812A), y)
  501. ifeq ($(CONFIG_USB_HCI), y)
  502. _HAL_INTFS_FILES +=hal/efuse/$(RTL871X)/HalEfuseMask8812A_USB.o
  503. endif
  504. ifeq ($(CONFIG_PCI_HCI), y)
  505. _HAL_INTFS_FILES +=hal/efuse/$(RTL871X)/HalEfuseMask8812A_PCIE.o
  506. endif
  507. endif
  508. ifeq ($(CONFIG_RTL8821A), y)
  509. ifeq ($(CONFIG_USB_HCI), y)
  510. _HAL_INTFS_FILES +=hal/efuse/$(RTL871X)/HalEfuseMask8821A_USB.o
  511. endif
  512. ifeq ($(CONFIG_PCI_HCI), y)
  513. _HAL_INTFS_FILES +=hal/efuse/$(RTL871X)/HalEfuseMask8821A_PCIE.o
  514. endif
  515. endif
  516. ifeq ($(CONFIG_RTL8812A), y)
  517. EXTRA_CFLAGS += -DCONFIG_RTL8812A
  518. _OUTSRC_FILES += hal/OUTSRC/$(RTL871X)/HalHWImg8812A_FW.o\
  519. hal/OUTSRC/$(RTL871X)/HalHWImg8812A_MAC.o\
  520. hal/OUTSRC/$(RTL871X)/HalHWImg8812A_BB.o\
  521. hal/OUTSRC/$(RTL871X)/HalHWImg8812A_RF.o\
  522. hal/OUTSRC/$(RTL871X)/HalPhyRf_8812A.o\
  523. hal/OUTSRC/$(RTL871X)/phydm_RegConfig8812A.o\
  524. hal/OUTSRC/$(RTL871X)/phydm_RTL8812A.o
  525. endif
  526. ifeq ($(CONFIG_RTL8821A), y)
  527. ifeq ($(CONFIG_RTL8812A), n)
  528. RTL871X = rtl8821a
  529. ifeq ($(CONFIG_USB_HCI), y)
  530. MODULE_NAME := 8821au
  531. endif
  532. ifeq ($(CONFIG_PCI_HCI), y)
  533. MODULE_NAME := 8821ae
  534. endif
  535. ifeq ($(CONFIG_SDIO_HCI), y)
  536. MODULE_NAME := 8821as
  537. endif
  538. endif
  539. EXTRA_CFLAGS += -DCONFIG_RTL8821A
  540. _OUTSRC_FILES += hal/OUTSRC/rtl8821a/HalHWImg8821A_FW.o\
  541. hal/OUTSRC/rtl8821a/HalHWImg8821A_MAC.o\
  542. hal/OUTSRC/rtl8821a/HalHWImg8821A_BB.o\
  543. hal/OUTSRC/rtl8821a/HalHWImg8821A_RF.o\
  544. hal/OUTSRC/rtl8812a/HalPhyRf_8812A.o\
  545. hal/OUTSRC/rtl8821a/HalPhyRf_8821A.o\
  546. hal/OUTSRC/rtl8821a/phydm_RegConfig8821A.o\
  547. hal/OUTSRC/rtl8821a/phydm_RTL8821A.o\
  548. hal/OUTSRC/rtl8821a/PhyDM_IQK_8821A.o
  549. endif
  550. endif
  551. ########### HAL_RTL8723B #################################
  552. ifeq ($(CONFIG_RTL8723B), y)
  553. RTL871X = rtl8723b
  554. ifeq ($(CONFIG_USB_HCI), y)
  555. MODULE_NAME = 8723bu
  556. endif
  557. ifeq ($(CONFIG_PCI_HCI), y)
  558. MODULE_NAME = 8723be
  559. endif
  560. ifeq ($(CONFIG_SDIO_HCI), y)
  561. MODULE_NAME = 8723bs
  562. endif
  563. EXTRA_CFLAGS += -DCONFIG_RTL8723B
  564. _HAL_INTFS_FILES += hal/HalPwrSeqCmd.o \
  565. hal/$(RTL871X)/Hal8723BPwrSeq.o\
  566. hal/$(RTL871X)/$(RTL871X)_sreset.o
  567. _HAL_INTFS_FILES += hal/$(RTL871X)/$(RTL871X)_hal_init.o \
  568. hal/$(RTL871X)/$(RTL871X)_phycfg.o \
  569. hal/$(RTL871X)/$(RTL871X)_rf6052.o \
  570. hal/$(RTL871X)/$(RTL871X)_dm.o \
  571. hal/$(RTL871X)/$(RTL871X)_rxdesc.o \
  572. hal/$(RTL871X)/$(RTL871X)_cmd.o \
  573. _HAL_INTFS_FILES += \
  574. hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_halinit.o \
  575. hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_led.o \
  576. hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_xmit.o \
  577. hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_recv.o
  578. ifeq ($(CONFIG_PCI_HCI), y)
  579. _HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops_linux.o
  580. else
  581. _HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops.o
  582. endif
  583. ifeq ($(CONFIG_MP_INCLUDED), y)
  584. _HAL_INTFS_FILES += hal/$(RTL871X)/$(RTL871X)_mp.o
  585. endif
  586. ifeq ($(CONFIG_USB_HCI), y)
  587. _HAL_INTFS_FILES +=hal/efuse/$(RTL871X)/HalEfuseMask8723B_USB.o
  588. endif
  589. ifeq ($(CONFIG_PCI_HCI), y)
  590. _HAL_INTFS_FILES +=hal/efuse/$(RTL871X)/HalEfuseMask8723B_PCIE.o
  591. endif
  592. _OUTSRC_FILES += hal/OUTSRC/$(RTL871X)/HalHWImg8723B_BB.o\
  593. hal/OUTSRC/$(RTL871X)/HalHWImg8723B_MAC.o\
  594. hal/OUTSRC/$(RTL871X)/HalHWImg8723B_RF.o\
  595. hal/OUTSRC/$(RTL871X)/HalHWImg8723B_FW.o\
  596. hal/OUTSRC/$(RTL871X)/HalHWImg8723B_MP.o\
  597. hal/OUTSRC/$(RTL871X)/phydm_RegConfig8723B.o\
  598. hal/OUTSRC/$(RTL871X)/HalPhyRf_8723B.o\
  599. hal/OUTSRC/$(RTL871X)/phydm_RTL8723B.o
  600. endif
  601. ########### AUTO_CFG #################################
  602. ifeq ($(CONFIG_AUTOCFG_CP), y)
  603. ifeq ($(CONFIG_MULTIDRV), y)
  604. $(shell cp $(TopDIR)/autoconf_multidrv_$(HCI_NAME)_linux.h $(TopDIR)/include/autoconf.h)
  605. else
  606. ifeq ($(CONFIG_RTL8188E)$(CONFIG_SDIO_HCI),yy)
  607. $(shell cp $(TopDIR)/autoconf_rtl8189e_$(HCI_NAME)_linux.h $(TopDIR)/include/autoconf.h)
  608. else
  609. $(shell cp $(TopDIR)/autoconf_$(RTL871X)_$(HCI_NAME)_linux.h $(TopDIR)/include/autoconf.h)
  610. endif
  611. endif
  612. endif
  613. ########### END OF PATH #################################
  614. ifeq ($(CONFIG_USB_HCI), y)
  615. ifeq ($(CONFIG_USB_AUTOSUSPEND), y)
  616. EXTRA_CFLAGS += -DCONFIG_USB_AUTOSUSPEND
  617. endif
  618. endif
  619. ifeq ($(CONFIG_MP_INCLUDED), y)
  620. #MODULE_NAME := $(MODULE_NAME)_mp
  621. EXTRA_CFLAGS += -DCONFIG_MP_INCLUDED
  622. endif
  623. ifeq ($(CONFIG_POWER_SAVING), y)
  624. EXTRA_CFLAGS += -DCONFIG_POWER_SAVING
  625. endif
  626. ifeq ($(CONFIG_HW_PWRP_DETECTION), y)
  627. EXTRA_CFLAGS += -DCONFIG_HW_PWRP_DETECTION
  628. endif
  629. ifeq ($(CONFIG_WIFI_TEST), y)
  630. EXTRA_CFLAGS += -DCONFIG_WIFI_TEST
  631. endif
  632. ifeq ($(CONFIG_BT_COEXIST), y)
  633. EXTRA_CFLAGS += -DCONFIG_BT_COEXIST
  634. endif
  635. ifeq ($(CONFIG_RTL8192CU_REDEFINE_1X1), y)
  636. EXTRA_CFLAGS += -DRTL8192C_RECONFIG_TO_1T1R
  637. endif
  638. ifeq ($(CONFIG_INTEL_WIDI), y)
  639. EXTRA_CFLAGS += -DCONFIG_INTEL_WIDI
  640. endif
  641. ifeq ($(CONFIG_WAPI_SUPPORT), y)
  642. EXTRA_CFLAGS += -DCONFIG_WAPI_SUPPORT
  643. endif
  644. ifeq ($(CONFIG_EFUSE_CONFIG_FILE), y)
  645. EXTRA_CFLAGS += -DCONFIG_EFUSE_CONFIG_FILE
  646. ifeq ($(MODULE_NAME), 8189es)
  647. EXTRA_CFLAGS += -DEFUSE_MAP_PATH=\"/system/etc/wifi/wifi_efuse_8189e.map\"
  648. else ifeq ($(MODULE_NAME), 8723bs)
  649. EXTRA_CFLAGS += -DEFUSE_MAP_PATH=\"/system/etc/wifi/wifi_efuse_8723bs.map\"
  650. else
  651. EXTRA_CFLAGS += -DEFUSE_MAP_PATH=\"/system/etc/wifi/wifi_efuse_$(MODULE_NAME).map\"
  652. endif
  653. EXTRA_CFLAGS += -DWIFIMAC_PATH=\"/data/wifimac.txt\"
  654. endif
  655. ifeq ($(CONFIG_EXT_CLK), y)
  656. EXTRA_CFLAGS += -DCONFIG_EXT_CLK
  657. endif
  658. ifeq ($(CONFIG_TRAFFIC_PROTECT), y)
  659. EXTRA_CFLAGS += -DCONFIG_TRAFFIC_PROTECT
  660. endif
  661. ifeq ($(CONFIG_LOAD_PHY_PARA_FROM_FILE), y)
  662. EXTRA_CFLAGS += -DCONFIG_LOAD_PHY_PARA_FROM_FILE
  663. #EXTRA_CFLAGS += -DREALTEK_CONFIG_PATH=\"/lib/firmware/\"
  664. EXTRA_CFLAGS += -DREALTEK_CONFIG_PATH=\"\"
  665. endif
  666. ifeq ($(CONFIG_CALIBRATE_TX_POWER_BY_REGULATORY), y)
  667. EXTRA_CFLAGS += -DCONFIG_CALIBRATE_TX_POWER_BY_REGULATORY
  668. endif
  669. ifeq ($(CONFIG_CALIBRATE_TX_POWER_TO_MAX), y)
  670. EXTRA_CFLAGS += -DCONFIG_CALIBRATE_TX_POWER_TO_MAX
  671. endif
  672. ifeq ($(CONFIG_RTW_ADAPTIVITY_EN), disable)
  673. EXTRA_CFLAGS += -DCONFIG_RTW_ADAPTIVITY_EN=0
  674. else ifeq ($(CONFIG_RTW_ADAPTIVITY_EN), enable)
  675. EXTRA_CFLAGS += -DCONFIG_RTW_ADAPTIVITY_EN=1
  676. endif
  677. ifeq ($(CONFIG_RTW_ADAPTIVITY_MODE), normal)
  678. EXTRA_CFLAGS += -DCONFIG_RTW_ADAPTIVITY_MODE=0
  679. else ifeq ($(CONFIG_RTW_ADAPTIVITY_MODE), carrier_sense)
  680. EXTRA_CFLAGS += -DCONFIG_RTW_ADAPTIVITY_MODE=1
  681. endif
  682. ifeq ($(CONFIG_SKIP_SIGNAL_SCALE_MAPPING), y)
  683. EXTRA_CFLAGS += -DCONFIG_SKIP_SIGNAL_SCALE_MAPPING
  684. endif
  685. ifeq ($(CONFIG_80211W), y)
  686. EXTRA_CFLAGS += -DCONFIG_IEEE80211W
  687. endif
  688. ifeq ($(CONFIG_WOWLAN), y)
  689. EXTRA_CFLAGS += -DCONFIG_WOWLAN
  690. ifeq ($(CONFIG_SDIO_HCI), y)
  691. EXTRA_CFLAGS += -DCONFIG_RTW_SDIO_PM_KEEP_POWER
  692. endif
  693. endif
  694. ifeq ($(CONFIG_AP_WOWLAN), y)
  695. EXTRA_CFLAGS += -DCONFIG_AP_WOWLAN
  696. ifeq ($(CONFIG_SDIO_HCI), y)
  697. EXTRA_CFLAGS += -DCONFIG_RTW_SDIO_PM_KEEP_POWER
  698. endif
  699. endif
  700. ifeq ($(CONFIG_PNO_SUPPORT), y)
  701. EXTRA_CFLAGS += -DCONFIG_PNO_SUPPORT
  702. ifeq ($(CONFIG_PNO_SET_DEBUG), y)
  703. EXTRA_CFLAGS += -DCONFIG_PNO_SET_DEBUG
  704. endif
  705. endif
  706. ifeq ($(CONFIG_GPIO_WAKEUP), y)
  707. EXTRA_CFLAGS += -DCONFIG_GPIO_WAKEUP
  708. endif
  709. ifneq ($(CONFIG_WAKEUP_GPIO_IDX), default)
  710. EXTRA_CFLAGS += -DWAKEUP_GPIO_IDX=$(CONFIG_WAKEUP_GPIO_IDX)
  711. endif
  712. ifeq ($(CONFIG_RTW_SDIO_PM_KEEP_POWER), y)
  713. ifeq ($(CONFIG_SDIO_HCI), y)
  714. EXTRA_CFLAGS += -DCONFIG_RTW_SDIO_PM_KEEP_POWER
  715. endif
  716. endif
  717. ifeq ($(CONFIG_REDUCE_TX_CPU_LOADING), y)
  718. EXTRA_CFLAGS += -DCONFIG_REDUCE_TX_CPU_LOADING
  719. endif
  720. ifeq ($(CONFIG_BR_EXT), y)
  721. BR_NAME = br0
  722. EXTRA_CFLAGS += -DCONFIG_BR_EXT
  723. EXTRA_CFLAGS += '-DCONFIG_BR_EXT_BRNAME="'$(BR_NAME)'"'
  724. endif
  725. ifeq ($(CONFIG_ANTENNA_DIVERSITY), y)
  726. EXTRA_CFLAGS += -DCONFIG_ANTENNA_DIVERSITY
  727. endif
  728. ifeq ($(CONFIG_TDLS), y)
  729. EXTRA_CFLAGS += -DCONFIG_TDLS
  730. endif
  731. ifeq ($(CONFIG_PLATFORM_I386_PC), y)
  732. ifdef EXT_EXTRA_CFLAGS
  733. EXTRA_CFLAGS += $(EXT_EXTRA_CFLAGS)
  734. else
  735. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  736. #EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE
  737. EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
  738. #EXTRA_CFLAGS += -DCONFIG_P2P_IPS
  739. endif
  740. ifndef ARCH
  741. SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/ppc64le/powerpc/ -e s/aarch64/arm64/)
  742. ARCH ?= $(SUBARCH)
  743. endif
  744. ifndef CROSS_COMPILE
  745. CROSS_COMPILE ?=
  746. endif
  747. ifndef KVER
  748. KVER ?= $(shell uname -r)
  749. endif
  750. ifndef KSRC
  751. KSRC := /lib/modules/$(KVER)/build
  752. endif
  753. ifndef MODDESTDIR
  754. MODDESTDIR := /lib/modules/$(KVER)/kernel/drivers/net/wireless/
  755. endif
  756. INSTALL_PREFIX :=
  757. endif
  758. ifeq ($(CONFIG_PLATFORM_ARM_RPI), y)
  759. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  760. EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
  761. ARCH ?= arm
  762. CROSS_COMPILE ?=
  763. KVER ?= $(shell uname -r)
  764. KSRC := /lib/modules/$(KVER)/build
  765. MODDESTDIR := /lib/modules/$(KVER)/kernel/drivers/net/wireless/
  766. INSTALL_PREFIX :=
  767. endif
  768. # NVidia Jetson Nano
  769. ifeq ($(CONFIG_PLATFORM_ARM_JET_NANO), y)
  770. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  771. EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE
  772. EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
  773. ARCH := arm64
  774. KVER ?= $(shell uname -r)
  775. KSRC := /usr/src/linux-headers-$(KVER)-ubuntu18.04_aarch64/kernel-4.9
  776. MODDESTDIR := /lib/modules/$(KVER)/kernel/drivers/net/wireless/realtek/rtl8812au/
  777. endif
  778. ifeq ($(CONFIG_PLATFORM_ACTIONS_ATM702X), y)
  779. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_PLATFORM_ANDROID -DCONFIG_PLATFORM_ACTIONS_ATM702X
  780. #ARCH := arm
  781. ARCH := $(R_ARCH)
  782. #CROSS_COMPILE := arm-none-linux-gnueabi-
  783. CROSS_COMPILE := $(R_CROSS_COMPILE)
  784. KVER ?= 3.4.0
  785. #KSRC := ../../../../build/out/kernel
  786. KSRC := $(KERNEL_BUILD_PATH)
  787. MODULE_NAME :=wlan
  788. endif
  789. ifeq ($(CONFIG_PLATFORM_ACTIONS_ATM705X), y)
  790. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  791. #EXTRA_CFLAGS += -DRTW_ENABLE_WIFI_CONTROL_FUNC
  792. # default setting for Android 4.1, 4.2, 4.3, 4.4
  793. EXTRA_CFLAGS += -DCONFIG_PLATFORM_ACTIONS_ATM705X
  794. EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE
  795. EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
  796. EXTRA_CFLAGS += -DCONFIG_P2P_IPS
  797. EXTRA_CFLAGS += -DCONFIG_PLATFORM_OPS
  798. ifeq ($(CONFIG_SDIO_HCI), y)
  799. _PLATFORM_FILES += platform/platform_arm_act_sdio.o
  800. endif
  801. ARCH := arm
  802. CROSS_COMPILE := /opt/arm-2011.09/bin/arm-none-linux-gnueabi-
  803. KSRC := /home/android_sdk/Action-semi/705a_android_L/android/kernel
  804. endif
  805. ifeq ($(CONFIG_PLATFORM_TI_AM3517), y)
  806. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_PLATFORM_ANDROID -DCONFIG_PLATFORM_SHUTTLE
  807. CROSS_COMPILE := arm-eabi-
  808. KSRC := $(shell pwd)/../../../Android/kernel
  809. ARCH := arm
  810. endif
  811. ifeq ($(CONFIG_PLATFORM_MSTAR_TITANIA12), y)
  812. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_PLATFORM_MSTAR -DCONFIG_PLATFORM_MSTAR_TITANIA12
  813. ARCH:=mips
  814. CROSS_COMPILE:= /usr/src/Mstar_kernel/mips-4.3/bin/mips-linux-gnu-
  815. KVER ?= 2.6.28.9
  816. KSRC:= /usr/src/Mstar_kernel/2.6.28.9/
  817. endif
  818. ifeq ($(CONFIG_PLATFORM_MSTAR), y)
  819. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_PLATFORM_MSTAR #-DCONFIG_PLATFORM_MSTAR_SCAN_BEFORE_CONNECT
  820. ARCH:=arm
  821. CROSS_COMPILE:= /usr/src/bin/arm-none-linux-gnueabi-
  822. KVER ?= 3.1.10
  823. KSRC:= /usr/src/Mstar_kernel/3.1.10/
  824. endif
  825. ifeq ($(CONFIG_PLATFORM_ANDROID_X86), y)
  826. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  827. SUBARCH := $(shell uname -m | sed -e s/i.86/i386/)
  828. ARCH := $(SUBARCH)
  829. CROSS_COMPILE := /media/DATA-2/android-x86/ics-x86_20120130/prebuilt/linux-x86/toolchain/i686-unknown-linux-gnu-4.2.1/bin/i686-unknown-linux-gnu-
  830. KSRC := /media/DATA-2/android-x86/ics-x86_20120130/out/target/product/generic_x86/obj/kernel
  831. MODULE_NAME :=wlan
  832. endif
  833. ifeq ($(CONFIG_PLATFORM_ANDROID_INTEL_X86), y)
  834. EXTRA_CFLAGS += -DCONFIG_PLATFORM_ANDROID_INTEL_X86
  835. EXTRA_CFLAGS += -DCONFIG_PLATFORM_INTEL_BYT
  836. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_PLATFORM_ANDROID
  837. EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE
  838. EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
  839. EXTRA_CFLAGS += -DCONFIG_P2P_IPS
  840. EXTRA_CFLAGS += -DCONFIG_SKIP_SIGNAL_SCALE_MAPPING
  841. ifeq ($(CONFIG_SDIO_HCI), y)
  842. EXTRA_CFLAGS += -DCONFIG_RESUME_IN_WORKQUEUE
  843. endif
  844. endif
  845. ifeq ($(CONFIG_PLATFORM_JB_X86), y)
  846. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  847. EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE
  848. EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
  849. EXTRA_CFLAGS += -DCONFIG_P2P_IPS
  850. SUBARCH := $(shell uname -m | sed -e s/i.86/i386/)
  851. ARCH := $(SUBARCH)
  852. CROSS_COMPILE := /home/android_sdk/android-x86_JB/prebuilts/gcc/linux-x86/x86/i686-linux-android-4.7/bin/i686-linux-android-
  853. KSRC := /home/android_sdk/android-x86_JB/out/target/product/x86/obj/kernel/
  854. MODULE_NAME :=wlan
  855. endif
  856. ifeq ($(CONFIG_PLATFORM_ARM_PXA2XX), y)
  857. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  858. ARCH := arm
  859. CROSS_COMPILE := arm-none-linux-gnueabi-
  860. KVER ?= 2.6.34.1
  861. KSRC ?= /usr/src/linux-2.6.34.1
  862. endif
  863. ifeq ($(CONFIG_PLATFORM_ARM_S3C2K4), y)
  864. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  865. ARCH := arm
  866. CROSS_COMPILE := arm-linux-
  867. KVER ?= 2.6.24.7_$(ARCH)
  868. KSRC := /usr/src/kernels/linux-$(KVER)
  869. endif
  870. ifeq ($(CONFIG_PLATFORM_ARM_S3C6K4), y)
  871. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  872. ARCH := arm
  873. CROSS_COMPILE := arm-none-linux-gnueabi-
  874. KVER ?= 2.6.34.1
  875. KSRC ?= /usr/src/linux-2.6.34.1
  876. endif
  877. ifeq ($(CONFIG_PLATFORM_RTD2880B), y)
  878. EXTRA_CFLAGS += -DCONFIG_BIG_ENDIAN -DCONFIG_PLATFORM_RTD2880B
  879. ARCH:=
  880. CROSS_COMPILE:=
  881. KVER ?=
  882. KSRC:=
  883. endif
  884. ifeq ($(CONFIG_PLATFORM_MIPS_RMI), y)
  885. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  886. ARCH:=mips
  887. CROSS_COMPILE:=mipsisa32r2-uclibc-
  888. KVER ?=
  889. KSRC:= /root/work/kernel_realtek
  890. endif
  891. ifeq ($(CONFIG_PLATFORM_MIPS_PLM), y)
  892. EXTRA_CFLAGS += -DCONFIG_BIG_ENDIAN
  893. ARCH:=mips
  894. CROSS_COMPILE:=mipsisa32r2-uclibc-
  895. KVER ?=
  896. KSRC:= /root/work/kernel_realtek
  897. endif
  898. ifeq ($(CONFIG_PLATFORM_MSTAR389), y)
  899. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_PLATFORM_MSTAR389
  900. ARCH:=mips
  901. CROSS_COMPILE:= mips-linux-gnu-
  902. KVER ?= 2.6.28.10
  903. KSRC:= /home/mstar/mstar_linux/2.6.28.9/
  904. endif
  905. ifeq ($(CONFIG_PLATFORM_MIPS_AR9132), y)
  906. EXTRA_CFLAGS += -DCONFIG_BIG_ENDIAN
  907. ARCH := mips
  908. CROSS_COMPILE := mips-openwrt-linux-
  909. KSRC := /home/alex/test_openwrt/tmp/linux-2.6.30.9
  910. endif
  911. # This is how I built for openwrt Neo2 platform. --Ben
  912. ifeq ($(CONFIG_PLATFORM_OPENWRT_NEO2), y)
  913. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  914. ARCH := arm64
  915. CROSS_COMPILE := aarch64-openwrt-linux-
  916. #export PATH=$PATH:/home/greearb/git/openwrt-neo2-dev/staging_dir/toolchain-aarch64_cortex-a53_gcc-7.3.0_musl/bin/
  917. #export STAGING_DIR=/home/greearb/git/openwrt-neo2-dev/staging_dir
  918. KSRC := /home/greearb/git/openwrt-neo2-dev/build_dir/target-aarch64_cortex-a53_musl/linux-sunxi_cortexa53/linux-4.14.78
  919. endif
  920. ifeq ($(CONFIG_PLATFORM_DMP_PHILIPS), y)
  921. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DRTK_DMP_PLATFORM
  922. ARCH := mips
  923. #CROSS_COMPILE:=/usr/local/msdk-4.3.6-mips-EL-2.6.12.6-0.9.30.3/bin/mipsel-linux-
  924. CROSS_COMPILE:=/usr/local/toolchain_mipsel/bin/mipsel-linux-
  925. KSRC ?=/usr/local/Jupiter/linux-2.6.12
  926. endif
  927. ifeq ($(CONFIG_PLATFORM_RTK_DMP), y)
  928. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DRTK_DMP_PLATFORM -DCONFIG_WIRELESS_EXT
  929. EXTRA_CFLAGS += -DCONFIG_PLATFORM_OPS
  930. ifeq ($(CONFIG_USB_HCI), y)
  931. _PLATFORM_FILES += platform/platform_RTK_DMP_usb.o
  932. endif
  933. ARCH:=mips
  934. CROSS_COMPILE:=mipsel-linux-
  935. KVER ?=
  936. KSRC ?= /usr/src/DMP_Kernel/jupiter/linux-2.6.12
  937. endif
  938. ifeq ($(CONFIG_PLATFORM_MT53XX), y)
  939. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_PLATFORM_MT53XX
  940. ARCH:= arm
  941. CROSS_COMPILE:= arm11_mtk_le-
  942. KVER ?= 2.6.27
  943. KSRC?= /proj/mtk00802/BD_Compare/BDP/Dev/BDP_V301/BDP_Linux/linux-2.6.27
  944. endif
  945. ifeq ($(CONFIG_PLATFORM_ARM_MX51_241H), y)
  946. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_WISTRON_PLATFORM
  947. ARCH := arm
  948. CROSS_COMPILE := /opt/freescale/usr/local/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-
  949. KVER ?= 2.6.31
  950. KSRC ?= /lib/modules/2.6.31-770-g0e46b52/source
  951. endif
  952. ifeq ($(CONFIG_PLATFORM_FS_MX61), y)
  953. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  954. ARCH := arm
  955. CROSS_COMPILE := /home/share/CusEnv/FreeScale/arm-eabi-4.4.3/bin/arm-eabi-
  956. KSRC ?= /home/share/CusEnv/FreeScale/FS_kernel_env
  957. endif
  958. ifeq ($(CONFIG_PLATFORM_ACTIONS_ATJ227X), y)
  959. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_PLATFORM_ACTIONS_ATJ227X
  960. ARCH := mips
  961. CROSS_COMPILE := /home/cnsd4/project/actions/tools-2.6.27/bin/mipsel-linux-gnu-
  962. KVER ?= 2.6.27
  963. KSRC := /home/cnsd4/project/actions/linux-2.6.27.28
  964. endif
  965. ifeq ($(CONFIG_PLATFORM_TI_DM365), y)
  966. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_PLATFORM_TI_DM365
  967. EXTRA_CFLAGS += -DCONFIG_USE_USB_BUFFER_ALLOC_RX
  968. EXTRA_CFLAGS += -DCONFIG_SINGLE_XMIT_BUF -DCONFIG_SINGLE_RECV_BUF
  969. ARCH := arm
  970. #CROSS_COMPILE := /home/cnsd4/Appro/mv_pro_5.0/montavista/pro/devkit/arm/v5t_le/bin/arm_v5t_le-
  971. #KSRC := /home/cnsd4/Appro/mv_pro_5.0/montavista/pro/devkit/lsp/ti-davinci/linux-dm365
  972. CROSS_COMPILE := /opt/montavista/pro5.0/devkit/arm/v5t_le/bin/arm-linux-
  973. KSRC:= /home/vivotek/lsp/DM365/kernel_platform/kernel/linux-2.6.18
  974. KERNELOUTPUT := ${PRODUCTDIR}/tmp
  975. KVER ?= 2.6.18
  976. endif
  977. ifeq ($(CONFIG_PLATFORM_MOZART), y)
  978. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_PLATFORM_MOZART
  979. ARCH := arm
  980. CROSS_COMPILE := /home/vivotek/lsp/mozart3v2/Mozart3e_Toolchain/build_arm_nofpu/usr/bin/arm-linux-
  981. KVER ?= $(shell uname -r)
  982. KSRC:= /opt/Vivotek/lsp/mozart3v2/kernel_platform/kernel/mozart_kernel-1.17
  983. KERNELOUTPUT := /home/pink/sample/ODM/IP8136W-VINT/tmp/kernel
  984. endif
  985. ifeq ($(CONFIG_PLATFORM_TEGRA3_CARDHU), y)
  986. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  987. # default setting for Android 4.1, 4.2
  988. EXTRA_CFLAGS += -DRTW_ENABLE_WIFI_CONTROL_FUNC
  989. EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE
  990. EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
  991. EXTRA_CFLAGS += -DCONFIG_P2P_IPS
  992. ARCH := arm
  993. CROSS_COMPILE := /home/android_sdk/nvidia/tegra-16r3-partner-android-4.1_20120723/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
  994. KSRC := /home/android_sdk/nvidia/tegra-16r3-partner-android-4.1_20120723/out/target/product/cardhu/obj/KERNEL
  995. MODULE_NAME := wlan
  996. endif
  997. ifeq ($(CONFIG_PLATFORM_TEGRA4_DALMORE), y)
  998. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  999. # default setting for Android 4.1, 4.2
  1000. EXTRA_CFLAGS += -DRTW_ENABLE_WIFI_CONTROL_FUNC
  1001. EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE
  1002. EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
  1003. EXTRA_CFLAGS += -DCONFIG_P2P_IPS
  1004. ARCH := arm
  1005. CROSS_COMPILE := /home/android_sdk/nvidia/tegra-17r9-partner-android-4.2-dalmore_20130131/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-
  1006. KSRC := /home/android_sdk/nvidia/tegra-17r9-partner-android-4.2-dalmore_20130131/out/target/product/dalmore/obj/KERNEL
  1007. MODULE_NAME := wlan
  1008. endif
  1009. ifeq ($(CONFIG_PLATFORM_ARM_TCC8900), y)
  1010. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  1011. ARCH := arm
  1012. CROSS_COMPILE := /home/android_sdk/Telechips/SDK_2304_20110613/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
  1013. KSRC := /home/android_sdk/Telechips/SDK_2304_20110613/kernel
  1014. MODULE_NAME := wlan
  1015. endif
  1016. ifeq ($(CONFIG_PLATFORM_ARM_TCC8920), y)
  1017. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  1018. ARCH := arm
  1019. CROSS_COMPILE := /home/android_sdk/Telechips/v12.06_r1-tcc-android-4.0.4/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
  1020. KSRC := /home/android_sdk/Telechips/v12.06_r1-tcc-android-4.0.4/kernel
  1021. MODULE_NAME := wlan
  1022. endif
  1023. ifeq ($(CONFIG_PLATFORM_ARM_TCC8920_JB42), y)
  1024. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  1025. # default setting for Android 4.1, 4.2
  1026. EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE
  1027. EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
  1028. EXTRA_CFLAGS += -DCONFIG_P2P_IPS
  1029. ARCH := arm
  1030. CROSS_COMPILE := /home/android_sdk/Telechips/v13.03_r1-tcc-android-4.2.2_ds_patched/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-
  1031. KSRC := /home/android_sdk/Telechips/v13.03_r1-tcc-android-4.2.2_ds_patched/kernel
  1032. MODULE_NAME := wlan
  1033. endif
  1034. ifeq ($(CONFIG_PLATFORM_ARM_RK2818), y)
  1035. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_PLATFORM_ANDROID -DCONFIG_PLATFORM_ROCKCHIPS
  1036. ARCH := arm
  1037. CROSS_COMPILE := /usr/src/release_fae_version/toolchain/arm-eabi-4.4.0/bin/arm-eabi-
  1038. KSRC := /usr/src/release_fae_version/kernel25_A7_281x
  1039. MODULE_NAME := wlan
  1040. endif
  1041. ifeq ($(CONFIG_PLATFORM_ARM_RK3188), y)
  1042. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_PLATFORM_ANDROID -DCONFIG_PLATFORM_ROCKCHIPS
  1043. # default setting for Android 4.1, 4.2, 4.3, 4.4
  1044. EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
  1045. EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE
  1046. # default setting for Power control
  1047. EXTRA_CFLAGS += -DRTW_ENABLE_WIFI_CONTROL_FUNC
  1048. EXTRA_CFLAGS += -DRTW_SUPPORT_PLATFORM_SHUTDOWN
  1049. # default setting for Special function
  1050. EXTRA_CFLAGS += -DCONFIG_P2P_IPS
  1051. ARCH := arm
  1052. CROSS_COMPILE := /home/android_sdk/Rockchip/Rk3188/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-
  1053. KSRC := /home/android_sdk/Rockchip/Rk3188/kernel
  1054. MODULE_NAME := wlan
  1055. endif
  1056. ifeq ($(CONFIG_PLATFORM_ARM_RK3066), y)
  1057. EXTRA_CFLAGS += -DCONFIG_PLATFORM_ARM_RK3066
  1058. EXTRA_CFLAGS += -DRTW_ENABLE_WIFI_CONTROL_FUNC
  1059. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  1060. EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE
  1061. EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211
  1062. EXTRA_CFLAGS += -DCONFIG_P2P_IPS
  1063. ifeq ($(CONFIG_SDIO_HCI), y)
  1064. EXTRA_CFLAGS += -DRTW_SUPPORT_PLATFORM_SHUTDOWN
  1065. endif
  1066. EXTRA_CFLAGS += -fno-pic
  1067. ARCH := arm
  1068. CROSS_COMPILE := /home/android_sdk/Rockchip/rk3066_20130607/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/arm-linux-androideabi-
  1069. #CROSS_COMPILE := /home/android_sdk/Rockchip/Rk3066sdk/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/arm-linux-androideabi-
  1070. KSRC := /home/android_sdk/Rockchip/Rk3066sdk/kernel
  1071. MODULE_NAME :=wlan
  1072. endif
  1073. ifeq ($(CONFIG_PLATFORM_ARM_URBETTER), y)
  1074. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN #-DCONFIG_MINIMAL_MEMORY_USAGE
  1075. ARCH := arm
  1076. CROSS_COMPILE := /media/DATA-1/urbetter/arm-2009q3/bin/arm-none-linux-gnueabi-
  1077. KSRC := /media/DATA-1/urbetter/ics-urbetter/kernel
  1078. MODULE_NAME := wlan
  1079. endif
  1080. ifeq ($(CONFIG_PLATFORM_ARM_TI_PANDA), y)
  1081. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN #-DCONFIG_MINIMAL_MEMORY_USAGE
  1082. ARCH := arm
  1083. #CROSS_COMPILE := /media/DATA-1/aosp/ics-aosp_20111227/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
  1084. #KSRC := /media/DATA-1/aosp/android-omap-panda-3.0_20120104
  1085. CROSS_COMPILE := /media/DATA-1/android-4.0/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
  1086. KSRC := /media/DATA-1/android-4.0/panda_kernel/omap
  1087. MODULE_NAME := wlan
  1088. endif
  1089. ifeq ($(CONFIG_PLATFORM_MIPS_JZ4760), y)
  1090. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_MINIMAL_MEMORY_USAGE
  1091. ARCH ?= mips
  1092. CROSS_COMPILE ?= /mnt/sdb5/Ingenic/Umido/mips-4.3/bin/mips-linux-gnu-
  1093. KSRC ?= /mnt/sdb5/Ingenic/Umido/kernel
  1094. endif
  1095. ifeq ($(CONFIG_PLATFORM_SZEBOOK), y)
  1096. EXTRA_CFLAGS += -DCONFIG_BIG_ENDIAN
  1097. ARCH:=arm
  1098. CROSS_COMPILE:=/opt/crosstool2/bin/armeb-unknown-linux-gnueabi-
  1099. KVER ?= 2.6.31.6
  1100. KSRC:= ../code/linux-2.6.31.6-2020/
  1101. endif
  1102. #Add setting for MN10300
  1103. ifeq ($(CONFIG_PLATFORM_MN10300), y)
  1104. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_PLATFORM_MN10300
  1105. ARCH := mn10300
  1106. CROSS_COMPILE := mn10300-linux-
  1107. KVER ?= 2.6.32.2
  1108. KSRC := /home/winuser/work/Plat_sLD2T_V3010/usr/src/linux-2.6.32.2
  1109. INSTALL_PREFIX :=
  1110. endif
  1111. ifeq ($(CONFIG_PLATFORM_ARM_SUNxI), y)
  1112. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  1113. EXTRA_CFLAGS += -DCONFIG_PLATFORM_ARM_SUNxI
  1114. # default setting for Android 4.1, 4.2
  1115. EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE
  1116. EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
  1117. EXTRA_CFLAGS += -DDCONFIG_P2P_IPS
  1118. EXTRA_CFLAGS += -DCONFIG_PLATFORM_OPS
  1119. ifeq ($(CONFIG_USB_HCI), y)
  1120. EXTRA_CFLAGS += -DCONFIG_USE_USB_BUFFER_ALLOC_TX
  1121. _PLATFORM_FILES += platform/platform_ARM_SUNxI_usb.o
  1122. endif
  1123. ifeq ($(CONFIG_SDIO_HCI), y)
  1124. # default setting for A10-EVB mmc0
  1125. #EXTRA_CFLAGS += -DCONFIG_WITS_EVB_V13
  1126. _PLATFORM_FILES += platform/platform_ARM_SUNxI_sdio.o
  1127. endif
  1128. ARCH := arm
  1129. #CROSS_COMPILE := arm-none-linux-gnueabi-
  1130. CROSS_COMPILE=/home/android_sdk/Allwinner/a10/android-jb42/lichee-jb42/buildroot/output/external-toolchain/bin/arm-none-linux-gnueabi-
  1131. KVER ?= 3.0.8
  1132. #KSRC:= ../lichee/linux-3.0/
  1133. KSRC=/home/android_sdk/Allwinner/a10/android-jb42/lichee-jb42/linux-3.0
  1134. endif
  1135. ifeq ($(CONFIG_PLATFORM_ARM_SUN6I), y)
  1136. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  1137. EXTRA_CFLAGS += -DCONFIG_PLATFORM_ARM_SUN6I
  1138. EXTRA_CFLAGS += -DCONFIG_TRAFFIC_PROTECT
  1139. # default setting for Android 4.1, 4.2, 4.3, 4.4
  1140. EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE
  1141. EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
  1142. EXTRA_CFLAGS += -DCONFIG_P2P_IPS -DCONFIG_QOS_OPTIMIZATION
  1143. EXTRA_CFLAGS += -DCONFIG_PLATFORM_OPS
  1144. ifeq ($(CONFIG_USB_HCI), y)
  1145. EXTRA_CFLAGS += -DCONFIG_USE_USB_BUFFER_ALLOC_TX
  1146. _PLATFORM_FILES += platform/platform_ARM_SUNxI_usb.o
  1147. endif
  1148. ifeq ($(CONFIG_SDIO_HCI), y)
  1149. # default setting for A31-EVB mmc0
  1150. EXTRA_CFLAGS += -DCONFIG_A31_EVB
  1151. _PLATFORM_FILES += platform/platform_ARM_SUNnI_sdio.o
  1152. endif
  1153. ARCH := arm
  1154. #Android-JB42
  1155. #CROSS_COMPILE := /home/android_sdk/Allwinner/a31/android-jb42/lichee/buildroot/output/external-toolchain/bin/arm-linux-gnueabi-
  1156. #KSRC :=/home/android_sdk/Allwinner/a31/android-jb42/lichee/linux-3.3
  1157. #ifeq ($(CONFIG_USB_HCI), y)
  1158. #MODULE_NAME := 8188eu_sw
  1159. #endif
  1160. # ==== Cross compile setting for kitkat-a3x_v4.5 =====
  1161. CROSS_COMPILE := /home/android_sdk/Allwinner/a31/kitkat-a3x_v4.5/lichee/buildroot/output/external-toolchain/bin/arm-linux-gnueabi-
  1162. KSRC :=/home/android_sdk/Allwinner/a31/kitkat-a3x_v4.5/lichee/linux-3.3
  1163. endif
  1164. ifeq ($(CONFIG_PLATFORM_ARM_SUN7I), y)
  1165. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  1166. EXTRA_CFLAGS += -DCONFIG_PLATFORM_ARM_SUN7I
  1167. EXTRA_CFLAGS += -DCONFIG_TRAFFIC_PROTECT
  1168. # default setting for Android 4.1, 4.2, 4.3, 4.4
  1169. EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE
  1170. EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
  1171. EXTRA_CFLAGS += -DCONFIG_P2P_IPS -DCONFIG_QOS_OPTIMIZATION
  1172. EXTRA_CFLAGS += -DCONFIG_PLATFORM_OPS
  1173. ifeq ($(CONFIG_USB_HCI), y)
  1174. EXTRA_CFLAGS += -DCONFIG_USE_USB_BUFFER_ALLOC_TX
  1175. _PLATFORM_FILES += platform/platform_ARM_SUNxI_usb.o
  1176. endif
  1177. ifeq ($(CONFIG_SDIO_HCI), y)
  1178. _PLATFORM_FILES += platform/platform_ARM_SUNnI_sdio.o
  1179. endif
  1180. ARCH := arm
  1181. # ===Cross compile setting for Android 4.2 SDK ===
  1182. #CROSS_COMPILE := /home/android_sdk/Allwinner/a20_evb/lichee/out/android/common/buildroot/external-toolchain/bin/arm-linux-gnueabi-
  1183. #KSRC := /home/android_sdk/Allwinner/a20_evb/lichee/linux-3.3
  1184. # ==== Cross compile setting for Android 4.3 SDK =====
  1185. #CROSS_COMPILE := /home/android_sdk/Allwinner/a20/android-jb43/lichee/out/android/common/buildroot/external-toolchain/bin/arm-linux-gnueabi-
  1186. #KSRC := /home/android_sdk/Allwinner/a20/android-jb43/lichee/linux-3.4
  1187. # ==== Cross compile setting for kitkat-a20_v4.4 =====
  1188. CROSS_COMPILE := /home/android_sdk/Allwinner/a20/kitkat-a20_v4.4/lichee/out/android/common/buildroot/external-toolchain/bin/arm-linux-gnueabi-
  1189. KSRC := /home/android_sdk/Allwinner/a20/kitkat-a20_v4.4/lichee/linux-3.4
  1190. endif
  1191. ifeq ($(CONFIG_PLATFORM_ARM_SUN8I), y)
  1192. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  1193. EXTRA_CFLAGS += -DCONFIG_PLATFORM_ARM_SUN8I
  1194. EXTRA_CFLAGS += -DCONFIG_TRAFFIC_PROTECT
  1195. # default setting for Android 4.1, 4.2
  1196. EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE
  1197. EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
  1198. EXTRA_CFLAGS += -DCONFIG_P2P_IPS
  1199. EXTRA_CFLAGS += -DCONFIG_PLATFORM_OPS
  1200. ifeq ($(CONFIG_USB_HCI), y)
  1201. EXTRA_CFLAGS += -DCONFIG_USE_USB_BUFFER_ALLOC_TX
  1202. _PLATFORM_FILES += platform/platform_ARM_SUNxI_usb.o
  1203. endif
  1204. ifeq ($(CONFIG_SDIO_HCI), y)
  1205. _PLATFORM_FILES += platform/platform_ARM_SUNnI_sdio.o
  1206. endif
  1207. ARCH := arm
  1208. # ===Cross compile setting for Android 4.2 SDK ===
  1209. #CROSS_COMPILE := /home/android_sdk/Allwinner/a23/android-jb42/lichee/out/android/common/buildroot/external-toolchain/bin/arm-linux-gnueabi-
  1210. #KSRC :=/home/android_sdk/Allwinner/a23/android-jb42/lichee/linux-3.4
  1211. # ===Cross compile setting for Android 4.4 SDK ===
  1212. CROSS_COMPILE := /home/android_sdk/Allwinner/a23/android-kk44/lichee/out/android/common/buildroot/external-toolchain/bin/arm-linux-gnueabi-
  1213. KSRC :=/home/android_sdk/Allwinner/a23/android-kk44/lichee/linux-3.4
  1214. endif
  1215. ifeq ($(CONFIG_PLATFORM_ACTIONS_ATV5201), y)
  1216. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_PLATFORM_ACTIONS_ATV5201
  1217. EXTRA_CFLAGS += -DCONFIG_SDIO_DISABLE_RXFIFO_POLLING_LOOP
  1218. ARCH := mips
  1219. CROSS_COMPILE := mipsel-linux-gnu-
  1220. KVER ?= $(KERNEL_VER)
  1221. KSRC:= $(CFGDIR)/../../kernel/linux-$(KERNEL_VER)
  1222. endif
  1223. ifeq ($(CONFIG_PLATFORM_ARM_RTD299X), y)
  1224. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DUSB_XMITBUF_ALIGN_SZ=1024 -DUSB_PACKET_OFFSET_SZ=0
  1225. #ARCH, CROSS_COMPILE, KSRC,and MODDESTDIR are provided by external makefile
  1226. INSTALL_PREFIX :=
  1227. endif
  1228. # Platfrom setting
  1229. ifeq ($(CONFIG_PLATFORM_ARM_SPREADTRUM_6820), y)
  1230. ifeq ($(CONFIG_ANDROID_2X), y)
  1231. EXTRA_CFLAGS += -DANDROID_2X
  1232. endif
  1233. EXTRA_CFLAGS += -DCONFIG_PLATFORM_SPRD
  1234. EXTRA_CFLAGS += -DPLATFORM_SPREADTRUM_6820
  1235. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  1236. ifeq ($(RTL871X), rtl8188e)
  1237. EXTRA_CFLAGS += -DSOFTAP_PS_DURATION=50
  1238. endif
  1239. ifeq ($(CONFIG_SDIO_HCI), y)
  1240. EXTRA_CFLAGS += -DCONFIG_PLATFORM_OPS
  1241. _PLATFORM_FILES += platform/platform_sprd_sdio.o
  1242. endif
  1243. endif
  1244. ifeq ($(CONFIG_PLATFORM_ARM_SPREADTRUM_8810), y)
  1245. ifeq ($(CONFIG_ANDROID_2X), y)
  1246. EXTRA_CFLAGS += -DANDROID_2X
  1247. endif
  1248. EXTRA_CFLAGS += -DCONFIG_PLATFORM_SPRD
  1249. EXTRA_CFLAGS += -DPLATFORM_SPREADTRUM_8810
  1250. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  1251. ifeq ($(RTL871X), rtl8188e)
  1252. EXTRA_CFLAGS += -DSOFTAP_PS_DURATION=50
  1253. endif
  1254. ifeq ($(CONFIG_SDIO_HCI), y)
  1255. EXTRA_CFLAGS += -DCONFIG_PLATFORM_OPS
  1256. _PLATFORM_FILES += platform/platform_sprd_sdio.o
  1257. endif
  1258. endif
  1259. ifeq ($(CONFIG_PLATFORM_ARM_WMT), y)
  1260. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  1261. EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE
  1262. EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
  1263. EXTRA_CFLAGS += -DCONFIG_PLATFORM_OPS
  1264. ifeq ($(CONFIG_SDIO_HCI), y)
  1265. _PLATFORM_FILES += platform/platform_ARM_WMT_sdio.o
  1266. endif
  1267. ARCH := arm
  1268. CROSS_COMPILE := /home/android_sdk/WonderMedia/wm8880-android4.4/toolchain/arm_201103_gcc4.5.2/mybin/arm_1103_le-
  1269. KSRC := /home/android_sdk/WonderMedia/wm8880-android4.4/kernel4.4/
  1270. MODULE_NAME :=8189es_kk
  1271. endif
  1272. ifeq ($(CONFIG_PLATFORM_RTK119X), y)
  1273. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  1274. #EXTRA_CFLAGS += -DCONFIG_PLATFORM_ARM_SUN7I
  1275. EXTRA_CFLAGS += -DCONFIG_TRAFFIC_PROTECT
  1276. # default setting for Android 4.1, 4.2
  1277. EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE
  1278. EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
  1279. #EXTRA_CFLAGS += -DCONFIG_P2P_IPS -DCONFIG_QOS_OPTIMIZATION
  1280. EXTRA_CFLAGS += -DCONFIG_QOS_OPTIMIZATION
  1281. #EXTRA_CFLAGS += -DCONFIG_#PLATFORM_OPS
  1282. ifeq ($(CONFIG_USB_HCI), y)
  1283. EXTRA_CFLAGS += -DCONFIG_USE_USB_BUFFER_ALLOC_TX
  1284. #_PLATFORM_FILES += platform/platform_ARM_SUNxI_usb.o
  1285. endif
  1286. ifeq ($(CONFIG_SDIO_HCI), y)
  1287. _PLATFORM_FILES += platform/platform_ARM_SUNnI_sdio.o
  1288. endif
  1289. ARCH := arm
  1290. # ==== Cross compile setting for Android 4.4 SDK =====
  1291. #CROSS_COMPILE := arm-linux-gnueabihf-
  1292. KVER ?= 3.10.24
  1293. #KSRC :=/home/android_sdk/Allwinner/a20/android-kitkat44/lichee/linux-3.4
  1294. CROSS_COMPILE := /home/realtek/software_phoenix/phoenix/toolchain/usr/local/arm-2013.11/bin/arm-linux-gnueabihf-
  1295. KSRC := /home/realtek/software_phoenix/linux-kernel
  1296. MODULE_NAME := 8192eu
  1297. endif
  1298. ifeq ($(CONFIG_PLATFORM_NOVATEK_NT72668), y)
  1299. EXTRA_CFLAGS += -DCONFIG_PLATFORM_NOVATEK_NT72668
  1300. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  1301. EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE
  1302. EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
  1303. EXTRA_CFLAGS += -DDCONFIG_P2P_IPS
  1304. EXTRA_CFLAGS += -DCONFIG_USE_USB_BUFFER_ALLOC_RX
  1305. EXTRA_CFLAGS += -DCONFIG_USE_USB_BUFFER_ALLOC_TX
  1306. ARCH ?= arm
  1307. CROSS_COMPILE := arm-linux-gnueabihf-
  1308. KVER ?= 3.8.0
  1309. KSRC := /Custom/Novatek/TCL/linux-3.8_header
  1310. #KSRC := $(KERNELDIR)
  1311. endif
  1312. ifeq ($(CONFIG_MULTIDRV), y)
  1313. ifeq ($(CONFIG_SDIO_HCI), y)
  1314. MODULE_NAME := rtw_sdio
  1315. endif
  1316. ifeq ($(CONFIG_USB_HCI), y)
  1317. MODULE_NAME := rtw_usb
  1318. endif
  1319. ifeq ($(CONFIG_PCI_HCI), y)
  1320. MODULE_NAME := rtw_pci
  1321. endif
  1322. endif
  1323. USER_MODULE_NAME ?= rtl$(MODULE_NAME)
  1324. ifneq ($(USER_MODULE_NAME),)
  1325. MODULE_NAME := $(USER_MODULE_NAME)
  1326. endif
  1327. ifneq ($(KERNELRELEASE),)
  1328. KERNELRELEASE := $(shell uname -r)
  1329. endif
  1330. ifeq ($(CONFIG_DEBUG), y)
  1331. EXTRA_CFLAGS += -DCONFIG_DEBUG
  1332. endif
  1333. ifeq ($(DCONFIG_DEBUG_CFG80211), y)
  1334. EXTRA_CFLAGS += -DCONFIG_DEBUG_CFG80211
  1335. endif
  1336. ifeq ($(DCONFIG_DEBUG_RTL871X), y)
  1337. EXTRA_CFLAGS += -DCONFIG_DEBUG_RTL871X
  1338. endif
  1339. rtk_core := core/rtw_cmd.o \
  1340. core/rtw_security.o \
  1341. core/rtw_debug.o \
  1342. core/rtw_io.o \
  1343. core/rtw_ioctl_query.o \
  1344. core/rtw_ioctl_set.o \
  1345. core/rtw_ieee80211.o \
  1346. core/rtw_mlme.o \
  1347. core/rtw_mlme_ext.o \
  1348. core/rtw_wlan_util.o \
  1349. core/rtw_vht.o \
  1350. core/rtw_pwrctrl.o \
  1351. core/rtw_rf.o \
  1352. core/rtw_recv.o \
  1353. core/rtw_sta_mgt.o \
  1354. core/rtw_ap.o \
  1355. core/rtw_xmit.o \
  1356. core/rtw_p2p.o \
  1357. core/rtw_tdls.o \
  1358. core/rtw_br_ext.o \
  1359. core/rtw_iol.o \
  1360. core/rtw_sreset.o \
  1361. core/rtw_btcoex.o \
  1362. core/rtw_beamforming.o \
  1363. core/rtw_odm.o \
  1364. core/efuse/rtw_efuse.o
  1365. $(MODULE_NAME)-y += $(rtk_core)
  1366. $(MODULE_NAME)-$(CONFIG_INTEL_WIDI) += core/rtw_intel_widi.o
  1367. $(MODULE_NAME)-$(CONFIG_WAPI_SUPPORT) += core/rtw_wapi.o \
  1368. core/rtw_wapi_sms4.o
  1369. $(MODULE_NAME)-y += $(_OS_INTFS_FILES)
  1370. $(MODULE_NAME)-y += $(_HAL_INTFS_FILES)
  1371. $(MODULE_NAME)-y += $(_OUTSRC_FILES)
  1372. $(MODULE_NAME)-y += $(_PLATFORM_FILES)
  1373. $(MODULE_NAME)-$(CONFIG_MP_INCLUDED) += core/rtw_mp.o \
  1374. core/rtw_mp_ioctl.o
  1375. ifeq ($(CONFIG_RTL8723A), y)
  1376. $(MODULE_NAME)-$(CONFIG_MP_INCLUDED)+= core/rtw_bt_mp.o
  1377. endif
  1378. ifeq ($(CONFIG_RTL8723B), y)
  1379. $(MODULE_NAME)-$(CONFIG_MP_INCLUDED)+= core/rtw_bt_mp.o
  1380. endif
  1381. ifeq ($(CONFIG_RTL8821A), y)
  1382. $(MODULE_NAME)-$(CONFIG_MP_INCLUDED)+= core/rtw_bt_mp.o
  1383. endif
  1384. ifneq ($(CONFIG_RTL8812AU),)
  1385. obj-$(CONFIG_RTL8812AU) := $(MODULE_NAME).o
  1386. else
  1387. obj-m := $(MODULE_NAME).o
  1388. all: modules
  1389. modules:
  1390. $(MAKE) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) -C $(KSRC) M=$(shell pwd) modules
  1391. strip:
  1392. $(CROSS_COMPILE)strip $(MODULE_NAME).ko --strip-unneeded
  1393. install:
  1394. install -p -m 644 $(MODULE_NAME).ko $(MODDESTDIR)
  1395. /sbin/depmod -a ${KVER}
  1396. uninstall:
  1397. rm -f $(MODDESTDIR)/$(MODULE_NAME).ko
  1398. /sbin/depmod -a ${KVER}
  1399. config_r:
  1400. @echo "make config"
  1401. /bin/bash script/Configure script/config.in
  1402. .PHONY: modules clean
  1403. clean:
  1404. $(MAKE) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) -C $(KSRC) M=$(shell pwd) clean
  1405. endif