Android.mk 37 KB

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