Android.mk 34 KB

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