1// Copyright (c) 2017-2023 Intel Corporation 2// 3// Permission is hereby granted, free of charge, to any person obtaining a copy 4// of this software and associated documentation files (the "Software"), to deal 5// in the Software without restriction, including without limitation the rights 6// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7// copies of the Software, and to permit persons to whom the Software is 8// furnished to do so, subject to the following conditions: 9// 10// The above copyright notice and this permission notice shall be included in all 11// copies or substantial portions of the Software. 12// 13// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19// SOFTWARE. 20 21package { 22 default_applicable_licenses: ["external_intel_libva_license"], 23} 24 25license { 26 name: "external_intel_libva_license", 27 visibility: [":__subpackages__"], 28 license_text: [ 29 "COPYING", 30 ], 31} 32 33sh_binary_host { 34 name: "libva_gen_version_script", 35 src: "build/gen_version.sh", 36} 37 38genrule { 39 name: "libva_gen_headers", 40 srcs: [ 41 "configure.ac", 42 "va/va_version.h.in", 43 "va/drm/va_drm.h", 44 ], 45 tools: [ 46 "libva_gen_version_script", 47 ], 48 out: [ 49 "va/va_version.h", 50 "va/va_drm.h", 51 ], 52 cmd: "$(location libva_gen_version_script) " + 53 "$$(dirname $(location configure.ac)) " + 54 "$(location va/va_version.h.in) > $(location va/va_version.h);" + 55 "cp $(location va/drm/va_drm.h) $(location va/va_drm.h)", 56} 57 58cc_library_headers { 59 name: "libva_headers", 60 61 export_include_dirs: [ 62 ".", 63 "va", 64 "va/drm", 65 ], 66 67 generated_headers: [ 68 "libva_gen_headers", 69 ], 70 export_generated_headers: [ 71 "libva_gen_headers", 72 ], 73 74 vendor: true, 75 enabled: false, 76 arch: { 77 x86_64: { 78 enabled: true, 79 }, 80 }, 81} 82 83cc_library_shared { 84 name: "libva", 85 86 shared_libs: [ 87 "libdl", 88 "libdrm", 89 "libcutils", 90 "liblog", 91 ], 92 93 local_include_dirs: [ 94 "va", 95 ], 96 97 generated_headers: [ 98 "libva_gen_headers", 99 ], 100 export_generated_headers: [ 101 "libva_gen_headers", 102 ], 103 export_include_dirs: [ 104 ".", 105 ], 106 107 header_libs: [ 108 "liblog_headers", 109 ], 110 111 srcs: [ 112 "va/va.c", 113 "va/va_trace.c", 114 "va/va_str.c", 115 "va/drm/va_drm.c", 116 "va/drm/va_drm_auth.c", 117 "va/drm/va_drm_utils.c", 118 ], 119 120 cflags: [ 121 "-Werror", 122 "-Winvalid-pch", 123 "-DSYSCONFDIR=\"/vendor/etc\"", 124 "-DLOG_TAG=\"libva\"", 125 ], 126 127 arch: { 128 x86_64: { 129 cflags: ["-DVA_DRIVERS_PATH=\"/vendor/lib64\""], 130 enabled: true, 131 }, 132 }, 133 134 vendor: true, 135 enabled: false, 136} 137 138cc_library_shared { 139 name: "libva-android", 140 141 shared_libs: [ 142 "libva", 143 "libdrm", 144 "liblog", 145 ], 146 147 local_include_dirs: [ 148 "va", 149 "va/drm", 150 ], 151 generated_headers: [ 152 "libva_gen_headers", 153 ], 154 export_generated_headers: [ 155 "libva_gen_headers", 156 ], 157 export_include_dirs: [ 158 ".", 159 ], 160 161 srcs: [ 162 "va/android/va_android.cpp", 163 "va/drm/va_drm_utils.c", 164 ], 165 166 cflags: [ 167 "-Werror", 168 "-Winvalid-pch", 169 "-DLOG_TAG=\"libva-android\"", 170 ], 171 172 vendor: true, 173 enabled: false, 174 arch: { 175 x86_64: { 176 enabled: true, 177 }, 178 }, 179} 180