blob: 4f0e561bc21019c42661840edfd4ea56ffe0b3fb [file] [log] [blame]
Jiwen 'Steve' Cai64177e82017-05-08 17:07:52 -07001// Copyright (C) 2017 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
15
16cc_library_headers {
17 name: "libdvr_headers",
Jiwen 'Steve' Cai64177e82017-05-08 17:07:52 -070018 export_include_dirs: ["include"],
Jiwen 'Steve' Cai0f950842018-01-16 17:05:54 -080019 vendor_available: false,
20 vndk: {
21 enabled: true,
22 },
Jiwen 'Steve' Cai64177e82017-05-08 17:07:52 -070023}
24
Steven Thomas3be0aa62017-05-08 15:45:30 -070025cflags = [
26 "-DLOG_TAG=\"libdvr\"",
Jiwen 'Steve' Cai656f4062017-05-22 13:02:33 -070027 "-DTRACE=0",
Chih-Hung Hsiehe1900832017-10-05 14:27:38 -070028 "-Wall",
29 "-Werror",
Steven Thomas3be0aa62017-05-08 15:45:30 -070030]
31
32srcs = [
33 "dvr_api.cpp",
34 "dvr_buffer.cpp",
35 "dvr_buffer_queue.cpp",
Hendrik Wagenaarbcb03d02017-05-23 14:59:08 -070036 "dvr_configuration_data.cpp",
Steven Thomas3be0aa62017-05-08 15:45:30 -070037 "dvr_display_manager.cpp",
38 "dvr_hardware_composer_client.cpp",
Corey Tabakafeb636d2017-06-23 16:20:07 -070039 "dvr_performance.cpp",
Marie White5096c652017-08-08 22:23:45 -070040 "dvr_pose.cpp",
Steven Thomas3be0aa62017-05-08 15:45:30 -070041 "dvr_surface.cpp",
42 "dvr_vsync.cpp",
43]
44
45static_libs = [
Okan Arikan822b7102017-05-08 13:31:34 -070046 "libbroadcastring",
Steven Thomas3be0aa62017-05-08 15:45:30 -070047 "libbufferhub",
48 "libbufferhubqueue",
Steven Thomas3be0aa62017-05-08 15:45:30 -070049 "libvrsensor",
Okan Arikan822b7102017-05-08 13:31:34 -070050 "libdisplay",
Steven Thomas3be0aa62017-05-08 15:45:30 -070051 "libvirtualtouchpadclient",
52 "libvr_hwc-impl",
53 "libvr_hwc-binder",
54 "libgrallocusage",
Corey Tabakafeb636d2017-06-23 16:20:07 -070055 "libperformance",
Steven Thomas3be0aa62017-05-08 15:45:30 -070056 "libpdx_default_transport",
57]
58
59shared_libs = [
60 "android.hardware.graphics.bufferqueue@1.0",
61 "android.hidl.token@1.0-utils",
62 "libbase",
63 "libbinder",
64 "liblog",
65 "libcutils",
66 "libutils",
67 "libnativewindow",
68 "libgui",
69 "libui",
70]
71
72cc_library_shared {
Jiwen 'Steve' Cai64177e82017-05-08 17:07:52 -070073 name: "libdvr",
74 owner: "google",
Steven Thomas3be0aa62017-05-08 15:45:30 -070075 cflags: cflags,
Jiwen 'Steve' Cai64177e82017-05-08 17:07:52 -070076 header_libs: ["libdvr_headers"],
77 export_header_lib_headers: ["libdvr_headers"],
Steven Thomas3be0aa62017-05-08 15:45:30 -070078 srcs: srcs,
79 static_libs: static_libs,
80 shared_libs: shared_libs,
81 version_script: "exported_apis.lds",
82}
Jiwen 'Steve' Cai64177e82017-05-08 17:07:52 -070083
Steven Thomas3be0aa62017-05-08 15:45:30 -070084// Also build a static libdvr for linking into tests. The linker script
85// restricting function access in the shared lib makes it inconvenient to use in
86// test code.
87cc_library_static {
88 name: "libdvr_static",
89 owner: "google",
90 cflags: cflags,
91 header_libs: ["libdvr_headers"],
92 export_header_lib_headers: ["libdvr_headers"],
93 srcs: srcs,
94 static_libs: static_libs,
95 shared_libs: shared_libs,
Jiwen 'Steve' Cai64177e82017-05-08 17:07:52 -070096}
97
98subdirs = [
99 "tests",
100]