Android.mk 35 KB

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