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