1// Copyright (C) 2016 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
15sourceFiles = [
16    "buffer_hub_client.cpp",
17    "buffer_hub_rpc.cpp",
18    "detached_buffer.cpp",
19    "ion_buffer.cpp",
20]
21
22localIncludeFiles = [
23    "include",
24]
25
26sharedLibraries = [
27    "libbase",
28    "libbinder",
29    "libcutils",
30    "libhardware",
31    "liblog",
32    "libui",
33    "libutils",
34    "libnativewindow",
35    "libpdx_default_transport",
36]
37
38headerLibraries = [
39    "libdvr_headers",
40    "libnativebase_headers",
41]
42
43cc_library {
44    srcs: sourceFiles,
45    cflags: [
46        "-DLOG_TAG=\"libbufferhub\"",
47        "-DTRACE=0",
48        "-DATRACE_TAG=ATRACE_TAG_GRAPHICS",
49        "-Wall",
50        "-Werror",
51    ],
52    export_include_dirs: localIncludeFiles,
53    shared_libs: sharedLibraries,
54    header_libs: headerLibraries,
55    name: "libbufferhub",
56    export_header_lib_headers: [
57        "libnativebase_headers",
58    ],
59}
60
61cc_test {
62    tags: ["optional"],
63    srcs: ["buffer_hub-test.cpp"],
64    static_libs: ["libbufferhub"],
65    shared_libs: sharedLibraries,
66    header_libs: headerLibraries,
67    name: "buffer_hub-test",
68}
69
70