blob: 2b4ebbe479264e1472dd1e3b3c242e027392c03b [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 = [
Okan Arikan822b7102017-05-08 13:31:34 -070037 "libbroadcastring",
Steven Thomas3be0aa62017-05-08 15:45:30 -070038 "libbufferhub",
39 "libbufferhubqueue",
Steven Thomas3be0aa62017-05-08 15:45:30 -070040 "libvrsensor",
Okan Arikan822b7102017-05-08 13:31:34 -070041 "libdisplay",
Steven Thomas3be0aa62017-05-08 15:45:30 -070042 "libvirtualtouchpadclient",
43 "libvr_hwc-impl",
44 "libvr_hwc-binder",
45 "libgrallocusage",
46 "libpdx_default_transport",
47]
48
49shared_libs = [
50 "android.hardware.graphics.bufferqueue@1.0",
51 "android.hidl.token@1.0-utils",
52 "libbase",
53 "libbinder",
54 "liblog",
55 "libcutils",
56 "libutils",
57 "libnativewindow",
58 "libgui",
59 "libui",
60]
61
62cc_library_shared {
Jiwen 'Steve' Cai64177e82017-05-08 17:07:52 -070063 name: "libdvr",
64 owner: "google",
Steven Thomas3be0aa62017-05-08 15:45:30 -070065 cflags: cflags,
Jiwen 'Steve' Cai64177e82017-05-08 17:07:52 -070066 header_libs: ["libdvr_headers"],
67 export_header_lib_headers: ["libdvr_headers"],
Steven Thomas3be0aa62017-05-08 15:45:30 -070068 srcs: srcs,
69 static_libs: static_libs,
70 shared_libs: shared_libs,
71 version_script: "exported_apis.lds",
72}
Jiwen 'Steve' Cai64177e82017-05-08 17:07:52 -070073
Steven Thomas3be0aa62017-05-08 15:45:30 -070074// Also build a static libdvr for linking into tests. The linker script
75// restricting function access in the shared lib makes it inconvenient to use in
76// test code.
77cc_library_static {
78 name: "libdvr_static",
79 owner: "google",
80 cflags: cflags,
81 header_libs: ["libdvr_headers"],
82 export_header_lib_headers: ["libdvr_headers"],
83 srcs: srcs,
84 static_libs: static_libs,
85 shared_libs: shared_libs,
Jiwen 'Steve' Cai64177e82017-05-08 17:07:52 -070086}
87
88subdirs = [
89 "tests",
90]