• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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    target: {
114        windows: {
115            enabled: true,
116        },
117    },
118}
119
120cc_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
134cc_binary {
135    name: "lpflash",
136    defaults: ["lp_defaults"],
137    host_supported: true,
138    shared_libs: [
139        "libbase",
140        "liblog",
141        "liblp",
142    ],
143    srcs: [
144        "lpflash.cc",
145    ],
146}
147
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}
165
166cc_binary_host {
167    name: "lpunpack",
168    defaults: ["lp_defaults"],
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}
182