blob: 6d202aec058d6b2eab0ba1acdb4dfdfaea600fff [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",
31 "libcutils",
32 "libhardware",
33 "liblog",
34 "libui",
35 "libutils",
Jiwen 'Steve' Cai037f35a2018-01-25 19:40:23 -080036 "libnativewindow",
37 "libpdx_default_transport",
Mathias Agopian6a3c05b2017-04-27 20:06:55 -070038]
39
Corey Tabaka52ea25c2017-09-13 18:02:48 -070040headerLibraries = [
Jiwen 'Steve' Cai8f51ec62018-08-07 21:50:51 -070041 "libbufferhub_headers",
Corey Tabaka52ea25c2017-09-13 18:02:48 -070042 "libdvr_headers",
Mathias Agopian6a3c05b2017-04-27 20:06:55 -070043 "libnativebase_headers",
Stephen Kiazyke77dce22017-03-14 15:38:12 -070044]
45
46cc_library {
47 srcs: sourceFiles,
48 cflags: [
49 "-DLOG_TAG=\"libbufferhub\"",
Corey Tabaka52ea25c2017-09-13 18:02:48 -070050 "-DTRACE=0",
51 "-DATRACE_TAG=ATRACE_TAG_GRAPHICS",
Chih-Hung Hsiehe1900832017-10-05 14:27:38 -070052 "-Wall",
53 "-Werror",
Stephen Kiazyke77dce22017-03-14 15:38:12 -070054 ],
Stephen Kiazyke77dce22017-03-14 15:38:12 -070055 shared_libs: sharedLibraries,
Corey Tabaka52ea25c2017-09-13 18:02:48 -070056 header_libs: headerLibraries,
Stephen Kiazyke77dce22017-03-14 15:38:12 -070057 name: "libbufferhub",
Mathias Agopian6a3c05b2017-04-27 20:06:55 -070058 export_header_lib_headers: [
Jiwen 'Steve' Cai8f51ec62018-08-07 21:50:51 -070059 "libbufferhub_headers",
Mathias Agopian6a3c05b2017-04-27 20:06:55 -070060 "libnativebase_headers",
61 ],
Stephen Kiazyke77dce22017-03-14 15:38:12 -070062}
63
64cc_test {
Jiwen 'Steve' Cai9e7f3032017-10-20 18:39:47 -070065 srcs: ["buffer_hub-test.cpp"],
Jiwen 'Steve' Cai037f35a2018-01-25 19:40:23 -080066 static_libs: ["libbufferhub"],
Stephen Kiazyke77dce22017-03-14 15:38:12 -070067 shared_libs: sharedLibraries,
Corey Tabaka52ea25c2017-09-13 18:02:48 -070068 header_libs: headerLibraries,
Jiwen 'Steve' Cai9e7f3032017-10-20 18:39:47 -070069 name: "buffer_hub-test",
Stephen Kiazyke77dce22017-03-14 15:38:12 -070070}