Makefile 32 KB

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