Alex Vakulenko | dcd0d94 | 2016-08-24 17:00:21 -0700 | [diff] [blame] | 1 | cc_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 Cross | f3b5f0e | 2016-09-29 14:08:34 -0700 | [diff] [blame] | 24 | "-DOS=\"Android\"", |
Alex Vakulenko | dcd0d94 | 2016-08-24 17:00:21 -0700 | [diff] [blame] | 25 | "-Werror", |
| 26 | // Bug: http://b/29823425 Disable -Wvarargs for Clang update to r271374 |
| 27 | "-Wno-varargs", |
| 28 | ], |
Alex Vakulenko | dcd0d94 | 2016-08-24 17:00:21 -0700 | [diff] [blame] | 29 | local_include_dirs: ["include", "lib"], |
Elliott Hughes | 82be86d | 2017-09-20 17:00:17 -0700 | [diff] [blame] | 30 | multilib: { |
| 31 | lib32: { |
| 32 | cflags: [ |
| 33 | "-DSIZEOF_LONG=4", |
| 34 | "-DSIZEOF_LONG_LONG=8", |
| 35 | "-DSIZEOF_SIZE_T=4", |
| 36 | "-DSIZEOF_TIME_T=4", |
Elliott Hughes | 82be86d | 2017-09-20 17:00:17 -0700 | [diff] [blame] | 37 | ], |
| 38 | }, |
| 39 | lib64: { |
| 40 | cflags: [ |
| 41 | "-DSIZEOF_LONG=8", |
| 42 | "-DSIZEOF_LONG_LONG=8", |
| 43 | "-DSIZEOF_SIZE_T=8", |
| 44 | "-DSIZEOF_TIME_T=8", |
Elliott Hughes | 82be86d | 2017-09-20 17:00:17 -0700 | [diff] [blame] | 45 | ], |
| 46 | }, |
| 47 | }, |
Alex Vakulenko | dcd0d94 | 2016-08-24 17:00:21 -0700 | [diff] [blame] | 48 | } |
| 49 | |
| 50 | cc_library { |
| 51 | name: "libcurl", |
Isaac Chen | 6dee854 | 2017-04-10 14:38:59 +0800 | [diff] [blame] | 52 | vendor_available: true, |
Justin Yun | fe7c5be | 2017-07-24 15:19:43 +0900 | [diff] [blame] | 53 | vndk: { |
| 54 | enabled: true, |
| 55 | }, |
Alex Vakulenko | dcd0d94 | 2016-08-24 17:00:21 -0700 | [diff] [blame] | 56 | defaults: ["curl_common_defaults"], |
| 57 | export_include_dirs: ["include"], |
| 58 | host_supported: true, |
Alex Deymo | 14b354c | 2016-10-18 14:39:33 -0700 | [diff] [blame] | 59 | cflags: [ |
| 60 | "-DBUILDING_LIBCURL", |
| 61 | ], |
Alex Vakulenko | dcd0d94 | 2016-08-24 17:00:21 -0700 | [diff] [blame] | 62 | srcs:[ |
Elliott Hughes | cac3980 | 2018-04-27 16:19:43 -0700 | [diff] [blame] | 63 | "lib/curl_ctype.c", |
| 64 | "lib/curl_range.c", |
Elliott Hughes | cee0338 | 2017-06-23 12:17:18 -0700 | [diff] [blame] | 65 | "lib/rand.c", |
Alex Vakulenko | dcd0d94 | 2016-08-24 17:00:21 -0700 | [diff] [blame] | 66 | "lib/file.c", |
| 67 | "lib/timeval.c", |
| 68 | "lib/base64.c", |
| 69 | "lib/hostip.c", |
| 70 | "lib/progress.c", |
| 71 | "lib/formdata.c", |
| 72 | "lib/cookie.c", |
| 73 | "lib/http.c", |
| 74 | "lib/sendf.c", |
| 75 | "lib/ftp.c", |
| 76 | "lib/url.c", |
| 77 | "lib/dict.c", |
| 78 | "lib/if2ip.c", |
| 79 | "lib/speedcheck.c", |
| 80 | "lib/ldap.c", |
| 81 | "lib/version.c", |
| 82 | "lib/getenv.c", |
| 83 | "lib/escape.c", |
| 84 | "lib/mprintf.c", |
| 85 | "lib/telnet.c", |
| 86 | "lib/netrc.c", |
| 87 | "lib/getinfo.c", |
| 88 | "lib/transfer.c", |
Alex Vakulenko | dcd0d94 | 2016-08-24 17:00:21 -0700 | [diff] [blame] | 89 | "lib/easy.c", |
| 90 | "lib/security.c", |
| 91 | "lib/curl_fnmatch.c", |
| 92 | "lib/fileinfo.c", |
| 93 | "lib/ftplistparser.c", |
| 94 | "lib/wildcard.c", |
| 95 | "lib/krb5.c", |
| 96 | "lib/memdebug.c", |
| 97 | "lib/http_chunks.c", |
| 98 | "lib/strtok.c", |
| 99 | "lib/connect.c", |
| 100 | "lib/llist.c", |
| 101 | "lib/hash.c", |
| 102 | "lib/multi.c", |
| 103 | "lib/content_encoding.c", |
| 104 | "lib/share.c", |
| 105 | "lib/http_digest.c", |
| 106 | "lib/md4.c", |
| 107 | "lib/md5.c", |
| 108 | "lib/http_negotiate.c", |
| 109 | "lib/inet_pton.c", |
| 110 | "lib/strtoofft.c", |
| 111 | "lib/strerror.c", |
| 112 | "lib/amigaos.c", |
| 113 | "lib/hostasyn.c", |
| 114 | "lib/hostip4.c", |
| 115 | "lib/hostip6.c", |
| 116 | "lib/hostsyn.c", |
| 117 | "lib/inet_ntop.c", |
| 118 | "lib/parsedate.c", |
| 119 | "lib/select.c", |
| 120 | "lib/tftp.c", |
| 121 | "lib/splay.c", |
Elliott Hughes | cee0338 | 2017-06-23 12:17:18 -0700 | [diff] [blame] | 122 | "lib/strcase.c", |
Alex Vakulenko | dcd0d94 | 2016-08-24 17:00:21 -0700 | [diff] [blame] | 123 | "lib/strdup.c", |
| 124 | "lib/socks.c", |
| 125 | "lib/ssh.c", |
Alex Vakulenko | dcd0d94 | 2016-08-24 17:00:21 -0700 | [diff] [blame] | 126 | "lib/curl_addrinfo.c", |
| 127 | "lib/socks_gssapi.c", |
| 128 | "lib/socks_sspi.c", |
| 129 | "lib/curl_sspi.c", |
| 130 | "lib/slist.c", |
| 131 | "lib/nonblock.c", |
| 132 | "lib/curl_memrchr.c", |
| 133 | "lib/imap.c", |
| 134 | "lib/pop3.c", |
| 135 | "lib/smtp.c", |
| 136 | "lib/pingpong.c", |
| 137 | "lib/rtsp.c", |
| 138 | "lib/curl_threads.c", |
| 139 | "lib/warnless.c", |
| 140 | "lib/hmac.c", |
| 141 | "lib/curl_rtmp.c", |
| 142 | "lib/openldap.c", |
| 143 | "lib/curl_gethostname.c", |
| 144 | "lib/gopher.c", |
| 145 | "lib/idn_win32.c", |
| 146 | "lib/http_proxy.c", |
| 147 | "lib/non-ascii.c", |
| 148 | "lib/asyn-ares.c", |
| 149 | "lib/asyn-thread.c", |
| 150 | "lib/curl_gssapi.c", |
| 151 | "lib/http_ntlm.c", |
| 152 | "lib/curl_ntlm_wb.c", |
| 153 | "lib/curl_ntlm_core.c", |
| 154 | "lib/curl_sasl.c", |
| 155 | "lib/curl_multibyte.c", |
| 156 | "lib/hostcheck.c", |
| 157 | "lib/conncache.c", |
| 158 | "lib/pipeline.c", |
| 159 | "lib/dotdot.c", |
| 160 | "lib/x509asn1.c", |
| 161 | "lib/http2.c", |
| 162 | "lib/smb.c", |
| 163 | "lib/curl_endian.c", |
| 164 | "lib/curl_des.c", |
| 165 | "lib/system_win32.c", |
Alex Deymo | 486467e | 2017-12-19 19:04:07 +0100 | [diff] [blame] | 166 | "lib/mime.c", |
| 167 | "lib/sha256.c", |
| 168 | "lib/setopt.c", |
Alex Vakulenko | dcd0d94 | 2016-08-24 17:00:21 -0700 | [diff] [blame] | 169 | "lib/vauth/vauth.c", |
| 170 | "lib/vauth/cleartext.c", |
| 171 | "lib/vauth/cram.c", |
| 172 | "lib/vauth/digest.c", |
| 173 | "lib/vauth/digest_sspi.c", |
| 174 | "lib/vauth/krb5_gssapi.c", |
| 175 | "lib/vauth/krb5_sspi.c", |
| 176 | "lib/vauth/ntlm.c", |
| 177 | "lib/vauth/ntlm_sspi.c", |
| 178 | "lib/vauth/oauth2.c", |
| 179 | "lib/vauth/spnego_gssapi.c", |
| 180 | "lib/vauth/spnego_sspi.c", |
| 181 | "lib/vtls/openssl.c", |
| 182 | "lib/vtls/gtls.c", |
| 183 | "lib/vtls/vtls.c", |
| 184 | "lib/vtls/nss.c", |
| 185 | "lib/vtls/polarssl.c", |
| 186 | "lib/vtls/polarssl_threadlock.c", |
| 187 | "lib/vtls/axtls.c", |
| 188 | "lib/vtls/cyassl.c", |
| 189 | "lib/vtls/schannel.c", |
Alex Vakulenko | dcd0d94 | 2016-08-24 17:00:21 -0700 | [diff] [blame] | 190 | "lib/vtls/gskit.c", |
| 191 | "lib/vtls/mbedtls.c", |
| 192 | ], |
Dan Willemsen | 9de5a54 | 2017-09-27 16:08:53 -0700 | [diff] [blame] | 193 | shared_libs: [ |
| 194 | "libcrypto", |
| 195 | "libssl", |
| 196 | "libz", |
| 197 | ], |
Alex Vakulenko | dcd0d94 | 2016-08-24 17:00:21 -0700 | [diff] [blame] | 198 | target: { |
| 199 | host: { |
| 200 | cflags: ["-D_GNU_SOURCE=1"], |
Alex Vakulenko | dcd0d94 | 2016-08-24 17:00:21 -0700 | [diff] [blame] | 201 | }, |
Elliott Hughes | c4e9612 | 2018-02-26 18:09:24 -0800 | [diff] [blame] | 202 | darwin: { |
| 203 | enabled: false, |
| 204 | }, |
Alex Vakulenko | dcd0d94 | 2016-08-24 17:00:21 -0700 | [diff] [blame] | 205 | }, |
| 206 | unique_host_soname: true, |
| 207 | } |
| 208 | |
| 209 | cc_binary { |
| 210 | name: "curl", |
| 211 | defaults: ["curl_common_defaults"], |
| 212 | srcs: [ |
| 213 | "src/slist_wc.c", |
| 214 | "src/tool_binmode.c", |
| 215 | "src/tool_bname.c", |
| 216 | "src/tool_cb_dbg.c", |
| 217 | "src/tool_cb_hdr.c", |
| 218 | "src/tool_cb_prg.c", |
| 219 | "src/tool_cb_rea.c", |
| 220 | "src/tool_cb_see.c", |
| 221 | "src/tool_cb_wrt.c", |
| 222 | "src/tool_cfgable.c", |
| 223 | "src/tool_convert.c", |
| 224 | "src/tool_dirhie.c", |
| 225 | "src/tool_doswin.c", |
| 226 | "src/tool_easysrc.c", |
| 227 | "src/tool_formparse.c", |
Elliott Hughes | cac3980 | 2018-04-27 16:19:43 -0700 | [diff] [blame] | 228 | "src/tool_filetime.c", |
Alex Vakulenko | dcd0d94 | 2016-08-24 17:00:21 -0700 | [diff] [blame] | 229 | "src/tool_getparam.c", |
| 230 | "src/tool_getpass.c", |
| 231 | "src/tool_help.c", |
| 232 | "src/tool_helpers.c", |
| 233 | "src/tool_homedir.c", |
| 234 | "src/tool_hugehelp.c", |
| 235 | "src/tool_libinfo.c", |
| 236 | "src/tool_main.c", |
| 237 | "src/tool_metalink.c", |
Alex Vakulenko | dcd0d94 | 2016-08-24 17:00:21 -0700 | [diff] [blame] | 238 | "src/tool_msgs.c", |
| 239 | "src/tool_operate.c", |
| 240 | "src/tool_operhlp.c", |
| 241 | "src/tool_panykey.c", |
| 242 | "src/tool_paramhlp.c", |
| 243 | "src/tool_parsecfg.c", |
| 244 | "src/tool_strdup.c", |
| 245 | "src/tool_setopt.c", |
| 246 | "src/tool_sleep.c", |
| 247 | "src/tool_urlglob.c", |
| 248 | "src/tool_util.c", |
| 249 | "src/tool_vms.c", |
Alex Vakulenko | dcd0d94 | 2016-08-24 17:00:21 -0700 | [diff] [blame] | 250 | "src/tool_writeout.c", |
| 251 | "src/tool_xattr.c", |
| 252 | ], |
| 253 | shared_libs: [ |
| 254 | "libcrypto", |
| 255 | "libssl", |
| 256 | "libz", |
| 257 | ], |
| 258 | static_libs: ["libcurl"], |
| 259 | } |