blob: aefcabe869be7a48d92ed2a25c72aa279f050cda [file] [log] [blame]
Tao Baod2f2ad62018-03-23 23:24:25 -07001// 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
15cc_defaults {
16 name: "recovery_defaults",
17
18 cflags: [
Tao Bao818f9382018-08-06 15:52:24 -070019 "-D_FILE_OFFSET_BITS=64",
20
21 // Must be the same as RECOVERY_API_VERSION.
22 "-DRECOVERY_API_VERSION=3",
23
Tao Baod2f2ad62018-03-23 23:24:25 -070024 "-Wall",
25 "-Werror",
26 ],
27}
28
Hridya Valsaraju20c81b32018-07-27 22:09:12 -070029cc_library_static {
30 name: "librecovery_fastboot",
31 recovery_available: true,
32 defaults: [
33 "recovery_defaults",
34 ],
35
36 srcs: [
37 "fastboot/fastboot.cpp",
38 ],
39
40 shared_libs: [
41 "libbase",
42 "libbootloader_message",
43 "libcutils",
44 "liblog",
Tianjie Xu8f397302018-08-20 13:40:47 -070045 "librecovery_ui",
Hridya Valsaraju20c81b32018-07-27 22:09:12 -070046 ],
47
48 static_libs: [
49 "librecovery_ui_default",
50 ],
51}
52
Tao Bao5fc72a12018-08-07 14:38:51 -070053cc_defaults {
54 name: "librecovery_defaults",
55
56 defaults: [
57 "recovery_defaults",
58 ],
59
60 shared_libs: [
Tao Bao5fc72a12018-08-07 14:38:51 -070061 "libbase",
62 "libbootloader_message",
63 "libcrypto",
Tao Bao5fc72a12018-08-07 14:38:51 -070064 "libcutils",
Tao Bao5fc72a12018-08-07 14:38:51 -070065 "libfs_mgr",
Tao Bao5fc72a12018-08-07 14:38:51 -070066 "liblog",
Tao Bao5fc72a12018-08-07 14:38:51 -070067 "libziparchive",
68 ],
69
70 static_libs: [
Tianjie Xu58a27692019-08-06 12:32:05 -070071 "libc++fs",
Tao Bao0deed332019-04-08 11:26:11 -070072 "libinstall",
Hridya Valsaraju20c81b32018-07-27 22:09:12 -070073 "librecovery_fastboot",
Tao Bao5fc72a12018-08-07 14:38:51 -070074 "libminui",
Tao Baoe3f09a72019-10-01 11:55:36 -070075 "librecovery_utils",
Tao Bao5fc72a12018-08-07 14:38:51 -070076 "libotautil",
Tao Bao5fc72a12018-08-07 14:38:51 -070077 ],
78}
79
80cc_library_static {
81 name: "librecovery",
82 recovery_available: true,
83
84 defaults: [
85 "librecovery_defaults",
86 ],
87
88 srcs: [
Tao Bao5fc72a12018-08-07 14:38:51 -070089 "fsck_unshare_blocks.cpp",
Tao Bao5fc72a12018-08-07 14:38:51 -070090 "recovery.cpp",
Tao Bao5fc72a12018-08-07 14:38:51 -070091 ],
92
Tianjie Xu8f397302018-08-20 13:40:47 -070093 shared_libs: [
94 "librecovery_ui",
95 ],
xunchang37304f32019-03-12 12:40:14 -070096}
97
Tao Bao5fc72a12018-08-07 14:38:51 -070098cc_binary {
99 name: "recovery",
100 recovery: true,
101
102 defaults: [
xunchang24788852019-03-22 16:08:52 -0700103 "libinstall_defaults",
Tao Bao5fc72a12018-08-07 14:38:51 -0700104 "librecovery_defaults",
Tao Bao832c9cd2019-09-27 23:32:00 -0700105 "librecovery_utils_defaults",
Tao Bao5fc72a12018-08-07 14:38:51 -0700106 ],
107
108 srcs: [
Tao Bao5fc72a12018-08-07 14:38:51 -0700109 "recovery_main.cpp",
110 ],
111
112 shared_libs: [
113 "librecovery_ui",
114 ],
115
116 static_libs: [
117 "librecovery",
118 "librecovery_ui_default",
119 ],
120
121 required: [
122 "e2fsdroid.recovery",
123 "librecovery_ui_ext",
xunchang34690ce2019-04-05 16:16:07 -0700124 "minadbd",
Tao Bao7c074d92018-08-21 12:31:51 -0700125 "mke2fs.conf.recovery",
Tao Bao5fc72a12018-08-07 14:38:51 -0700126 "mke2fs.recovery",
127 "recovery_deps",
128 ],
129}
130
Tao Baod2f2ad62018-03-23 23:24:25 -0700131// The dynamic executable that runs after /data mounts.
132cc_binary {
133 name: "recovery-persist",
134
135 defaults: [
136 "recovery_defaults",
137 ],
138
139 srcs: [
140 "recovery-persist.cpp",
Tao Baod2f2ad62018-03-23 23:24:25 -0700141 ],
142
143 shared_libs: [
144 "libbase",
145 "liblog",
Tianjie Xu2b1a4642018-09-06 11:58:55 -0700146 "libmetricslogger",
Tao Baod2f2ad62018-03-23 23:24:25 -0700147 ],
148
Jerry Zhang152933a2018-05-02 16:56:00 -0700149 static_libs: [
Tao Baoe3f09a72019-10-01 11:55:36 -0700150 "librecovery_utils",
Jerry Zhang152933a2018-05-02 16:56:00 -0700151 ],
152
Tao Baod2f2ad62018-03-23 23:24:25 -0700153 init_rc: [
154 "recovery-persist.rc",
155 ],
156}
157
158// The dynamic executable that runs at init.
159cc_binary {
160 name: "recovery-refresh",
161
162 defaults: [
163 "recovery_defaults",
164 ],
165
166 srcs: [
167 "recovery-refresh.cpp",
Tao Baod2f2ad62018-03-23 23:24:25 -0700168 ],
169
170 shared_libs: [
171 "libbase",
172 "liblog",
173 ],
174
Jerry Zhang152933a2018-05-02 16:56:00 -0700175 static_libs: [
Tao Baoe3f09a72019-10-01 11:55:36 -0700176 "librecovery_utils",
Jerry Zhang152933a2018-05-02 16:56:00 -0700177 ],
178
Tao Baod2f2ad62018-03-23 23:24:25 -0700179 init_rc: [
180 "recovery-refresh.rc",
181 ],
182}
Tao Baoef5e38f2018-07-24 15:34:39 -0700183
184filegroup {
185 name: "res-testdata",
186
187 srcs: [
188 "res-*/images/*_text.png",
189 ],
190}