blob: a6d962714effff6167741c1653418c4fdfdbc0e4 [file] [log] [blame]
// Copyright (c) 2017-2023 Intel Corporation
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
package {
default_applicable_licenses: ["external_intel_libva_license"],
}
license {
name: "external_intel_libva_license",
visibility: [":__subpackages__"],
license_text: [
"COPYING",
],
}
sh_binary_host {
name: "libva_gen_version_script",
src: "build/gen_version.sh",
}
genrule {
name: "libva_gen_headers",
srcs: [
"configure.ac",
"va/va_version.h.in",
"va/drm/va_drm.h",
],
tools: [
"libva_gen_version_script",
],
out: [
"va/va_version.h",
"va/va_drm.h",
],
cmd: "$(location libva_gen_version_script) " +
"$$(dirname $(location configure.ac)) " +
"$(location va/va_version.h.in) > $(location va/va_version.h);" +
"cp $(location va/drm/va_drm.h) $(location va/va_drm.h)",
}
cc_library_headers {
name: "libva_headers",
export_include_dirs: [
".",
"va",
"va/drm",
],
generated_headers: [
"libva_gen_headers",
],
export_generated_headers: [
"libva_gen_headers",
],
vendor: true,
enabled: false,
arch: {
x86_64: {
enabled: true,
},
},
}
cc_library_shared {
name: "libva",
shared_libs: [
"libdl",
"libdrm",
"libcutils",
"liblog",
],
local_include_dirs: [
"va",
],
generated_headers: [
"libva_gen_headers",
],
export_generated_headers: [
"libva_gen_headers",
],
export_include_dirs: [
".",
],
header_libs: [
"liblog_headers",
],
srcs: [
"va/va.c",
"va/va_trace.c",
"va/va_str.c",
"va/drm/va_drm.c",
"va/drm/va_drm_auth.c",
"va/drm/va_drm_utils.c",
],
cflags: [
"-Werror",
"-Winvalid-pch",
"-DANDROID",
"-DSYSCONFDIR=\"/vendor/etc\"",
"-DLOG_TAG=\"libva\"",
],
arch: {
x86_64: {
cflags: ["-DVA_DRIVERS_PATH=\"/vendor/lib64\""],
enabled: true,
},
},
vendor: true,
enabled: false,
}