blob: 81a9b2d26a87a80266fbea085fe8b9d15af9965e [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
Jiwen 'Steve' Caid88a0502018-04-30 10:27:08 -070022cc_library_headers {
23 name: "libdvr_private_headers",
24 export_include_dirs: ["."],
25 vendor_available: false,
26}
27
Steven Thomas3be0aa62017-05-08 15:45:30 -070028cflags = [
Jiwen 'Steve' Caic604e3b2018-04-19 11:16:49 -070029 "-DDVR_TRACKING_IMPLEMENTED=0",
Steven Thomas3be0aa62017-05-08 15:45:30 -070030 "-DLOG_TAG=\"libdvr\"",
Jiwen 'Steve' Cai656f4062017-05-22 13:02:33 -070031 "-DTRACE=0",
Chih-Hung Hsiehe1900832017-10-05 14:27:38 -070032 "-Wall",
33 "-Werror",
Steven Thomas3be0aa62017-05-08 15:45:30 -070034]
35
36srcs = [
37 "dvr_api.cpp",
38 "dvr_buffer.cpp",
39 "dvr_buffer_queue.cpp",
Hendrik Wagenaarbcb03d02017-05-23 14:59:08 -070040 "dvr_configuration_data.cpp",
Steven Thomas3be0aa62017-05-08 15:45:30 -070041 "dvr_display_manager.cpp",
42 "dvr_hardware_composer_client.cpp",
Corey Tabakafeb636d2017-06-23 16:20:07 -070043 "dvr_performance.cpp",
Marie White5096c652017-08-08 22:23:45 -070044 "dvr_pose.cpp",
Steven Thomas3be0aa62017-05-08 15:45:30 -070045 "dvr_surface.cpp",
Jiwen 'Steve' Caic604e3b2018-04-19 11:16:49 -070046 "dvr_tracking.cpp",
Steven Thomas3be0aa62017-05-08 15:45:30 -070047]
48
49static_libs = [
Okan Arikan822b7102017-05-08 13:31:34 -070050 "libbroadcastring",
Steven Thomas3be0aa62017-05-08 15:45:30 -070051 "libvrsensor",
Okan Arikan822b7102017-05-08 13:31:34 -070052 "libdisplay",
Steven Thomas3be0aa62017-05-08 15:45:30 -070053 "libvirtualtouchpadclient",
54 "libvr_hwc-impl",
55 "libvr_hwc-binder",
56 "libgrallocusage",
Corey Tabakafeb636d2017-06-23 16:20:07 -070057 "libperformance",
Steven Thomas3be0aa62017-05-08 15:45:30 -070058]
59
60shared_libs = [
61 "android.hardware.graphics.bufferqueue@1.0",
62 "android.hidl.token@1.0-utils",
63 "libbase",
Jiwen 'Steve' Cai037f35a2018-01-25 19:40:23 -080064 "libbufferhubqueue",
Steven Thomas3be0aa62017-05-08 15:45:30 -070065 "libbinder",
66 "liblog",
67 "libcutils",
68 "libutils",
69 "libnativewindow",
70 "libgui",
71 "libui",
Jiwen 'Steve' Cai037f35a2018-01-25 19:40:23 -080072 "libpdx_default_transport",
Steven Thomas3be0aa62017-05-08 15:45:30 -070073]
74
75cc_library_shared {
Pat Plunkett6eadd172018-08-09 09:38:58 -070076 name: "libdvr.google",
Jiwen 'Steve' Cai64177e82017-05-08 17:07:52 -070077 owner: "google",
Steven Thomas3be0aa62017-05-08 15:45:30 -070078 cflags: cflags,
Jiwen 'Steve' Cai64177e82017-05-08 17:07:52 -070079 header_libs: ["libdvr_headers"],
80 export_header_lib_headers: ["libdvr_headers"],
Steven Thomas3be0aa62017-05-08 15:45:30 -070081 srcs: srcs,
82 static_libs: static_libs,
83 shared_libs: shared_libs,
84 version_script: "exported_apis.lds",
85}
Jiwen 'Steve' Cai64177e82017-05-08 17:07:52 -070086
Steven Thomas3be0aa62017-05-08 15:45:30 -070087// Also build a static libdvr for linking into tests. The linker script
88// restricting function access in the shared lib makes it inconvenient to use in
89// test code.
90cc_library_static {
Pat Plunkett6eadd172018-08-09 09:38:58 -070091 name: "libdvr_static.google",
Steven Thomas3be0aa62017-05-08 15:45:30 -070092 owner: "google",
93 cflags: cflags,
94 header_libs: ["libdvr_headers"],
95 export_header_lib_headers: ["libdvr_headers"],
96 srcs: srcs,
97 static_libs: static_libs,
98 shared_libs: shared_libs,
Jiwen 'Steve' Cai64177e82017-05-08 17:07:52 -070099}
100
101subdirs = [
102 "tests",
103]