blob: d426e27124a3ce20ddabbee84be2882f26ed9971 [file] [log] [blame]
//
// Copyright (C) 2018 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
cc_library_headers {
name: "libfiemap_headers",
recovery_available: true,
export_include_dirs: ["include"],
}
cc_defaults {
name: "libfiemap_defaults",
defaults: ["fs_mgr_defaults"],
cflags: [
"-D_FILE_OFFSET_BITS=64",
"-Wall",
"-Werror",
],
srcs: [
"fiemap_writer.cpp",
"image_manager.cpp",
"metadata.cpp",
"split_fiemap_writer.cpp",
"utility.cpp",
],
static_libs: [
"libdm",
"libext2_uuid",
"libext4_utils",
"liblp",
"libfs_mgr",
],
shared_libs: [
"libbase",
],
header_libs: [
"libfiemap_headers",
"liblog_headers",
],
export_shared_lib_headers: [
"libbase",
],
export_header_lib_headers: [
"libfiemap_headers",
],
}
// Open up a binder IImageManager interface.
cc_library_static {
name: "libfiemap_binder",
defaults: ["libfiemap_defaults"],
srcs: [
"binder.cpp",
],
whole_static_libs: [
"gsi_aidl_interface-cpp",
"libgsi",
],
shared_libs: [
"libbinder",
],
}
// Open up a passthrough IImageManager interface. Use libfiemap_binder whenever
// possible. This should only be used when binder is not available.
cc_library_static {
name: "libfiemap_passthrough",
defaults: ["libfiemap_defaults"],
recovery_available: true,
srcs: [
"passthrough.cpp",
],
}
cc_test {
name: "fiemap_writer_test",
defaults: ["libfiemap_defaults"],
static_libs: [
"libbase",
"libdm",
"liblog",
],
data: [
"testdata/unaligned_file",
"testdata/file_4k",
"testdata/file_32k",
],
srcs: [
"fiemap_writer_test.cpp",
],
}
cc_test {
name: "fiemap_image_test",
defaults: ["libfiemap_defaults"],
static_libs: [
"libdm",
"libext4_utils",
"libfs_mgr",
"liblp",
],
shared_libs: [
"libcrypto",
"libcrypto_utils",
"libcutils",
"liblog",
],
srcs: [
"image_test.cpp",
],
}