2017-09-09 22:37:03 +02:00
|
|
|
//
|
|
|
|
// Copyright 2008 The Android Open Source Project
|
|
|
|
//
|
|
|
|
// Zip alignment tool
|
|
|
|
//
|
|
|
|
|
2021-02-13 06:42:54 +01:00
|
|
|
package {
|
|
|
|
default_applicable_licenses: ["Android-Apache-2.0"],
|
|
|
|
}
|
|
|
|
|
2020-10-23 02:58:12 +02:00
|
|
|
cc_defaults {
|
|
|
|
name: "zipalign_defaults",
|
|
|
|
target: {
|
|
|
|
windows: {
|
|
|
|
host_ldlibs: ["-lpthread"],
|
|
|
|
enabled: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
2017-09-09 22:37:03 +02:00
|
|
|
|
2020-10-23 02:58:12 +02:00
|
|
|
cc_library_host_static {
|
|
|
|
name: "libzipalign",
|
2017-09-09 22:37:03 +02:00
|
|
|
srcs: [
|
|
|
|
"ZipAlign.cpp",
|
|
|
|
"ZipEntry.cpp",
|
|
|
|
"ZipFile.cpp",
|
|
|
|
],
|
2020-10-23 02:58:12 +02:00
|
|
|
export_include_dirs: [
|
|
|
|
"include",
|
|
|
|
],
|
2017-10-03 22:45:03 +02:00
|
|
|
cflags: ["-Wall", "-Werror"],
|
|
|
|
|
2017-11-06 12:40:07 +01:00
|
|
|
// NOTE: Do not add any shared_libs dependencies because they will break the
|
|
|
|
// static_sdk_tools target.
|
2020-10-23 02:58:12 +02:00
|
|
|
whole_static_libs: [
|
2017-09-09 22:37:03 +02:00
|
|
|
"libutils",
|
|
|
|
"libcutils",
|
|
|
|
"liblog",
|
2017-11-06 12:40:07 +01:00
|
|
|
"libziparchive",
|
|
|
|
"libz",
|
|
|
|
"libbase",
|
2017-09-09 22:37:03 +02:00
|
|
|
"libzopfli",
|
2017-10-26 19:00:13 +02:00
|
|
|
],
|
2020-10-23 02:58:12 +02:00
|
|
|
defaults: ["zipalign_defaults"],
|
|
|
|
}
|
2017-10-26 19:00:13 +02:00
|
|
|
|
2020-10-23 02:58:12 +02:00
|
|
|
cc_binary_host {
|
|
|
|
name: "zipalign",
|
|
|
|
srcs: [
|
|
|
|
"ZipAlignMain.cpp",
|
|
|
|
],
|
|
|
|
cflags: ["-Wall", "-Werror"],
|
|
|
|
static_libs: [
|
|
|
|
"libzipalign",
|
|
|
|
],
|
|
|
|
defaults: ["zipalign_defaults"],
|
|
|
|
}
|
|
|
|
|
|
|
|
cc_test_host {
|
|
|
|
name: "zipalign_tests",
|
|
|
|
srcs: [
|
|
|
|
"tests/src/*_test.cpp",
|
|
|
|
],
|
2020-12-11 20:52:45 +01:00
|
|
|
test_options: {
|
|
|
|
unit_test: true,
|
|
|
|
},
|
2020-10-23 02:58:12 +02:00
|
|
|
static_libs: [
|
2020-10-23 02:58:12 +02:00
|
|
|
"libbase",
|
2020-10-23 02:58:12 +02:00
|
|
|
"libzipalign",
|
|
|
|
"libgmock",
|
|
|
|
],
|
|
|
|
data: [
|
2020-10-21 00:47:10 +02:00
|
|
|
"tests/data/diffOrders.zip",
|
|
|
|
"tests/data/holes.zip",
|
2020-10-23 02:58:12 +02:00
|
|
|
"tests/data/unaligned.zip",
|
|
|
|
],
|
|
|
|
defaults: ["zipalign_defaults"],
|
2020-11-05 23:58:12 +01:00
|
|
|
test_suites: ["general-tests"],
|
2017-09-09 22:37:03 +02:00
|
|
|
}
|