Android.mk 34 KB

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