Android.mk 35 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691
  1. #
  2. # Copyright (C) 2008 The Android Open Source Project
  3. #
  4. # This software may be distributed under the terms of the BSD license.
  5. # See README for more details.
  6. #
  7. LOCAL_PATH := $(call my-dir)
  8. PKG_CONFIG ?= pkg-config
  9. ifneq ($(BOARD_WPA_SUPPLICANT_DRIVER),)
  10. CONFIG_DRIVER_$(BOARD_WPA_SUPPLICANT_DRIVER) := y
  11. endif
  12. include $(LOCAL_PATH)/android.config
  13. # To ignore possible wrong network configurations
  14. L_CFLAGS = -DWPA_IGNORE_CONFIG_ERRORS
  15. L_CFLAGS += -DVERSION_STR_POSTFIX=\"-$(PLATFORM_VERSION)\"
  16. # Set Android log name
  17. L_CFLAGS += -DANDROID_LOG_NAME=\"wpa_supplicant\"
  18. # Disable unused parameter warnings
  19. L_CFLAGS += -Wno-unused-parameter
  20. # Set Android extended P2P functionality
  21. L_CFLAGS += -DANDROID_P2P
  22. ifeq ($(BOARD_WPA_SUPPLICANT_PRIVATE_LIB),)
  23. L_CFLAGS += -DANDROID_LIB_STUB
  24. endif
  25. # Disable roaming in wpa_supplicant
  26. ifdef CONFIG_NO_ROAMING
  27. L_CFLAGS += -DCONFIG_NO_ROAMING
  28. endif
  29. # Use Android specific directory for control interface sockets
  30. L_CFLAGS += -DCONFIG_CTRL_IFACE_CLIENT_DIR=\"/data/misc/wifi/sockets\"
  31. L_CFLAGS += -DCONFIG_CTRL_IFACE_DIR=\"/data/misc/wifi/sockets\"
  32. # Use Android specific directory for wpa_cli command completion history
  33. L_CFLAGS += -DCONFIG_WPA_CLI_HISTORY_DIR=\"/data/misc/wifi\"
  34. # To force sizeof(enum) = 4
  35. ifeq ($(TARGET_ARCH),arm)
  36. L_CFLAGS += -mabi=aapcs-linux
  37. endif
  38. # C++ flags for binder interface
  39. L_CPPFLAGS := -std=c++11 -Wall -Werror
  40. # TODO: Remove these allowed warnings later.
  41. L_CPPFLAGS += -Wno-unused-variable -Wno-unused-parameter
  42. L_CPPFLAGS += -Wno-unused-private-field
  43. INCLUDES = $(LOCAL_PATH)
  44. INCLUDES += $(LOCAL_PATH)/src
  45. INCLUDES += $(LOCAL_PATH)/src/common
  46. # INCLUDES += $(LOCAL_PATH)/src/crypto # To force proper includes
  47. INCLUDES += $(LOCAL_PATH)/src/drivers
  48. INCLUDES += $(LOCAL_PATH)/src/eap_common
  49. INCLUDES += $(LOCAL_PATH)/src/eapol_supp
  50. INCLUDES += $(LOCAL_PATH)/src/eap_peer
  51. INCLUDES += $(LOCAL_PATH)/src/eap_server
  52. INCLUDES += $(LOCAL_PATH)/src/hlr_auc_gw
  53. INCLUDES += $(LOCAL_PATH)/src/l2_packet
  54. INCLUDES += $(LOCAL_PATH)/src/radius
  55. INCLUDES += $(LOCAL_PATH)/src/rsn_supp
  56. INCLUDES += $(LOCAL_PATH)/src/tls
  57. INCLUDES += $(LOCAL_PATH)/src/utils
  58. INCLUDES += $(LOCAL_PATH)/src/wps
  59. INCLUDES += system/security/keystore/include
  60. ifdef CONFIG_DRIVER_NL80211
  61. ifneq ($(wildcard external/libnl),)
  62. INCLUDES += external/libnl/include
  63. else
  64. INCLUDES += external/libnl-headers
  65. endif
  66. endif
  67. ifdef CONFIG_FIPS
  68. CONFIG_NO_RANDOM_POOL=
  69. CONFIG_OPENSSL_CMAC=y
  70. endif
  71. OBJS = config.c
  72. OBJS += notify.c
  73. OBJS += bss.c
  74. OBJS += eap_register.c
  75. OBJS += src/utils/common.c
  76. OBJS += src/utils/wpa_debug.c
  77. OBJS += src/utils/wpabuf.c
  78. OBJS += wmm_ac.c
  79. OBJS_p = wpa_passphrase.c
  80. OBJS_p += src/utils/common.c
  81. OBJS_p += src/utils/wpa_debug.c
  82. OBJS_p += src/utils/wpabuf.c
  83. OBJS_c = wpa_cli.c src/common/wpa_ctrl.c
  84. OBJS_c += src/utils/wpa_debug.c
  85. OBJS_c += src/utils/common.c
  86. OBJS_c += src/common/cli.c
  87. OBJS_d =
  88. OBJS_priv =
  89. ifndef CONFIG_OS
  90. ifdef CONFIG_NATIVE_WINDOWS
  91. CONFIG_OS=win32
  92. else
  93. CONFIG_OS=unix
  94. endif
  95. endif
  96. ifeq ($(CONFIG_OS), internal)
  97. L_CFLAGS += -DOS_NO_C_LIB_DEFINES
  98. endif
  99. OBJS += src/utils/os_$(CONFIG_OS).c
  100. OBJS_p += src/utils/os_$(CONFIG_OS).c
  101. OBJS_c += src/utils/os_$(CONFIG_OS).c
  102. ifdef CONFIG_WPA_TRACE
  103. L_CFLAGS += -DWPA_TRACE
  104. OBJS += src/utils/trace.c
  105. OBJS_p += src/utils/trace.c
  106. OBJS_c += src/utils/trace.c
  107. LDFLAGS += -rdynamic
  108. L_CFLAGS += -funwind-tables
  109. ifdef CONFIG_WPA_TRACE_BFD
  110. L_CFLAGS += -DWPA_TRACE_BFD
  111. LIBS += -lbfd
  112. LIBS_p += -lbfd
  113. LIBS_c += -lbfd
  114. endif
  115. endif
  116. ifndef CONFIG_ELOOP
  117. CONFIG_ELOOP=eloop
  118. endif
  119. OBJS += src/utils/$(CONFIG_ELOOP).c
  120. OBJS_c += src/utils/$(CONFIG_ELOOP).c
  121. ifdef CONFIG_ELOOP_POLL
  122. L_CFLAGS += -DCONFIG_ELOOP_POLL
  123. endif
  124. ifdef CONFIG_ELOOP_EPOLL
  125. L_CFLAGS += -DCONFIG_ELOOP_EPOLL
  126. endif
  127. ifdef CONFIG_EAPOL_TEST
  128. L_CFLAGS += -Werror -DEAPOL_TEST
  129. endif
  130. ifdef CONFIG_HT_OVERRIDES
  131. L_CFLAGS += -DCONFIG_HT_OVERRIDES
  132. endif
  133. ifdef CONFIG_VHT_OVERRIDES
  134. L_CFLAGS += -DCONFIG_VHT_OVERRIDES
  135. endif
  136. ifndef CONFIG_BACKEND
  137. CONFIG_BACKEND=file
  138. endif
  139. ifeq ($(CONFIG_BACKEND), file)
  140. OBJS += config_file.c
  141. ifndef CONFIG_NO_CONFIG_BLOBS
  142. NEED_BASE64=y
  143. endif
  144. L_CFLAGS += -DCONFIG_BACKEND_FILE
  145. endif
  146. ifeq ($(CONFIG_BACKEND), winreg)
  147. OBJS += config_winreg.c
  148. endif
  149. ifeq ($(CONFIG_BACKEND), none)
  150. OBJS += config_none.c
  151. endif
  152. ifdef CONFIG_NO_CONFIG_WRITE
  153. L_CFLAGS += -DCONFIG_NO_CONFIG_WRITE
  154. endif
  155. ifdef CONFIG_NO_CONFIG_BLOBS
  156. L_CFLAGS += -DCONFIG_NO_CONFIG_BLOBS
  157. endif
  158. ifdef CONFIG_NO_SCAN_PROCESSING
  159. L_CFLAGS += -DCONFIG_NO_SCAN_PROCESSING
  160. endif
  161. ifdef CONFIG_SUITEB
  162. L_CFLAGS += -DCONFIG_SUITEB
  163. NEED_SHA256=y
  164. NEED_AES_OMAC1=y
  165. endif
  166. ifdef CONFIG_SUITEB192
  167. L_CFLAGS += -DCONFIG_SUITEB192
  168. NEED_SHA384=y
  169. endif
  170. ifdef CONFIG_IEEE80211W
  171. L_CFLAGS += -DCONFIG_IEEE80211W
  172. NEED_SHA256=y
  173. NEED_AES_OMAC1=y
  174. endif
  175. ifdef CONFIG_IEEE80211R
  176. L_CFLAGS += -DCONFIG_IEEE80211R
  177. OBJS += src/rsn_supp/wpa_ft.c
  178. NEED_SHA256=y
  179. NEED_AES_OMAC1=y
  180. endif
  181. ifdef CONFIG_MESH
  182. NEED_80211_COMMON=y
  183. NEED_SHA256=y
  184. NEED_AES_SIV=y
  185. NEED_AES_OMAC1=y
  186. NEED_AES_CTR=y
  187. CONFIG_SAE=y
  188. CONFIG_AP=y
  189. L_CFLAGS += -DCONFIG_MESH
  190. OBJS += mesh.c
  191. OBJS += mesh_mpm.c
  192. OBJS += mesh_rsn.c
  193. endif
  194. ifdef CONFIG_SAE
  195. L_CFLAGS += -DCONFIG_SAE
  196. OBJS += src/common/sae.c
  197. NEED_ECC=y
  198. NEED_DH_GROUPS=y
  199. endif
  200. ifdef CONFIG_FILS
  201. L_CFLAGS += -DCONFIG_FILS
  202. NEED_CRC32=y
  203. NEED_SHA384=y
  204. NEED_AES_SIV=y
  205. endif
  206. ifdef CONFIG_WNM
  207. L_CFLAGS += -DCONFIG_WNM
  208. OBJS += wnm_sta.c
  209. endif
  210. ifdef CONFIG_TDLS
  211. L_CFLAGS += -DCONFIG_TDLS
  212. OBJS += src/rsn_supp/tdls.c
  213. NEED_SHA256=y
  214. NEED_AES_OMAC1=y
  215. endif
  216. ifdef CONFIG_TDLS_TESTING
  217. L_CFLAGS += -DCONFIG_TDLS_TESTING
  218. endif
  219. ifdef CONFIG_PEERKEY
  220. L_CFLAGS += -DCONFIG_PEERKEY
  221. endif
  222. ifndef CONFIG_NO_WPA
  223. OBJS += src/rsn_supp/wpa.c
  224. OBJS += src/rsn_supp/preauth.c
  225. OBJS += src/rsn_supp/pmksa_cache.c
  226. OBJS += src/rsn_supp/peerkey.c
  227. OBJS += src/rsn_supp/wpa_ie.c
  228. OBJS += src/common/wpa_common.c
  229. NEED_AES=y
  230. NEED_SHA1=y
  231. NEED_MD5=y
  232. NEED_RC4=y
  233. else
  234. L_CFLAGS += -DCONFIG_NO_WPA
  235. endif
  236. ifdef CONFIG_IBSS_RSN
  237. NEED_RSN_AUTHENTICATOR=y
  238. L_CFLAGS += -DCONFIG_IBSS_RSN
  239. L_CFLAGS += -DCONFIG_NO_VLAN
  240. OBJS += ibss_rsn.c
  241. endif
  242. ifdef CONFIG_P2P
  243. OBJS += p2p_supplicant.c
  244. OBJS += p2p_supplicant_sd.c
  245. OBJS += src/p2p/p2p.c
  246. OBJS += src/p2p/p2p_utils.c
  247. OBJS += src/p2p/p2p_parse.c
  248. OBJS += src/p2p/p2p_build.c
  249. OBJS += src/p2p/p2p_go_neg.c
  250. OBJS += src/p2p/p2p_sd.c
  251. OBJS += src/p2p/p2p_pd.c
  252. OBJS += src/p2p/p2p_invitation.c
  253. OBJS += src/p2p/p2p_dev_disc.c
  254. OBJS += src/p2p/p2p_group.c
  255. OBJS += src/ap/p2p_hostapd.c
  256. OBJS += src/utils/bitfield.c
  257. L_CFLAGS += -DCONFIG_P2P
  258. NEED_GAS=y
  259. NEED_OFFCHANNEL=y
  260. CONFIG_WPS=y
  261. CONFIG_AP=y
  262. ifdef CONFIG_P2P_STRICT
  263. L_CFLAGS += -DCONFIG_P2P_STRICT
  264. endif
  265. endif
  266. ifdef CONFIG_WIFI_DISPLAY
  267. L_CFLAGS += -DCONFIG_WIFI_DISPLAY
  268. OBJS += wifi_display.c
  269. endif
  270. ifdef CONFIG_HS20
  271. OBJS += hs20_supplicant.c
  272. L_CFLAGS += -DCONFIG_HS20
  273. CONFIG_INTERWORKING=y
  274. NEED_AES_OMAC1=y
  275. endif
  276. ifdef CONFIG_INTERWORKING
  277. OBJS += interworking.c
  278. L_CFLAGS += -DCONFIG_INTERWORKING
  279. NEED_GAS=y
  280. endif
  281. ifdef CONFIG_FST
  282. L_CFLAGS += -DCONFIG_FST
  283. OBJS += src/fst/fst.c
  284. OBJS += src/fst/fst_session.c
  285. OBJS += src/fst/fst_iface.c
  286. OBJS += src/fst/fst_group.c
  287. OBJS += src/fst/fst_ctrl_aux.c
  288. ifdef CONFIG_FST_TEST
  289. L_CFLAGS += -DCONFIG_FST_TEST
  290. endif
  291. ifdef CONFIG_CTRL_IFACE
  292. OBJS += src/fst/fst_ctrl_iface.c
  293. endif
  294. endif
  295. include $(LOCAL_PATH)/src/drivers/drivers.mk
  296. ifdef CONFIG_AP
  297. OBJS_d += $(DRV_BOTH_OBJS)
  298. L_CFLAGS += $(DRV_BOTH_CFLAGS)
  299. LDFLAGS += $(DRV_BOTH_LDFLAGS)
  300. LIBS += $(DRV_BOTH_LIBS)
  301. else
  302. NEED_AP_MLME=
  303. OBJS_d += $(DRV_WPA_OBJS)
  304. L_CFLAGS += $(DRV_WPA_CFLAGS)
  305. LDFLAGS += $(DRV_WPA_LDFLAGS)
  306. LIBS += $(DRV_WPA_LIBS)
  307. endif
  308. ifndef CONFIG_L2_PACKET
  309. CONFIG_L2_PACKET=linux
  310. endif
  311. OBJS_l2 += src/l2_packet/l2_packet_$(CONFIG_L2_PACKET).c
  312. ifeq ($(CONFIG_L2_PACKET), pcap)
  313. ifdef CONFIG_WINPCAP
  314. L_CFLAGS += -DCONFIG_WINPCAP
  315. LIBS += -lwpcap -lpacket
  316. LIBS_w += -lwpcap
  317. else
  318. LIBS += -ldnet -lpcap
  319. endif
  320. endif
  321. ifeq ($(CONFIG_L2_PACKET), winpcap)
  322. LIBS += -lwpcap -lpacket
  323. LIBS_w += -lwpcap
  324. endif
  325. ifeq ($(CONFIG_L2_PACKET), freebsd)
  326. LIBS += -lpcap
  327. endif
  328. ifdef CONFIG_ERP
  329. L_CFLAGS += -DCONFIG_ERP
  330. NEED_SHA256=y
  331. NEED_HMAC_SHA256_KDF=y
  332. endif
  333. ifdef CONFIG_EAP_TLS
  334. # EAP-TLS
  335. ifeq ($(CONFIG_EAP_TLS), dyn)
  336. L_CFLAGS += -DEAP_TLS_DYNAMIC
  337. EAPDYN += src/eap_peer/eap_tls.so
  338. else
  339. L_CFLAGS += -DEAP_TLS
  340. OBJS += src/eap_peer/eap_tls.c
  341. endif
  342. TLS_FUNCS=y
  343. CONFIG_IEEE8021X_EAPOL=y
  344. endif
  345. ifdef CONFIG_EAP_UNAUTH_TLS
  346. # EAP-UNAUTH-TLS
  347. L_CFLAGS += -DEAP_UNAUTH_TLS
  348. ifndef CONFIG_EAP_TLS
  349. OBJS += src/eap_peer/eap_tls.c
  350. TLS_FUNCS=y
  351. endif
  352. CONFIG_IEEE8021X_EAPOL=y
  353. endif
  354. ifdef CONFIG_EAP_PEAP
  355. # EAP-PEAP
  356. ifeq ($(CONFIG_EAP_PEAP), dyn)
  357. L_CFLAGS += -DEAP_PEAP_DYNAMIC
  358. EAPDYN += src/eap_peer/eap_peap.so
  359. else
  360. L_CFLAGS += -DEAP_PEAP
  361. OBJS += src/eap_peer/eap_peap.c
  362. OBJS += src/eap_common/eap_peap_common.c
  363. endif
  364. TLS_FUNCS=y
  365. CONFIG_IEEE8021X_EAPOL=y
  366. endif
  367. ifdef CONFIG_EAP_TTLS
  368. # EAP-TTLS
  369. ifeq ($(CONFIG_EAP_TTLS), dyn)
  370. L_CFLAGS += -DEAP_TTLS_DYNAMIC
  371. EAPDYN += src/eap_peer/eap_ttls.so
  372. else
  373. L_CFLAGS += -DEAP_TTLS
  374. OBJS += src/eap_peer/eap_ttls.c
  375. endif
  376. TLS_FUNCS=y
  377. ifndef CONFIG_FIPS
  378. MS_FUNCS=y
  379. CHAP=y
  380. endif
  381. CONFIG_IEEE8021X_EAPOL=y
  382. endif
  383. ifdef CONFIG_EAP_MD5
  384. # EAP-MD5
  385. ifeq ($(CONFIG_EAP_MD5), dyn)
  386. L_CFLAGS += -DEAP_MD5_DYNAMIC
  387. EAPDYN += src/eap_peer/eap_md5.so
  388. else
  389. L_CFLAGS += -DEAP_MD5
  390. OBJS += src/eap_peer/eap_md5.c
  391. endif
  392. CHAP=y
  393. CONFIG_IEEE8021X_EAPOL=y
  394. endif
  395. # backwards compatibility for old spelling
  396. ifdef CONFIG_MSCHAPV2
  397. ifndef CONFIG_EAP_MSCHAPV2
  398. CONFIG_EAP_MSCHAPV2=y
  399. endif
  400. endif
  401. ifdef CONFIG_EAP_MSCHAPV2
  402. # EAP-MSCHAPv2
  403. ifeq ($(CONFIG_EAP_MSCHAPV2), dyn)
  404. L_CFLAGS += -DEAP_MSCHAPv2_DYNAMIC
  405. EAPDYN += src/eap_peer/eap_mschapv2.so
  406. EAPDYN += src/eap_peer/mschapv2.so
  407. else
  408. L_CFLAGS += -DEAP_MSCHAPv2
  409. OBJS += src/eap_peer/eap_mschapv2.c
  410. OBJS += src/eap_peer/mschapv2.c
  411. endif
  412. MS_FUNCS=y
  413. CONFIG_IEEE8021X_EAPOL=y
  414. endif
  415. ifdef CONFIG_EAP_GTC
  416. # EAP-GTC
  417. ifeq ($(CONFIG_EAP_GTC), dyn)
  418. L_CFLAGS += -DEAP_GTC_DYNAMIC
  419. EAPDYN += src/eap_peer/eap_gtc.so
  420. else
  421. L_CFLAGS += -DEAP_GTC
  422. OBJS += src/eap_peer/eap_gtc.c
  423. endif
  424. CONFIG_IEEE8021X_EAPOL=y
  425. endif
  426. ifdef CONFIG_EAP_OTP
  427. # EAP-OTP
  428. ifeq ($(CONFIG_EAP_OTP), dyn)
  429. L_CFLAGS += -DEAP_OTP_DYNAMIC
  430. EAPDYN += src/eap_peer/eap_otp.so
  431. else
  432. L_CFLAGS += -DEAP_OTP
  433. OBJS += src/eap_peer/eap_otp.c
  434. endif
  435. CONFIG_IEEE8021X_EAPOL=y
  436. endif
  437. ifdef CONFIG_EAP_SIM
  438. # EAP-SIM
  439. ifeq ($(CONFIG_EAP_SIM), dyn)
  440. L_CFLAGS += -DEAP_SIM_DYNAMIC
  441. EAPDYN += src/eap_peer/eap_sim.so
  442. else
  443. L_CFLAGS += -DEAP_SIM
  444. OBJS += src/eap_peer/eap_sim.c
  445. endif
  446. CONFIG_IEEE8021X_EAPOL=y
  447. CONFIG_EAP_SIM_COMMON=y
  448. NEED_AES_CBC=y
  449. endif
  450. ifdef CONFIG_EAP_LEAP
  451. # EAP-LEAP
  452. ifeq ($(CONFIG_EAP_LEAP), dyn)
  453. L_CFLAGS += -DEAP_LEAP_DYNAMIC
  454. EAPDYN += src/eap_peer/eap_leap.so
  455. else
  456. L_CFLAGS += -DEAP_LEAP
  457. OBJS += src/eap_peer/eap_leap.c
  458. endif
  459. MS_FUNCS=y
  460. CONFIG_IEEE8021X_EAPOL=y
  461. endif
  462. ifdef CONFIG_EAP_PSK
  463. # EAP-PSK
  464. ifeq ($(CONFIG_EAP_PSK), dyn)
  465. L_CFLAGS += -DEAP_PSK_DYNAMIC
  466. EAPDYN += src/eap_peer/eap_psk.so
  467. else
  468. L_CFLAGS += -DEAP_PSK
  469. OBJS += src/eap_peer/eap_psk.c src/eap_common/eap_psk_common.c
  470. endif
  471. CONFIG_IEEE8021X_EAPOL=y
  472. NEED_AES=y
  473. NEED_AES_OMAC1=y
  474. NEED_AES_ENCBLOCK=y
  475. NEED_AES_EAX=y
  476. endif
  477. ifdef CONFIG_EAP_AKA
  478. # EAP-AKA
  479. ifeq ($(CONFIG_EAP_AKA), dyn)
  480. L_CFLAGS += -DEAP_AKA_DYNAMIC
  481. EAPDYN += src/eap_peer/eap_aka.so
  482. else
  483. L_CFLAGS += -DEAP_AKA
  484. OBJS += src/eap_peer/eap_aka.c
  485. endif
  486. CONFIG_IEEE8021X_EAPOL=y
  487. CONFIG_EAP_SIM_COMMON=y
  488. NEED_AES_CBC=y
  489. endif
  490. ifdef CONFIG_EAP_PROXY
  491. L_CFLAGS += -DCONFIG_EAP_PROXY
  492. OBJS += src/eap_peer/eap_proxy_$(CONFIG_EAP_PROXY).c
  493. include $(LOCAL_PATH)/eap_proxy_$(CONFIG_EAP_PROXY).mk
  494. CONFIG_IEEE8021X_EAPOL=y
  495. endif
  496. ifdef CONFIG_EAP_AKA_PRIME
  497. # EAP-AKA'
  498. ifeq ($(CONFIG_EAP_AKA_PRIME), dyn)
  499. L_CFLAGS += -DEAP_AKA_PRIME_DYNAMIC
  500. else
  501. L_CFLAGS += -DEAP_AKA_PRIME
  502. endif
  503. NEED_SHA256=y
  504. endif
  505. ifdef CONFIG_EAP_SIM_COMMON
  506. OBJS += src/eap_common/eap_sim_common.c
  507. NEED_AES=y
  508. NEED_FIPS186_2_PRF=y
  509. endif
  510. ifdef CONFIG_EAP_FAST
  511. # EAP-FAST
  512. ifeq ($(CONFIG_EAP_FAST), dyn)
  513. L_CFLAGS += -DEAP_FAST_DYNAMIC
  514. EAPDYN += src/eap_peer/eap_fast.so
  515. EAPDYN += src/eap_common/eap_fast_common.c
  516. else
  517. L_CFLAGS += -DEAP_FAST
  518. OBJS += src/eap_peer/eap_fast.c src/eap_peer/eap_fast_pac.c
  519. OBJS += src/eap_common/eap_fast_common.c
  520. endif
  521. TLS_FUNCS=y
  522. CONFIG_IEEE8021X_EAPOL=y
  523. NEED_T_PRF=y
  524. endif
  525. ifdef CONFIG_EAP_PAX
  526. # EAP-PAX
  527. ifeq ($(CONFIG_EAP_PAX), dyn)
  528. L_CFLAGS += -DEAP_PAX_DYNAMIC
  529. EAPDYN += src/eap_peer/eap_pax.so
  530. else
  531. L_CFLAGS += -DEAP_PAX
  532. OBJS += src/eap_peer/eap_pax.c src/eap_common/eap_pax_common.c
  533. endif
  534. CONFIG_IEEE8021X_EAPOL=y
  535. endif
  536. ifdef CONFIG_EAP_SAKE
  537. # EAP-SAKE
  538. ifeq ($(CONFIG_EAP_SAKE), dyn)
  539. L_CFLAGS += -DEAP_SAKE_DYNAMIC
  540. EAPDYN += src/eap_peer/eap_sake.so
  541. else
  542. L_CFLAGS += -DEAP_SAKE
  543. OBJS += src/eap_peer/eap_sake.c src/eap_common/eap_sake_common.c
  544. endif
  545. CONFIG_IEEE8021X_EAPOL=y
  546. endif
  547. ifdef CONFIG_EAP_GPSK
  548. # EAP-GPSK
  549. ifeq ($(CONFIG_EAP_GPSK), dyn)
  550. L_CFLAGS += -DEAP_GPSK_DYNAMIC
  551. EAPDYN += src/eap_peer/eap_gpsk.so
  552. else
  553. L_CFLAGS += -DEAP_GPSK
  554. OBJS += src/eap_peer/eap_gpsk.c src/eap_common/eap_gpsk_common.c
  555. endif
  556. CONFIG_IEEE8021X_EAPOL=y
  557. ifdef CONFIG_EAP_GPSK_SHA256
  558. L_CFLAGS += -DEAP_GPSK_SHA256
  559. endif
  560. NEED_SHA256=y
  561. NEED_AES_OMAC1=y
  562. endif
  563. ifdef CONFIG_EAP_PWD
  564. L_CFLAGS += -DEAP_PWD
  565. OBJS += src/eap_peer/eap_pwd.c src/eap_common/eap_pwd_common.c
  566. CONFIG_IEEE8021X_EAPOL=y
  567. NEED_SHA256=y
  568. endif
  569. ifdef CONFIG_EAP_EKE
  570. # EAP-EKE
  571. ifeq ($(CONFIG_EAP_EKE), dyn)
  572. L_CFLAGS += -DEAP_EKE_DYNAMIC
  573. EAPDYN += src/eap_peer/eap_eke.so
  574. else
  575. L_CFLAGS += -DEAP_EKE
  576. OBJS += src/eap_peer/eap_eke.c src/eap_common/eap_eke_common.c
  577. endif
  578. CONFIG_IEEE8021X_EAPOL=y
  579. NEED_DH_GROUPS=y
  580. NEED_DH_GROUPS_ALL=y
  581. NEED_SHA256=y
  582. NEED_AES_CBC=y
  583. endif
  584. ifdef CONFIG_WPS
  585. # EAP-WSC
  586. L_CFLAGS += -DCONFIG_WPS -DEAP_WSC
  587. OBJS += wps_supplicant.c
  588. OBJS += src/utils/uuid.c
  589. OBJS += src/eap_peer/eap_wsc.c src/eap_common/eap_wsc_common.c
  590. OBJS += src/wps/wps.c
  591. OBJS += src/wps/wps_common.c
  592. OBJS += src/wps/wps_attr_parse.c
  593. OBJS += src/wps/wps_attr_build.c
  594. OBJS += src/wps/wps_attr_process.c
  595. OBJS += src/wps/wps_dev_attr.c
  596. OBJS += src/wps/wps_enrollee.c
  597. OBJS += src/wps/wps_registrar.c
  598. CONFIG_IEEE8021X_EAPOL=y
  599. NEED_DH_GROUPS=y
  600. NEED_SHA256=y
  601. NEED_BASE64=y
  602. NEED_AES_CBC=y
  603. NEED_MODEXP=y
  604. ifdef CONFIG_WPS_NFC
  605. L_CFLAGS += -DCONFIG_WPS_NFC
  606. OBJS += src/wps/ndef.c
  607. NEED_WPS_OOB=y
  608. endif
  609. ifdef NEED_WPS_OOB
  610. L_CFLAGS += -DCONFIG_WPS_OOB
  611. endif
  612. ifdef CONFIG_WPS_ER
  613. CONFIG_WPS_UPNP=y
  614. L_CFLAGS += -DCONFIG_WPS_ER
  615. OBJS += src/wps/wps_er.c
  616. OBJS += src/wps/wps_er_ssdp.c
  617. endif
  618. ifdef CONFIG_WPS_UPNP
  619. L_CFLAGS += -DCONFIG_WPS_UPNP
  620. OBJS += src/wps/wps_upnp.c
  621. OBJS += src/wps/wps_upnp_ssdp.c
  622. OBJS += src/wps/wps_upnp_web.c
  623. OBJS += src/wps/wps_upnp_event.c
  624. OBJS += src/wps/wps_upnp_ap.c
  625. OBJS += src/wps/upnp_xml.c
  626. OBJS += src/wps/httpread.c
  627. OBJS += src/wps/http_client.c
  628. OBJS += src/wps/http_server.c
  629. endif
  630. ifdef CONFIG_WPS_STRICT
  631. L_CFLAGS += -DCONFIG_WPS_STRICT
  632. OBJS += src/wps/wps_validate.c
  633. endif
  634. ifdef CONFIG_WPS_TESTING
  635. L_CFLAGS += -DCONFIG_WPS_TESTING
  636. endif
  637. ifdef CONFIG_WPS_REG_DISABLE_OPEN
  638. L_CFLAGS += -DCONFIG_WPS_REG_DISABLE_OPEN
  639. endif
  640. endif
  641. ifdef CONFIG_EAP_IKEV2
  642. # EAP-IKEv2
  643. ifeq ($(CONFIG_EAP_IKEV2), dyn)
  644. L_CFLAGS += -DEAP_IKEV2_DYNAMIC
  645. EAPDYN += src/eap_peer/eap_ikev2.so src/eap_peer/ikev2.c
  646. EAPDYN += src/eap_common/eap_ikev2_common.c src/eap_common/ikev2_common.c
  647. else
  648. L_CFLAGS += -DEAP_IKEV2
  649. OBJS += src/eap_peer/eap_ikev2.c src/eap_peer/ikev2.c
  650. OBJS += src/eap_common/eap_ikev2_common.c src/eap_common/ikev2_common.c
  651. endif
  652. CONFIG_IEEE8021X_EAPOL=y
  653. NEED_DH_GROUPS=y
  654. NEED_DH_GROUPS_ALL=y
  655. NEED_MODEXP=y
  656. NEED_CIPHER=y
  657. endif
  658. ifdef CONFIG_EAP_VENDOR_TEST
  659. ifeq ($(CONFIG_EAP_VENDOR_TEST), dyn)
  660. L_CFLAGS += -DEAP_VENDOR_TEST_DYNAMIC
  661. EAPDYN += src/eap_peer/eap_vendor_test.so
  662. else
  663. L_CFLAGS += -DEAP_VENDOR_TEST
  664. OBJS += src/eap_peer/eap_vendor_test.c
  665. endif
  666. CONFIG_IEEE8021X_EAPOL=y
  667. endif
  668. ifdef CONFIG_EAP_TNC
  669. # EAP-TNC
  670. L_CFLAGS += -DEAP_TNC
  671. OBJS += src/eap_peer/eap_tnc.c
  672. OBJS += src/eap_peer/tncc.c
  673. NEED_BASE64=y
  674. ifndef CONFIG_NATIVE_WINDOWS
  675. ifndef CONFIG_DRIVER_BSD
  676. LIBS += -ldl
  677. endif
  678. endif
  679. endif
  680. ifdef CONFIG_IEEE8021X_EAPOL
  681. # IEEE 802.1X/EAPOL state machines (e.g., for RADIUS authentication)
  682. L_CFLAGS += -DIEEE8021X_EAPOL
  683. OBJS += src/eapol_supp/eapol_supp_sm.c
  684. OBJS += src/eap_peer/eap.c src/eap_peer/eap_methods.c
  685. NEED_EAP_COMMON=y
  686. ifdef CONFIG_DYNAMIC_EAP_METHODS
  687. L_CFLAGS += -DCONFIG_DYNAMIC_EAP_METHODS
  688. LIBS += -ldl -rdynamic
  689. endif
  690. endif
  691. ifdef CONFIG_AP
  692. NEED_EAP_COMMON=y
  693. NEED_RSN_AUTHENTICATOR=y
  694. L_CFLAGS += -DCONFIG_AP
  695. OBJS += ap.c
  696. L_CFLAGS += -DCONFIG_NO_RADIUS
  697. L_CFLAGS += -DCONFIG_NO_ACCOUNTING
  698. L_CFLAGS += -DCONFIG_NO_VLAN
  699. OBJS += src/ap/hostapd.c
  700. OBJS += src/ap/wpa_auth_glue.c
  701. OBJS += src/ap/utils.c
  702. OBJS += src/ap/authsrv.c
  703. OBJS += src/ap/ap_config.c
  704. OBJS += src/utils/ip_addr.c
  705. OBJS += src/ap/sta_info.c
  706. OBJS += src/ap/tkip_countermeasures.c
  707. OBJS += src/ap/ap_mlme.c
  708. OBJS += src/ap/ieee802_1x.c
  709. OBJS += src/eapol_auth/eapol_auth_sm.c
  710. OBJS += src/ap/ieee802_11_auth.c
  711. OBJS += src/ap/ieee802_11_shared.c
  712. OBJS += src/ap/drv_callbacks.c
  713. OBJS += src/ap/ap_drv_ops.c
  714. OBJS += src/ap/beacon.c
  715. OBJS += src/ap/bss_load.c
  716. OBJS += src/ap/eap_user_db.c
  717. OBJS += src/ap/neighbor_db.c
  718. OBJS += src/ap/rrm.c
  719. ifdef CONFIG_IEEE80211N
  720. OBJS += src/ap/ieee802_11_ht.c
  721. ifdef CONFIG_IEEE80211AC
  722. OBJS += src/ap/ieee802_11_vht.c
  723. endif
  724. endif
  725. ifdef CONFIG_WNM
  726. OBJS += src/ap/wnm_ap.c
  727. endif
  728. ifdef CONFIG_MBO
  729. OBJS += src/ap/mbo_ap.c
  730. endif
  731. ifdef CONFIG_CTRL_IFACE
  732. OBJS += src/ap/ctrl_iface_ap.c
  733. endif
  734. L_CFLAGS += -DEAP_SERVER -DEAP_SERVER_IDENTITY
  735. OBJS += src/eap_server/eap_server.c
  736. OBJS += src/eap_server/eap_server_identity.c
  737. OBJS += src/eap_server/eap_server_methods.c
  738. ifdef CONFIG_IEEE80211N
  739. L_CFLAGS += -DCONFIG_IEEE80211N
  740. ifdef CONFIG_IEEE80211AC
  741. L_CFLAGS += -DCONFIG_IEEE80211AC
  742. endif
  743. endif
  744. ifdef CONFIG_MBO
  745. OBJS += mbo.c
  746. L_CFLAGS += -DCONFIG_MBO
  747. endif
  748. ifdef NEED_AP_MLME
  749. OBJS += src/ap/wmm.c
  750. OBJS += src/ap/ap_list.c
  751. OBJS += src/ap/ieee802_11.c
  752. OBJS += src/ap/hw_features.c
  753. OBJS += src/ap/dfs.c
  754. L_CFLAGS += -DNEED_AP_MLME
  755. endif
  756. ifdef CONFIG_WPS
  757. L_CFLAGS += -DEAP_SERVER_WSC
  758. OBJS += src/ap/wps_hostapd.c
  759. OBJS += src/eap_server/eap_server_wsc.c
  760. endif
  761. ifdef CONFIG_INTERWORKING
  762. OBJS += src/ap/gas_serv.c
  763. endif
  764. ifdef CONFIG_HS20
  765. OBJS += src/ap/hs20.c
  766. endif
  767. endif
  768. ifdef NEED_RSN_AUTHENTICATOR
  769. L_CFLAGS += -DCONFIG_NO_RADIUS
  770. NEED_AES_WRAP=y
  771. OBJS += src/ap/wpa_auth.c
  772. OBJS += src/ap/wpa_auth_ie.c
  773. OBJS += src/ap/pmksa_cache_auth.c
  774. ifdef CONFIG_IEEE80211R
  775. OBJS += src/ap/wpa_auth_ft.c
  776. endif
  777. ifdef CONFIG_PEERKEY
  778. OBJS += src/ap/peerkey_auth.c
  779. endif
  780. endif
  781. ifdef CONFIG_ACS
  782. L_CFLAGS += -DCONFIG_ACS
  783. OBJS += src/ap/acs.c
  784. LIBS += -lm
  785. endif
  786. ifdef CONFIG_PCSC
  787. # PC/SC interface for smartcards (USIM, GSM SIM)
  788. L_CFLAGS += -DPCSC_FUNCS -I/usr/include/PCSC
  789. OBJS += src/utils/pcsc_funcs.c
  790. # -lpthread may not be needed depending on how pcsc-lite was configured
  791. ifdef CONFIG_NATIVE_WINDOWS
  792. #Once MinGW gets support for WinScard, -lwinscard could be used instead of the
  793. #dynamic symbol loading that is now used in pcsc_funcs.c
  794. #LIBS += -lwinscard
  795. else
  796. LIBS += -lpcsclite -lpthread
  797. endif
  798. endif
  799. ifdef CONFIG_SIM_SIMULATOR
  800. L_CFLAGS += -DCONFIG_SIM_SIMULATOR
  801. NEED_MILENAGE=y
  802. endif
  803. ifdef CONFIG_USIM_SIMULATOR
  804. L_CFLAGS += -DCONFIG_USIM_SIMULATOR
  805. NEED_MILENAGE=y
  806. endif
  807. ifdef NEED_MILENAGE
  808. OBJS += src/crypto/milenage.c
  809. NEED_AES_ENCBLOCK=y
  810. endif
  811. ifdef CONFIG_PKCS12
  812. L_CFLAGS += -DPKCS12_FUNCS
  813. endif
  814. ifdef CONFIG_SMARTCARD
  815. L_CFLAGS += -DCONFIG_SMARTCARD
  816. endif
  817. ifdef MS_FUNCS
  818. OBJS += src/crypto/ms_funcs.c
  819. NEED_DES=y
  820. NEED_MD4=y
  821. endif
  822. ifdef CHAP
  823. OBJS += src/eap_common/chap.c
  824. endif
  825. ifdef TLS_FUNCS
  826. NEED_DES=y
  827. # Shared TLS functions (needed for EAP_TLS, EAP_PEAP, EAP_TTLS, and EAP_FAST)
  828. OBJS += src/eap_peer/eap_tls_common.c
  829. ifndef CONFIG_FIPS
  830. NEED_TLS_PRF=y
  831. NEED_SHA1=y
  832. NEED_MD5=y
  833. endif
  834. endif
  835. ifndef CONFIG_TLS
  836. CONFIG_TLS=openssl
  837. endif
  838. ifdef CONFIG_TLSV11
  839. L_CFLAGS += -DCONFIG_TLSV11
  840. endif
  841. ifdef CONFIG_TLSV12
  842. L_CFLAGS += -DCONFIG_TLSV12
  843. NEED_SHA256=y
  844. endif
  845. ifeq ($(CONFIG_TLS), openssl)
  846. ifdef TLS_FUNCS
  847. L_CFLAGS += -DEAP_TLS_OPENSSL
  848. OBJS += src/crypto/tls_openssl.c
  849. OBJS += src/crypto/tls_openssl_ocsp.c
  850. LIBS += -lssl
  851. endif
  852. OBJS += src/crypto/crypto_openssl.c
  853. OBJS_p += src/crypto/crypto_openssl.c
  854. ifdef NEED_FIPS186_2_PRF
  855. OBJS += src/crypto/fips_prf_openssl.c
  856. endif
  857. NEED_SHA256=y
  858. NEED_TLS_PRF_SHA256=y
  859. LIBS += -lcrypto
  860. LIBS_p += -lcrypto
  861. ifdef CONFIG_TLS_ADD_DL
  862. LIBS += -ldl
  863. LIBS_p += -ldl
  864. endif
  865. endif
  866. ifeq ($(CONFIG_TLS), gnutls)
  867. ifdef TLS_FUNCS
  868. OBJS += src/crypto/tls_gnutls.c
  869. LIBS += -lgnutls -lgpg-error
  870. endif
  871. OBJS += src/crypto/crypto_gnutls.c
  872. OBJS_p += src/crypto/crypto_gnutls.c
  873. ifdef NEED_FIPS186_2_PRF
  874. OBJS += src/crypto/fips_prf_internal.c
  875. OBJS += src/crypto/sha1-internal.c
  876. endif
  877. LIBS += -lgcrypt
  878. LIBS_p += -lgcrypt
  879. CONFIG_INTERNAL_SHA256=y
  880. CONFIG_INTERNAL_RC4=y
  881. CONFIG_INTERNAL_DH_GROUP5=y
  882. endif
  883. ifeq ($(CONFIG_TLS), internal)
  884. ifndef CONFIG_CRYPTO
  885. CONFIG_CRYPTO=internal
  886. endif
  887. ifdef TLS_FUNCS
  888. OBJS += src/crypto/crypto_internal-rsa.c
  889. OBJS += src/crypto/tls_internal.c
  890. OBJS += src/tls/tlsv1_common.c
  891. OBJS += src/tls/tlsv1_record.c
  892. OBJS += src/tls/tlsv1_cred.c
  893. OBJS += src/tls/tlsv1_client.c
  894. OBJS += src/tls/tlsv1_client_write.c
  895. OBJS += src/tls/tlsv1_client_read.c
  896. OBJS += src/tls/tlsv1_client_ocsp.c
  897. OBJS += src/tls/asn1.c
  898. OBJS += src/tls/rsa.c
  899. OBJS += src/tls/x509v3.c
  900. OBJS += src/tls/pkcs1.c
  901. OBJS += src/tls/pkcs5.c
  902. OBJS += src/tls/pkcs8.c
  903. NEED_SHA256=y
  904. NEED_BASE64=y
  905. NEED_TLS_PRF=y
  906. ifdef CONFIG_TLSV12
  907. NEED_TLS_PRF_SHA256=y
  908. endif
  909. NEED_MODEXP=y
  910. NEED_CIPHER=y
  911. L_CFLAGS += -DCONFIG_TLS_INTERNAL_CLIENT
  912. endif
  913. ifdef NEED_CIPHER
  914. NEED_DES=y
  915. OBJS += src/crypto/crypto_internal-cipher.c
  916. endif
  917. ifdef NEED_MODEXP
  918. OBJS += src/crypto/crypto_internal-modexp.c
  919. OBJS += src/tls/bignum.c
  920. endif
  921. ifeq ($(CONFIG_CRYPTO), libtomcrypt)
  922. OBJS += src/crypto/crypto_libtomcrypt.c
  923. OBJS_p += src/crypto/crypto_libtomcrypt.c
  924. LIBS += -ltomcrypt -ltfm
  925. LIBS_p += -ltomcrypt -ltfm
  926. CONFIG_INTERNAL_SHA256=y
  927. CONFIG_INTERNAL_RC4=y
  928. CONFIG_INTERNAL_DH_GROUP5=y
  929. endif
  930. ifeq ($(CONFIG_CRYPTO), internal)
  931. OBJS += src/crypto/crypto_internal.c
  932. OBJS_p += src/crypto/crypto_internal.c
  933. NEED_AES_ENC=y
  934. L_CFLAGS += -DCONFIG_CRYPTO_INTERNAL
  935. ifdef CONFIG_INTERNAL_LIBTOMMATH
  936. L_CFLAGS += -DCONFIG_INTERNAL_LIBTOMMATH
  937. ifdef CONFIG_INTERNAL_LIBTOMMATH_FAST
  938. L_CFLAGS += -DLTM_FAST
  939. endif
  940. else
  941. LIBS += -ltommath
  942. LIBS_p += -ltommath
  943. endif
  944. CONFIG_INTERNAL_AES=y
  945. CONFIG_INTERNAL_DES=y
  946. CONFIG_INTERNAL_SHA1=y
  947. CONFIG_INTERNAL_MD4=y
  948. CONFIG_INTERNAL_MD5=y
  949. CONFIG_INTERNAL_SHA256=y
  950. CONFIG_INTERNAL_SHA384=y
  951. CONFIG_INTERNAL_SHA512=y
  952. CONFIG_INTERNAL_RC4=y
  953. CONFIG_INTERNAL_DH_GROUP5=y
  954. endif
  955. ifeq ($(CONFIG_CRYPTO), cryptoapi)
  956. OBJS += src/crypto/crypto_cryptoapi.c
  957. OBJS_p += src/crypto/crypto_cryptoapi.c
  958. L_CFLAGS += -DCONFIG_CRYPTO_CRYPTOAPI
  959. CONFIG_INTERNAL_SHA256=y
  960. CONFIG_INTERNAL_RC4=y
  961. endif
  962. endif
  963. ifeq ($(CONFIG_TLS), none)
  964. ifdef TLS_FUNCS
  965. OBJS += src/crypto/tls_none.c
  966. L_CFLAGS += -DEAP_TLS_NONE
  967. CONFIG_INTERNAL_AES=y
  968. CONFIG_INTERNAL_SHA1=y
  969. CONFIG_INTERNAL_MD5=y
  970. endif
  971. OBJS += src/crypto/crypto_none.c
  972. OBJS_p += src/crypto/crypto_none.c
  973. CONFIG_INTERNAL_SHA256=y
  974. CONFIG_INTERNAL_RC4=y
  975. endif
  976. ifdef TLS_FUNCS
  977. ifdef CONFIG_SMARTCARD
  978. ifndef CONFIG_NATIVE_WINDOWS
  979. ifneq ($(CONFIG_L2_PACKET), freebsd)
  980. LIBS += -ldl
  981. endif
  982. endif
  983. endif
  984. endif
  985. ifndef TLS_FUNCS
  986. OBJS += src/crypto/tls_none.c
  987. ifeq ($(CONFIG_TLS), internal)
  988. CONFIG_INTERNAL_AES=y
  989. CONFIG_INTERNAL_SHA1=y
  990. CONFIG_INTERNAL_MD5=y
  991. CONFIG_INTERNAL_RC4=y
  992. endif
  993. endif
  994. AESOBJS = # none so far (see below)
  995. ifdef CONFIG_INTERNAL_AES
  996. AESOBJS += src/crypto/aes-internal.c src/crypto/aes-internal-dec.c
  997. endif
  998. ifneq ($(CONFIG_TLS), openssl)
  999. NEED_INTERNAL_AES_WRAP=y
  1000. endif
  1001. ifdef CONFIG_OPENSSL_INTERNAL_AES_WRAP
  1002. # Seems to be needed at least with BoringSSL
  1003. NEED_INTERNAL_AES_WRAP=y
  1004. L_CFLAGS += -DCONFIG_OPENSSL_INTERNAL_AES_WRAP
  1005. endif
  1006. ifdef CONFIG_FIPS
  1007. # Have to use internal AES key wrap routines to use OpenSSL EVP since the
  1008. # OpenSSL AES_wrap_key()/AES_unwrap_key() API is not available in FIPS mode.
  1009. NEED_INTERNAL_AES_WRAP=y
  1010. endif
  1011. ifdef NEED_INTERNAL_AES_WRAP
  1012. AESOBJS += src/crypto/aes-unwrap.c
  1013. endif
  1014. ifdef NEED_AES_EAX
  1015. AESOBJS += src/crypto/aes-eax.c
  1016. NEED_AES_CTR=y
  1017. endif
  1018. ifdef NEED_AES_CTR
  1019. AESOBJS += src/crypto/aes-ctr.c
  1020. endif
  1021. ifdef NEED_AES_ENCBLOCK
  1022. AESOBJS += src/crypto/aes-encblock.c
  1023. endif
  1024. ifdef NEED_AES_OMAC1
  1025. NEED_AES_ENC=y
  1026. ifdef CONFIG_OPENSSL_CMAC
  1027. L_CFLAGS += -DCONFIG_OPENSSL_CMAC
  1028. else
  1029. AESOBJS += src/crypto/aes-omac1.c
  1030. endif
  1031. endif
  1032. ifdef NEED_AES_WRAP
  1033. NEED_AES_ENC=y
  1034. ifdef NEED_INTERNAL_AES_WRAP
  1035. AESOBJS += src/crypto/aes-wrap.c
  1036. endif
  1037. endif
  1038. ifdef NEED_AES_CBC
  1039. NEED_AES_ENC=y
  1040. ifneq ($(CONFIG_TLS), openssl)
  1041. AESOBJS += src/crypto/aes-cbc.c
  1042. endif
  1043. endif
  1044. ifdef NEED_AES_ENC
  1045. ifdef CONFIG_INTERNAL_AES
  1046. AESOBJS += src/crypto/aes-internal-enc.c
  1047. endif
  1048. endif
  1049. ifdef NEED_AES_SIV
  1050. AESOBJS += src/crypto/aes-siv.c
  1051. endif
  1052. ifdef NEED_AES
  1053. OBJS += $(AESOBJS)
  1054. endif
  1055. SHA1OBJS =
  1056. ifdef NEED_SHA1
  1057. ifneq ($(CONFIG_TLS), openssl)
  1058. SHA1OBJS += src/crypto/sha1.c
  1059. endif
  1060. SHA1OBJS += src/crypto/sha1-prf.c
  1061. ifdef CONFIG_INTERNAL_SHA1
  1062. SHA1OBJS += src/crypto/sha1-internal.c
  1063. ifdef NEED_FIPS186_2_PRF
  1064. SHA1OBJS += src/crypto/fips_prf_internal.c
  1065. endif
  1066. endif
  1067. ifdef CONFIG_NO_WPA_PASSPHRASE
  1068. L_CFLAGS += -DCONFIG_NO_PBKDF2
  1069. else
  1070. ifneq ($(CONFIG_TLS), openssl)
  1071. SHA1OBJS += src/crypto/sha1-pbkdf2.c
  1072. endif
  1073. endif
  1074. ifdef NEED_T_PRF
  1075. SHA1OBJS += src/crypto/sha1-tprf.c
  1076. endif
  1077. ifdef NEED_TLS_PRF
  1078. SHA1OBJS += src/crypto/sha1-tlsprf.c
  1079. endif
  1080. endif
  1081. MD5OBJS =
  1082. ifndef CONFIG_FIPS
  1083. ifneq ($(CONFIG_TLS), openssl)
  1084. MD5OBJS += src/crypto/md5.c
  1085. endif
  1086. endif
  1087. ifdef NEED_MD5
  1088. ifdef CONFIG_INTERNAL_MD5
  1089. MD5OBJS += src/crypto/md5-internal.c
  1090. endif
  1091. OBJS += $(MD5OBJS)
  1092. OBJS_p += $(MD5OBJS)
  1093. endif
  1094. ifdef NEED_MD4
  1095. ifdef CONFIG_INTERNAL_MD4
  1096. OBJS += src/crypto/md4-internal.c
  1097. endif
  1098. endif
  1099. DESOBJS = # none needed when not internal
  1100. ifdef NEED_DES
  1101. ifdef CONFIG_INTERNAL_DES
  1102. DESOBJS += src/crypto/des-internal.c
  1103. endif
  1104. endif
  1105. ifdef CONFIG_NO_RC4
  1106. L_CFLAGS += -DCONFIG_NO_RC4
  1107. endif
  1108. ifdef NEED_RC4
  1109. ifdef CONFIG_INTERNAL_RC4
  1110. ifndef CONFIG_NO_RC4
  1111. OBJS += src/crypto/rc4.c
  1112. endif
  1113. endif
  1114. endif
  1115. SHA256OBJS = # none by default
  1116. ifdef NEED_SHA256
  1117. L_CFLAGS += -DCONFIG_SHA256
  1118. ifneq ($(CONFIG_TLS), openssl)
  1119. SHA256OBJS += src/crypto/sha256.c
  1120. endif
  1121. SHA256OBJS += src/crypto/sha256-prf.c
  1122. ifdef CONFIG_INTERNAL_SHA256
  1123. SHA256OBJS += src/crypto/sha256-internal.c
  1124. endif
  1125. ifdef CONFIG_INTERNAL_SHA384
  1126. L_CFLAGS += -DCONFIG_INTERNAL_SHA384
  1127. SHA256OBJS += src/crypto/sha384-internal.c
  1128. endif
  1129. ifdef CONFIG_INTERNAL_SHA512
  1130. L_CFLAGS += -DCONFIG_INTERNAL_SHA512
  1131. SHA256OBJS += src/crypto/sha512-internal.c
  1132. endif
  1133. ifdef NEED_TLS_PRF_SHA256
  1134. SHA256OBJS += src/crypto/sha256-tlsprf.c
  1135. endif
  1136. ifdef NEED_HMAC_SHA256_KDF
  1137. L_CFLAGS += -DCONFIG_HMAC_SHA256_KDF
  1138. SHA256OBJS += src/crypto/sha256-kdf.c
  1139. endif
  1140. OBJS += $(SHA256OBJS)
  1141. endif
  1142. ifdef NEED_SHA384
  1143. L_CFLAGS += -DCONFIG_SHA384
  1144. OBJS += src/crypto/sha384-prf.c
  1145. endif
  1146. ifdef NEED_DH_GROUPS
  1147. OBJS += src/crypto/dh_groups.c
  1148. endif
  1149. ifdef NEED_DH_GROUPS_ALL
  1150. L_CFLAGS += -DALL_DH_GROUPS
  1151. endif
  1152. ifdef CONFIG_INTERNAL_DH_GROUP5
  1153. ifdef NEED_DH_GROUPS
  1154. OBJS += src/crypto/dh_group5.c
  1155. endif
  1156. endif
  1157. ifdef NEED_ECC
  1158. L_CFLAGS += -DCONFIG_ECC
  1159. endif
  1160. ifdef NEED_CRC32
  1161. OBJS += src/utils/crc32.c
  1162. endif
  1163. ifdef CONFIG_NO_RANDOM_POOL
  1164. L_CFLAGS += -DCONFIG_NO_RANDOM_POOL
  1165. else
  1166. OBJS += src/crypto/random.c
  1167. endif
  1168. ifdef CONFIG_CTRL_IFACE
  1169. ifeq ($(CONFIG_CTRL_IFACE), y)
  1170. ifdef CONFIG_NATIVE_WINDOWS
  1171. CONFIG_CTRL_IFACE=named_pipe
  1172. else
  1173. CONFIG_CTRL_IFACE=unix
  1174. endif
  1175. endif
  1176. L_CFLAGS += -DCONFIG_CTRL_IFACE
  1177. ifeq ($(CONFIG_CTRL_IFACE), unix)
  1178. L_CFLAGS += -DCONFIG_CTRL_IFACE_UNIX
  1179. OBJS += src/common/ctrl_iface_common.c
  1180. endif
  1181. ifeq ($(CONFIG_CTRL_IFACE), udp)
  1182. L_CFLAGS += -DCONFIG_CTRL_IFACE_UDP
  1183. endif
  1184. ifeq ($(CONFIG_CTRL_IFACE), named_pipe)
  1185. L_CFLAGS += -DCONFIG_CTRL_IFACE_NAMED_PIPE
  1186. endif
  1187. ifeq ($(CONFIG_CTRL_IFACE), udp-remote)
  1188. CONFIG_CTRL_IFACE=udp
  1189. L_CFLAGS += -DCONFIG_CTRL_IFACE_UDP
  1190. L_CFLAGS += -DCONFIG_CTRL_IFACE_UDP_REMOTE
  1191. endif
  1192. OBJS += ctrl_iface.c ctrl_iface_$(CONFIG_CTRL_IFACE).c
  1193. endif
  1194. ifdef CONFIG_CTRL_IFACE_DBUS
  1195. DBUS=y
  1196. DBUS_CFLAGS += -DCONFIG_CTRL_IFACE_DBUS -DDBUS_API_SUBJECT_TO_CHANGE
  1197. DBUS_OBJS += dbus/dbus_old.c dbus/dbus_old_handlers.c
  1198. ifdef CONFIG_WPS
  1199. DBUS_OBJS += dbus/dbus_old_handlers_wps.c
  1200. endif
  1201. DBUS_OBJS += dbus/dbus_dict_helpers.c
  1202. DBUS_CFLAGS += $(DBUS_INCLUDE)
  1203. endif
  1204. ifdef CONFIG_CTRL_IFACE_DBUS_NEW
  1205. DBUS=y
  1206. DBUS_CFLAGS += -DCONFIG_CTRL_IFACE_DBUS_NEW
  1207. DBUS_OBJS ?= dbus/dbus_dict_helpers.c
  1208. DBUS_OBJS += dbus/dbus_new_helpers.c
  1209. DBUS_OBJS += dbus/dbus_new.c dbus/dbus_new_handlers.c
  1210. ifdef CONFIG_WPS
  1211. DBUS_OBJS += dbus/dbus_new_handlers_wps.c
  1212. endif
  1213. ifdef CONFIG_P2P
  1214. DBUS_OBJS += dbus/dbus_new_handlers_p2p.c
  1215. endif
  1216. ifdef CONFIG_CTRL_IFACE_DBUS_INTRO
  1217. DBUS_OBJS += dbus/dbus_new_introspect.c
  1218. DBUS_CFLAGS += -DCONFIG_CTRL_IFACE_DBUS_INTRO
  1219. endif
  1220. DBUS_CFLAGS += $(DBUS_INCLUDE)
  1221. endif
  1222. ifdef DBUS
  1223. DBUS_CFLAGS += -DCONFIG_DBUS
  1224. DBUS_OBJS += dbus/dbus_common.c
  1225. endif
  1226. OBJS += $(DBUS_OBJS)
  1227. L_CFLAGS += $(DBUS_CFLAGS)
  1228. ifdef CONFIG_CTRL_IFACE_BINDER
  1229. WPA_SUPPLICANT_USE_BINDER=y
  1230. L_CFLAGS += -DCONFIG_BINDER -DCONFIG_CTRL_IFACE_BINDER
  1231. endif
  1232. ifdef CONFIG_READLINE
  1233. OBJS_c += src/utils/edit_readline.c
  1234. LIBS_c += -lncurses -lreadline
  1235. else
  1236. ifdef CONFIG_WPA_CLI_EDIT
  1237. OBJS_c += src/utils/edit.c
  1238. else
  1239. OBJS_c += src/utils/edit_simple.c
  1240. endif
  1241. endif
  1242. ifdef CONFIG_NATIVE_WINDOWS
  1243. L_CFLAGS += -DCONFIG_NATIVE_WINDOWS
  1244. LIBS += -lws2_32 -lgdi32 -lcrypt32
  1245. LIBS_c += -lws2_32
  1246. LIBS_p += -lws2_32 -lgdi32
  1247. ifeq ($(CONFIG_CRYPTO), cryptoapi)
  1248. LIBS_p += -lcrypt32
  1249. endif
  1250. endif
  1251. ifdef CONFIG_NO_STDOUT_DEBUG
  1252. L_CFLAGS += -DCONFIG_NO_STDOUT_DEBUG
  1253. ifndef CONFIG_CTRL_IFACE
  1254. L_CFLAGS += -DCONFIG_NO_WPA_MSG
  1255. endif
  1256. endif
  1257. ifdef CONFIG_ANDROID_LOG
  1258. L_CFLAGS += -DCONFIG_ANDROID_LOG
  1259. endif
  1260. ifdef CONFIG_IPV6
  1261. # for eapol_test only
  1262. L_CFLAGS += -DCONFIG_IPV6
  1263. endif
  1264. ifdef NEED_BASE64
  1265. OBJS += src/utils/base64.c
  1266. endif
  1267. ifdef NEED_SME
  1268. OBJS += sme.c
  1269. L_CFLAGS += -DCONFIG_SME
  1270. endif
  1271. OBJS += src/common/ieee802_11_common.c
  1272. OBJS += src/common/hw_features_common.c
  1273. ifdef NEED_EAP_COMMON
  1274. OBJS += src/eap_common/eap_common.c
  1275. endif
  1276. ifndef CONFIG_MAIN
  1277. CONFIG_MAIN=main
  1278. endif
  1279. ifdef CONFIG_DEBUG_SYSLOG
  1280. L_CFLAGS += -DCONFIG_DEBUG_SYSLOG
  1281. ifdef CONFIG_DEBUG_SYSLOG_FACILITY
  1282. L_CFLAGS += -DLOG_HOSTAPD="$(CONFIG_DEBUG_SYSLOG_FACILITY)"
  1283. endif
  1284. endif
  1285. ifdef CONFIG_DEBUG_LINUX_TRACING
  1286. L_CFLAGS += -DCONFIG_DEBUG_LINUX_TRACING
  1287. endif
  1288. ifdef CONFIG_DEBUG_FILE
  1289. L_CFLAGS += -DCONFIG_DEBUG_FILE
  1290. endif
  1291. ifdef CONFIG_DELAYED_MIC_ERROR_REPORT
  1292. L_CFLAGS += -DCONFIG_DELAYED_MIC_ERROR_REPORT
  1293. endif
  1294. ifdef CONFIG_FIPS
  1295. L_CFLAGS += -DCONFIG_FIPS
  1296. endif
  1297. OBJS += $(SHA1OBJS) $(DESOBJS)
  1298. OBJS_p += $(SHA1OBJS)
  1299. OBJS_p += $(SHA256OBJS)
  1300. ifdef CONFIG_BGSCAN_SIMPLE
  1301. L_CFLAGS += -DCONFIG_BGSCAN_SIMPLE
  1302. OBJS += bgscan_simple.c
  1303. NEED_BGSCAN=y
  1304. endif
  1305. ifdef CONFIG_BGSCAN_LEARN
  1306. L_CFLAGS += -DCONFIG_BGSCAN_LEARN
  1307. OBJS += bgscan_learn.c
  1308. NEED_BGSCAN=y
  1309. endif
  1310. ifdef NEED_BGSCAN
  1311. L_CFLAGS += -DCONFIG_BGSCAN
  1312. OBJS += bgscan.c
  1313. endif
  1314. ifdef CONFIG_AUTOSCAN_EXPONENTIAL
  1315. L_CFLAGS += -DCONFIG_AUTOSCAN_EXPONENTIAL
  1316. OBJS += autoscan_exponential.c
  1317. NEED_AUTOSCAN=y
  1318. endif
  1319. ifdef CONFIG_AUTOSCAN_PERIODIC
  1320. L_CFLAGS += -DCONFIG_AUTOSCAN_PERIODIC
  1321. OBJS += autoscan_periodic.c
  1322. NEED_AUTOSCAN=y
  1323. endif
  1324. ifdef NEED_AUTOSCAN
  1325. L_CFLAGS += -DCONFIG_AUTOSCAN
  1326. OBJS += autoscan.c
  1327. endif
  1328. ifdef CONFIG_EXT_PASSWORD_TEST
  1329. OBJS += src/utils/ext_password_test.c
  1330. L_CFLAGS += -DCONFIG_EXT_PASSWORD_TEST
  1331. NEED_EXT_PASSWORD=y
  1332. endif
  1333. ifdef NEED_EXT_PASSWORD
  1334. OBJS += src/utils/ext_password.c
  1335. L_CFLAGS += -DCONFIG_EXT_PASSWORD
  1336. endif
  1337. ifdef NEED_GAS
  1338. OBJS += src/common/gas.c
  1339. OBJS += gas_query.c
  1340. L_CFLAGS += -DCONFIG_GAS
  1341. NEED_OFFCHANNEL=y
  1342. endif
  1343. ifdef NEED_OFFCHANNEL
  1344. OBJS += offchannel.c
  1345. L_CFLAGS += -DCONFIG_OFFCHANNEL
  1346. endif
  1347. OBJS += src/drivers/driver_common.c
  1348. OBJS += wpa_supplicant.c events.c blacklist.c wpas_glue.c scan.c
  1349. OBJS_t := $(OBJS) $(OBJS_l2) eapol_test.c
  1350. OBJS_t += src/radius/radius_client.c
  1351. OBJS_t += src/radius/radius.c
  1352. ifndef CONFIG_AP
  1353. OBJS_t += src/utils/ip_addr.c
  1354. endif
  1355. OBJS_t2 := $(OBJS) $(OBJS_l2) preauth_test.c
  1356. OBJS += $(CONFIG_MAIN).c
  1357. ifdef CONFIG_PRIVSEP
  1358. OBJS_priv += $(OBJS_d) src/drivers/drivers.c
  1359. OBJS_priv += $(OBJS_l2)
  1360. OBJS_priv += src/utils/os_$(CONFIG_OS).c
  1361. OBJS_priv += src/utils/$(CONFIG_ELOOP).c
  1362. OBJS_priv += src/utils/common.c
  1363. OBJS_priv += src/utils/wpa_debug.c
  1364. OBJS_priv += src/utils/wpabuf.c
  1365. OBJS_priv += wpa_priv.c
  1366. ifdef CONFIG_DRIVER_NL80211
  1367. OBJS_priv += src/common/ieee802_11_common.c
  1368. endif
  1369. OBJS += src/l2_packet/l2_packet_privsep.c
  1370. OBJS += src/drivers/driver_privsep.c
  1371. EXTRA_progs += wpa_priv
  1372. else
  1373. OBJS += $(OBJS_d) src/drivers/drivers.c
  1374. OBJS += $(OBJS_l2)
  1375. endif
  1376. ifdef CONFIG_NDIS_EVENTS_INTEGRATED
  1377. L_CFLAGS += -DCONFIG_NDIS_EVENTS_INTEGRATED
  1378. OBJS += src/drivers/ndis_events.c
  1379. EXTRALIBS += -loleaut32 -lole32 -luuid
  1380. ifdef PLATFORMSDKLIB
  1381. EXTRALIBS += $(PLATFORMSDKLIB)/WbemUuid.Lib
  1382. else
  1383. EXTRALIBS += WbemUuid.Lib
  1384. endif
  1385. endif
  1386. ifndef LDO
  1387. LDO=$(CC)
  1388. endif
  1389. ########################
  1390. include $(CLEAR_VARS)
  1391. LOCAL_MODULE := wpa_cli
  1392. LOCAL_MODULE_TAGS := debug
  1393. LOCAL_SHARED_LIBRARIES := libc libcutils liblog
  1394. LOCAL_CFLAGS := $(L_CFLAGS)
  1395. LOCAL_SRC_FILES := $(OBJS_c)
  1396. LOCAL_C_INCLUDES := $(INCLUDES)
  1397. include $(BUILD_EXECUTABLE)
  1398. ########################
  1399. include $(CLEAR_VARS)
  1400. LOCAL_MODULE := wpa_supplicant
  1401. ifdef CONFIG_DRIVER_CUSTOM
  1402. LOCAL_STATIC_LIBRARIES := libCustomWifi
  1403. endif
  1404. ifneq ($(BOARD_WPA_SUPPLICANT_PRIVATE_LIB),)
  1405. LOCAL_STATIC_LIBRARIES += $(BOARD_WPA_SUPPLICANT_PRIVATE_LIB)
  1406. endif
  1407. LOCAL_SHARED_LIBRARIES := libc libcutils liblog
  1408. ifdef CONFIG_EAP_PROXY
  1409. LOCAL_STATIC_LIBRARIES += $(LIB_STATIC_EAP_PROXY)
  1410. LOCAL_SHARED_LIBRARIES += $(LIB_SHARED_EAP_PROXY)
  1411. endif
  1412. ifeq ($(CONFIG_TLS), openssl)
  1413. LOCAL_SHARED_LIBRARIES += libcrypto libssl libkeystore_binder
  1414. endif
  1415. # With BoringSSL we need libkeystore-engine in order to provide access to
  1416. # keystore keys.
  1417. ifneq (,$(wildcard external/boringssl/flavor.mk))
  1418. LOCAL_SHARED_LIBRARIES += libkeystore-engine
  1419. endif
  1420. ifdef CONFIG_DRIVER_NL80211
  1421. ifneq ($(wildcard external/libnl),)
  1422. LOCAL_SHARED_LIBRARIES += libnl
  1423. else
  1424. LOCAL_STATIC_LIBRARIES += libnl_2
  1425. endif
  1426. endif
  1427. LOCAL_CFLAGS := $(L_CFLAGS)
  1428. LOCAL_SRC_FILES := $(OBJS)
  1429. LOCAL_C_INCLUDES := $(INCLUDES)
  1430. ifeq ($(DBUS), y)
  1431. LOCAL_SHARED_LIBRARIES += libdbus
  1432. endif
  1433. ifeq ($(WPA_SUPPLICANT_USE_BINDER), y)
  1434. LOCAL_SHARED_LIBRARIES += libbinder libutils
  1435. LOCAL_STATIC_LIBRARIES += libwpa_binder libwpa_binder_interface
  1436. endif
  1437. include $(BUILD_EXECUTABLE)
  1438. ########################
  1439. #
  1440. #include $(CLEAR_VARS)
  1441. #LOCAL_MODULE := eapol_test
  1442. #ifdef CONFIG_DRIVER_CUSTOM
  1443. #LOCAL_STATIC_LIBRARIES := libCustomWifi
  1444. #endif
  1445. #LOCAL_SHARED_LIBRARIES := libc libcrypto libssl
  1446. #LOCAL_CFLAGS := $(L_CFLAGS)
  1447. #LOCAL_SRC_FILES := $(OBJS_t)
  1448. #LOCAL_C_INCLUDES := $(INCLUDES)
  1449. #include $(BUILD_EXECUTABLE)
  1450. #
  1451. ########################
  1452. #
  1453. #local_target_dir := $(TARGET_OUT)/etc/wifi
  1454. #
  1455. #include $(CLEAR_VARS)
  1456. #LOCAL_MODULE := wpa_supplicant.conf
  1457. #LOCAL_MODULE_CLASS := ETC
  1458. #LOCAL_MODULE_PATH := $(local_target_dir)
  1459. #LOCAL_SRC_FILES := $(LOCAL_MODULE)
  1460. #include $(BUILD_PREBUILT)
  1461. #
  1462. ########################
  1463. include $(CLEAR_VARS)
  1464. LOCAL_MODULE = libwpa_client
  1465. LOCAL_CFLAGS = $(L_CFLAGS)
  1466. LOCAL_SRC_FILES = src/common/wpa_ctrl.c src/utils/os_$(CONFIG_OS).c
  1467. LOCAL_C_INCLUDES = $(INCLUDES)
  1468. LOCAL_SHARED_LIBRARIES := libcutils liblog
  1469. LOCAL_COPY_HEADERS_TO := libwpa_client
  1470. LOCAL_COPY_HEADERS := src/common/wpa_ctrl.h
  1471. LOCAL_COPY_HEADERS += src/common/qca-vendor.h
  1472. include $(BUILD_SHARED_LIBRARY)
  1473. ifeq ($(WPA_SUPPLICANT_USE_BINDER), y)
  1474. ### Binder interface library ###
  1475. ########################
  1476. include $(CLEAR_VARS)
  1477. LOCAL_MODULE := libwpa_binder_interface
  1478. LOCAL_AIDL_INCLUDES := \
  1479. $(LOCAL_PATH)/binder \
  1480. frameworks/native/aidl/binder
  1481. LOCAL_EXPORT_C_INCLUDE_DIRS := \
  1482. $(LOCAL_PATH)/binder
  1483. LOCAL_CPPFLAGS := $(L_CPPFLAGS)
  1484. LOCAL_SRC_FILES := \
  1485. binder/binder_constants.cpp \
  1486. binder/fi/w1/wpa_supplicant/ISupplicant.aidl \
  1487. binder/fi/w1/wpa_supplicant/ISupplicantCallbacks.aidl \
  1488. binder/fi/w1/wpa_supplicant/IIface.aidl
  1489. LOCAL_SHARED_LIBRARIES := libbinder
  1490. include $(BUILD_STATIC_LIBRARY)
  1491. ### Binder service library ###
  1492. ########################
  1493. include $(CLEAR_VARS)
  1494. LOCAL_MODULE := libwpa_binder
  1495. LOCAL_CPPFLAGS := $(L_CPPFLAGS)
  1496. LOCAL_CFLAGS := $(L_CFLAGS)
  1497. LOCAL_C_INCLUDES := $(INCLUDES)
  1498. LOCAL_SRC_FILES := \
  1499. binder/binder.cpp binder/binder_manager.cpp \
  1500. binder/supplicant.cpp binder/iface.cpp
  1501. LOCAL_SHARED_LIBRARIES := \
  1502. libbinder \
  1503. libutils
  1504. LOCAL_STATIC_LIBRARIES := libwpa_binder_interface
  1505. include $(BUILD_STATIC_LIBRARY)
  1506. endif # BINDER == y