Android.mk 34 KB

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