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