1cc_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 local_include_dirs: ["include", "lib"], 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", 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", 45 ], 46 }, 47 }, 48} 49 50cc_library { 51 name: "libcurl", 52 vendor_available: true, 53 vndk: { 54 enabled: true, 55 }, 56 defaults: ["curl_common_defaults"], 57 export_include_dirs: ["include"], 58 host_supported: true, 59 cflags: [ 60 "-DBUILDING_LIBCURL", 61 ], 62 srcs:[ 63 "lib/**/*.c", 64 ], 65 shared_libs: [ 66 "libcrypto", 67 "libssl", 68 "libz", 69 ], 70 target: { 71 host: { 72 cflags: ["-D_GNU_SOURCE=1"], 73 }, 74 darwin: { 75 enabled: false, 76 }, 77 }, 78 unique_host_soname: true, 79} 80 81cc_binary { 82 name: "curl", 83 defaults: ["curl_common_defaults"], 84 srcs: [ 85 "src/*.c", 86 ], 87 shared_libs: [ 88 "libcrypto", 89 "libssl", 90 "libz", 91 ], 92 static_libs: ["libcurl"], 93} 94