1// Copyright (C) 2015 The Android Open Source Project 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15package { 16 default_applicable_licenses: ["external_libevent_license"], 17} 18 19// Added automatically by a large-scale-change that took the approach of 20// 'apply every license found to every target'. While this makes sure we respect 21// every license restriction, it may not be entirely correct. 22// 23// e.g. GPL in an MIT project might only apply to the contrib/ directory. 24// 25// Please consider splitting the single license below into multiple licenses, 26// taking care not to lose any license_kind information, and overriding the 27// default license using the 'licenses: [...]' property on targets as needed. 28// 29// For unused files, consider creating a 'fileGroup' with "//visibility:private" 30// to attach the license to, and including a comment whether the files may be 31// used in the current project. 32// See: http://go/android-license-faq 33license { 34 name: "external_libevent_license", 35 visibility: [":__subpackages__"], 36 license_kinds: [ 37 "SPDX-license-identifier-BSD", 38 "SPDX-license-identifier-BSL-1.0", 39 "SPDX-license-identifier-ISC", 40 "SPDX-license-identifier-MIT", 41 "legacy_notice", 42 "legacy_unencumbered", 43 ], 44 license_text: [ 45 "LICENSE", 46 ], 47} 48 49cc_library { 50 name: "libevent", 51 host_supported: true, 52 ramdisk_available: true, 53 recovery_available: true, 54 vendor_available: true, 55 product_available: true, 56 unique_host_soname: true, 57 58 arch: { 59 arm: { 60 instruction_set: "arm", 61 }, 62 }, 63 cflags: [ 64 "-D_BSD_SOURCE", 65 "-O3", 66 "-Wno-strict-aliasing", 67 "-Wno-unused-parameter", 68 "-Wno-tautological-compare", 69 "-Werror", 70 ], 71 export_include_dirs: ["include"], 72 73 local_include_dirs: ["compat"], 74 75 srcs: [ 76 // core 77 "buffer.c", 78 "bufferevent.c", 79 "bufferevent_filter.c", 80 "bufferevent_pair.c", 81 "bufferevent_ratelim.c", 82 "bufferevent_sock.c", 83 "event.c", 84 "evmap.c", 85 "evthread.c", 86 "evthread_pthread.c", 87 "evutil.c", 88 "evutil_rand.c", 89 "evutil_time.c", 90 "listener.c", 91 "log.c", 92 "signal.c", 93 "strlcpy.c", 94 95 // extra 96 "evdns.c", 97 "event_tagging.c", 98 "evrpc.c", 99 "http.c", 100 101 "poll.c", 102 "select.c", 103 ], 104 105 target: { 106 linux: { 107 srcs: ["epoll.c"], 108 cflags: ["-D_GNU_SOURCE=1"], 109 }, 110 linux_bionic: { 111 enabled: true, 112 }, 113 darwin: { 114 srcs: ["kqueue.c"], 115 }, 116 }, 117 min_sdk_version: "30", 118 apex_available: [ 119 "//apex_available:platform", 120 "com.android.bt", 121 "com.android.nfcservices", 122 ], 123} 124