Android.mk 35 KB

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