Android.mk 35 KB

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