Jiwen 'Steve' Cai | 64177e8 | 2017-05-08 17:07:52 -0700 | [diff] [blame] | 1 | // 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 | |
Bob Badour | 3306e49 | 2021-02-25 15:35:37 -0800 | [diff] [blame] | 16 | package { |
| 17 | // See: http://go/android-license-faq |
| 18 | // A large-scale-change added 'default_applicable_licenses' to import |
| 19 | // all of the 'license_kinds' from "frameworks_native_license" |
| 20 | // to get the below license kinds: |
| 21 | // SPDX-license-identifier-Apache-2.0 |
| 22 | default_applicable_licenses: ["frameworks_native_license"], |
| 23 | } |
| 24 | |
Jiwen 'Steve' Cai | 64177e8 | 2017-05-08 17:07:52 -0700 | [diff] [blame] | 25 | cc_library_headers { |
| 26 | name: "libdvr_headers", |
Jiwen 'Steve' Cai | 64177e8 | 2017-05-08 17:07:52 -0700 | [diff] [blame] | 27 | export_include_dirs: ["include"], |
Jiyong Park | a75d3d6 | 2018-04-09 12:16:30 +0900 | [diff] [blame] | 28 | vendor_available: true, |
Jooyung Han | 2cf9404 | 2020-06-05 17:30:54 +0900 | [diff] [blame] | 29 | apex_available: [ |
| 30 | "//apex_available:platform", |
| 31 | "com.android.media", |
| 32 | "com.android.media.swcodec", |
| 33 | ], |
| 34 | min_sdk_version: "29", |
Jiwen 'Steve' Cai | 64177e8 | 2017-05-08 17:07:52 -0700 | [diff] [blame] | 35 | } |
| 36 | |
Jiwen 'Steve' Cai | d88a050 | 2018-04-30 10:27:08 -0700 | [diff] [blame] | 37 | cc_library_headers { |
| 38 | name: "libdvr_private_headers", |
| 39 | export_include_dirs: ["."], |
| 40 | vendor_available: false, |
| 41 | } |
| 42 | |
Steven Thomas | 3be0aa6 | 2017-05-08 15:45:30 -0700 | [diff] [blame] | 43 | cflags = [ |
Jiwen 'Steve' Cai | c604e3b | 2018-04-19 11:16:49 -0700 | [diff] [blame] | 44 | "-DDVR_TRACKING_IMPLEMENTED=0", |
Steven Thomas | 3be0aa6 | 2017-05-08 15:45:30 -0700 | [diff] [blame] | 45 | "-DLOG_TAG=\"libdvr\"", |
Jiwen 'Steve' Cai | 656f406 | 2017-05-22 13:02:33 -0700 | [diff] [blame] | 46 | "-DTRACE=0", |
Chih-Hung Hsieh | e190083 | 2017-10-05 14:27:38 -0700 | [diff] [blame] | 47 | "-Wall", |
| 48 | "-Werror", |
Steven Thomas | 3be0aa6 | 2017-05-08 15:45:30 -0700 | [diff] [blame] | 49 | ] |
| 50 | |
| 51 | srcs = [ |
| 52 | "dvr_api.cpp", |
| 53 | "dvr_buffer.cpp", |
| 54 | "dvr_buffer_queue.cpp", |
Hendrik Wagenaar | bcb03d0 | 2017-05-23 14:59:08 -0700 | [diff] [blame] | 55 | "dvr_configuration_data.cpp", |
Steven Thomas | 3be0aa6 | 2017-05-08 15:45:30 -0700 | [diff] [blame] | 56 | "dvr_display_manager.cpp", |
| 57 | "dvr_hardware_composer_client.cpp", |
Corey Tabaka | feb636d | 2017-06-23 16:20:07 -0700 | [diff] [blame] | 58 | "dvr_performance.cpp", |
Marie White | 5096c65 | 2017-08-08 22:23:45 -0700 | [diff] [blame] | 59 | "dvr_pose.cpp", |
Steven Thomas | 3be0aa6 | 2017-05-08 15:45:30 -0700 | [diff] [blame] | 60 | "dvr_surface.cpp", |
Jiwen 'Steve' Cai | c604e3b | 2018-04-19 11:16:49 -0700 | [diff] [blame] | 61 | "dvr_tracking.cpp", |
Steven Thomas | 3be0aa6 | 2017-05-08 15:45:30 -0700 | [diff] [blame] | 62 | ] |
| 63 | |
| 64 | static_libs = [ |
Okan Arikan | 822b710 | 2017-05-08 13:31:34 -0700 | [diff] [blame] | 65 | "libbroadcastring", |
Steven Thomas | 3be0aa6 | 2017-05-08 15:45:30 -0700 | [diff] [blame] | 66 | "libvrsensor", |
Okan Arikan | 822b710 | 2017-05-08 13:31:34 -0700 | [diff] [blame] | 67 | "libdisplay", |
Steven Thomas | 3be0aa6 | 2017-05-08 15:45:30 -0700 | [diff] [blame] | 68 | "libvirtualtouchpadclient", |
| 69 | "libvr_hwc-impl", |
| 70 | "libvr_hwc-binder", |
| 71 | "libgrallocusage", |
Corey Tabaka | feb636d | 2017-06-23 16:20:07 -0700 | [diff] [blame] | 72 | "libperformance", |
Steven Thomas | 3be0aa6 | 2017-05-08 15:45:30 -0700 | [diff] [blame] | 73 | ] |
| 74 | |
| 75 | shared_libs = [ |
| 76 | "android.hardware.graphics.bufferqueue@1.0", |
| 77 | "android.hidl.token@1.0-utils", |
| 78 | "libbase", |
Jiwen 'Steve' Cai | 037f35a | 2018-01-25 19:40:23 -0800 | [diff] [blame] | 79 | "libbufferhubqueue", |
Steven Thomas | 3be0aa6 | 2017-05-08 15:45:30 -0700 | [diff] [blame] | 80 | "libbinder", |
| 81 | "liblog", |
| 82 | "libcutils", |
| 83 | "libutils", |
| 84 | "libnativewindow", |
| 85 | "libgui", |
| 86 | "libui", |
Jiwen 'Steve' Cai | 037f35a | 2018-01-25 19:40:23 -0800 | [diff] [blame] | 87 | "libpdx_default_transport", |
Steven Thomas | 3be0aa6 | 2017-05-08 15:45:30 -0700 | [diff] [blame] | 88 | ] |
| 89 | |
| 90 | cc_library_shared { |
Pat Plunkett | 6eadd17 | 2018-08-09 09:38:58 -0700 | [diff] [blame] | 91 | name: "libdvr.google", |
Roman Kiryanov | 80703bb | 2020-11-17 22:57:41 -0800 | [diff] [blame] | 92 | system_ext_specific: true, |
Jiwen 'Steve' Cai | 64177e8 | 2017-05-08 17:07:52 -0700 | [diff] [blame] | 93 | owner: "google", |
Steven Thomas | 3be0aa6 | 2017-05-08 15:45:30 -0700 | [diff] [blame] | 94 | cflags: cflags, |
Jiwen 'Steve' Cai | 64177e8 | 2017-05-08 17:07:52 -0700 | [diff] [blame] | 95 | header_libs: ["libdvr_headers"], |
| 96 | export_header_lib_headers: ["libdvr_headers"], |
Steven Thomas | 3be0aa6 | 2017-05-08 15:45:30 -0700 | [diff] [blame] | 97 | srcs: srcs, |
| 98 | static_libs: static_libs, |
| 99 | shared_libs: shared_libs, |
| 100 | version_script: "exported_apis.lds", |
| 101 | } |
Jiwen 'Steve' Cai | 64177e8 | 2017-05-08 17:07:52 -0700 | [diff] [blame] | 102 | |
Steven Thomas | 3be0aa6 | 2017-05-08 15:45:30 -0700 | [diff] [blame] | 103 | // Also build a static libdvr for linking into tests. The linker script |
| 104 | // restricting function access in the shared lib makes it inconvenient to use in |
| 105 | // test code. |
| 106 | cc_library_static { |
Pat Plunkett | 6eadd17 | 2018-08-09 09:38:58 -0700 | [diff] [blame] | 107 | name: "libdvr_static.google", |
Steven Thomas | 3be0aa6 | 2017-05-08 15:45:30 -0700 | [diff] [blame] | 108 | owner: "google", |
| 109 | cflags: cflags, |
| 110 | header_libs: ["libdvr_headers"], |
| 111 | export_header_lib_headers: ["libdvr_headers"], |
| 112 | srcs: srcs, |
| 113 | static_libs: static_libs, |
| 114 | shared_libs: shared_libs, |
Jiwen 'Steve' Cai | 64177e8 | 2017-05-08 17:07:52 -0700 | [diff] [blame] | 115 | } |
| 116 | |
| 117 | subdirs = [ |
| 118 | "tests", |
| 119 | ] |