Android.mk 35 KB

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