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