blob: 8f6dd47d9f4f99baf547509d40fe9d02eb021fe9 [file] [log] [blame]
Alex Vakulenkodcd0d942016-08-24 17:00:21 -07001cc_defaults {
2 name: "curl_common_defaults",
3 cflags: [
4 "-Wpointer-arith",
5 "-Wwrite-strings",
6 "-Wunused",
7 "-Winline",
8 "-Wnested-externs",
9 "-Wmissing-declarations",
10 "-Wmissing-prototypes",
11 "-Wno-long-long",
12 "-Wfloat-equal",
13 "-Wno-multichar",
14 "-Wno-sign-compare",
15 "-Wno-format-nonliteral",
16 "-Wendif-labels",
17 "-Wstrict-prototypes",
18 "-Wdeclaration-after-statement",
19 "-Wno-system-headers",
20 "-DHAVE_CONFIG_H",
21 // TODO(avakulenko): Android.mk had this for OS version string:
22 // "Android $(PLATFORM_VERSION) $(TARGET_ARCH_VARIANT)"
23 // but Soong doesn't have access to those config variables yet.
Colin Crossf3b5f0e2016-09-29 14:08:34 -070024 "-DOS=\"Android\"",
Alex Vakulenkodcd0d942016-08-24 17:00:21 -070025 "-Werror",
26 // Bug: http://b/29823425 Disable -Wvarargs for Clang update to r271374
27 "-Wno-varargs",
28 ],
29 clang: true,
30 local_include_dirs: ["include", "lib"],
31}
32
33cc_library {
34 name: "libcurl",
35 defaults: ["curl_common_defaults"],
36 export_include_dirs: ["include"],
37 host_supported: true,
Alex Deymo14b354c2016-10-18 14:39:33 -070038 cflags: [
39 "-DBUILDING_LIBCURL",
40 ],
Alex Vakulenkodcd0d942016-08-24 17:00:21 -070041 srcs:[
42 "lib/file.c",
43 "lib/timeval.c",
44 "lib/base64.c",
45 "lib/hostip.c",
46 "lib/progress.c",
47 "lib/formdata.c",
48 "lib/cookie.c",
49 "lib/http.c",
50 "lib/sendf.c",
51 "lib/ftp.c",
52 "lib/url.c",
53 "lib/dict.c",
54 "lib/if2ip.c",
55 "lib/speedcheck.c",
56 "lib/ldap.c",
57 "lib/version.c",
58 "lib/getenv.c",
59 "lib/escape.c",
60 "lib/mprintf.c",
61 "lib/telnet.c",
62 "lib/netrc.c",
63 "lib/getinfo.c",
64 "lib/transfer.c",
65 "lib/strequal.c",
66 "lib/easy.c",
67 "lib/security.c",
68 "lib/curl_fnmatch.c",
69 "lib/fileinfo.c",
70 "lib/ftplistparser.c",
71 "lib/wildcard.c",
72 "lib/krb5.c",
73 "lib/memdebug.c",
74 "lib/http_chunks.c",
75 "lib/strtok.c",
76 "lib/connect.c",
77 "lib/llist.c",
78 "lib/hash.c",
79 "lib/multi.c",
80 "lib/content_encoding.c",
81 "lib/share.c",
82 "lib/http_digest.c",
83 "lib/md4.c",
84 "lib/md5.c",
85 "lib/http_negotiate.c",
86 "lib/inet_pton.c",
87 "lib/strtoofft.c",
88 "lib/strerror.c",
89 "lib/amigaos.c",
90 "lib/hostasyn.c",
91 "lib/hostip4.c",
92 "lib/hostip6.c",
93 "lib/hostsyn.c",
94 "lib/inet_ntop.c",
95 "lib/parsedate.c",
96 "lib/select.c",
97 "lib/tftp.c",
98 "lib/splay.c",
99 "lib/strdup.c",
100 "lib/socks.c",
101 "lib/ssh.c",
102 "lib/rawstr.c",
103 "lib/curl_addrinfo.c",
104 "lib/socks_gssapi.c",
105 "lib/socks_sspi.c",
106 "lib/curl_sspi.c",
107 "lib/slist.c",
108 "lib/nonblock.c",
109 "lib/curl_memrchr.c",
110 "lib/imap.c",
111 "lib/pop3.c",
112 "lib/smtp.c",
113 "lib/pingpong.c",
114 "lib/rtsp.c",
115 "lib/curl_threads.c",
116 "lib/warnless.c",
117 "lib/hmac.c",
118 "lib/curl_rtmp.c",
119 "lib/openldap.c",
120 "lib/curl_gethostname.c",
121 "lib/gopher.c",
122 "lib/idn_win32.c",
123 "lib/http_proxy.c",
124 "lib/non-ascii.c",
125 "lib/asyn-ares.c",
126 "lib/asyn-thread.c",
127 "lib/curl_gssapi.c",
128 "lib/http_ntlm.c",
129 "lib/curl_ntlm_wb.c",
130 "lib/curl_ntlm_core.c",
131 "lib/curl_sasl.c",
132 "lib/curl_multibyte.c",
133 "lib/hostcheck.c",
134 "lib/conncache.c",
135 "lib/pipeline.c",
136 "lib/dotdot.c",
137 "lib/x509asn1.c",
138 "lib/http2.c",
139 "lib/smb.c",
140 "lib/curl_endian.c",
141 "lib/curl_des.c",
142 "lib/system_win32.c",
143 "lib/vauth/vauth.c",
144 "lib/vauth/cleartext.c",
145 "lib/vauth/cram.c",
146 "lib/vauth/digest.c",
147 "lib/vauth/digest_sspi.c",
148 "lib/vauth/krb5_gssapi.c",
149 "lib/vauth/krb5_sspi.c",
150 "lib/vauth/ntlm.c",
151 "lib/vauth/ntlm_sspi.c",
152 "lib/vauth/oauth2.c",
153 "lib/vauth/spnego_gssapi.c",
154 "lib/vauth/spnego_sspi.c",
155 "lib/vtls/openssl.c",
156 "lib/vtls/gtls.c",
157 "lib/vtls/vtls.c",
158 "lib/vtls/nss.c",
159 "lib/vtls/polarssl.c",
160 "lib/vtls/polarssl_threadlock.c",
161 "lib/vtls/axtls.c",
162 "lib/vtls/cyassl.c",
163 "lib/vtls/schannel.c",
164 "lib/vtls/darwinssl.c",
165 "lib/vtls/gskit.c",
166 "lib/vtls/mbedtls.c",
167 ],
168 shared: {
169 shared_libs: [
170 "libcrypto",
171 "libssl",
172 ],
173 },
174 static: {
175 static_libs: [
176 "libcrypto",
177 "libssl",
178 "libz",
179 ],
180 },
181 target: {
182 host: {
183 cflags: ["-D_GNU_SOURCE=1"],
184 shared: {
185 shared_libs: [
186 "libz-host",
187 ],
188 },
189 },
190 android: {
191 shared: {
192 shared_libs: [
193 "libz",
194 ],
195 },
196 },
197 },
198 unique_host_soname: true,
199}
200
201cc_binary {
202 name: "curl",
203 defaults: ["curl_common_defaults"],
204 srcs: [
205 "src/slist_wc.c",
206 "src/tool_binmode.c",
207 "src/tool_bname.c",
208 "src/tool_cb_dbg.c",
209 "src/tool_cb_hdr.c",
210 "src/tool_cb_prg.c",
211 "src/tool_cb_rea.c",
212 "src/tool_cb_see.c",
213 "src/tool_cb_wrt.c",
214 "src/tool_cfgable.c",
215 "src/tool_convert.c",
216 "src/tool_dirhie.c",
217 "src/tool_doswin.c",
218 "src/tool_easysrc.c",
219 "src/tool_formparse.c",
220 "src/tool_getparam.c",
221 "src/tool_getpass.c",
222 "src/tool_help.c",
223 "src/tool_helpers.c",
224 "src/tool_homedir.c",
225 "src/tool_hugehelp.c",
226 "src/tool_libinfo.c",
227 "src/tool_main.c",
228 "src/tool_metalink.c",
229 "src/tool_mfiles.c",
230 "src/tool_msgs.c",
231 "src/tool_operate.c",
232 "src/tool_operhlp.c",
233 "src/tool_panykey.c",
234 "src/tool_paramhlp.c",
235 "src/tool_parsecfg.c",
236 "src/tool_strdup.c",
237 "src/tool_setopt.c",
238 "src/tool_sleep.c",
239 "src/tool_urlglob.c",
240 "src/tool_util.c",
241 "src/tool_vms.c",
242 "src/tool_writeenv.c",
243 "src/tool_writeout.c",
244 "src/tool_xattr.c",
245 ],
246 shared_libs: [
247 "libcrypto",
248 "libssl",
249 "libz",
250 ],
251 static_libs: ["libcurl"],
252}