blob: fa78b1c13603759b8754be328ec53102b23b3aa3 [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",
18 owner: "google",
19 export_include_dirs: ["include"],
20}
21
Steven Thomas3be0aa62017-05-08 15:45:30 -070022cflags = [
23 "-DLOG_TAG=\"libdvr\"",
24]
25
26srcs = [
27 "dvr_api.cpp",
28 "dvr_buffer.cpp",
29 "dvr_buffer_queue.cpp",
30 "dvr_display_manager.cpp",
31 "dvr_hardware_composer_client.cpp",
32 "dvr_surface.cpp",
33 "dvr_vsync.cpp",
34]
35
36static_libs = [
37 "libbufferhub",
38 "libbufferhubqueue",
39 "libdisplay",
40 "libvrsensor",
41 "libvirtualtouchpadclient",
42 "libvr_hwc-impl",
43 "libvr_hwc-binder",
44 "libgrallocusage",
45 "libpdx_default_transport",
46]
47
48shared_libs = [
49 "android.hardware.graphics.bufferqueue@1.0",
50 "android.hidl.token@1.0-utils",
51 "libbase",
52 "libbinder",
53 "liblog",
54 "libcutils",
55 "libutils",
56 "libnativewindow",
57 "libgui",
58 "libui",
59]
60
61cc_library_shared {
Jiwen 'Steve' Cai64177e82017-05-08 17:07:52 -070062 name: "libdvr",
63 owner: "google",
Steven Thomas3be0aa62017-05-08 15:45:30 -070064 cflags: cflags,
Jiwen 'Steve' Cai64177e82017-05-08 17:07:52 -070065 header_libs: ["libdvr_headers"],
66 export_header_lib_headers: ["libdvr_headers"],
Steven Thomas3be0aa62017-05-08 15:45:30 -070067 srcs: srcs,
68 static_libs: static_libs,
69 shared_libs: shared_libs,
70 version_script: "exported_apis.lds",
71}
Jiwen 'Steve' Cai64177e82017-05-08 17:07:52 -070072
Steven Thomas3be0aa62017-05-08 15:45:30 -070073// Also build a static libdvr for linking into tests. The linker script
74// restricting function access in the shared lib makes it inconvenient to use in
75// test code.
76cc_library_static {
77 name: "libdvr_static",
78 owner: "google",
79 cflags: cflags,
80 header_libs: ["libdvr_headers"],
81 export_header_lib_headers: ["libdvr_headers"],
82 srcs: srcs,
83 static_libs: static_libs,
84 shared_libs: shared_libs,
Jiwen 'Steve' Cai64177e82017-05-08 17:07:52 -070085}
86
87subdirs = [
88 "tests",
89]