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