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