blob: 4041d6bb41d6822716d7c8552d877ab4e06d00bb [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\"",
Jiwen 'Steve' Cai656f4062017-05-22 13:02:33 -070024 "-DTRACE=0",
Steven Thomas3be0aa62017-05-08 15:45:30 -070025]
26
27srcs = [
28 "dvr_api.cpp",
29 "dvr_buffer.cpp",
30 "dvr_buffer_queue.cpp",
Hendrik Wagenaarbcb03d02017-05-23 14:59:08 -070031 "dvr_configuration_data.cpp",
Steven Thomas3be0aa62017-05-08 15:45:30 -070032 "dvr_display_manager.cpp",
33 "dvr_hardware_composer_client.cpp",
34 "dvr_surface.cpp",
35 "dvr_vsync.cpp",
36]
37
38static_libs = [
Okan Arikan822b7102017-05-08 13:31:34 -070039 "libbroadcastring",
Steven Thomas3be0aa62017-05-08 15:45:30 -070040 "libbufferhub",
41 "libbufferhubqueue",
Steven Thomas3be0aa62017-05-08 15:45:30 -070042 "libvrsensor",
Okan Arikan822b7102017-05-08 13:31:34 -070043 "libdisplay",
Steven Thomas3be0aa62017-05-08 15:45:30 -070044 "libvirtualtouchpadclient",
45 "libvr_hwc-impl",
46 "libvr_hwc-binder",
47 "libgrallocusage",
48 "libpdx_default_transport",
49]
50
51shared_libs = [
52 "android.hardware.graphics.bufferqueue@1.0",
53 "android.hidl.token@1.0-utils",
54 "libbase",
55 "libbinder",
56 "liblog",
57 "libcutils",
58 "libutils",
59 "libnativewindow",
60 "libgui",
61 "libui",
62]
63
64cc_library_shared {
Jiwen 'Steve' Cai64177e82017-05-08 17:07:52 -070065 name: "libdvr",
66 owner: "google",
Steven Thomas3be0aa62017-05-08 15:45:30 -070067 cflags: cflags,
Jiwen 'Steve' Cai64177e82017-05-08 17:07:52 -070068 header_libs: ["libdvr_headers"],
69 export_header_lib_headers: ["libdvr_headers"],
Steven Thomas3be0aa62017-05-08 15:45:30 -070070 srcs: srcs,
71 static_libs: static_libs,
72 shared_libs: shared_libs,
73 version_script: "exported_apis.lds",
74}
Jiwen 'Steve' Cai64177e82017-05-08 17:07:52 -070075
Steven Thomas3be0aa62017-05-08 15:45:30 -070076// Also build a static libdvr for linking into tests. The linker script
77// restricting function access in the shared lib makes it inconvenient to use in
78// test code.
79cc_library_static {
80 name: "libdvr_static",
81 owner: "google",
82 cflags: cflags,
83 header_libs: ["libdvr_headers"],
84 export_header_lib_headers: ["libdvr_headers"],
85 srcs: srcs,
86 static_libs: static_libs,
87 shared_libs: shared_libs,
Jiwen 'Steve' Cai64177e82017-05-08 17:07:52 -070088}
89
90subdirs = [
91 "tests",
92]