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 export_include_dirs: ["include"], 19 vendor_available: true, 20 } 21 22 cc_library_headers { 23 name: "libdvr_private_headers", 24 export_include_dirs: ["."], 25 vendor_available: false, 26 } 27 28 cflags = [ 29 "-DDVR_TRACKING_IMPLEMENTED=0", 30 "-DLOG_TAG=\"libdvr\"", 31 "-DTRACE=0", 32 "-Wall", 33 "-Werror", 34 ] 35 36 srcs = [ 37 "dvr_api.cpp", 38 "dvr_buffer.cpp", 39 "dvr_buffer_queue.cpp", 40 "dvr_configuration_data.cpp", 41 "dvr_display_manager.cpp", 42 "dvr_hardware_composer_client.cpp", 43 "dvr_performance.cpp", 44 "dvr_pose.cpp", 45 "dvr_surface.cpp", 46 "dvr_tracking.cpp", 47 ] 48 49 static_libs = [ 50 "libbroadcastring", 51 "libvrsensor", 52 "libdisplay", 53 "libvirtualtouchpadclient", 54 "libvr_hwc-impl", 55 "libvr_hwc-binder", 56 "libgrallocusage", 57 "libperformance", 58 ] 59 60 shared_libs = [ 61 "android.hardware.graphics.bufferqueue (a] 1.0", 62 "android.hidl.token (a] 1.0-utils", 63 "libbase", 64 "libbufferhubqueue", 65 "libbinder", 66 "liblog", 67 "libcutils", 68 "libutils", 69 "libnativewindow", 70 "libgui", 71 "libui", 72 "libpdx_default_transport", 73 ] 74 75 cc_library_shared { 76 name: "libdvr.google", 77 owner: "google", 78 cflags: cflags, 79 header_libs: ["libdvr_headers"], 80 export_header_lib_headers: ["libdvr_headers"], 81 srcs: srcs, 82 static_libs: static_libs, 83 shared_libs: shared_libs, 84 version_script: "exported_apis.lds", 85 } 86 87 // Also build a static libdvr for linking into tests. The linker script 88 // restricting function access in the shared lib makes it inconvenient to use in 89 // test code. 90 cc_library_static { 91 name: "libdvr_static.google", 92 owner: "google", 93 cflags: cflags, 94 header_libs: ["libdvr_headers"], 95 export_header_lib_headers: ["libdvr_headers"], 96 srcs: srcs, 97 static_libs: static_libs, 98 shared_libs: shared_libs, 99 } 100 101 subdirs = [ 102 "tests", 103 ] 104