Android.mk 36 KB

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