blob: b8e3bf12fef1633390b1d4ad2b074e50f35b3406 [file] [log] [blame]
David Anderson41241232018-06-13 16:50:11 -07001//
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 Badour4e060082021-02-16 18:59:28 -080017package {
18 default_applicable_licenses: ["Android-Apache-2.0"],
19}
20
David Anderson41241232018-06-13 16:50:11 -070021cc_defaults {
22 name: "lp_defaults",
23 cflags: [
24 "-Werror",
25 "-Wextra",
David Andersonfbd63222019-11-18 15:07:45 -080026 "-D_FILE_OFFSET_BITS=64",
David Anderson41241232018-06-13 16:50:11 -070027 ],
28 target: {
29 linux_bionic: {
30 enabled: true,
31 },
32 },
33}
34
Yifan Hongb84fb572019-03-15 14:19:08 -070035cc_library_shared {
36 name: "liblpdump",
David Anderson41241232018-06-13 16:50:11 -070037 defaults: ["lp_defaults"],
38 host_supported: true,
David Anderson84e9a2f2018-07-27 16:14:36 -070039 shared_libs: [
David Anderson41241232018-06-13 16:50:11 -070040 "libbase",
David Anderson41241232018-06-13 16:50:11 -070041 "liblog",
42 "liblp",
Yifan Hong7ea1a932019-03-15 16:06:50 -070043 "libprotobuf-cpp-full",
44 ],
45 static_libs: [
46 "libjsonpbparse",
David Anderson41241232018-06-13 16:50:11 -070047 ],
48 srcs: [
49 "lpdump.cc",
Yifan Hong7ea1a932019-03-15 16:06:50 -070050 "dynamic_partitions_device_info.proto",
David Anderson41241232018-06-13 16:50:11 -070051 ],
Yifan Hong7ea1a932019-03-15 16:06:50 -070052 proto: {
53 type: "full",
54 },
David Anderson299abc72018-12-12 13:36:43 -080055 target: {
56 android: {
57 shared_libs: [
Yifan Hongb84fb572019-03-15 14:19:08 -070058 "libcutils",
David Anderson299abc72018-12-12 13:36:43 -080059 "libfs_mgr",
60 ],
61 },
62 },
David Anderson41241232018-06-13 16:50:11 -070063}
64
65cc_binary {
Yifan Hongb84fb572019-03-15 14:19:08 -070066 name: "lpdump",
67 defaults: ["lp_defaults"],
68 host_supported: true,
69 shared_libs: [
70 "libbase",
71 "liblog",
72 "liblp",
73 ],
Yifan Hong7ea1a932019-03-15 16:06:50 -070074 static_libs: [
75 "libjsonpbparse",
76 ],
Yifan Hongb84fb572019-03-15 14:19:08 -070077 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 Andersonfbd63222019-11-18 15:07:45 -0800102cc_binary_host {
David Anderson41241232018-06-13 16:50:11 -0700103 name: "lpmake",
104 defaults: ["lp_defaults"],
David Anderson84e9a2f2018-07-27 16:14:36 -0700105 shared_libs: [
David Anderson41241232018-06-13 16:50:11 -0700106 "libbase",
David Anderson41241232018-06-13 16:50:11 -0700107 "liblog",
108 "liblp",
109 ],
110 srcs: [
111 "lpmake.cc",
112 ],
David Anderson192e9102022-01-28 14:13:56 -0800113 target: {
114 windows: {
115 enabled: true,
116 },
117 },
David Anderson41241232018-06-13 16:50:11 -0700118}
119
David Andersonfbd63222019-11-18 15:07:45 -0800120cc_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 Anderson41241232018-06-13 16:50:11 -0700134cc_binary {
135 name: "lpflash",
136 defaults: ["lp_defaults"],
137 host_supported: true,
David Anderson84e9a2f2018-07-27 16:14:36 -0700138 shared_libs: [
David Anderson41241232018-06-13 16:50:11 -0700139 "libbase",
David Anderson41241232018-06-13 16:50:11 -0700140 "liblog",
141 "liblp",
142 ],
143 srcs: [
144 "lpflash.cc",
145 ],
146}
Yifan Hongb84fb572019-03-15 14:19:08 -0700147
148cc_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 Andersone2b1be12019-04-24 18:16:27 -0700165
David Andersonfbd63222019-11-18 15:07:45 -0800166cc_binary_host {
David Andersone2b1be12019-04-24 18:16:27 -0700167 name: "lpunpack",
168 defaults: ["lp_defaults"],
David Andersone2b1be12019-04-24 18:16:27 -0700169 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 Bestas40b2ddc2022-02-18 23:29:01 +0200182
183cc_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}