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