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