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