Android.mk 34 KB

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