Android.mk 35 KB

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