blob: 16906f57cd7bdcb8af5df847f36a4a547e94556f [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"],
Jiyong Parka75d3d62018-04-09 12:16:30 +090019 vendor_available: true,
Jiwen 'Steve' Cai64177e82017-05-08 17:07:52 -070020}
21
Steven Thomas3be0aa62017-05-08 15:45:30 -070022cflags = [
23 "-DLOG_TAG=\"libdvr\"",
Jiwen 'Steve' Cai656f4062017-05-22 13:02:33 -070024 "-DTRACE=0",
Chih-Hung Hsiehe1900832017-10-05 14:27:38 -070025 "-Wall",
26 "-Werror",
Steven Thomas3be0aa62017-05-08 15:45:30 -070027]
28
29srcs = [
30 "dvr_api.cpp",
31 "dvr_buffer.cpp",
32 "dvr_buffer_queue.cpp",
Hendrik Wagenaarbcb03d02017-05-23 14:59:08 -070033 "dvr_configuration_data.cpp",
Steven Thomas3be0aa62017-05-08 15:45:30 -070034 "dvr_display_manager.cpp",
35 "dvr_hardware_composer_client.cpp",
Corey Tabakafeb636d2017-06-23 16:20:07 -070036 "dvr_performance.cpp",
Marie White5096c652017-08-08 22:23:45 -070037 "dvr_pose.cpp",
Steven Thomas3be0aa62017-05-08 15:45:30 -070038 "dvr_surface.cpp",
39 "dvr_vsync.cpp",
40]
41
42static_libs = [
Okan Arikan822b7102017-05-08 13:31:34 -070043 "libbroadcastring",
Steven Thomas3be0aa62017-05-08 15:45:30 -070044 "libvrsensor",
Okan Arikan822b7102017-05-08 13:31:34 -070045 "libdisplay",
Steven Thomas3be0aa62017-05-08 15:45:30 -070046 "libvirtualtouchpadclient",
47 "libvr_hwc-impl",
48 "libvr_hwc-binder",
49 "libgrallocusage",
Corey Tabakafeb636d2017-06-23 16:20:07 -070050 "libperformance",
Steven Thomas3be0aa62017-05-08 15:45:30 -070051]
52
53shared_libs = [
54 "android.hardware.graphics.bufferqueue@1.0",
55 "android.hidl.token@1.0-utils",
56 "libbase",
Jiwen 'Steve' Cai037f35a2018-01-25 19:40:23 -080057 "libbufferhubqueue",
Steven Thomas3be0aa62017-05-08 15:45:30 -070058 "libbinder",
59 "liblog",
60 "libcutils",
61 "libutils",
62 "libnativewindow",
63 "libgui",
64 "libui",
Jiwen 'Steve' Cai037f35a2018-01-25 19:40:23 -080065 "libpdx_default_transport",
Steven Thomas3be0aa62017-05-08 15:45:30 -070066]
67
68cc_library_shared {
Jiwen 'Steve' Cai64177e82017-05-08 17:07:52 -070069 name: "libdvr",
70 owner: "google",
Steven Thomas3be0aa62017-05-08 15:45:30 -070071 cflags: cflags,
Jiwen 'Steve' Cai64177e82017-05-08 17:07:52 -070072 header_libs: ["libdvr_headers"],
73 export_header_lib_headers: ["libdvr_headers"],
Steven Thomas3be0aa62017-05-08 15:45:30 -070074 srcs: srcs,
75 static_libs: static_libs,
76 shared_libs: shared_libs,
77 version_script: "exported_apis.lds",
78}
Jiwen 'Steve' Cai64177e82017-05-08 17:07:52 -070079
Steven Thomas3be0aa62017-05-08 15:45:30 -070080// Also build a static libdvr for linking into tests. The linker script
81// restricting function access in the shared lib makes it inconvenient to use in
82// test code.
83cc_library_static {
84 name: "libdvr_static",
85 owner: "google",
86 cflags: cflags,
87 header_libs: ["libdvr_headers"],
88 export_header_lib_headers: ["libdvr_headers"],
89 srcs: srcs,
90 static_libs: static_libs,
91 shared_libs: shared_libs,
Jiwen 'Steve' Cai64177e82017-05-08 17:07:52 -070092}
93
94subdirs = [
95 "tests",
96]