Android.mk 35 KB

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