1// 2// Copyright (C) 2018 The Android Open Source Project 3// 4// Licensed under the Apache License, Version 2.0 (the "License"); 5// you may not use this file except in compliance with the License. 6// You may obtain a copy of the License at 7// 8// http://www.apache.org/licenses/LICENSE-2.0 9// 10// Unless required by applicable law or agreed to in writing, software 11// distributed under the License is distributed on an "AS IS" BASIS, 12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13// See the License for the specific language governing permissions and 14// limitations under the License. 15// 16 17liblp_lib_deps = [ 18 "libbase", 19 "liblog", 20 "libcrypto", 21 "libcrypto_utils", 22 "libsparse", 23 "libext4_utils", 24 "libz", 25] 26 27cc_library { 28 name: "liblp", 29 host_supported: true, 30 recovery_available: true, 31 defaults: ["fs_mgr_defaults"], 32 cppflags: [ 33 "-D_FILE_OFFSET_BITS=64", 34 ], 35 srcs: [ 36 "builder.cpp", 37 "images.cpp", 38 "partition_opener.cpp", 39 "reader.cpp", 40 "utility.cpp", 41 "writer.cpp", 42 ], 43 shared_libs: liblp_lib_deps, 44 target: { 45 windows: { 46 enabled: true, 47 }, 48 android: { 49 shared_libs: [ 50 "libcutils", 51 ], 52 }, 53 }, 54 export_include_dirs: ["include"], 55} 56 57cc_test { 58 name: "liblp_test_static", 59 defaults: ["fs_mgr_defaults"], 60 cppflags: [ 61 "-Wno-unused-parameter", 62 ], 63 static_libs: [ 64 "libgmock", 65 "libfs_mgr", 66 "liblp", 67 ] + liblp_lib_deps, 68 stl: "libc++_static", 69 srcs: [ 70 "builder_test.cpp", 71 "io_test.cpp", 72 "test_partition_opener.cpp", 73 "utility_test.cpp", 74 ], 75 target: { 76 android: { 77 static_libs: [ 78 "libcutils", 79 ], 80 }, 81 }, 82} 83