Android.mk 33 KB

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