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. 24 "-DOS=\"Android\"", 25 "-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 33 cc_library { 34 name: "libcurl", 35 vendor_available: true, 36 vndk: { 37 enabled: true, 38 }, 39 defaults: ["curl_common_defaults"], 40 export_include_dirs: ["include"], 41 host_supported: true, 42 cflags: [ 43 "-DBUILDING_LIBCURL", 44 ], 45 srcs:[ 46 "lib/rand.c", 47 "lib/file.c", 48 "lib/timeval.c", 49 "lib/base64.c", 50 "lib/hostip.c", 51 "lib/progress.c", 52 "lib/formdata.c", 53 "lib/cookie.c", 54 "lib/http.c", 55 "lib/sendf.c", 56 "lib/ftp.c", 57 "lib/url.c", 58 "lib/dict.c", 59 "lib/if2ip.c", 60 "lib/speedcheck.c", 61 "lib/ldap.c", 62 "lib/version.c", 63 "lib/getenv.c", 64 "lib/escape.c", 65 "lib/mprintf.c", 66 "lib/telnet.c", 67 "lib/netrc.c", 68 "lib/getinfo.c", 69 "lib/transfer.c", 70 "lib/easy.c", 71 "lib/security.c", 72 "lib/curl_fnmatch.c", 73 "lib/fileinfo.c", 74 "lib/ftplistparser.c", 75 "lib/wildcard.c", 76 "lib/krb5.c", 77 "lib/memdebug.c", 78 "lib/http_chunks.c", 79 "lib/strtok.c", 80 "lib/connect.c", 81 "lib/llist.c", 82 "lib/hash.c", 83 "lib/multi.c", 84 "lib/content_encoding.c", 85 "lib/share.c", 86 "lib/http_digest.c", 87 "lib/md4.c", 88 "lib/md5.c", 89 "lib/http_negotiate.c", 90 "lib/inet_pton.c", 91 "lib/strtoofft.c", 92 "lib/strerror.c", 93 "lib/amigaos.c", 94 "lib/hostasyn.c", 95 "lib/hostip4.c", 96 "lib/hostip6.c", 97 "lib/hostsyn.c", 98 "lib/inet_ntop.c", 99 "lib/parsedate.c", 100 "lib/select.c", 101 "lib/tftp.c", 102 "lib/splay.c", 103 "lib/strcase.c", 104 "lib/strdup.c", 105 "lib/socks.c", 106 "lib/ssh.c", 107 "lib/curl_addrinfo.c", 108 "lib/socks_gssapi.c", 109 "lib/socks_sspi.c", 110 "lib/curl_sspi.c", 111 "lib/slist.c", 112 "lib/nonblock.c", 113 "lib/curl_memrchr.c", 114 "lib/imap.c", 115 "lib/pop3.c", 116 "lib/smtp.c", 117 "lib/pingpong.c", 118 "lib/rtsp.c", 119 "lib/curl_threads.c", 120 "lib/warnless.c", 121 "lib/hmac.c", 122 "lib/curl_rtmp.c", 123 "lib/openldap.c", 124 "lib/curl_gethostname.c", 125 "lib/gopher.c", 126 "lib/idn_win32.c", 127 "lib/http_proxy.c", 128 "lib/non-ascii.c", 129 "lib/asyn-ares.c", 130 "lib/asyn-thread.c", 131 "lib/curl_gssapi.c", 132 "lib/http_ntlm.c", 133 "lib/curl_ntlm_wb.c", 134 "lib/curl_ntlm_core.c", 135 "lib/curl_sasl.c", 136 "lib/curl_multibyte.c", 137 "lib/hostcheck.c", 138 "lib/conncache.c", 139 "lib/pipeline.c", 140 "lib/dotdot.c", 141 "lib/x509asn1.c", 142 "lib/http2.c", 143 "lib/smb.c", 144 "lib/curl_endian.c", 145 "lib/curl_des.c", 146 "lib/system_win32.c", 147 "lib/vauth/vauth.c", 148 "lib/vauth/cleartext.c", 149 "lib/vauth/cram.c", 150 "lib/vauth/digest.c", 151 "lib/vauth/digest_sspi.c", 152 "lib/vauth/krb5_gssapi.c", 153 "lib/vauth/krb5_sspi.c", 154 "lib/vauth/ntlm.c", 155 "lib/vauth/ntlm_sspi.c", 156 "lib/vauth/oauth2.c", 157 "lib/vauth/spnego_gssapi.c", 158 "lib/vauth/spnego_sspi.c", 159 "lib/vtls/openssl.c", 160 "lib/vtls/gtls.c", 161 "lib/vtls/vtls.c", 162 "lib/vtls/nss.c", 163 "lib/vtls/polarssl.c", 164 "lib/vtls/polarssl_threadlock.c", 165 "lib/vtls/axtls.c", 166 "lib/vtls/cyassl.c", 167 "lib/vtls/schannel.c", 168 "lib/vtls/darwinssl.c", 169 "lib/vtls/gskit.c", 170 "lib/vtls/mbedtls.c", 171 ], 172 shared: { 173 shared_libs: [ 174 "libcrypto", 175 "libssl", 176 ], 177 }, 178 static: { 179 static_libs: [ 180 "libcrypto", 181 "libssl", 182 "libz", 183 ], 184 }, 185 target: { 186 host: { 187 cflags: ["-D_GNU_SOURCE=1"], 188 shared: { 189 shared_libs: [ 190 "libz-host", 191 ], 192 }, 193 }, 194 linux: { 195 host_ldlibs: ["-lrt"], 196 }, 197 android: { 198 shared: { 199 shared_libs: [ 200 "libz", 201 ], 202 }, 203 }, 204 }, 205 unique_host_soname: true, 206 } 207 208 cc_binary { 209 name: "curl", 210 defaults: ["curl_common_defaults"], 211 srcs: [ 212 "src/slist_wc.c", 213 "src/tool_binmode.c", 214 "src/tool_bname.c", 215 "src/tool_cb_dbg.c", 216 "src/tool_cb_hdr.c", 217 "src/tool_cb_prg.c", 218 "src/tool_cb_rea.c", 219 "src/tool_cb_see.c", 220 "src/tool_cb_wrt.c", 221 "src/tool_cfgable.c", 222 "src/tool_convert.c", 223 "src/tool_dirhie.c", 224 "src/tool_doswin.c", 225 "src/tool_easysrc.c", 226 "src/tool_formparse.c", 227 "src/tool_getparam.c", 228 "src/tool_getpass.c", 229 "src/tool_help.c", 230 "src/tool_helpers.c", 231 "src/tool_homedir.c", 232 "src/tool_hugehelp.c", 233 "src/tool_libinfo.c", 234 "src/tool_main.c", 235 "src/tool_metalink.c", 236 "src/tool_mfiles.c", 237 "src/tool_msgs.c", 238 "src/tool_operate.c", 239 "src/tool_operhlp.c", 240 "src/tool_panykey.c", 241 "src/tool_paramhlp.c", 242 "src/tool_parsecfg.c", 243 "src/tool_strdup.c", 244 "src/tool_setopt.c", 245 "src/tool_sleep.c", 246 "src/tool_urlglob.c", 247 "src/tool_util.c", 248 "src/tool_vms.c", 249 "src/tool_writeenv.c", 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 } 260