Skip to content

Commit

Permalink
Update Android.bp to generate va_version.h and build only for x86_64
Browse files Browse the repository at this point in the history
Changes include:
- Updated Android.bp to add license package and enable it only for
x86_64
- Added genrule to generate the va_version.h.
- Removed va_version.h

Signed-off-by: JeevakaPrabu <[email protected]>
Signed-off-by: Andreas Huber <[email protected]>
  • Loading branch information
JeevakaPrabu committed Oct 2, 2024
1 parent 288acbf commit fce7b82
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 111 deletions.
86 changes: 63 additions & 23 deletions Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,38 @@
// 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_version",
srcs: [
"configure.ac",
"va/va_version.h.in",
],
tools: [
"libva_gen_version_script",
],
out: ["va/va_version.h"],
cmd: "$(location libva_gen_version_script) " +
"$$(dirname $(location configure.ac)) " +
"$(location va/va_version.h.in) > $(out)",
}

cc_library_headers {
name: "libva_headers",

Expand All @@ -27,7 +59,20 @@ cc_library_headers {
"va/drm"
],

generated_headers: [
"libva_gen_version",
],
export_generated_headers: [
"libva_gen_version",
],

vendor: true,
enabled: false,
arch: {
x86_64: {
enabled: true,
},
},
}

cc_library_shared {
Expand All @@ -41,16 +86,18 @@ cc_library_shared {
],

local_include_dirs: [
".",
"va"
],

header_libs: [
"libutils_headers",
generated_headers: [
"libva_gen_version",
],
export_generated_headers: [
"libva_gen_version",
],

export_include_dirs: [
".",
header_libs: [
"liblog_headers",
],

srcs: [
Expand All @@ -64,30 +111,25 @@ cc_library_shared {

cflags: [
"-Werror",
"-Wno-error",
"-Winvalid-pch",
"-DSYSCONFDIR=\"/vendor/etc\"",
"-DLOG_TAG=\"libva\"",
],

arch: {
x86: {
cflags: ["-DVA_DRIVERS_PATH=\"/vendor/lib\""],
},
x86_64: {
cflags: ["-DVA_DRIVERS_PATH=\"/vendor/lib64\""],
enabled: true,
},
},

vendor: true,
enabled: false,
}

cc_library_shared {
name: "libva-android",

static_libs: [
"libarect",
],

shared_libs: [
"libva",
"libdrm",
Expand All @@ -99,24 +141,22 @@ cc_library_shared {
"va/drm",
],

header_libs: [
"libnativebase_headers",
"libutils_headers",
],

include_dirs: [
],

srcs: [
"va/android/va_android.cpp",
"va/drm/va_drm_utils.c",
],

cflags: [
"-Wall",
"-Werror",
"-Wno-error",
"-Winvalid-pch",
"-DLOG_TAG=\"libva-android\"",
],

vendor: true,
enabled: false,
arch: {
x86_64: {
enabled: true,
},
},
}
88 changes: 0 additions & 88 deletions va/va_version.h

This file was deleted.

0 comments on commit fce7b82

Please sign in to comment.