blob: 37c19d43f7a8e2c48d55828960ea90be9db8de59 [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.
Jooyung Han2cf94042020-06-05 17:30:54 +090019 apex_available: [
20 "//apex_available:platform",
21 "com.android.media",
22 "com.android.media.swcodec",
23 ],
24 min_sdk_version: "29",
Jiwen 'Steve' Cai8f51ec62018-08-07 21:50:51 -070025}
26
Stephen Kiazyke77dce22017-03-14 15:38:12 -070027sourceFiles = [
Jiwen 'Steve' Caic6fcf2f2018-09-27 23:34:45 -070028 "buffer_hub_base.cpp",
Stephen Kiazyke77dce22017-03-14 15:38:12 -070029 "buffer_hub_rpc.cpp",
Jiwen 'Steve' Caic6fcf2f2018-09-27 23:34:45 -070030 "consumer_buffer.cpp",
Stephen Kiazyke77dce22017-03-14 15:38:12 -070031 "ion_buffer.cpp",
Jiwen 'Steve' Caic6fcf2f2018-09-27 23:34:45 -070032 "producer_buffer.cpp",
Stephen Kiazyke77dce22017-03-14 15:38:12 -070033]
34
Stephen Kiazyke77dce22017-03-14 15:38:12 -070035sharedLibraries = [
36 "libbase",
37 "libcutils",
Stephen Kiazyke77dce22017-03-14 15:38:12 -070038 "liblog",
39 "libui",
40 "libutils",
Jiwen 'Steve' Cai037f35a2018-01-25 19:40:23 -080041 "libpdx_default_transport",
Mathias Agopian6a3c05b2017-04-27 20:06:55 -070042]
43
Corey Tabaka52ea25c2017-09-13 18:02:48 -070044headerLibraries = [
Jiwen 'Steve' Cai8f51ec62018-08-07 21:50:51 -070045 "libbufferhub_headers",
Corey Tabaka52ea25c2017-09-13 18:02:48 -070046 "libdvr_headers",
Mathias Agopian6a3c05b2017-04-27 20:06:55 -070047 "libnativebase_headers",
Stephen Kiazyke77dce22017-03-14 15:38:12 -070048]
49
50cc_library {
51 srcs: sourceFiles,
52 cflags: [
53 "-DLOG_TAG=\"libbufferhub\"",
Corey Tabaka52ea25c2017-09-13 18:02:48 -070054 "-DTRACE=0",
55 "-DATRACE_TAG=ATRACE_TAG_GRAPHICS",
Chih-Hung Hsiehe1900832017-10-05 14:27:38 -070056 "-Wall",
57 "-Werror",
Stephen Kiazyke77dce22017-03-14 15:38:12 -070058 ],
Stephen Kiazyke77dce22017-03-14 15:38:12 -070059 shared_libs: sharedLibraries,
Corey Tabaka52ea25c2017-09-13 18:02:48 -070060 header_libs: headerLibraries,
Stephen Kiazyke77dce22017-03-14 15:38:12 -070061 name: "libbufferhub",
Mathias Agopian6a3c05b2017-04-27 20:06:55 -070062 export_header_lib_headers: [
Jiwen 'Steve' Cai8f51ec62018-08-07 21:50:51 -070063 "libbufferhub_headers",
Mathias Agopian6a3c05b2017-04-27 20:06:55 -070064 "libnativebase_headers",
65 ],
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",
Stephen Kiazyke77dce22017-03-14 15:38:12 -070074}