Android.mk 34 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657
  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. endif
  588. ifdef CONFIG_WPS
  589. # EAP-WSC
  590. L_CFLAGS += -DCONFIG_WPS -DEAP_WSC
  591. OBJS += wps_supplicant.c
  592. OBJS += src/utils/uuid.c
  593. OBJS += src/eap_peer/eap_wsc.c src/eap_common/eap_wsc_common.c
  594. OBJS += src/wps/wps.c
  595. OBJS += src/wps/wps_common.c
  596. OBJS += src/wps/wps_attr_parse.c
  597. OBJS += src/wps/wps_attr_build.c
  598. OBJS += src/wps/wps_attr_process.c
  599. OBJS += src/wps/wps_dev_attr.c
  600. OBJS += src/wps/wps_enrollee.c
  601. OBJS += src/wps/wps_registrar.c
  602. OBJS_h += src/eap_server/eap_server_wsc.c
  603. CONFIG_IEEE8021X_EAPOL=y
  604. NEED_DH_GROUPS=y
  605. NEED_SHA256=y
  606. NEED_BASE64=y
  607. NEED_AES_CBC=y
  608. NEED_MODEXP=y
  609. ifdef CONFIG_WPS_NFC
  610. L_CFLAGS += -DCONFIG_WPS_NFC
  611. OBJS += src/wps/ndef.c
  612. NEED_WPS_OOB=y
  613. endif
  614. ifdef NEED_WPS_OOB
  615. L_CFLAGS += -DCONFIG_WPS_OOB
  616. endif
  617. ifdef CONFIG_WPS_ER
  618. CONFIG_WPS_UPNP=y
  619. L_CFLAGS += -DCONFIG_WPS_ER
  620. OBJS += src/wps/wps_er.c
  621. OBJS += src/wps/wps_er_ssdp.c
  622. endif
  623. ifdef CONFIG_WPS_UPNP
  624. L_CFLAGS += -DCONFIG_WPS_UPNP
  625. OBJS += src/wps/wps_upnp.c
  626. OBJS += src/wps/wps_upnp_ssdp.c
  627. OBJS += src/wps/wps_upnp_web.c
  628. OBJS += src/wps/wps_upnp_event.c
  629. OBJS += src/wps/wps_upnp_ap.c
  630. OBJS += src/wps/upnp_xml.c
  631. OBJS += src/wps/httpread.c
  632. OBJS += src/wps/http_client.c
  633. OBJS += src/wps/http_server.c
  634. endif
  635. ifdef CONFIG_WPS_STRICT
  636. L_CFLAGS += -DCONFIG_WPS_STRICT
  637. OBJS += src/wps/wps_validate.c
  638. endif
  639. ifdef CONFIG_WPS_TESTING
  640. L_CFLAGS += -DCONFIG_WPS_TESTING
  641. endif
  642. ifdef CONFIG_WPS_REG_DISABLE_OPEN
  643. L_CFLAGS += -DCONFIG_WPS_REG_DISABLE_OPEN
  644. endif
  645. endif
  646. ifdef CONFIG_EAP_IKEV2
  647. # EAP-IKEv2
  648. ifeq ($(CONFIG_EAP_IKEV2), dyn)
  649. L_CFLAGS += -DEAP_IKEV2_DYNAMIC
  650. EAPDYN += src/eap_peer/eap_ikev2.so src/eap_peer/ikev2.c
  651. EAPDYN += src/eap_common/eap_ikev2_common.c src/eap_common/ikev2_common.c
  652. else
  653. L_CFLAGS += -DEAP_IKEV2
  654. OBJS += src/eap_peer/eap_ikev2.c src/eap_peer/ikev2.c
  655. OBJS += src/eap_common/eap_ikev2_common.c src/eap_common/ikev2_common.c
  656. OBJS_h += src/eap_server/eap_server_ikev2.c
  657. OBJS_h += src/eap_server/ikev2.c
  658. endif
  659. CONFIG_IEEE8021X_EAPOL=y
  660. NEED_DH_GROUPS=y
  661. NEED_DH_GROUPS_ALL=y
  662. NEED_MODEXP=y
  663. NEED_CIPHER=y
  664. endif
  665. ifdef CONFIG_EAP_VENDOR_TEST
  666. ifeq ($(CONFIG_EAP_VENDOR_TEST), dyn)
  667. L_CFLAGS += -DEAP_VENDOR_TEST_DYNAMIC
  668. EAPDYN += src/eap_peer/eap_vendor_test.so
  669. else
  670. L_CFLAGS += -DEAP_VENDOR_TEST
  671. OBJS += src/eap_peer/eap_vendor_test.c
  672. OBJS_h += src/eap_server/eap_server_vendor_test.c
  673. endif
  674. CONFIG_IEEE8021X_EAPOL=y
  675. endif
  676. ifdef CONFIG_EAP_TNC
  677. # EAP-TNC
  678. L_CFLAGS += -DEAP_TNC
  679. OBJS += src/eap_peer/eap_tnc.c
  680. OBJS += src/eap_peer/tncc.c
  681. OBJS_h += src/eap_server/eap_server_tnc.c
  682. OBJS_h += src/eap_server/tncs.c
  683. NEED_BASE64=y
  684. ifndef CONFIG_NATIVE_WINDOWS
  685. ifndef CONFIG_DRIVER_BSD
  686. LIBS += -ldl
  687. endif
  688. endif
  689. endif
  690. ifdef CONFIG_IEEE8021X_EAPOL
  691. # IEEE 802.1X/EAPOL state machines (e.g., for RADIUS authentication)
  692. L_CFLAGS += -DIEEE8021X_EAPOL
  693. OBJS += src/eapol_supp/eapol_supp_sm.c
  694. OBJS += src/eap_peer/eap.c src/eap_peer/eap_methods.c
  695. NEED_EAP_COMMON=y
  696. ifdef CONFIG_DYNAMIC_EAP_METHODS
  697. L_CFLAGS += -DCONFIG_DYNAMIC_EAP_METHODS
  698. LIBS += -ldl -rdynamic
  699. endif
  700. endif
  701. ifdef CONFIG_AP
  702. NEED_EAP_COMMON=y
  703. NEED_RSN_AUTHENTICATOR=y
  704. L_CFLAGS += -DCONFIG_AP
  705. OBJS += ap.c
  706. L_CFLAGS += -DCONFIG_NO_RADIUS
  707. L_CFLAGS += -DCONFIG_NO_ACCOUNTING
  708. L_CFLAGS += -DCONFIG_NO_VLAN
  709. OBJS += src/ap/hostapd.c
  710. OBJS += src/ap/wpa_auth_glue.c
  711. OBJS += src/ap/utils.c
  712. OBJS += src/ap/authsrv.c
  713. OBJS += src/ap/ap_config.c
  714. OBJS += src/utils/ip_addr.c
  715. OBJS += src/ap/sta_info.c
  716. OBJS += src/ap/tkip_countermeasures.c
  717. OBJS += src/ap/ap_mlme.c
  718. OBJS += src/ap/ieee802_1x.c
  719. OBJS += src/eapol_auth/eapol_auth_sm.c
  720. OBJS += src/ap/ieee802_11_auth.c
  721. OBJS += src/ap/ieee802_11_shared.c
  722. OBJS += src/ap/drv_callbacks.c
  723. OBJS += src/ap/ap_drv_ops.c
  724. OBJS += src/ap/beacon.c
  725. OBJS += src/ap/bss_load.c
  726. OBJS += src/ap/eap_user_db.c
  727. ifdef CONFIG_IEEE80211N
  728. OBJS += src/ap/ieee802_11_ht.c
  729. ifdef CONFIG_IEEE80211AC
  730. OBJS += src/ap/ieee802_11_vht.c
  731. endif
  732. endif
  733. ifdef CONFIG_WNM
  734. OBJS += src/ap/wnm_ap.c
  735. endif
  736. ifdef CONFIG_CTRL_IFACE
  737. OBJS += src/ap/ctrl_iface_ap.c
  738. endif
  739. L_CFLAGS += -DEAP_SERVER -DEAP_SERVER_IDENTITY
  740. OBJS += src/eap_server/eap_server.c
  741. OBJS += src/eap_server/eap_server_identity.c
  742. OBJS += src/eap_server/eap_server_methods.c
  743. ifdef CONFIG_IEEE80211N
  744. L_CFLAGS += -DCONFIG_IEEE80211N
  745. ifdef CONFIG_IEEE80211AC
  746. L_CFLAGS += -DCONFIG_IEEE80211AC
  747. endif
  748. endif
  749. ifdef NEED_AP_MLME
  750. OBJS += src/ap/wmm.c
  751. OBJS += src/ap/ap_list.c
  752. OBJS += src/ap/ieee802_11.c
  753. OBJS += src/ap/hw_features.c
  754. OBJS += src/ap/dfs.c
  755. L_CFLAGS += -DNEED_AP_MLME
  756. endif
  757. ifdef CONFIG_WPS
  758. L_CFLAGS += -DEAP_SERVER_WSC
  759. OBJS += src/ap/wps_hostapd.c
  760. OBJS += src/eap_server/eap_server_wsc.c
  761. endif
  762. ifdef CONFIG_INTERWORKING
  763. OBJS += src/ap/gas_serv.c
  764. endif
  765. ifdef CONFIG_HS20
  766. OBJS += src/ap/hs20.c
  767. endif
  768. endif
  769. ifdef NEED_RSN_AUTHENTICATOR
  770. L_CFLAGS += -DCONFIG_NO_RADIUS
  771. NEED_AES_WRAP=y
  772. OBJS += src/ap/wpa_auth.c
  773. OBJS += src/ap/wpa_auth_ie.c
  774. OBJS += src/ap/pmksa_cache_auth.c
  775. ifdef CONFIG_IEEE80211R
  776. OBJS += src/ap/wpa_auth_ft.c
  777. endif
  778. ifdef CONFIG_PEERKEY
  779. OBJS += src/ap/peerkey_auth.c
  780. endif
  781. endif
  782. ifdef CONFIG_EAP_SERVER
  783. L_CFLAGS += -DEAP_SERVER
  784. OBJS_h += src/eap_server/eap_server.c
  785. OBJS_h += src/eap_server/eap_server_identity.c
  786. OBJS_h += src/eap_server/eap_server_methods.c
  787. endif
  788. ifdef CONFIG_RADIUS_CLIENT
  789. OBJS_h += src/utils/ip_addr.c
  790. OBJS_h += src/radius/radius.c
  791. OBJS_h += src/radius/radius_client.c
  792. endif
  793. ifdef CONFIG_AUTHENTICATOR
  794. OBJS_h += src/eapol_auth/eapol_auth_sm.c
  795. OBJS_h += src/ap/ieee802_1x.c
  796. endif
  797. ifdef CONFIG_WPA_AUTHENTICATOR
  798. OBJS_h += src/ap/wpa_auth.c
  799. OBJS_h += src/ap/wpa_auth_ie.c
  800. OBJS_h += src/ap/pmksa_cache_auth.c
  801. ifdef CONFIG_IEEE80211R
  802. OBJS_h += src/ap/wpa_auth_ft.c
  803. endif
  804. ifdef CONFIG_PEERKEY
  805. OBJS_h += src/ap/peerkey_auth.c
  806. endif
  807. endif
  808. ifdef CONFIG_PCSC
  809. # PC/SC interface for smartcards (USIM, GSM SIM)
  810. L_CFLAGS += -DPCSC_FUNCS -I/usr/include/PCSC
  811. OBJS += src/utils/pcsc_funcs.c
  812. # -lpthread may not be needed depending on how pcsc-lite was configured
  813. ifdef CONFIG_NATIVE_WINDOWS
  814. #Once MinGW gets support for WinScard, -lwinscard could be used instead of the
  815. #dynamic symbol loading that is now used in pcsc_funcs.c
  816. #LIBS += -lwinscard
  817. else
  818. LIBS += -lpcsclite -lpthread
  819. endif
  820. endif
  821. ifdef CONFIG_SIM_SIMULATOR
  822. L_CFLAGS += -DCONFIG_SIM_SIMULATOR
  823. NEED_MILENAGE=y
  824. endif
  825. ifdef CONFIG_USIM_SIMULATOR
  826. L_CFLAGS += -DCONFIG_USIM_SIMULATOR
  827. NEED_MILENAGE=y
  828. endif
  829. ifdef NEED_MILENAGE
  830. OBJS += src/crypto/milenage.c
  831. NEED_AES_ENCBLOCK=y
  832. endif
  833. ifdef CONFIG_PKCS12
  834. L_CFLAGS += -DPKCS12_FUNCS
  835. endif
  836. ifdef CONFIG_SMARTCARD
  837. L_CFLAGS += -DCONFIG_SMARTCARD
  838. endif
  839. ifdef MS_FUNCS
  840. OBJS += src/crypto/ms_funcs.c
  841. NEED_DES=y
  842. NEED_MD4=y
  843. endif
  844. ifdef CHAP
  845. OBJS += src/eap_common/chap.c
  846. endif
  847. ifdef TLS_FUNCS
  848. NEED_DES=y
  849. # Shared TLS functions (needed for EAP_TLS, EAP_PEAP, EAP_TTLS, and EAP_FAST)
  850. OBJS += src/eap_peer/eap_tls_common.c
  851. OBJS_h += src/eap_server/eap_server_tls_common.c
  852. ifndef CONFIG_FIPS
  853. NEED_TLS_PRF=y
  854. NEED_SHA1=y
  855. NEED_MD5=y
  856. endif
  857. endif
  858. ifndef CONFIG_TLS
  859. CONFIG_TLS=openssl
  860. endif
  861. ifdef CONFIG_TLSV11
  862. L_CFLAGS += -DCONFIG_TLSV11
  863. endif
  864. ifdef CONFIG_TLSV12
  865. L_CFLAGS += -DCONFIG_TLSV12
  866. NEED_SHA256=y
  867. endif
  868. ifeq ($(CONFIG_TLS), openssl)
  869. ifdef TLS_FUNCS
  870. L_CFLAGS += -DEAP_TLS_OPENSSL
  871. OBJS += src/crypto/tls_openssl.c
  872. LIBS += -lssl
  873. endif
  874. OBJS += src/crypto/crypto_openssl.c
  875. OBJS_p += src/crypto/crypto_openssl.c
  876. ifdef NEED_FIPS186_2_PRF
  877. OBJS += src/crypto/fips_prf_openssl.c
  878. endif
  879. NEED_SHA256=y
  880. NEED_TLS_PRF_SHA256=y
  881. LIBS += -lcrypto
  882. LIBS_p += -lcrypto
  883. ifdef CONFIG_TLS_ADD_DL
  884. LIBS += -ldl
  885. LIBS_p += -ldl
  886. endif
  887. endif
  888. ifeq ($(CONFIG_TLS), gnutls)
  889. ifdef TLS_FUNCS
  890. OBJS += src/crypto/tls_gnutls.c
  891. LIBS += -lgnutls -lgpg-error
  892. endif
  893. OBJS += src/crypto/crypto_gnutls.c
  894. OBJS_p += src/crypto/crypto_gnutls.c
  895. ifdef NEED_FIPS186_2_PRF
  896. OBJS += src/crypto/fips_prf_internal.c
  897. OBJS += src/crypto/sha1-internal.c
  898. endif
  899. LIBS += -lgcrypt
  900. LIBS_p += -lgcrypt
  901. CONFIG_INTERNAL_SHA256=y
  902. CONFIG_INTERNAL_RC4=y
  903. CONFIG_INTERNAL_DH_GROUP5=y
  904. endif
  905. ifeq ($(CONFIG_TLS), internal)
  906. ifndef CONFIG_CRYPTO
  907. CONFIG_CRYPTO=internal
  908. endif
  909. ifdef TLS_FUNCS
  910. OBJS += src/crypto/crypto_internal-rsa.c
  911. OBJS += src/crypto/tls_internal.c
  912. OBJS += src/tls/tlsv1_common.c
  913. OBJS += src/tls/tlsv1_record.c
  914. OBJS += src/tls/tlsv1_cred.c
  915. OBJS += src/tls/tlsv1_client.c
  916. OBJS += src/tls/tlsv1_client_write.c
  917. OBJS += src/tls/tlsv1_client_read.c
  918. OBJS += src/tls/asn1.c
  919. OBJS += src/tls/rsa.c
  920. OBJS += src/tls/x509v3.c
  921. OBJS += src/tls/pkcs1.c
  922. OBJS += src/tls/pkcs5.c
  923. OBJS += src/tls/pkcs8.c
  924. NEED_SHA256=y
  925. NEED_BASE64=y
  926. NEED_TLS_PRF=y
  927. ifdef CONFIG_TLSV12
  928. NEED_TLS_PRF_SHA256=y
  929. endif
  930. NEED_MODEXP=y
  931. NEED_CIPHER=y
  932. L_CFLAGS += -DCONFIG_TLS_INTERNAL_CLIENT
  933. endif
  934. ifdef NEED_CIPHER
  935. NEED_DES=y
  936. OBJS += src/crypto/crypto_internal-cipher.c
  937. endif
  938. ifdef NEED_MODEXP
  939. OBJS += src/crypto/crypto_internal-modexp.c
  940. OBJS += src/tls/bignum.c
  941. endif
  942. ifeq ($(CONFIG_CRYPTO), libtomcrypt)
  943. OBJS += src/crypto/crypto_libtomcrypt.c
  944. OBJS_p += src/crypto/crypto_libtomcrypt.c
  945. LIBS += -ltomcrypt -ltfm
  946. LIBS_p += -ltomcrypt -ltfm
  947. CONFIG_INTERNAL_SHA256=y
  948. CONFIG_INTERNAL_RC4=y
  949. CONFIG_INTERNAL_DH_GROUP5=y
  950. endif
  951. ifeq ($(CONFIG_CRYPTO), internal)
  952. OBJS += src/crypto/crypto_internal.c
  953. OBJS_p += src/crypto/crypto_internal.c
  954. NEED_AES_ENC=y
  955. L_CFLAGS += -DCONFIG_CRYPTO_INTERNAL
  956. ifdef CONFIG_INTERNAL_LIBTOMMATH
  957. L_CFLAGS += -DCONFIG_INTERNAL_LIBTOMMATH
  958. ifdef CONFIG_INTERNAL_LIBTOMMATH_FAST
  959. L_CFLAGS += -DLTM_FAST
  960. endif
  961. else
  962. LIBS += -ltommath
  963. LIBS_p += -ltommath
  964. endif
  965. CONFIG_INTERNAL_AES=y
  966. CONFIG_INTERNAL_DES=y
  967. CONFIG_INTERNAL_SHA1=y
  968. CONFIG_INTERNAL_MD4=y
  969. CONFIG_INTERNAL_MD5=y
  970. CONFIG_INTERNAL_SHA256=y
  971. CONFIG_INTERNAL_RC4=y
  972. CONFIG_INTERNAL_DH_GROUP5=y
  973. endif
  974. ifeq ($(CONFIG_CRYPTO), cryptoapi)
  975. OBJS += src/crypto/crypto_cryptoapi.c
  976. OBJS_p += src/crypto/crypto_cryptoapi.c
  977. L_CFLAGS += -DCONFIG_CRYPTO_CRYPTOAPI
  978. CONFIG_INTERNAL_SHA256=y
  979. CONFIG_INTERNAL_RC4=y
  980. endif
  981. endif
  982. ifeq ($(CONFIG_TLS), none)
  983. ifdef TLS_FUNCS
  984. OBJS += src/crypto/tls_none.c
  985. L_CFLAGS += -DEAP_TLS_NONE
  986. CONFIG_INTERNAL_AES=y
  987. CONFIG_INTERNAL_SHA1=y
  988. CONFIG_INTERNAL_MD5=y
  989. endif
  990. OBJS += src/crypto/crypto_none.c
  991. OBJS_p += src/crypto/crypto_none.c
  992. CONFIG_INTERNAL_SHA256=y
  993. CONFIG_INTERNAL_RC4=y
  994. endif
  995. ifdef TLS_FUNCS
  996. ifdef CONFIG_SMARTCARD
  997. ifndef CONFIG_NATIVE_WINDOWS
  998. ifneq ($(CONFIG_L2_PACKET), freebsd)
  999. LIBS += -ldl
  1000. endif
  1001. endif
  1002. endif
  1003. endif
  1004. ifndef TLS_FUNCS
  1005. OBJS += src/crypto/tls_none.c
  1006. ifeq ($(CONFIG_TLS), internal)
  1007. CONFIG_INTERNAL_AES=y
  1008. CONFIG_INTERNAL_SHA1=y
  1009. CONFIG_INTERNAL_MD5=y
  1010. CONFIG_INTERNAL_RC4=y
  1011. endif
  1012. endif
  1013. AESOBJS = # none so far (see below)
  1014. ifdef CONFIG_INTERNAL_AES
  1015. AESOBJS += src/crypto/aes-internal.c src/crypto/aes-internal-dec.c
  1016. endif
  1017. ifneq ($(CONFIG_TLS), openssl)
  1018. NEED_INTERNAL_AES_WRAP=y
  1019. endif
  1020. ifdef CONFIG_OPENSSL_INTERNAL_AES_WRAP
  1021. # Seems to be needed at least with BoringSSL
  1022. NEED_INTERNAL_AES_WRAP=y
  1023. L_CFLAGS += -DCONFIG_OPENSSL_INTERNAL_AES_WRAP
  1024. endif
  1025. ifdef CONFIG_FIPS
  1026. # Have to use internal AES key wrap routines to use OpenSSL EVP since the
  1027. # OpenSSL AES_wrap_key()/AES_unwrap_key() API is not available in FIPS mode.
  1028. NEED_INTERNAL_AES_WRAP=y
  1029. endif
  1030. ifdef NEED_INTERNAL_AES_WRAP
  1031. AESOBJS += src/crypto/aes-unwrap.c
  1032. endif
  1033. ifdef NEED_AES_EAX
  1034. AESOBJS += src/crypto/aes-eax.c
  1035. NEED_AES_CTR=y
  1036. endif
  1037. ifdef NEED_AES_CTR
  1038. AESOBJS += src/crypto/aes-ctr.c
  1039. endif
  1040. ifdef NEED_AES_ENCBLOCK
  1041. AESOBJS += src/crypto/aes-encblock.c
  1042. endif
  1043. ifdef NEED_AES_OMAC1
  1044. NEED_AES_ENC=y
  1045. ifdef CONFIG_OPENSSL_CMAC
  1046. L_CFLAGS += -DCONFIG_OPENSSL_CMAC
  1047. else
  1048. AESOBJS += src/crypto/aes-omac1.c
  1049. endif
  1050. endif
  1051. ifdef NEED_AES_WRAP
  1052. NEED_AES_ENC=y
  1053. ifdef NEED_INTERNAL_AES_WRAP
  1054. AESOBJS += src/crypto/aes-wrap.c
  1055. endif
  1056. endif
  1057. ifdef NEED_AES_CBC
  1058. NEED_AES_ENC=y
  1059. ifneq ($(CONFIG_TLS), openssl)
  1060. AESOBJS += src/crypto/aes-cbc.c
  1061. endif
  1062. endif
  1063. ifdef NEED_AES_ENC
  1064. ifdef CONFIG_INTERNAL_AES
  1065. AESOBJS += src/crypto/aes-internal-enc.c
  1066. endif
  1067. endif
  1068. ifdef NEED_AES_SIV
  1069. AESOBJS += src/crypto/aes-siv.c
  1070. endif
  1071. ifdef NEED_AES
  1072. OBJS += $(AESOBJS)
  1073. endif
  1074. SHA1OBJS =
  1075. ifdef NEED_SHA1
  1076. ifneq ($(CONFIG_TLS), openssl)
  1077. SHA1OBJS += src/crypto/sha1.c
  1078. endif
  1079. SHA1OBJS += src/crypto/sha1-prf.c
  1080. ifdef CONFIG_INTERNAL_SHA1
  1081. SHA1OBJS += src/crypto/sha1-internal.c
  1082. ifdef NEED_FIPS186_2_PRF
  1083. SHA1OBJS += src/crypto/fips_prf_internal.c
  1084. endif
  1085. endif
  1086. ifdef CONFIG_NO_WPA_PASSPHRASE
  1087. L_CFLAGS += -DCONFIG_NO_PBKDF2
  1088. else
  1089. ifneq ($(CONFIG_TLS), openssl)
  1090. SHA1OBJS += src/crypto/sha1-pbkdf2.c
  1091. endif
  1092. endif
  1093. ifdef NEED_T_PRF
  1094. SHA1OBJS += src/crypto/sha1-tprf.c
  1095. endif
  1096. ifdef NEED_TLS_PRF
  1097. SHA1OBJS += src/crypto/sha1-tlsprf.c
  1098. endif
  1099. endif
  1100. MD5OBJS =
  1101. ifndef CONFIG_FIPS
  1102. ifneq ($(CONFIG_TLS), openssl)
  1103. MD5OBJS += src/crypto/md5.c
  1104. endif
  1105. endif
  1106. ifdef NEED_MD5
  1107. ifdef CONFIG_INTERNAL_MD5
  1108. MD5OBJS += src/crypto/md5-internal.c
  1109. endif
  1110. OBJS += $(MD5OBJS)
  1111. OBJS_p += $(MD5OBJS)
  1112. endif
  1113. ifdef NEED_MD4
  1114. ifdef CONFIG_INTERNAL_MD4
  1115. OBJS += src/crypto/md4-internal.c
  1116. endif
  1117. endif
  1118. DESOBJS = # none needed when not internal
  1119. ifdef NEED_DES
  1120. ifdef CONFIG_INTERNAL_DES
  1121. DESOBJS += src/crypto/des-internal.c
  1122. endif
  1123. endif
  1124. ifdef CONFIG_NO_RC4
  1125. L_CFLAGS += -DCONFIG_NO_RC4
  1126. endif
  1127. ifdef NEED_RC4
  1128. ifdef CONFIG_INTERNAL_RC4
  1129. ifndef CONFIG_NO_RC4
  1130. OBJS += src/crypto/rc4.c
  1131. endif
  1132. endif
  1133. endif
  1134. SHA256OBJS = # none by default
  1135. ifdef NEED_SHA256
  1136. L_CFLAGS += -DCONFIG_SHA256
  1137. ifneq ($(CONFIG_TLS), openssl)
  1138. SHA256OBJS += src/crypto/sha256.c
  1139. endif
  1140. SHA256OBJS += src/crypto/sha256-prf.c
  1141. ifdef CONFIG_INTERNAL_SHA256
  1142. SHA256OBJS += src/crypto/sha256-internal.c
  1143. endif
  1144. ifdef NEED_TLS_PRF_SHA256
  1145. SHA256OBJS += src/crypto/sha256-tlsprf.c
  1146. endif
  1147. ifdef NEED_HMAC_SHA256_KDF
  1148. SHA256OBJS += src/crypto/sha256-kdf.c
  1149. endif
  1150. OBJS += $(SHA256OBJS)
  1151. endif
  1152. ifdef NEED_SHA384
  1153. L_CFLAGS += -DCONFIG_SHA384
  1154. OBJS += src/crypto/sha384-prf.c
  1155. endif
  1156. ifdef NEED_DH_GROUPS
  1157. OBJS += src/crypto/dh_groups.c
  1158. endif
  1159. ifdef NEED_DH_GROUPS_ALL
  1160. L_CFLAGS += -DALL_DH_GROUPS
  1161. endif
  1162. ifdef CONFIG_INTERNAL_DH_GROUP5
  1163. ifdef NEED_DH_GROUPS
  1164. OBJS += src/crypto/dh_group5.c
  1165. endif
  1166. endif
  1167. ifdef NEED_ECC
  1168. L_CFLAGS += -DCONFIG_ECC
  1169. endif
  1170. ifdef CONFIG_NO_RANDOM_POOL
  1171. L_CFLAGS += -DCONFIG_NO_RANDOM_POOL
  1172. else
  1173. OBJS += src/crypto/random.c
  1174. endif
  1175. ifdef CONFIG_CTRL_IFACE
  1176. ifeq ($(CONFIG_CTRL_IFACE), y)
  1177. ifdef CONFIG_NATIVE_WINDOWS
  1178. CONFIG_CTRL_IFACE=named_pipe
  1179. else
  1180. CONFIG_CTRL_IFACE=unix
  1181. endif
  1182. endif
  1183. L_CFLAGS += -DCONFIG_CTRL_IFACE
  1184. ifeq ($(CONFIG_CTRL_IFACE), unix)
  1185. L_CFLAGS += -DCONFIG_CTRL_IFACE_UNIX
  1186. endif
  1187. ifeq ($(CONFIG_CTRL_IFACE), udp)
  1188. L_CFLAGS += -DCONFIG_CTRL_IFACE_UDP
  1189. endif
  1190. ifeq ($(CONFIG_CTRL_IFACE), named_pipe)
  1191. L_CFLAGS += -DCONFIG_CTRL_IFACE_NAMED_PIPE
  1192. endif
  1193. ifeq ($(CONFIG_CTRL_IFACE), udp-remote)
  1194. CONFIG_CTRL_IFACE=udp
  1195. L_CFLAGS += -DCONFIG_CTRL_IFACE_UDP
  1196. L_CFLAGS += -DCONFIG_CTRL_IFACE_UDP_REMOTE
  1197. endif
  1198. OBJS += ctrl_iface.c ctrl_iface_$(CONFIG_CTRL_IFACE).c
  1199. endif
  1200. ifdef CONFIG_CTRL_IFACE_DBUS
  1201. DBUS=y
  1202. DBUS_CFLAGS += -DCONFIG_CTRL_IFACE_DBUS -DDBUS_API_SUBJECT_TO_CHANGE
  1203. DBUS_OBJS += dbus/dbus_old.c dbus/dbus_old_handlers.c
  1204. ifdef CONFIG_WPS
  1205. DBUS_OBJS += dbus/dbus_old_handlers_wps.c
  1206. endif
  1207. DBUS_OBJS += dbus/dbus_dict_helpers.c
  1208. ifndef DBUS_LIBS
  1209. DBUS_LIBS := $(shell $(PKG_CONFIG) --libs dbus-1)
  1210. endif
  1211. ifndef DBUS_INCLUDE
  1212. DBUS_INCLUDE := $(shell $(PKG_CONFIG) --cflags dbus-1)
  1213. endif
  1214. DBUS_CFLAGS += $(DBUS_INCLUDE)
  1215. endif
  1216. ifdef CONFIG_CTRL_IFACE_DBUS_NEW
  1217. DBUS=y
  1218. DBUS_CFLAGS += -DCONFIG_CTRL_IFACE_DBUS_NEW
  1219. DBUS_OBJS ?= dbus/dbus_dict_helpers.c
  1220. DBUS_OBJS += dbus/dbus_new_helpers.c
  1221. DBUS_OBJS += dbus/dbus_new.c dbus/dbus_new_handlers.c
  1222. ifdef CONFIG_WPS
  1223. DBUS_OBJS += dbus/dbus_new_handlers_wps.c
  1224. endif
  1225. ifdef CONFIG_P2P
  1226. DBUS_OBJS += dbus/dbus_new_handlers_p2p.c
  1227. endif
  1228. ifndef DBUS_LIBS
  1229. DBUS_LIBS := $(shell $(PKG_CONFIG) --libs dbus-1)
  1230. endif
  1231. ifndef DBUS_INCLUDE
  1232. DBUS_INCLUDE := $(shell $(PKG_CONFIG) --cflags dbus-1)
  1233. endif
  1234. ifdef CONFIG_CTRL_IFACE_DBUS_INTRO
  1235. DBUS_OBJS += dbus/dbus_new_introspect.c
  1236. DBUS_CFLAGS += -DCONFIG_CTRL_IFACE_DBUS_INTRO
  1237. endif
  1238. DBUS_CFLAGS += $(DBUS_INCLUDE)
  1239. endif
  1240. ifdef DBUS
  1241. DBUS_CFLAGS += -DCONFIG_DBUS
  1242. DBUS_OBJS += dbus/dbus_common.c
  1243. endif
  1244. OBJS += $(DBUS_OBJS)
  1245. L_CFLAGS += $(DBUS_CFLAGS)
  1246. LIBS += $(DBUS_LIBS)
  1247. ifdef CONFIG_READLINE
  1248. OBJS_c += src/utils/edit_readline.c
  1249. LIBS_c += -lncurses -lreadline
  1250. else
  1251. ifdef CONFIG_WPA_CLI_EDIT
  1252. OBJS_c += src/utils/edit.c
  1253. else
  1254. OBJS_c += src/utils/edit_simple.c
  1255. endif
  1256. endif
  1257. ifdef CONFIG_NATIVE_WINDOWS
  1258. L_CFLAGS += -DCONFIG_NATIVE_WINDOWS
  1259. LIBS += -lws2_32 -lgdi32 -lcrypt32
  1260. LIBS_c += -lws2_32
  1261. LIBS_p += -lws2_32 -lgdi32
  1262. ifeq ($(CONFIG_CRYPTO), cryptoapi)
  1263. LIBS_p += -lcrypt32
  1264. endif
  1265. endif
  1266. ifdef CONFIG_NO_STDOUT_DEBUG
  1267. L_CFLAGS += -DCONFIG_NO_STDOUT_DEBUG
  1268. ifndef CONFIG_CTRL_IFACE
  1269. L_CFLAGS += -DCONFIG_NO_WPA_MSG
  1270. endif
  1271. endif
  1272. ifdef CONFIG_ANDROID_LOG
  1273. L_CFLAGS += -DCONFIG_ANDROID_LOG
  1274. endif
  1275. ifdef CONFIG_IPV6
  1276. # for eapol_test only
  1277. L_CFLAGS += -DCONFIG_IPV6
  1278. endif
  1279. ifdef NEED_BASE64
  1280. OBJS += src/utils/base64.c
  1281. endif
  1282. ifdef NEED_SME
  1283. OBJS += sme.c
  1284. L_CFLAGS += -DCONFIG_SME
  1285. endif
  1286. OBJS += src/common/ieee802_11_common.c
  1287. OBJS += src/common/hw_features_common.c
  1288. ifdef NEED_EAP_COMMON
  1289. OBJS += src/eap_common/eap_common.c
  1290. endif
  1291. ifndef CONFIG_MAIN
  1292. CONFIG_MAIN=main
  1293. endif
  1294. ifdef CONFIG_DEBUG_SYSLOG
  1295. L_CFLAGS += -DCONFIG_DEBUG_SYSLOG
  1296. ifdef CONFIG_DEBUG_SYSLOG_FACILITY
  1297. L_CFLAGS += -DLOG_HOSTAPD="$(CONFIG_DEBUG_SYSLOG_FACILITY)"
  1298. endif
  1299. endif
  1300. ifdef CONFIG_DEBUG_LINUX_TRACING
  1301. L_CFLAGS += -DCONFIG_DEBUG_LINUX_TRACING
  1302. endif
  1303. ifdef CONFIG_DEBUG_FILE
  1304. L_CFLAGS += -DCONFIG_DEBUG_FILE
  1305. endif
  1306. ifdef CONFIG_DELAYED_MIC_ERROR_REPORT
  1307. L_CFLAGS += -DCONFIG_DELAYED_MIC_ERROR_REPORT
  1308. endif
  1309. ifdef CONFIG_FIPS
  1310. L_CFLAGS += -DCONFIG_FIPS
  1311. endif
  1312. OBJS += $(SHA1OBJS) $(DESOBJS)
  1313. OBJS_p += $(SHA1OBJS)
  1314. OBJS_p += $(SHA256OBJS)
  1315. ifdef CONFIG_BGSCAN_SIMPLE
  1316. L_CFLAGS += -DCONFIG_BGSCAN_SIMPLE
  1317. OBJS += bgscan_simple.c
  1318. NEED_BGSCAN=y
  1319. endif
  1320. ifdef CONFIG_BGSCAN_LEARN
  1321. L_CFLAGS += -DCONFIG_BGSCAN_LEARN
  1322. OBJS += bgscan_learn.c
  1323. NEED_BGSCAN=y
  1324. endif
  1325. ifdef NEED_BGSCAN
  1326. L_CFLAGS += -DCONFIG_BGSCAN
  1327. OBJS += bgscan.c
  1328. endif
  1329. ifdef CONFIG_AUTOSCAN_EXPONENTIAL
  1330. L_CFLAGS += -DCONFIG_AUTOSCAN_EXPONENTIAL
  1331. OBJS += autoscan_exponential.c
  1332. NEED_AUTOSCAN=y
  1333. endif
  1334. ifdef CONFIG_AUTOSCAN_PERIODIC
  1335. L_CFLAGS += -DCONFIG_AUTOSCAN_PERIODIC
  1336. OBJS += autoscan_periodic.c
  1337. NEED_AUTOSCAN=y
  1338. endif
  1339. ifdef NEED_AUTOSCAN
  1340. L_CFLAGS += -DCONFIG_AUTOSCAN
  1341. OBJS += autoscan.c
  1342. endif
  1343. ifdef CONFIG_EXT_PASSWORD_TEST
  1344. OBJS += src/utils/ext_password_test.c
  1345. L_CFLAGS += -DCONFIG_EXT_PASSWORD_TEST
  1346. NEED_EXT_PASSWORD=y
  1347. endif
  1348. ifdef NEED_EXT_PASSWORD
  1349. OBJS += src/utils/ext_password.c
  1350. L_CFLAGS += -DCONFIG_EXT_PASSWORD
  1351. endif
  1352. ifdef NEED_GAS
  1353. OBJS += src/common/gas.c
  1354. OBJS += gas_query.c
  1355. L_CFLAGS += -DCONFIG_GAS
  1356. NEED_OFFCHANNEL=y
  1357. endif
  1358. ifdef NEED_OFFCHANNEL
  1359. OBJS += offchannel.c
  1360. L_CFLAGS += -DCONFIG_OFFCHANNEL
  1361. endif
  1362. OBJS += src/drivers/driver_common.c
  1363. OBJS_wpa_rm := ctrl_iface.c ctrl_iface_unix.c
  1364. OBJS_wpa := $(filter-out $(OBJS_wpa_rm),$(OBJS)) $(OBJS_h) tests/test_wpa.c
  1365. ifdef CONFIG_AUTHENTICATOR
  1366. OBJS_wpa += tests/link_test.c
  1367. endif
  1368. OBJS_wpa += $(OBJS_l2)
  1369. OBJS += wpa_supplicant.c events.c blacklist.c wpas_glue.c scan.c
  1370. OBJS_t := $(OBJS) $(OBJS_l2) eapol_test.c
  1371. OBJS_t += src/radius/radius_client.c
  1372. OBJS_t += src/radius/radius.c
  1373. ifndef CONFIG_AP
  1374. OBJS_t += src/utils/ip_addr.c
  1375. endif
  1376. OBJS_t2 := $(OBJS) $(OBJS_l2) preauth_test.c
  1377. OBJS += $(CONFIG_MAIN).c
  1378. ifdef CONFIG_PRIVSEP
  1379. OBJS_priv += $(OBJS_d) src/drivers/drivers.c
  1380. OBJS_priv += $(OBJS_l2)
  1381. OBJS_priv += src/utils/os_$(CONFIG_OS).c
  1382. OBJS_priv += src/utils/$(CONFIG_ELOOP).c
  1383. OBJS_priv += src/utils/common.c
  1384. OBJS_priv += src/utils/wpa_debug.c
  1385. OBJS_priv += src/utils/wpabuf.c
  1386. OBJS_priv += wpa_priv.c
  1387. ifdef CONFIG_DRIVER_NL80211
  1388. OBJS_priv += src/common/ieee802_11_common.c
  1389. endif
  1390. OBJS += src/l2_packet/l2_packet_privsep.c
  1391. OBJS += src/drivers/driver_privsep.c
  1392. EXTRA_progs += wpa_priv
  1393. else
  1394. OBJS += $(OBJS_d) src/drivers/drivers.c
  1395. OBJS += $(OBJS_l2)
  1396. endif
  1397. ifdef CONFIG_NDIS_EVENTS_INTEGRATED
  1398. L_CFLAGS += -DCONFIG_NDIS_EVENTS_INTEGRATED
  1399. OBJS += src/drivers/ndis_events.c
  1400. EXTRALIBS += -loleaut32 -lole32 -luuid
  1401. ifdef PLATFORMSDKLIB
  1402. EXTRALIBS += $(PLATFORMSDKLIB)/WbemUuid.Lib
  1403. else
  1404. EXTRALIBS += WbemUuid.Lib
  1405. endif
  1406. endif
  1407. ifndef LDO
  1408. LDO=$(CC)
  1409. endif
  1410. ########################
  1411. include $(CLEAR_VARS)
  1412. LOCAL_MODULE := wpa_cli
  1413. LOCAL_MODULE_TAGS := debug
  1414. LOCAL_SHARED_LIBRARIES := libc libcutils liblog
  1415. LOCAL_CFLAGS := $(L_CFLAGS)
  1416. LOCAL_SRC_FILES := $(OBJS_c)
  1417. LOCAL_C_INCLUDES := $(INCLUDES)
  1418. include $(BUILD_EXECUTABLE)
  1419. ########################
  1420. include $(CLEAR_VARS)
  1421. LOCAL_MODULE := wpa_supplicant
  1422. ifdef CONFIG_DRIVER_CUSTOM
  1423. LOCAL_STATIC_LIBRARIES := libCustomWifi
  1424. endif
  1425. ifneq ($(BOARD_WPA_SUPPLICANT_PRIVATE_LIB),)
  1426. LOCAL_STATIC_LIBRARIES += $(BOARD_WPA_SUPPLICANT_PRIVATE_LIB)
  1427. endif
  1428. LOCAL_SHARED_LIBRARIES := libc libcutils liblog
  1429. ifdef CONFIG_EAP_PROXY
  1430. LOCAL_STATIC_LIBRARIES += $(LIB_STATIC_EAP_PROXY)
  1431. LOCAL_SHARED_LIBRARIES += $(LIB_SHARED_EAP_PROXY)
  1432. endif
  1433. ifeq ($(CONFIG_TLS), openssl)
  1434. LOCAL_SHARED_LIBRARIES += libcrypto libssl libkeystore_binder
  1435. endif
  1436. ifdef CONFIG_DRIVER_NL80211
  1437. ifneq ($(wildcard external/libnl),)
  1438. LOCAL_SHARED_LIBRARIES += libnl
  1439. else
  1440. LOCAL_STATIC_LIBRARIES += libnl_2
  1441. endif
  1442. endif
  1443. LOCAL_CFLAGS := $(L_CFLAGS)
  1444. LOCAL_SRC_FILES := $(OBJS)
  1445. LOCAL_C_INCLUDES := $(INCLUDES)
  1446. include $(BUILD_EXECUTABLE)
  1447. ########################
  1448. #
  1449. #include $(CLEAR_VARS)
  1450. #LOCAL_MODULE := eapol_test
  1451. #ifdef CONFIG_DRIVER_CUSTOM
  1452. #LOCAL_STATIC_LIBRARIES := libCustomWifi
  1453. #endif
  1454. #LOCAL_SHARED_LIBRARIES := libc libcrypto libssl
  1455. #LOCAL_CFLAGS := $(L_CFLAGS)
  1456. #LOCAL_SRC_FILES := $(OBJS_t)
  1457. #LOCAL_C_INCLUDES := $(INCLUDES)
  1458. #include $(BUILD_EXECUTABLE)
  1459. #
  1460. ########################
  1461. #
  1462. #local_target_dir := $(TARGET_OUT)/etc/wifi
  1463. #
  1464. #include $(CLEAR_VARS)
  1465. #LOCAL_MODULE := wpa_supplicant.conf
  1466. #LOCAL_MODULE_CLASS := ETC
  1467. #LOCAL_MODULE_PATH := $(local_target_dir)
  1468. #LOCAL_SRC_FILES := $(LOCAL_MODULE)
  1469. #include $(BUILD_PREBUILT)
  1470. #
  1471. ########################
  1472. include $(CLEAR_VARS)
  1473. LOCAL_MODULE = libwpa_client
  1474. LOCAL_CFLAGS = $(L_CFLAGS)
  1475. LOCAL_SRC_FILES = src/common/wpa_ctrl.c src/utils/os_$(CONFIG_OS).c
  1476. LOCAL_C_INCLUDES = $(INCLUDES)
  1477. LOCAL_SHARED_LIBRARIES := libcutils liblog
  1478. LOCAL_COPY_HEADERS_TO := libwpa_client
  1479. LOCAL_COPY_HEADERS := src/common/wpa_ctrl.h
  1480. LOCAL_COPY_HEADERS += src/common/qca-vendor.h
  1481. include $(BUILD_SHARED_LIBRARY)