David Anderson | 4124123 | 2018-06-13 16:50:11 -0700 | [diff] [blame] | 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 | |
Bob Badour | 4e06008 | 2021-02-16 18:59:28 -0800 | [diff] [blame] | 17 | package { |
| 18 | default_applicable_licenses: ["Android-Apache-2.0"], |
| 19 | } |
| 20 | |
David Anderson | 4124123 | 2018-06-13 16:50:11 -0700 | [diff] [blame] | 21 | cc_defaults { |
| 22 | name: "lp_defaults", |
| 23 | cflags: [ |
| 24 | "-Werror", |
| 25 | "-Wextra", |
David Anderson | fbd6322 | 2019-11-18 15:07:45 -0800 | [diff] [blame] | 26 | "-D_FILE_OFFSET_BITS=64", |
David Anderson | 4124123 | 2018-06-13 16:50:11 -0700 | [diff] [blame] | 27 | ], |
| 28 | target: { |
| 29 | linux_bionic: { |
| 30 | enabled: true, |
| 31 | }, |
| 32 | }, |
| 33 | } |
| 34 | |
Yifan Hong | b84fb57 | 2019-03-15 14:19:08 -0700 | [diff] [blame] | 35 | cc_library_shared { |
| 36 | name: "liblpdump", |
David Anderson | 4124123 | 2018-06-13 16:50:11 -0700 | [diff] [blame] | 37 | defaults: ["lp_defaults"], |
| 38 | host_supported: true, |
David Anderson | 84e9a2f | 2018-07-27 16:14:36 -0700 | [diff] [blame] | 39 | shared_libs: [ |
David Anderson | 4124123 | 2018-06-13 16:50:11 -0700 | [diff] [blame] | 40 | "libbase", |
David Anderson | 4124123 | 2018-06-13 16:50:11 -0700 | [diff] [blame] | 41 | "liblog", |
| 42 | "liblp", |
Yifan Hong | 7ea1a93 | 2019-03-15 16:06:50 -0700 | [diff] [blame] | 43 | "libprotobuf-cpp-full", |
| 44 | ], |
| 45 | static_libs: [ |
| 46 | "libjsonpbparse", |
David Anderson | 4124123 | 2018-06-13 16:50:11 -0700 | [diff] [blame] | 47 | ], |
| 48 | srcs: [ |
| 49 | "lpdump.cc", |
Yifan Hong | 7ea1a93 | 2019-03-15 16:06:50 -0700 | [diff] [blame] | 50 | "dynamic_partitions_device_info.proto", |
David Anderson | 4124123 | 2018-06-13 16:50:11 -0700 | [diff] [blame] | 51 | ], |
Yifan Hong | 7ea1a93 | 2019-03-15 16:06:50 -0700 | [diff] [blame] | 52 | proto: { |
| 53 | type: "full", |
| 54 | }, |
David Anderson | 299abc7 | 2018-12-12 13:36:43 -0800 | [diff] [blame] | 55 | target: { |
| 56 | android: { |
| 57 | shared_libs: [ |
Yifan Hong | b84fb57 | 2019-03-15 14:19:08 -0700 | [diff] [blame] | 58 | "libcutils", |
David Anderson | 299abc7 | 2018-12-12 13:36:43 -0800 | [diff] [blame] | 59 | "libfs_mgr", |
| 60 | ], |
| 61 | }, |
| 62 | }, |
David Anderson | 4124123 | 2018-06-13 16:50:11 -0700 | [diff] [blame] | 63 | } |
| 64 | |
| 65 | cc_binary { |
Yifan Hong | b84fb57 | 2019-03-15 14:19:08 -0700 | [diff] [blame] | 66 | name: "lpdump", |
| 67 | defaults: ["lp_defaults"], |
| 68 | host_supported: true, |
| 69 | shared_libs: [ |
| 70 | "libbase", |
| 71 | "liblog", |
| 72 | "liblp", |
| 73 | ], |
Yifan Hong | 7ea1a93 | 2019-03-15 16:06:50 -0700 | [diff] [blame] | 74 | static_libs: [ |
| 75 | "libjsonpbparse", |
| 76 | ], |
Yifan Hong | b84fb57 | 2019-03-15 14:19:08 -0700 | [diff] [blame] | 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 | |
David Anderson | fbd6322 | 2019-11-18 15:07:45 -0800 | [diff] [blame] | 102 | cc_binary_host { |
David Anderson | 4124123 | 2018-06-13 16:50:11 -0700 | [diff] [blame] | 103 | name: "lpmake", |
| 104 | defaults: ["lp_defaults"], |
David Anderson | 84e9a2f | 2018-07-27 16:14:36 -0700 | [diff] [blame] | 105 | shared_libs: [ |
David Anderson | 4124123 | 2018-06-13 16:50:11 -0700 | [diff] [blame] | 106 | "libbase", |
David Anderson | 4124123 | 2018-06-13 16:50:11 -0700 | [diff] [blame] | 107 | "liblog", |
| 108 | "liblp", |
| 109 | ], |
| 110 | srcs: [ |
| 111 | "lpmake.cc", |
| 112 | ], |
David Anderson | 192e910 | 2022-01-28 14:13:56 -0800 | [diff] [blame] | 113 | target: { |
| 114 | windows: { |
| 115 | enabled: true, |
| 116 | }, |
| 117 | }, |
David Anderson | 4124123 | 2018-06-13 16:50:11 -0700 | [diff] [blame] | 118 | } |
| 119 | |
David Anderson | fbd6322 | 2019-11-18 15:07:45 -0800 | [diff] [blame] | 120 | cc_binary_host { |
| 121 | name: "lpadd", |
| 122 | defaults: ["lp_defaults"], |
| 123 | shared_libs: [ |
| 124 | "libbase", |
| 125 | "liblog", |
| 126 | "liblp", |
| 127 | "libsparse", |
| 128 | ], |
| 129 | srcs: [ |
| 130 | "lpadd.cc", |
| 131 | ], |
| 132 | } |
| 133 | |
David Anderson | 4124123 | 2018-06-13 16:50:11 -0700 | [diff] [blame] | 134 | cc_binary { |
| 135 | name: "lpflash", |
| 136 | defaults: ["lp_defaults"], |
| 137 | host_supported: true, |
David Anderson | 84e9a2f | 2018-07-27 16:14:36 -0700 | [diff] [blame] | 138 | shared_libs: [ |
David Anderson | 4124123 | 2018-06-13 16:50:11 -0700 | [diff] [blame] | 139 | "libbase", |
David Anderson | 4124123 | 2018-06-13 16:50:11 -0700 | [diff] [blame] | 140 | "liblog", |
| 141 | "liblp", |
| 142 | ], |
| 143 | srcs: [ |
| 144 | "lpflash.cc", |
| 145 | ], |
| 146 | } |
Yifan Hong | b84fb57 | 2019-03-15 14:19:08 -0700 | [diff] [blame] | 147 | |
| 148 | cc_binary { |
| 149 | name: "lpdumpd", |
| 150 | defaults: ["lp_defaults"], |
| 151 | init_rc: ["lpdumpd.rc"], |
| 152 | shared_libs: [ |
| 153 | "libbase", |
| 154 | "libbinder", |
| 155 | "liblog", |
| 156 | "liblp", |
| 157 | "liblpdump", |
| 158 | "liblpdump_interface-cpp", |
| 159 | "libutils", |
| 160 | ], |
| 161 | srcs: [ |
| 162 | "lpdumpd.cc", |
| 163 | ], |
| 164 | } |
David Anderson | e2b1be1 | 2019-04-24 18:16:27 -0700 | [diff] [blame] | 165 | |
David Anderson | fbd6322 | 2019-11-18 15:07:45 -0800 | [diff] [blame] | 166 | cc_binary_host { |
David Anderson | e2b1be1 | 2019-04-24 18:16:27 -0700 | [diff] [blame] | 167 | name: "lpunpack", |
| 168 | defaults: ["lp_defaults"], |
David Anderson | e2b1be1 | 2019-04-24 18:16:27 -0700 | [diff] [blame] | 169 | shared_libs: [ |
| 170 | "libbase", |
| 171 | "liblog", |
| 172 | "liblp", |
| 173 | "libsparse", |
| 174 | ], |
| 175 | srcs: [ |
| 176 | "lpunpack.cc", |
| 177 | ], |
| 178 | cppflags: [ |
| 179 | "-D_FILE_OFFSET_BITS=64", |
| 180 | ], |
| 181 | } |
Michael Bestas | 40b2ddc | 2022-02-18 23:29:01 +0200 | [diff] [blame] | 182 | |
| 183 | cc_binary_host { |
| 184 | name: "lpunpack_static", |
| 185 | defaults: ["lp_defaults"], |
| 186 | static_libs: [ |
| 187 | "libbase", |
| 188 | "libcrypto", |
| 189 | "libcrypto_utils", |
| 190 | "libext4_utils", |
| 191 | "liblog", |
| 192 | "liblp", |
| 193 | "libsparse", |
| 194 | "libz" |
| 195 | ], |
| 196 | srcs: [ |
| 197 | "lpunpack.cc", |
| 198 | ], |
| 199 | cppflags: [ |
| 200 | "-D_FILE_OFFSET_BITS=64", |
| 201 | ], |
| 202 | stl: "libc++_static", |
| 203 | static_executable: true, |
| 204 | } |