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