Makefile 32 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144
  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 += -Wno-unused-variable
  10. EXTRA_CFLAGS += -Wno-unused-value
  11. EXTRA_CFLAGS += -Wno-unused-label
  12. EXTRA_CFLAGS += -Wno-unused-parameter
  13. EXTRA_CFLAGS += -Wno-unused-function
  14. EXTRA_CFLAGS += -Wno-unused
  15. EXTRA_CFLAGS += -Wno-incompatible-pointer-types
  16. EXTRA_CFLAGS += -Wno-implicit-function-declaration
  17. EXTRA_CFLAGS += -Wno-uninitialized
  18. EXTRA_CFLAGS += -Wno-int-to-pointer-cast
  19. EXTRA_CFLAGS += -Wno-vla
  20. EXTRA_CFLAGS += -I$(src)/include
  21. CONFIG_AUTOCFG_CP = n
  22. CONFIG_MULTIDRV = n
  23. CONFIG_RTL8192C = n
  24. CONFIG_RTL8192D = n
  25. CONFIG_RTL8723A = n
  26. CONFIG_RTL8188E = n
  27. CONFIG_RTL8812A = y
  28. CONFIG_RTL8821A = y
  29. CONFIG_RTL8192E = n
  30. CONFIG_RTL8723B = n
  31. CONFIG_USB_HCI = y
  32. CONFIG_PCI_HCI = n
  33. CONFIG_SDIO_HCI = n
  34. CONFIG_GSPI_HCI = n
  35. CONFIG_MP_INCLUDED = y
  36. CONFIG_POWER_SAVING = y
  37. CONFIG_USB_AUTOSUSPEND = n
  38. CONFIG_HW_PWRP_DETECTION = n
  39. CONFIG_WIFI_TEST = n
  40. CONFIG_BT_COEXIST = n
  41. CONFIG_RTL8192CU_REDEFINE_1X1 = n
  42. CONFIG_INTEL_WIDI = n
  43. CONFIG_WAPI_SUPPORT = n
  44. CONFIG_EFUSE_CONFIG_FILE = n
  45. CONFIG_EXT_CLK = n
  46. CONFIG_FTP_PROTECT = n
  47. CONFIG_WOWLAN = n
  48. CONFIG_PLATFORM_I386_PC = y
  49. CONFIG_PLATFORM_ANDROID_X86 = n
  50. CONFIG_PLATFORM_JB_X86 = n
  51. CONFIG_PLATFORM_ARM_S3C2K4 = n
  52. CONFIG_PLATFORM_ARM_PXA2XX = n
  53. CONFIG_PLATFORM_ARM_S3C6K4 = n
  54. CONFIG_PLATFORM_ARM_RPI = n
  55. CONFIG_PLATFORM_ARM_RPI_64 = n
  56. CONFIG_PLATFORM_MIPS_RMI = n
  57. CONFIG_PLATFORM_RTD2880B = n
  58. CONFIG_PLATFORM_MIPS_AR9132 = n
  59. CONFIG_PLATFORM_RTK_DMP = n
  60. CONFIG_PLATFORM_MIPS_PLM = n
  61. CONFIG_PLATFORM_MSTAR389 = n
  62. CONFIG_PLATFORM_MT53XX = n
  63. CONFIG_PLATFORM_ARM_MX51_241H = n
  64. CONFIG_PLATFORM_FS_MX61 = n
  65. CONFIG_PLATFORM_ACTIONS_ATJ227X = n
  66. CONFIG_PLATFORM_TEGRA3_CARDHU = n
  67. CONFIG_PLATFORM_TEGRA4_DALMORE = n
  68. CONFIG_PLATFORM_ARM_TCC8900 = n
  69. CONFIG_PLATFORM_ARM_TCC8920 = n
  70. CONFIG_PLATFORM_ARM_TCC8920_JB42 = n
  71. CONFIG_PLATFORM_ARM_RK2818 = n
  72. CONFIG_PLATFORM_ARM_URBETTER = n
  73. CONFIG_PLATFORM_ARM_TI_PANDA = n
  74. CONFIG_PLATFORM_MIPS_JZ4760 = n
  75. CONFIG_PLATFORM_DMP_PHILIPS = n
  76. CONFIG_PLATFORM_TI_DM365 = n
  77. CONFIG_PLATFORM_MSTAR_TITANIA12 = n
  78. CONFIG_PLATFORM_SZEBOOK = n
  79. CONFIG_PLATFORM_ARM_SUNxI = n
  80. CONFIG_PLATFORM_ARM_SUN6I = n
  81. CONFIG_PLATFORM_ACTIONS_ATM702X = n
  82. CONFIG_PLATFORM_ACTIONS_ATV5201 = n
  83. CONFIG_PLATFORM_PPC = n
  84. CONFIG_PLATFORM_MIPS64_LOONGSON = n
  85. CONFIG_PLATFORM_RISCV = n
  86. CONFIG_DRVEXT_MODULE = n
  87. export TopDIR ?= $(shell pwd)
  88. ########### COMMON #################################
  89. ifeq ($(CONFIG_GSPI_HCI), y)
  90. HCI_NAME = gspi
  91. endif
  92. ifeq ($(CONFIG_SDIO_HCI), y)
  93. HCI_NAME = sdio
  94. endif
  95. ifeq ($(CONFIG_USB_HCI), y)
  96. HCI_NAME = usb
  97. endif
  98. ifeq ($(CONFIG_PCI_HCI), y)
  99. HCI_NAME = pci
  100. endif
  101. _OS_INTFS_FILES := os_dep/osdep_service.o \
  102. os_dep/linux/os_intfs.o \
  103. os_dep/linux/$(HCI_NAME)_intf.o \
  104. os_dep/linux/$(HCI_NAME)_ops_linux.o \
  105. os_dep/linux/ioctl_linux.o \
  106. os_dep/linux/xmit_linux.o \
  107. os_dep/linux/mlme_linux.o \
  108. os_dep/linux/recv_linux.o \
  109. os_dep/linux/ioctl_cfg80211.o \
  110. os_dep/linux/rtw_android.o
  111. ifeq ($(CONFIG_SDIO_HCI), y)
  112. _OS_INTFS_FILES += os_dep/linux/custom_gpio_linux.o
  113. _OS_INTFS_FILES += os_dep/linux/$(HCI_NAME)_ops_linux.o
  114. endif
  115. ifeq ($(CONFIG_GSPI_HCI), y)
  116. _OS_INTFS_FILES += os_dep/linux/custom_gpio_linux.o
  117. _OS_INTFS_FILES += os_dep/linux/$(HCI_NAME)_ops_linux.o
  118. endif
  119. _HAL_INTFS_FILES := hal/hal_intf.o \
  120. hal/hal_com.o \
  121. hal/hal_com_phycfg.o \
  122. hal/hal_phy.o \
  123. hal/led/hal_$(HCI_NAME)_led.o
  124. _OUTSRC_FILES := hal/OUTSRC/odm_debug.o \
  125. hal/OUTSRC/odm_interface.o\
  126. hal/OUTSRC/odm_HWConfig.o\
  127. hal/OUTSRC/odm.o\
  128. hal/OUTSRC/HalPhyRf.o
  129. ########### HAL_RTL8192C #################################
  130. ifeq ($(CONFIG_RTL8192C), y)
  131. RTL871X = rtl8192c
  132. ifeq ($(CONFIG_USB_HCI), y)
  133. MODULE_NAME = 8192cu
  134. endif
  135. ifeq ($(CONFIG_PCI_HCI), y)
  136. MODULE_NAME = 8192ce
  137. endif
  138. EXTRA_CFLAGS += -DCONFIG_RTL8192C
  139. _HAL_INTFS_FILES += \
  140. hal/$(RTL871X)/$(RTL871X)_sreset.o \
  141. hal/$(RTL871X)/$(RTL871X)_xmit.o
  142. _HAL_INTFS_FILES += hal/$(RTL871X)/$(RTL871X)_hal_init.o \
  143. hal/$(RTL871X)/$(RTL871X)_phycfg.o \
  144. hal/$(RTL871X)/$(RTL871X)_rf6052.o \
  145. hal/$(RTL871X)/$(RTL871X)_dm.o \
  146. hal/$(RTL871X)/$(RTL871X)_rxdesc.o \
  147. hal/$(RTL871X)/$(RTL871X)_cmd.o \
  148. hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_halinit.o \
  149. hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_led.o \
  150. hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_xmit.o \
  151. hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_recv.o
  152. _HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops_linux.o
  153. ifeq ($(CONFIG_MP_INCLUDED), y)
  154. _HAL_INTFS_FILES += hal/$(RTL871X)/$(RTL871X)_mp.o
  155. endif
  156. _OUTSRC_FILES += hal/OUTSRC/$(RTL871X)/odm_RTL8192C.o\
  157. hal/OUTSRC/$(RTL871X)/HalDMOutSrc8192C_CE.o
  158. ifeq ($(CONFIG_USB_HCI), y)
  159. _OUTSRC_FILES += hal/OUTSRC/$(RTL871X)/Hal8192CUFWImg_CE.o \
  160. hal/OUTSRC/$(RTL871X)/Hal8192CUPHYImg_CE.o \
  161. hal/OUTSRC/$(RTL871X)/Hal8192CUMACImg_CE.o
  162. endif
  163. ifeq ($(CONFIG_PCI_HCI), y)
  164. _OUTSRC_FILES += hal/OUTSRC/$(RTL871X)/Hal8192CEFWImg_CE.o \
  165. hal/OUTSRC/$(RTL871X)/Hal8192CEPHYImg_CE.o \
  166. hal/OUTSRC/$(RTL871X)/Hal8192CEMACImg_CE.o
  167. endif
  168. endif
  169. ########### HAL_RTL8192D #################################
  170. ifeq ($(CONFIG_RTL8192D), y)
  171. RTL871X = rtl8192d
  172. ifeq ($(CONFIG_USB_HCI), y)
  173. MODULE_NAME = 8192du
  174. endif
  175. ifeq ($(CONFIG_PCI_HCI), y)
  176. MODULE_NAME = 8192de
  177. endif
  178. EXTRA_CFLAGS += -DCONFIG_RTL8192D
  179. _HAL_INTFS_FILES += \
  180. hal/$(RTL871X)/$(RTL871X)_xmit.o
  181. _HAL_INTFS_FILES += hal/$(RTL871X)/$(RTL871X)_hal_init.o \
  182. hal/$(RTL871X)/$(RTL871X)_phycfg.o \
  183. hal/$(RTL871X)/$(RTL871X)_rf6052.o \
  184. hal/$(RTL871X)/$(RTL871X)_dm.o \
  185. hal/$(RTL871X)/$(RTL871X)_rxdesc.o \
  186. hal/$(RTL871X)/$(RTL871X)_cmd.o \
  187. hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_halinit.o \
  188. hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_led.o \
  189. hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_xmit.o \
  190. hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_recv.o
  191. _HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops_linux.o
  192. ifeq ($(CONFIG_MP_INCLUDED), y)
  193. _HAL_INTFS_FILES += hal/$(RTL871X)/$(RTL871X)_mp.o
  194. endif
  195. _OUTSRC_FILES += hal/OUTSRC/$(RTL871X)/odm_RTL8192D.o\
  196. hal/OUTSRC/$(RTL871X)/HalDMOutSrc8192D_CE.o
  197. ifeq ($(CONFIG_USB_HCI), y)
  198. _OUTSRC_FILES += hal/OUTSRC/$(RTL871X)/Hal8192DUFWImg_CE.o \
  199. hal/OUTSRC/$(RTL871X)/Hal8192DUPHYImg_CE.o \
  200. hal/OUTSRC/$(RTL871X)/Hal8192DUMACImg_CE.o
  201. endif
  202. ifeq ($(CONFIG_PCI_HCI), y)
  203. _OUTSRC_FILES += hal/OUTSRC/$(RTL871X)/Hal8192DEFWImg_CE.o \
  204. hal/OUTSRC/$(RTL871X)/Hal8192DEPHYImg_CE.o \
  205. hal/OUTSRC/$(RTL871X)/Hal8192DEMACImg_CE.o
  206. endif
  207. endif
  208. ########### HAL_RTL8723A #################################
  209. ifeq ($(CONFIG_RTL8723A), y)
  210. RTL871X = rtl8723a
  211. ifeq ($(CONFIG_GSPI_HCI), y)
  212. MODULE_NAME = 8723as
  213. endif
  214. ifeq ($(CONFIG_SDIO_HCI), y)
  215. MODULE_NAME = 8723as
  216. endif
  217. ifeq ($(CONFIG_USB_HCI), y)
  218. MODULE_NAME = 8723au
  219. endif
  220. ifeq ($(CONFIG_PCI_HCI), y)
  221. MODULE_NAME = 8723ae
  222. endif
  223. EXTRA_CFLAGS += -DCONFIG_RTL8723A
  224. _HAL_INTFS_FILES += hal/HalPwrSeqCmd.o \
  225. hal/$(RTL871X)/Hal8723PwrSeq.o\
  226. hal/$(RTL871X)/$(RTL871X)_xmit.o \
  227. hal/$(RTL871X)/$(RTL871X)_sreset.o
  228. _HAL_INTFS_FILES += hal/$(RTL871X)/$(RTL871X)_hal_init.o \
  229. hal/$(RTL871X)/$(RTL871X)_phycfg.o \
  230. hal/$(RTL871X)/$(RTL871X)_rf6052.o \
  231. hal/$(RTL871X)/$(RTL871X)_dm.o \
  232. hal/$(RTL871X)/$(RTL871X)_rxdesc.o \
  233. hal/$(RTL871X)/$(RTL871X)_cmd.o \
  234. hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_halinit.o \
  235. hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_led.o \
  236. hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_xmit.o \
  237. hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_recv.o
  238. ifeq ($(CONFIG_SDIO_HCI), y)
  239. _HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops.o
  240. else
  241. ifeq ($(CONFIG_GSPI_HCI), y)
  242. _HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops.o
  243. else
  244. _HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops_linux.o
  245. endif
  246. endif
  247. ifeq ($(CONFIG_MP_INCLUDED), y)
  248. _HAL_INTFS_FILES += hal/$(RTL871X)/$(RTL871X)_mp.o
  249. endif
  250. ifeq ($(CONFIG_BT_COEXIST), y)
  251. _HAL_INTFS_FILES += hal/$(RTL871X)/rtl8723a_bt-coexist.o
  252. endif
  253. ifeq ($(CONFIG_GSPI_HCI), y)
  254. _OUTSRC_FILES += hal/OUTSRC/$(RTL871X)/Hal8723SHWImg_CE.o
  255. endif
  256. ifeq ($(CONFIG_SDIO_HCI), y)
  257. _OUTSRC_FILES += hal/OUTSRC/$(RTL871X)/Hal8723SHWImg_CE.o
  258. endif
  259. ifeq ($(CONFIG_USB_HCI), y)
  260. _OUTSRC_FILES += hal/OUTSRC/$(RTL871X)/Hal8723UHWImg_CE.o
  261. endif
  262. ifeq ($(CONFIG_PCI_HCI), y)
  263. _OUTSRC_FILES += hal/OUTSRC/$(RTL871X)/Hal8723EHWImg_CE.o
  264. endif
  265. #hal/OUTSRC/$(RTL871X)/HalHWImg8723A_FW.o
  266. _OUTSRC_FILES += hal/OUTSRC/$(RTL871X)/HalHWImg8723A_BB.o\
  267. hal/OUTSRC/$(RTL871X)/HalHWImg8723A_MAC.o\
  268. hal/OUTSRC/$(RTL871X)/HalHWImg8723A_RF.o\
  269. hal/OUTSRC/$(RTL871X)/odm_RegConfig8723A.o
  270. _OUTSRC_FILES += hal/OUTSRC/rtl8192c/HalDMOutSrc8192C_CE.o
  271. endif
  272. ########### HAL_RTL8188E #################################
  273. ifeq ($(CONFIG_RTL8188E), y)
  274. RTL871X = rtl8188e
  275. ifeq ($(CONFIG_SDIO_HCI), y)
  276. MODULE_NAME = 8189es
  277. endif
  278. ifeq ($(CONFIG_USB_HCI), y)
  279. MODULE_NAME = 8188eu
  280. endif
  281. ifeq ($(CONFIG_PCI_HCI), y)
  282. MODULE_NAME = 8188ee
  283. endif
  284. EXTRA_CFLAGS += -DCONFIG_RTL8188E
  285. _HAL_INTFS_FILES += hal/HalPwrSeqCmd.o \
  286. hal/$(RTL871X)/Hal8188EPwrSeq.o\
  287. hal/$(RTL871X)/$(RTL871X)_xmit.o\
  288. hal/$(RTL871X)/$(RTL871X)_sreset.o
  289. _HAL_INTFS_FILES += hal/$(RTL871X)/$(RTL871X)_hal_init.o \
  290. hal/$(RTL871X)/$(RTL871X)_phycfg.o \
  291. hal/$(RTL871X)/$(RTL871X)_rf6052.o \
  292. hal/$(RTL871X)/$(RTL871X)_dm.o \
  293. hal/$(RTL871X)/$(RTL871X)_rxdesc.o \
  294. hal/$(RTL871X)/$(RTL871X)_cmd.o \
  295. hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_halinit.o \
  296. hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_led.o \
  297. hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_xmit.o \
  298. hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_recv.o
  299. ifeq ($(CONFIG_SDIO_HCI), y)
  300. _HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops.o
  301. else
  302. ifeq ($(CONFIG_GSPI_HCI), y)
  303. _HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops.o
  304. else
  305. _HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops_linux.o
  306. endif
  307. endif
  308. ifeq ($(CONFIG_MP_INCLUDED), y)
  309. _HAL_INTFS_FILES += hal/$(RTL871X)/$(RTL871X)_mp.o
  310. endif
  311. #hal/OUTSRC/$(RTL871X)/Hal8188EFWImg_CE.o
  312. _OUTSRC_FILES += hal/OUTSRC/$(RTL871X)/HalHWImg8188E_MAC.o\
  313. hal/OUTSRC/$(RTL871X)/HalHWImg8188E_BB.o\
  314. hal/OUTSRC/$(RTL871X)/HalHWImg8188E_RF.o\
  315. hal/OUTSRC/$(RTL871X)/HalHWImg8188E_FW.o\
  316. hal/OUTSRC/$(RTL871X)/HalPhyRf_8188e.o\
  317. hal/OUTSRC/$(RTL871X)/odm_RegConfig8188E.o\
  318. hal/OUTSRC/$(RTL871X)/Hal8188ERateAdaptive.o\
  319. hal/OUTSRC/$(RTL871X)/odm_RTL8188E.o
  320. endif
  321. ########### HAL_RTL8192E #################################
  322. ifeq ($(CONFIG_RTL8192E), y)
  323. RTL871X = rtl8192e
  324. ifeq ($(CONFIG_SDIO_HCI), y)
  325. MODULE_NAME = 8192es
  326. endif
  327. ifeq ($(CONFIG_USB_HCI), y)
  328. MODULE_NAME = 8192eu
  329. endif
  330. ifeq ($(CONFIG_PCI_HCI), y)
  331. MODULE_NAME = 8192ee
  332. endif
  333. EXTRA_CFLAGS += -DCONFIG_RTL8192E
  334. _HAL_INTFS_FILES += hal/HalPwrSeqCmd.o \
  335. hal/$(RTL871X)/Hal8192EPwrSeq.o\
  336. hal/$(RTL871X)/$(RTL871X)_xmit.o\
  337. hal/$(RTL871X)/$(RTL871X)_sreset.o
  338. _HAL_INTFS_FILES += hal/$(RTL871X)/$(RTL871X)_hal_init.o \
  339. hal/$(RTL871X)/$(RTL871X)_phycfg.o \
  340. hal/$(RTL871X)/$(RTL871X)_rf6052.o \
  341. hal/$(RTL871X)/$(RTL871X)_dm.o \
  342. hal/$(RTL871X)/$(RTL871X)_rxdesc.o \
  343. hal/$(RTL871X)/$(RTL871X)_cmd.o \
  344. hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_halinit.o \
  345. hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_led.o \
  346. hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_xmit.o \
  347. hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_recv.o
  348. ifeq ($(CONFIG_SDIO_HCI), y)
  349. _HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops.o
  350. else
  351. ifeq ($(CONFIG_GSPI_HCI), y)
  352. _HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops.o
  353. else
  354. _HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops_linux.o
  355. endif
  356. endif
  357. ifeq ($(CONFIG_MP_INCLUDED), y)
  358. _HAL_INTFS_FILES += hal/$(RTL871X)/$(RTL871X)_mp.o
  359. endif
  360. #hal/OUTSRC/$(RTL871X)/HalHWImg8188E_FW.o
  361. _OUTSRC_FILES += hal/OUTSRC/$(RTL871X)/HalHWImg8192E_MAC.o\
  362. hal/OUTSRC/$(RTL871X)/HalHWImg8192E_BB.o\
  363. hal/OUTSRC/$(RTL871X)/HalHWImg8192E_RF.o\
  364. hal/OUTSRC/$(RTL871X)/HalHWImg8192E_FW.o\
  365. hal/OUTSRC/$(RTL871X)/HalPhyRf_8192e.o\
  366. hal/OUTSRC/$(RTL871X)/odm_RegConfig8192E.o\
  367. hal/OUTSRC/$(RTL871X)/odm_RTL8192E.o
  368. endif
  369. ########### HAL_RTL8812A_RTL8821A #################################
  370. ifneq ($(CONFIG_RTL8812A)_$(CONFIG_RTL8821A), n_n)
  371. RTL871X = rtl8812a
  372. ifeq ($(CONFIG_USB_HCI), y)
  373. MODULE_NAME = 8812au
  374. endif
  375. ifeq ($(CONFIG_PCI_HCI), y)
  376. MODULE_NAME = 8812ae
  377. endif
  378. ifeq ($(CONFIG_SDIO_HCI), y)
  379. MODULE_NAME = 8812as
  380. endif
  381. _HAL_INTFS_FILES += hal/HalPwrSeqCmd.o \
  382. hal/$(RTL871X)/Hal8812PwrSeq.o \
  383. hal/$(RTL871X)/Hal8821APwrSeq.o\
  384. hal/$(RTL871X)/$(RTL871X)_xmit.o\
  385. hal/$(RTL871X)/$(RTL871X)_sreset.o
  386. _HAL_INTFS_FILES += hal/$(RTL871X)/$(RTL871X)_hal_init.o \
  387. hal/$(RTL871X)/$(RTL871X)_phycfg.o \
  388. hal/$(RTL871X)/$(RTL871X)_rf6052.o \
  389. hal/$(RTL871X)/$(RTL871X)_dm.o \
  390. hal/$(RTL871X)/$(RTL871X)_rxdesc.o \
  391. hal/$(RTL871X)/$(RTL871X)_cmd.o \
  392. hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_halinit.o \
  393. hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_led.o \
  394. hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_xmit.o \
  395. hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_recv.o
  396. ifeq ($(CONFIG_SDIO_HCI), y)
  397. _HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops.o
  398. else
  399. ifeq ($(CONFIG_GSPI_HCI), y)
  400. _HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops.o
  401. else
  402. _HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops_linux.o
  403. endif
  404. endif
  405. ifeq ($(CONFIG_MP_INCLUDED), y)
  406. _HAL_INTFS_FILES += hal/$(RTL871X)/$(RTL871X)_mp.o
  407. endif
  408. ifeq ($(CONFIG_RTL8812A), y)
  409. EXTRA_CFLAGS += -DCONFIG_RTL8812A
  410. _OUTSRC_FILES += hal/OUTSRC/$(RTL871X)/HalHWImg8812A_FW.o\
  411. hal/OUTSRC/$(RTL871X)/HalHWImg8812A_MAC.o\
  412. hal/OUTSRC/$(RTL871X)/HalHWImg8812A_BB.o\
  413. hal/OUTSRC/$(RTL871X)/HalHWImg8812A_RF.o\
  414. hal/OUTSRC/$(RTL871X)/HalHWImg8812A_TestChip_FW.o\
  415. hal/OUTSRC/$(RTL871X)/HalHWImg8812A_TestChip_MAC.o\
  416. hal/OUTSRC/$(RTL871X)/HalHWImg8812A_TestChip_BB.o\
  417. hal/OUTSRC/$(RTL871X)/HalHWImg8812A_TestChip_RF.o\
  418. hal/OUTSRC/$(RTL871X)/HalPhyRf_8812A.o\
  419. hal/OUTSRC/$(RTL871X)/odm_RegConfig8812A.o
  420. endif
  421. ifeq ($(CONFIG_RTL8821A), y)
  422. ifeq ($(CONFIG_RTL8812A), n)
  423. ifeq ($(CONFIG_USB_HCI), y)
  424. MODULE_NAME := 8821au
  425. endif
  426. ifeq ($(CONFIG_PCI_HCI), y)
  427. MODULE_NAME := 8821ae
  428. endif
  429. endif
  430. ifeq ($(CONFIG_SDIO_HCI), y)
  431. MODULE_NAME := 8821as
  432. endif
  433. EXTRA_CFLAGS += -DCONFIG_RTL8821A
  434. _OUTSRC_FILES += hal/OUTSRC/rtl8821a/HalHWImg8821A_FW.o\
  435. hal/OUTSRC/rtl8821a/HalHWImg8821A_MAC.o\
  436. hal/OUTSRC/rtl8821a/HalHWImg8821A_BB.o\
  437. hal/OUTSRC/rtl8821a/HalHWImg8821A_RF.o\
  438. hal/OUTSRC/rtl8821a/HalHWImg8821A_TestChip_MAC.o\
  439. hal/OUTSRC/rtl8821a/HalHWImg8821A_TestChip_BB.o\
  440. hal/OUTSRC/rtl8821a/HalHWImg8821A_TestChip_RF.o\
  441. hal/OUTSRC/rtl8812a/HalPhyRf_8812A.o\
  442. hal/OUTSRC/rtl8821a/HalPhyRf_8821A.o\
  443. hal/OUTSRC/rtl8821a/odm_RegConfig8821A.o
  444. endif
  445. endif
  446. ########### HAL_RTL8723B #################################
  447. ifeq ($(CONFIG_RTL8723B), y)
  448. RTL871X = rtl8723b
  449. MODULE_NAME = 8723bs
  450. EXTRA_CFLAGS += -DCONFIG_RTL8723B
  451. _HAL_INTFS_FILES += hal/HalPwrSeqCmd.o \
  452. hal/$(RTL871X)/Hal8723BPwrSeq.o\
  453. hal/$(RTL871X)/$(RTL871X)_sreset.o
  454. _HAL_INTFS_FILES += hal/$(RTL871X)/$(RTL871X)_hal_init.o \
  455. hal/$(RTL871X)/$(RTL871X)_phycfg.o \
  456. hal/$(RTL871X)/$(RTL871X)_rf6052.o \
  457. hal/$(RTL871X)/$(RTL871X)_dm.o \
  458. hal/$(RTL871X)/$(RTL871X)_rxdesc.o \
  459. hal/$(RTL871X)/$(RTL871X)_cmd.o \
  460. hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_halinit.o \
  461. hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_led.o \
  462. hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_xmit.o \
  463. hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_recv.o
  464. _HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops.o
  465. ifeq ($(CONFIG_MP_INCLUDED), y)
  466. _HAL_INTFS_FILES += hal/$(RTL871X)/$(RTL871X)_mp.o
  467. endif
  468. ifeq ($(CONFIG_BT_COEXIST), y)
  469. _HAL_INTFS_FILES += hal/$(RTL871X)/rtl8723b_bt-coexist.o
  470. endif
  471. _OUTSRC_FILES += hal/OUTSRC/$(RTL871X)/HalHWImg8723B_BB.o\
  472. hal/OUTSRC/$(RTL871X)/HalHWImg8723B_MAC.o\
  473. hal/OUTSRC/$(RTL871X)/HalHWImg8723B_RF.o\
  474. hal/OUTSRC/$(RTL871X)/HalHWImg8723B_FW.o\
  475. hal/OUTSRC/$(RTL871X)/HalHWImg8723B_MP.o\
  476. hal/OUTSRC/$(RTL871X)/odm_RegConfig8723B.o\
  477. hal/OUTSRC/$(RTL871X)/HalPhyRf_8723B.o\
  478. hal/OUTSRC/$(RTL871X)/odm_RTL8723B.o
  479. endif
  480. ########### AUTO_CFG #################################
  481. ifeq ($(CONFIG_AUTOCFG_CP), y)
  482. ifeq ($(CONFIG_MULTIDRV), y)
  483. $(shell cp $(TopDIR)/autoconf_multidrv_$(HCI_NAME)_linux.h $(TopDIR)/include/autoconf.h)
  484. else
  485. ifeq ($(CONFIG_RTL8188E)$(CONFIG_SDIO_HCI),yy)
  486. $(shell cp $(TopDIR)/autoconf_rtl8189e_$(HCI_NAME)_linux.h $(TopDIR)/include/autoconf.h)
  487. else
  488. $(shell cp $(TopDIR)/autoconf_$(RTL871X)_$(HCI_NAME)_linux.h $(TopDIR)/include/autoconf.h)
  489. endif
  490. endif
  491. endif
  492. ########### END OF PATH #################################
  493. ifeq ($(CONFIG_USB_HCI), y)
  494. ifeq ($(CONFIG_USB_AUTOSUSPEND), y)
  495. EXTRA_CFLAGS += -DCONFIG_USB_AUTOSUSPEND
  496. endif
  497. endif
  498. ifeq ($(CONFIG_MP_INCLUDED), y)
  499. #MODULE_NAME := $(MODULE_NAME)_mp
  500. EXTRA_CFLAGS += -DCONFIG_MP_INCLUDED
  501. endif
  502. ifeq ($(CONFIG_POWER_SAVING), y)
  503. EXTRA_CFLAGS += -DCONFIG_POWER_SAVING
  504. endif
  505. ifeq ($(CONFIG_HW_PWRP_DETECTION), y)
  506. EXTRA_CFLAGS += -DCONFIG_HW_PWRP_DETECTION
  507. endif
  508. ifeq ($(CONFIG_WIFI_TEST), y)
  509. EXTRA_CFLAGS += -DCONFIG_WIFI_TEST
  510. endif
  511. ifeq ($(CONFIG_BT_COEXIST), y)
  512. EXTRA_CFLAGS += -DCONFIG_BT_COEXIST
  513. endif
  514. ifeq ($(CONFIG_RTL8192CU_REDEFINE_1X1), y)
  515. EXTRA_CFLAGS += -DRTL8192C_RECONFIG_TO_1T1R
  516. endif
  517. ifeq ($(CONFIG_INTEL_WIDI), y)
  518. EXTRA_CFLAGS += -DCONFIG_INTEL_WIDI
  519. endif
  520. ifeq ($(CONFIG_WAPI_SUPPORT), y)
  521. EXTRA_CFLAGS += -DCONFIG_WAPI_SUPPORT
  522. endif
  523. ifeq ($(CONFIG_EFUSE_CONFIG_FILE), y)
  524. EXTRA_CFLAGS += -DCONFIG_EFUSE_CONFIG_FILE
  525. endif
  526. ifeq ($(CONFIG_EXT_CLK), y)
  527. EXTRA_CFLAGS += -DCONFIG_EXT_CLK
  528. endif
  529. ifeq ($(CONFIG_FTP_PROTECT), y)
  530. EXTRA_CFLAGS += -DCONFIG_FTP_PROTECT
  531. endif
  532. ifeq ($(CONFIG_RTL8188E), y)
  533. ifeq ($(CONFIG_WOWLAN), y)
  534. EXTRA_CFLAGS += -DCONFIG_WOWLAN
  535. endif
  536. endif
  537. ifeq ($(CONFIG_PLATFORM_I386_PC), y)
  538. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  539. SUBARCH := $(shell uname -m | sed -e s/i.86/i386/)
  540. ARCH ?= $(SUBARCH)
  541. CROSS_COMPILE ?=
  542. KVER ?= $(shell uname -r)
  543. KSRC ?= /lib/modules/$(KVER)/build
  544. MODDESTDIR := /lib/modules/$(KVER)/kernel/drivers/net/wireless/
  545. INSTALL_PREFIX :=
  546. endif
  547. ifeq ($(CONFIG_PLATFORM_ACTIONS_ATM702X), y)
  548. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_PLATFORM_ANDROID -DCONFIG_PLATFORM_ACTIONS_ATM702X
  549. #ARCH := arm
  550. ARCH := $(R_ARCH)
  551. #CROSS_COMPILE := arm-none-linux-gnueabi-
  552. CROSS_COMPILE := $(R_CROSS_COMPILE)
  553. KVER := 3.4.0
  554. #KSRC ?= ../../../../build/out/kernel
  555. KSRC ?= $(KERNEL_BUILD_PATH)
  556. MODULE_NAME :=wlan
  557. endif
  558. ifeq ($(CONFIG_PLATFORM_TI_AM3517), y)
  559. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_PLATFORM_ANDROID -DCONFIG_PLATFORM_SHUTTLE
  560. CROSS_COMPILE := arm-eabi-
  561. KSRC ?= $(shell pwd)/../../../Android/kernel
  562. ARCH := arm
  563. endif
  564. ifeq ($(CONFIG_PLATFORM_MSTAR_TITANIA12), y)
  565. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_PLATFORM_MSTAR_TITANIA12
  566. ARCH:=mips
  567. CROSS_COMPILE:= /usr/src/Mstar_kernel/mips-4.3/bin/mips-linux-gnu-
  568. KVER := 2.6.28.9
  569. KSRC ?= /usr/src/Mstar_kernel/2.6.28.9/
  570. endif
  571. ifeq ($(CONFIG_PLATFORM_ANDROID_X86), y)
  572. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  573. SUBARCH := $(shell uname -m | sed -e s/i.86/i386/)
  574. ARCH := $(SUBARCH)
  575. 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-
  576. KSRC ?= /media/DATA-2/android-x86/ics-x86_20120130/out/target/product/generic_x86/obj/kernel
  577. MODULE_NAME :=wlan
  578. endif
  579. ifeq ($(CONFIG_PLATFORM_JB_X86), y)
  580. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  581. EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE
  582. EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
  583. EXTRA_CFLAGS += -DCONFIG_P2P_IPS
  584. SUBARCH := $(shell uname -m | sed -e s/i.86/i386/)
  585. ARCH := $(SUBARCH)
  586. CROSS_COMPILE := /home/android_sdk/android-x86_JB/prebuilts/gcc/linux-x86/x86/i686-linux-android-4.7/bin/i686-linux-android-
  587. KSRC ?= /home/android_sdk/android-x86_JB/out/target/product/x86/obj/kernel/
  588. MODULE_NAME :=wlan
  589. endif
  590. ifeq ($(CONFIG_PLATFORM_ARM_PXA2XX), y)
  591. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  592. ARCH := arm
  593. CROSS_COMPILE := arm-none-linux-gnueabi-
  594. KVER := 2.6.34.1
  595. KSRC ?= /usr/src/linux-2.6.34.1
  596. endif
  597. ifeq ($(CONFIG_PLATFORM_ARM_S3C2K4), y)
  598. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  599. ARCH := arm
  600. CROSS_COMPILE := arm-linux-
  601. KVER := 2.6.24.7_$(ARCH)
  602. KSRC ?= /usr/src/kernels/linux-$(KVER)
  603. endif
  604. ifeq ($(CONFIG_PLATFORM_ARM_S3C6K4), y)
  605. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  606. ARCH := arm
  607. CROSS_COMPILE := arm-none-linux-gnueabi-
  608. KVER := 2.6.34.1
  609. KSRC ?= /usr/src/linux-2.6.34.1
  610. endif
  611. ifeq ($(CONFIG_PLATFORM_ARM_RPI), y)
  612. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  613. ARCH := arm
  614. CROSS_COMPILE :=
  615. KVER ?= $(shell uname -r)
  616. KSRC ?= /lib/modules/$(KVER)/build
  617. MODDESTDIR := /lib/modules/$(KVER)/kernel/drivers/net/wireless/
  618. endif
  619. ifeq ($(CONFIG_PLATFORM_ARM_RPI_64), y)
  620. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  621. ARCH := arm64
  622. CROSS_COMPILE :=
  623. KVER ?= $(shell uname -r)
  624. KSRC ?= /lib/modules/$(KVER)/build
  625. MODDESTDIR := /lib/modules/$(KVER)/kernel/drivers/net/wireless/
  626. endif
  627. ifeq ($(CONFIG_PLATFORM_RTD2880B), y)
  628. EXTRA_CFLAGS += -DCONFIG_BIG_ENDIAN -DCONFIG_PLATFORM_RTD2880B
  629. ARCH:=
  630. CROSS_COMPILE:=
  631. KVER ?=
  632. KSRC:=
  633. endif
  634. ifeq ($(CONFIG_PLATFORM_MIPS_RMI), y)
  635. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  636. ARCH:=mips
  637. CROSS_COMPILE:=mipsisa32r2-uclibc-
  638. KVER ?=
  639. KSRC:= /root/work/kernel_realtek
  640. endif
  641. ifeq ($(CONFIG_PLATFORM_MIPS_PLM), y)
  642. EXTRA_CFLAGS += -DCONFIG_BIG_ENDIAN
  643. ARCH:=mips
  644. CROSS_COMPILE:=mipsisa32r2-uclibc-
  645. KVER ?=
  646. KSRC:= /root/work/kernel_realtek
  647. endif
  648. ifeq ($(CONFIG_PLATFORM_MSTAR389), y)
  649. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_PLATFORM_MSTAR389
  650. ARCH:=mips
  651. CROSS_COMPILE:= mips-linux-gnu-
  652. KVER := 2.6.28.10
  653. KSRC:= /home/mstar/mstar_linux/2.6.28.9/
  654. endif
  655. ifeq ($(CONFIG_PLATFORM_MIPS_AR9132), y)
  656. EXTRA_CFLAGS += -DCONFIG_BIG_ENDIAN
  657. ARCH := mips
  658. CROSS_COMPILE := mips-openwrt-linux-
  659. KSRC ?= /home/alex/test_openwrt/tmp/linux-2.6.30.9
  660. endif
  661. ifeq ($(CONFIG_PLATFORM_DMP_PHILIPS), y)
  662. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DRTK_DMP_PLATFORM
  663. ARCH := mips
  664. #CROSS_COMPILE:=/usr/local/msdk-4.3.6-mips-EL-2.6.12.6-0.9.30.3/bin/mipsel-linux-
  665. CROSS_COMPILE:=/usr/local/toolchain_mipsel/bin/mipsel-linux-
  666. KSRC ?=/usr/local/Jupiter/linux-2.6.12
  667. endif
  668. ifeq ($(CONFIG_PLATFORM_RTK_DMP), y)
  669. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DRTK_DMP_PLATFORM
  670. ARCH:=mips
  671. CROSS_COMPILE:=mipsel-linux-
  672. KVER ?=
  673. KSRC ?= /usr/src/DMP_Kernel/jupiter/linux-2.6.12
  674. endif
  675. ifeq ($(CONFIG_PLATFORM_MT53XX), y)
  676. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_PLATFORM_MT53XX
  677. ARCH:= arm
  678. CROSS_COMPILE:= arm11_mtk_le-
  679. KVER := 2.6.27
  680. KSRC?= /proj/mtk00802/BD_Compare/BDP/Dev/BDP_V301/BDP_Linux/linux-2.6.27
  681. endif
  682. ifeq ($(CONFIG_PLATFORM_ARM_MX51_241H), y)
  683. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_WISTRON_PLATFORM
  684. ARCH := arm
  685. CROSS_COMPILE := /opt/freescale/usr/local/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-
  686. KVER := 2.6.31
  687. KSRC ?= /lib/modules/2.6.31-770-g0e46b52/source
  688. endif
  689. ifeq ($(CONFIG_PLATFORM_FS_MX61), y)
  690. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  691. ARCH := arm
  692. CROSS_COMPILE := /home/share/CusEnv/FreeScale/arm-eabi-4.4.3/bin/arm-eabi-
  693. KSRC ?= /home/share/CusEnv/FreeScale/FS_kernel_env
  694. endif
  695. ifeq ($(CONFIG_PLATFORM_ACTIONS_ATJ227X), y)
  696. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_PLATFORM_ACTIONS_ATJ227X
  697. ARCH := mips
  698. CROSS_COMPILE := /home/cnsd4/project/actions/tools-2.6.27/bin/mipsel-linux-gnu-
  699. KVER := 2.6.27
  700. KSRC ?= /home/cnsd4/project/actions/linux-2.6.27.28
  701. endif
  702. ifeq ($(CONFIG_PLATFORM_TI_DM365), y)
  703. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_PLATFORM_TI_DM365
  704. ARCH := arm
  705. CROSS_COMPILE := /home/cnsd4/Appro/mv_pro_5.0/montavista/pro/devkit/arm/v5t_le/bin/arm_v5t_le-
  706. KVER := 2.6.18
  707. KSRC ?= /home/cnsd4/Appro/mv_pro_5.0/montavista/pro/devkit/lsp/ti-davinci/linux-dm365
  708. endif
  709. ifeq ($(CONFIG_PLATFORM_TEGRA3_CARDHU), y)
  710. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  711. # default setting for Android 4.1, 4.2
  712. EXTRA_CFLAGS += -DRTW_ENABLE_WIFI_CONTROL_FUNC
  713. EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE
  714. EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
  715. EXTRA_CFLAGS += -DCONFIG_P2P_IPS
  716. ARCH := arm
  717. 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-
  718. KSRC ?= /home/android_sdk/nvidia/tegra-16r3-partner-android-4.1_20120723/out/target/product/cardhu/obj/KERNEL
  719. MODULE_NAME := wlan
  720. endif
  721. ifeq ($(CONFIG_PLATFORM_TEGRA4_DALMORE), y)
  722. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  723. # default setting for Android 4.1, 4.2
  724. EXTRA_CFLAGS += -DRTW_ENABLE_WIFI_CONTROL_FUNC
  725. EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE
  726. EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
  727. EXTRA_CFLAGS += -DCONFIG_P2P_IPS
  728. ARCH := arm
  729. 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-
  730. KSRC ?= /home/android_sdk/nvidia/tegra-17r9-partner-android-4.2-dalmore_20130131/out/target/product/dalmore/obj/KERNEL
  731. MODULE_NAME := wlan
  732. endif
  733. ifeq ($(CONFIG_PLATFORM_ARM_TCC8900), y)
  734. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  735. ARCH := arm
  736. CROSS_COMPILE := /home/android_sdk/Telechips/SDK_2304_20110613/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
  737. KSRC ?= /home/android_sdk/Telechips/SDK_2304_20110613/kernel
  738. MODULE_NAME := wlan
  739. endif
  740. ifeq ($(CONFIG_PLATFORM_ARM_TCC8920), y)
  741. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  742. ARCH := arm
  743. 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-
  744. KSRC ?= /home/android_sdk/Telechips/v12.06_r1-tcc-android-4.0.4/kernel
  745. MODULE_NAME := wlan
  746. endif
  747. ifeq ($(CONFIG_PLATFORM_ARM_TCC8920_JB42), y)
  748. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  749. # default setting for Android 4.1, 4.2
  750. EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE
  751. EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
  752. EXTRA_CFLAGS += -DCONFIG_P2P_IPS
  753. ARCH := arm
  754. 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-
  755. KSRC ?= /home/android_sdk/Telechips/v13.03_r1-tcc-android-4.2.2_ds_patched/kernel
  756. MODULE_NAME := wlan
  757. endif
  758. ifeq ($(CONFIG_PLATFORM_ARM_RK2818), y)
  759. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_PLATFORM_ANDROID -DCONFIG_PLATFORM_ROCKCHIPS -DCONFIG_MINIMAL_MEMORY_USAGE
  760. ARCH := arm
  761. CROSS_COMPILE := /usr/src/release_fae_version/toolchain/arm-eabi-4.4.0/bin/arm-eabi-
  762. KSRC ?= /usr/src/release_fae_version/kernel25_A7_281x
  763. MODULE_NAME := wlan
  764. endif
  765. ifeq ($(CONFIG_PLATFORM_ARM_URBETTER), y)
  766. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN #-DCONFIG_MINIMAL_MEMORY_USAGE
  767. ARCH := arm
  768. CROSS_COMPILE := /media/DATA-1/urbetter/arm-2009q3/bin/arm-none-linux-gnueabi-
  769. KSRC ?= /media/DATA-1/urbetter/ics-urbetter/kernel
  770. MODULE_NAME := wlan
  771. endif
  772. ifeq ($(CONFIG_PLATFORM_ARM_TI_PANDA), y)
  773. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN #-DCONFIG_MINIMAL_MEMORY_USAGE
  774. ARCH := arm
  775. #CROSS_COMPILE := /media/DATA-1/aosp/ics-aosp_20111227/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
  776. #KSRC ?= /media/DATA-1/aosp/android-omap-panda-3.0_20120104
  777. CROSS_COMPILE := /media/DATA-1/android-4.0/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
  778. KSRC ?= /media/DATA-1/android-4.0/panda_kernel/omap
  779. MODULE_NAME := wlan
  780. endif
  781. ifeq ($(CONFIG_PLATFORM_MIPS_JZ4760), y)
  782. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_MINIMAL_MEMORY_USAGE
  783. ARCH ?= mips
  784. CROSS_COMPILE ?= /mnt/sdb5/Ingenic/Umido/mips-4.3/bin/mips-linux-gnu-
  785. KSRC ?= /mnt/sdb5/Ingenic/Umido/kernel
  786. endif
  787. ifeq ($(CONFIG_PLATFORM_SZEBOOK), y)
  788. EXTRA_CFLAGS += -DCONFIG_BIG_ENDIAN
  789. ARCH:=arm
  790. CROSS_COMPILE:=/opt/crosstool2/bin/armeb-unknown-linux-gnueabi-
  791. KVER := 2.6.31.6
  792. KSRC:= ../code/linux-2.6.31.6-2020/
  793. endif
  794. #Add setting for MN10300
  795. ifeq ($(CONFIG_PLATFORM_MN10300), y)
  796. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_PLATFORM_MN10300
  797. ARCH := mn10300
  798. CROSS_COMPILE := mn10300-linux-
  799. KVER := 2.6.32.2
  800. KSRC ?= /home/winuser/work/Plat_sLD2T_V3010/usr/src/linux-2.6.32.2
  801. INSTALL_PREFIX :=
  802. endif
  803. ifeq ($(CONFIG_PLATFORM_ARM_SUNxI), y)
  804. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_PLATFORM_ARM_SUNxI
  805. ARCH := arm
  806. CROSS_COMPILE := arm-none-linux-gnueabi-
  807. KVER := 3.0.8
  808. #KSRC:= ../lichee/linux-3.0/
  809. endif
  810. ifeq ($(CONFIG_PLATFORM_ARM_SUN6I), y)
  811. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  812. EXTRA_CFLAGS += -DCONFIG_PLATFORM_ARM_SUN6I
  813. EXTRA_CFLAGS += -DCONFIG_USE_USB_BUFFER_ALLOC_TX
  814. # default setting for Android 4.1, 4.2
  815. EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE
  816. EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
  817. EXTRA_CFLAGS += -DCONFIG_P2P_IPS
  818. ARCH := arm
  819. CROSS_COMPILE := arm-none-linux-gnueabi-
  820. KVER := 3.3.0
  821. #KSRC:= ../lichee/linux-3.3/
  822. endif
  823. ifeq ($(CONFIG_PLATFORM_ACTIONS_ATV5201), y)
  824. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_PLATFORM_ACTIONS_ATV5201
  825. ARCH := mips
  826. CROSS_COMPILE := mipsel-linux-gnu-
  827. KVER := $(KERNEL_VER)
  828. KSRC:= $(CFGDIR)/../../kernel/linux-$(KERNEL_VER)
  829. endif
  830. ifeq ($(CONFIG_PLATFORM_PPC), y)
  831. EXTRA_CFLAGS += -DCONFIG_BIG_ENDIAN
  832. SUBARCH := $(shell uname -m | sed -e s/ppc/powerpc/)
  833. ARCH ?= $(SUBARCH)
  834. CROSS_COMPILE ?=
  835. KVER ?= $(shell uname -r)
  836. KSRC ?= /lib/modules/$(KVER)/build
  837. MODDESTDIR := /lib/modules/$(KVER)/kernel/drivers/net/wireless/
  838. INSTALL_PREFIX :=
  839. endif
  840. ifeq ($(CONFIG_PLATFORM_MIPS64_LOONGSON), y)
  841. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  842. ARCH := mips
  843. KVER ?= $(shell uname -r)
  844. KSRC ?= /lib/modules/$(KVER)/build
  845. MODDESTDIR := /lib/modules/$(KVER)/kernel/drivers/net/wireless/
  846. endif
  847. ifeq ($(CONFIG_PLATFORM_RISCV), y)
  848. EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
  849. ARCH ?= riscv
  850. CROSS_COMPILE ?=
  851. KVER ?= $(shell uname -r)
  852. KSRC ?= /lib/modules/$(KVER)/build
  853. MODDESTDIR := /lib/modules/$(KVER)/kernel/drivers/net/wireless/
  854. endif
  855. ifeq ($(CONFIG_MULTIDRV), y)
  856. ifeq ($(CONFIG_SDIO_HCI), y)
  857. MODULE_NAME := rtw_sdio
  858. endif
  859. ifeq ($(CONFIG_USB_HCI), y)
  860. MODULE_NAME := rtw_usb
  861. endif
  862. ifeq ($(CONFIG_PCI_HCI), y)
  863. MODULE_NAME := rtw_pci
  864. endif
  865. endif
  866. ifneq ($(USER_MODULE_NAME),)
  867. MODULE_NAME := $(USER_MODULE_NAME)
  868. endif
  869. ifneq ($(KERNELRELEASE),)
  870. rtk_core := core/rtw_cmd.o \
  871. core/rtw_security.o \
  872. core/rtw_debug.o \
  873. core/rtw_io.o \
  874. core/rtw_ioctl_query.o \
  875. core/rtw_ioctl_set.o \
  876. core/rtw_ieee80211.o \
  877. core/rtw_mlme.o \
  878. core/rtw_mlme_ext.o \
  879. core/rtw_wlan_util.o \
  880. core/rtw_vht.o \
  881. core/rtw_pwrctrl.o \
  882. core/rtw_rf.o \
  883. core/rtw_recv.o \
  884. core/rtw_sta_mgt.o \
  885. core/rtw_ap.o \
  886. core/rtw_xmit.o \
  887. core/rtw_p2p.o \
  888. core/rtw_tdls.o \
  889. core/rtw_br_ext.o \
  890. core/rtw_iol.o \
  891. core/rtw_sreset.o\
  892. core/efuse/rtw_efuse.o
  893. $(MODULE_NAME)-y += $(rtk_core)
  894. $(MODULE_NAME)-$(CONFIG_INTEL_WIDI) += core/rtw_intel_widi.o
  895. $(MODULE_NAME)-$(CONFIG_WAPI_SUPPORT) += core/rtw_wapi.o \
  896. core/rtw_wapi_sms4.o
  897. $(MODULE_NAME)-y += $(_OS_INTFS_FILES)
  898. $(MODULE_NAME)-y += $(_HAL_INTFS_FILES)
  899. $(MODULE_NAME)-y += $(_OUTSRC_FILES)
  900. $(MODULE_NAME)-$(CONFIG_MP_INCLUDED) += core/rtw_mp.o \
  901. core/rtw_mp_ioctl.o
  902. ifeq ($(CONFIG_RTL8723A), y)
  903. $(MODULE_NAME)-$(CONFIG_MP_INCLUDED)+= core/rtw_bt_mp.o
  904. endif
  905. ifeq ($(CONFIG_RTL8723B), y)
  906. $(MODULE_NAME)-$(CONFIG_MP_INCLUDED)+= core/rtw_bt_mp.o
  907. endif
  908. obj-$(CONFIG_RTL8812AU_8821AU) := $(MODULE_NAME).o
  909. else
  910. export CONFIG_RTL8812AU_8821AU = m
  911. all: modules
  912. modules:
  913. $(MAKE) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) -C $(KSRC) M=$(shell pwd) modules
  914. strip:
  915. $(CROSS_COMPILE)strip $(MODULE_NAME).ko --strip-unneeded
  916. install:
  917. install -p -m 644 $(MODULE_NAME).ko $(MODDESTDIR)
  918. /sbin/depmod -a ${KVER}
  919. uninstall:
  920. rm -f $(MODDESTDIR)/$(MODULE_NAME).ko
  921. /sbin/depmod -a ${KVER}
  922. config_r:
  923. @echo "make config"
  924. /bin/bash script/Configure script/config.in
  925. DRIVER_VERSION = $(shell grep "\#define DRIVERVERSION" include/rtw_version.h | awk '{print $$3}' | tr -d v\")
  926. dkms_install:
  927. mkdir -p /usr/src/8812au-$(DRIVER_VERSION)
  928. cp -r * /usr/src/8812au-$(DRIVER_VERSION)
  929. dkms add -m 8812au -v $(DRIVER_VERSION)
  930. dkms build -m 8812au -v $(DRIVER_VERSION)
  931. dkms install -m 8812au -v $(DRIVER_VERSION)
  932. dkms status
  933. dkms_remove:
  934. dkms remove 8812au/$(DRIVER_VERSION) --all
  935. rm -rf /usr/src/8812au-$(DRIVER_VERSION)
  936. .PHONY: modules clean
  937. clean:
  938. cd hal/OUTSRC/ ; rm -fr */*.mod.c */*.mod */*.o */.*.cmd */*.ko
  939. cd hal/OUTSRC/ ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
  940. cd hal/led ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
  941. cd hal ; rm -fr */*/*.mod.c */*/*.mod */*/*.o */*/.*.cmd */*/*.ko
  942. cd hal ; rm -fr */*.mod.c */*.mod */*.o */.*.cmd */*.ko
  943. cd hal ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
  944. cd core/efuse ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
  945. cd core ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
  946. cd os_dep/linux ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
  947. cd os_dep ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
  948. rm -fr Module.symvers ; rm -fr Module.markers ; rm -fr modules.order
  949. rm -fr *.mod.c *.mod *.o .*.cmd *.ko *~
  950. rm -fr .tmp_versions
  951. endif