Android.mk 36 KB

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