blob: ba5cfcd905b57cd8d54a9d7d9988bd6fd72e5ed8 [file] [log] [blame]
Stephen Kiazyke77dce22017-03-14 15:38:12 -07001// 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
Jiwen 'Steve' Cai8f51ec62018-08-07 21:50:51 -070015cc_library_headers {
16 name: "libbufferhub_headers",
17 export_include_dirs: ["include"],
18 vendor_available: true, // TODO(b/112338314): Does shouldn't be available to vendor.
19}
20
Stephen Kiazyke77dce22017-03-14 15:38:12 -070021sourceFiles = [
Jiwen 'Steve' Caic6fcf2f2018-09-27 23:34:45 -070022 "buffer_hub_base.cpp",
Stephen Kiazyke77dce22017-03-14 15:38:12 -070023 "buffer_hub_rpc.cpp",
Jiwen 'Steve' Caic6fcf2f2018-09-27 23:34:45 -070024 "consumer_buffer.cpp",
Stephen Kiazyke77dce22017-03-14 15:38:12 -070025 "ion_buffer.cpp",
Jiwen 'Steve' Caic6fcf2f2018-09-27 23:34:45 -070026 "producer_buffer.cpp",
Stephen Kiazyke77dce22017-03-14 15:38:12 -070027]
28
Stephen Kiazyke77dce22017-03-14 15:38:12 -070029sharedLibraries = [
30 "libbase",
Jiwen 'Steve' Caia88e3ee2017-11-03 17:33:33 -070031 "libbinder",
Stephen Kiazyke77dce22017-03-14 15:38:12 -070032 "libcutils",
33 "libhardware",
34 "liblog",
35 "libui",
36 "libutils",
Jiwen 'Steve' Cai037f35a2018-01-25 19:40:23 -080037 "libnativewindow",
38 "libpdx_default_transport",
Mathias Agopian6a3c05b2017-04-27 20:06:55 -070039]
40
Corey Tabaka52ea25c2017-09-13 18:02:48 -070041headerLibraries = [
Jiwen 'Steve' Cai8f51ec62018-08-07 21:50:51 -070042 "libbufferhub_headers",
Corey Tabaka52ea25c2017-09-13 18:02:48 -070043 "libdvr_headers",
Mathias Agopian6a3c05b2017-04-27 20:06:55 -070044 "libnativebase_headers",
Stephen Kiazyke77dce22017-03-14 15:38:12 -070045]
46
47cc_library {
48 srcs: sourceFiles,
49 cflags: [
50 "-DLOG_TAG=\"libbufferhub\"",
Corey Tabaka52ea25c2017-09-13 18:02:48 -070051 "-DTRACE=0",
52 "-DATRACE_TAG=ATRACE_TAG_GRAPHICS",
Chih-Hung Hsiehe1900832017-10-05 14:27:38 -070053 "-Wall",
54 "-Werror",
Stephen Kiazyke77dce22017-03-14 15:38:12 -070055 ],
Stephen Kiazyke77dce22017-03-14 15:38:12 -070056 shared_libs: sharedLibraries,
Corey Tabaka52ea25c2017-09-13 18:02:48 -070057 header_libs: headerLibraries,
Stephen Kiazyke77dce22017-03-14 15:38:12 -070058 name: "libbufferhub",
Mathias Agopian6a3c05b2017-04-27 20:06:55 -070059 export_header_lib_headers: [
Jiwen 'Steve' Cai8f51ec62018-08-07 21:50:51 -070060 "libbufferhub_headers",
Mathias Agopian6a3c05b2017-04-27 20:06:55 -070061 "libnativebase_headers",
62 ],
Jiwen 'Steve' Cai9f7b7f32018-10-10 15:05:01 -070063
64 // TODO(b/117568153): Temporarily opt out using libcrt.
65 no_libcrt: true,
Stephen Kiazyke77dce22017-03-14 15:38:12 -070066}
67
68cc_test {
Jiwen 'Steve' Cai9e7f3032017-10-20 18:39:47 -070069 srcs: ["buffer_hub-test.cpp"],
Jiwen 'Steve' Cai037f35a2018-01-25 19:40:23 -080070 static_libs: ["libbufferhub"],
Stephen Kiazyke77dce22017-03-14 15:38:12 -070071 shared_libs: sharedLibraries,
Corey Tabaka52ea25c2017-09-13 18:02:48 -070072 header_libs: headerLibraries,
Jiwen 'Steve' Cai9e7f3032017-10-20 18:39:47 -070073 name: "buffer_hub-test",
Jiwen 'Steve' Cai9f7b7f32018-10-10 15:05:01 -070074
75 // TODO(b/117568153): Temporarily opt out using libcrt.
76 no_libcrt: true,
Stephen Kiazyke77dce22017-03-14 15:38:12 -070077}