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