• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright (C) 2018 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//      http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15package {
16    // See: http://go/android-license-faq
17    // A large-scale-change added 'default_applicable_licenses' to import
18    // all of the 'license_kinds' from "bootable_recovery_license"
19    // to get the below license kinds:
20    //   SPDX-license-identifier-Apache-2.0
21    default_applicable_licenses: ["bootable_recovery_license"],
22}
23
24cc_defaults {
25    name: "libupdater_static_libs",
26
27    static_libs: [
28        "libapplypatch",
29        "libbootloader_message",
30        "libbspatch",
31        "libedify",
32        "libotautil",
33        "libext4_utils",
34        "libdm",
35        "libfec",
36        "libfec_rs",
37        "libavb",
38        "libverity_tree",
39        "liblog",
40        "liblp",
41        "libselinux",
42        "libsparse",
43        "libsquashfs_utils",
44        "libbrotli",
45        "libbz",
46        "libziparchive",
47        "libz",
48        "libbase",
49        "libcrypto_utils",
50        "libcutils",
51        "libutils",
52    ],
53    header_libs: [
54        "libgtest_prod_headers",
55    ],
56}
57
58cc_defaults {
59    name: "libupdater_defaults",
60
61    defaults: [
62        "recovery_defaults",
63        "libupdater_static_libs",
64    ],
65
66    shared_libs: [
67        "libcrypto",
68    ],
69}
70
71cc_defaults {
72    name: "libupdater_device_defaults",
73
74    static_libs: [
75        "libfs_mgr",
76        "libtune2fs",
77
78        "libext2_com_err",
79        "libext2_blkid",
80        "libext2_quota",
81        "libext2_uuid",
82        "libext2_e2p",
83        "libext2fs",
84    ],
85}
86
87cc_library_static {
88    name: "libupdater_core",
89
90    host_supported: true,
91
92    defaults: [
93        "recovery_defaults",
94        "libupdater_defaults",
95    ],
96
97    srcs: [
98        "blockimg.cpp",
99        "commands.cpp",
100        "install.cpp",
101        "mounts.cpp",
102        "updater.cpp",
103    ],
104
105    target: {
106        darwin: {
107            enabled: false,
108        },
109    },
110
111    export_include_dirs: [
112        "include",
113    ],
114}
115
116cc_library_static {
117    name: "libupdater_device",
118
119    defaults: [
120        "recovery_defaults",
121        "libupdater_defaults",
122        "libupdater_device_defaults",
123    ],
124
125    srcs: [
126        "dynamic_partitions.cpp",
127        "updater_runtime.cpp",
128        "updater_runtime_dynamic_partitions.cpp",
129    ],
130
131    static_libs: [
132        "libupdater_core",
133    ],
134
135    include_dirs: [
136        "external/e2fsprogs/misc",
137    ],
138
139    export_include_dirs: [
140        "include",
141    ],
142}
143
144cc_library_host_static {
145    name: "libupdater_host",
146
147    defaults: [
148        "recovery_defaults",
149        "libupdater_defaults",
150    ],
151
152    srcs: [
153        "build_info.cpp",
154        "dynamic_partitions.cpp",
155        "simulator_runtime.cpp",
156        "target_files.cpp",
157    ],
158
159    static_libs: [
160        "libupdater_core",
161        "libfstab",
162        "libc++fs",
163    ],
164
165    target: {
166        darwin: {
167            enabled: false,
168        },
169    },
170
171    export_include_dirs: [
172        "include",
173    ],
174}
175
176cc_binary_host {
177    name: "update_host_simulator",
178    defaults: ["libupdater_static_libs"],
179
180    srcs: ["update_simulator_main.cpp"],
181
182    cflags: [
183        "-Wall",
184        "-Werror",
185    ],
186
187    static_libs: [
188        "libupdater_host",
189        "libupdater_core",
190        "libcrypto_static",
191        "libfstab",
192        "libc++fs",
193    ],
194
195    target: {
196        darwin: {
197            enabled: false,
198        },
199    },
200}
201