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 recovery_available: true, 53 vendor_available: true, 54 product_available: true, 55 vndk: { 56 enabled: true, 57 }, 58 unique_host_soname: true, 59 60 arch: { 61 arm: { 62 instruction_set: "arm", 63 }, 64 }, 65 cflags: [ 66 "-D_BSD_SOURCE", 67 "-O3", 68 "-Wno-implicit-function-declaration", 69 "-Wno-strict-aliasing", 70 "-Wno-unused-parameter", 71 "-Werror", 72 ], 73 export_include_dirs: ["include"], 74 75 local_include_dirs: ["compat"], 76 77 srcs: [ 78 // core 79 "buffer.c", 80 "bufferevent.c", 81 "bufferevent_filter.c", 82 "bufferevent_pair.c", 83 "bufferevent_ratelim.c", 84 "bufferevent_sock.c", 85 "event.c", 86 "evmap.c", 87 "evthread.c", 88 "evthread_pthread.c", 89 "evutil.c", 90 "evutil_rand.c", 91 "evutil_time.c", 92 "listener.c", 93 "log.c", 94 "signal.c", 95 "strlcpy.c", 96 97 // extra 98 "evdns.c", 99 "event_tagging.c", 100 "evrpc.c", 101 "http.c", 102 103 "poll.c", 104 "select.c", 105 ], 106 107 target: { 108 linux: { 109 srcs: ["epoll.c"], 110 }, 111 linux_bionic: { 112 enabled: true, 113 }, 114 darwin: { 115 srcs: ["kqueue.c"], 116 }, 117 }, 118} 119