• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
15cc_library {
16    name: "libevent",
17    host_supported: true,
18    recovery_available: true,
19    vendor_available: true,
20    vndk: {
21        enabled: true,
22    },
23    unique_host_soname: true,
24
25    arch: {
26        arm: {
27            instruction_set: "arm",
28        },
29    },
30    cflags: [
31        "-D_BSD_SOURCE",
32        "-O3",
33        "-Wno-implicit-function-declaration",
34        "-Wno-strict-aliasing",
35        "-Wno-unused-parameter",
36        "-Werror",
37    ],
38    export_include_dirs: ["include"],
39
40    local_include_dirs: ["compat"],
41
42    srcs: [
43        // core
44        "buffer.c",
45        "bufferevent.c",
46        "bufferevent_filter.c",
47        "bufferevent_pair.c",
48        "bufferevent_ratelim.c",
49        "bufferevent_sock.c",
50        "event.c",
51        "evmap.c",
52        "evthread.c",
53        "evutil.c",
54        "evutil_rand.c",
55        "evutil_time.c",
56        "listener.c",
57        "log.c",
58        "signal.c",
59        "strlcpy.c",
60
61        // extra
62        "evdns.c",
63        "event_tagging.c",
64        "evrpc.c",
65        "http.c",
66
67        "poll.c",
68        "select.c",
69    ],
70
71    target: {
72        linux: {
73            srcs: ["epoll.c"],
74        },
75        linux_bionic: {
76            enabled: true,
77        },
78        darwin: {
79            srcs: ["kqueue.c"],
80        },
81    },
82}
83