1package { 2 default_applicable_licenses: ["external_curl_license"], 3} 4 5// Added automatically by a large-scale-change that took the approach of 6// 'apply every license found to every target'. While this makes sure we respect 7// every license restriction, it may not be entirely correct. 8// 9// e.g. GPL in an MIT project might only apply to the contrib/ directory. 10// 11// Please consider splitting the single license below into multiple licenses, 12// taking care not to lose any license_kind information, and overriding the 13// default license using the 'licenses: [...]' property on targets as needed. 14// 15// For unused files, consider creating a 'fileGroup' with "//visibility:private" 16// to attach the license to, and including a comment whether the files may be 17// used in the current project. 18// 19// large-scale-change filtered out the below license kinds as false-positives: 20// SPDX-license-identifier-GPL 21// See: http://go/android-license-faq 22license { 23 name: "external_curl_license", 24 visibility: [":__subpackages__"], 25 license_kinds: [ 26 "SPDX-license-identifier-BSD", 27 "SPDX-license-identifier-ISC", 28 "SPDX-license-identifier-MIT", 29 "SPDX-license-identifier-OpenSSL", 30 "legacy_notice", 31 "legacy_unencumbered", 32 ], 33 license_text: [ 34 "COPYING", 35 ], 36} 37 38cc_defaults { 39 name: "curl_common_defaults", 40 cflags: [ 41 "-Wpointer-arith", 42 "-Wwrite-strings", 43 "-Wunused", 44 "-Winline", 45 "-Wnested-externs", 46 "-Wmissing-declarations", 47 "-Wmissing-prototypes", 48 "-Wno-long-long", 49 "-Wfloat-equal", 50 "-Wno-multichar", 51 "-Wno-sign-compare", 52 "-Wno-format-nonliteral", 53 "-Wendif-labels", 54 "-Wstrict-prototypes", 55 "-Wdeclaration-after-statement", 56 "-Wno-system-headers", 57 "-DHAVE_CONFIG_H", 58 // TODO(avakulenko): Android.mk had this for OS version string: 59 // "Android $(PLATFORM_VERSION) $(TARGET_ARCH_VARIANT)" 60 // but Soong doesn't have access to those config variables yet. 61 "-DOS=\"Android\"", 62 "-Werror", 63 // Bug: http://b/29823425 Disable -Wvarargs for Clang update to r271374 64 "-Wno-varargs", 65 ], 66 local_include_dirs: ["include", "lib"], 67 multilib: { 68 lib32: { 69 cflags: [ 70 "-DSIZEOF_LONG=4", 71 "-DSIZEOF_LONG_LONG=8", 72 "-DSIZEOF_SIZE_T=4", 73 "-DSIZEOF_TIME_T=4", 74 ], 75 }, 76 lib64: { 77 cflags: [ 78 "-DSIZEOF_LONG=8", 79 "-DSIZEOF_LONG_LONG=8", 80 "-DSIZEOF_SIZE_T=8", 81 "-DSIZEOF_TIME_T=8", 82 ], 83 }, 84 }, 85} 86 87cc_library { 88 name: "libcurl", 89 vendor_available: true, 90 product_available: true, 91 vndk: { 92 enabled: true, 93 }, 94 defaults: ["curl_common_defaults"], 95 export_include_dirs: ["include"], 96 host_supported: true, 97 cflags: [ 98 "-DBUILDING_LIBCURL", 99 ], 100 srcs:[ 101 "lib/**/*.c", 102 ], 103 shared_libs: [ 104 "libcrypto", 105 "libssl", 106 "libz", 107 ], 108 target: { 109 host: { 110 cflags: ["-D_GNU_SOURCE=1"], 111 }, 112 darwin: { 113 enabled: false, 114 }, 115 }, 116 unique_host_soname: true, 117} 118 119cc_binary { 120 name: "curl", 121 defaults: ["curl_common_defaults"], 122 srcs: [ 123 "src/*.c", 124 "lib/dynbuf.c", 125 ], 126 shared_libs: [ 127 "libcrypto", 128 "libssl", 129 "libz", 130 ], 131 static_libs: ["libcurl"], 132} 133