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