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 17package { 18 default_applicable_licenses: ["Android-Apache-2.0"], 19} 20 21cc_defaults { 22 name: "lp_defaults", 23 cflags: [ 24 "-Werror", 25 "-Wextra", 26 "-D_FILE_OFFSET_BITS=64", 27 ], 28 target: { 29 linux_bionic: { 30 enabled: true, 31 }, 32 }, 33} 34 35cc_library_shared { 36 name: "liblpdump", 37 defaults: ["lp_defaults"], 38 host_supported: true, 39 shared_libs: [ 40 "libbase", 41 "liblog", 42 "liblp", 43 "libprotobuf-cpp-full", 44 ], 45 static_libs: [ 46 "libjsonpbparse", 47 ], 48 srcs: [ 49 "lpdump.cc", 50 "dynamic_partitions_device_info.proto", 51 ], 52 proto: { 53 type: "full", 54 }, 55 target: { 56 android: { 57 shared_libs: [ 58 "libcutils", 59 "libfs_mgr", 60 ], 61 }, 62 }, 63} 64 65cc_binary { 66 name: "lpdump", 67 defaults: ["lp_defaults"], 68 host_supported: true, 69 shared_libs: [ 70 "libbase", 71 "liblog", 72 "liblp", 73 ], 74 static_libs: [ 75 "libjsonpbparse", 76 ], 77 target: { 78 android: { 79 srcs: [ 80 "lpdump_target.cc", 81 ], 82 shared_libs: [ 83 "liblpdump_interface-cpp", 84 "libbinder", 85 "libutils", 86 ], 87 required: [ 88 "lpdumpd", 89 ], 90 }, 91 host: { 92 srcs: [ 93 "lpdump_host.cc", 94 ], 95 shared_libs: [ 96 "liblpdump", 97 ], 98 }, 99 }, 100} 101 102cc_binary_host { 103 name: "lpmake", 104 defaults: ["lp_defaults"], 105 shared_libs: [ 106 "libbase", 107 "liblog", 108 "liblp", 109 ], 110 srcs: [ 111 "lpmake.cc", 112 ], 113} 114 115cc_binary_host { 116 name: "lpadd", 117 defaults: ["lp_defaults"], 118 shared_libs: [ 119 "libbase", 120 "liblog", 121 "liblp", 122 "libsparse", 123 ], 124 srcs: [ 125 "lpadd.cc", 126 ], 127} 128 129cc_binary { 130 name: "lpflash", 131 defaults: ["lp_defaults"], 132 host_supported: true, 133 shared_libs: [ 134 "libbase", 135 "liblog", 136 "liblp", 137 ], 138 srcs: [ 139 "lpflash.cc", 140 ], 141} 142 143cc_binary { 144 name: "lpdumpd", 145 defaults: ["lp_defaults"], 146 init_rc: ["lpdumpd.rc"], 147 shared_libs: [ 148 "libbase", 149 "libbinder", 150 "liblog", 151 "liblp", 152 "liblpdump", 153 "liblpdump_interface-cpp", 154 "libutils", 155 ], 156 srcs: [ 157 "lpdumpd.cc", 158 ], 159} 160 161cc_binary_host { 162 name: "lpunpack", 163 defaults: ["lp_defaults"], 164 shared_libs: [ 165 "libbase", 166 "liblog", 167 "liblp", 168 "libsparse", 169 ], 170 srcs: [ 171 "lpunpack.cc", 172 ], 173 cppflags: [ 174 "-D_FILE_OFFSET_BITS=64", 175 ], 176} 177