blob: 45aafb0437f54dcb6e3a184572437210a55d9990 [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: [
Tao Bao0deed332019-04-08 11:26:11 -070071 "libinstall",
Hridya Valsaraju20c81b32018-07-27 22:09:12 -070072 "librecovery_fastboot",
Tao Bao5fc72a12018-08-07 14:38:51 -070073 "libminui",
Tao Baoe3f09a72019-10-01 11:55:36 -070074 "librecovery_utils",
Tao Bao5fc72a12018-08-07 14:38:51 -070075 "libotautil",
Tao Bao5fc72a12018-08-07 14:38:51 -070076 ],
77}
78
79cc_library_static {
80 name: "librecovery",
81 recovery_available: true,
82
83 defaults: [
84 "librecovery_defaults",
85 ],
86
87 srcs: [
Tao Bao5fc72a12018-08-07 14:38:51 -070088 "fsck_unshare_blocks.cpp",
Tao Bao5fc72a12018-08-07 14:38:51 -070089 "recovery.cpp",
Tao Bao5fc72a12018-08-07 14:38:51 -070090 ],
91
Tianjie Xu8f397302018-08-20 13:40:47 -070092 shared_libs: [
93 "librecovery_ui",
94 ],
xunchang37304f32019-03-12 12:40:14 -070095}
96
Tao Bao5fc72a12018-08-07 14:38:51 -070097cc_binary {
98 name: "recovery",
99 recovery: true,
100
101 defaults: [
xunchang24788852019-03-22 16:08:52 -0700102 "libinstall_defaults",
Tao Bao5fc72a12018-08-07 14:38:51 -0700103 "librecovery_defaults",
Tao Bao832c9cd2019-09-27 23:32:00 -0700104 "librecovery_utils_defaults",
Tao Bao5fc72a12018-08-07 14:38:51 -0700105 ],
106
107 srcs: [
Tao Bao5fc72a12018-08-07 14:38:51 -0700108 "recovery_main.cpp",
109 ],
110
111 shared_libs: [
112 "librecovery_ui",
113 ],
114
115 static_libs: [
116 "librecovery",
117 "librecovery_ui_default",
118 ],
119
120 required: [
121 "e2fsdroid.recovery",
122 "librecovery_ui_ext",
xunchang34690ce2019-04-05 16:16:07 -0700123 "minadbd",
Tao Bao7c074d92018-08-21 12:31:51 -0700124 "mke2fs.conf.recovery",
Tao Bao5fc72a12018-08-07 14:38:51 -0700125 "mke2fs.recovery",
126 "recovery_deps",
127 ],
128}
129
Tao Baod2f2ad62018-03-23 23:24:25 -0700130// The dynamic executable that runs after /data mounts.
131cc_binary {
132 name: "recovery-persist",
133
134 defaults: [
135 "recovery_defaults",
136 ],
137
138 srcs: [
139 "recovery-persist.cpp",
Tao Baod2f2ad62018-03-23 23:24:25 -0700140 ],
141
142 shared_libs: [
143 "libbase",
144 "liblog",
Tianjie Xu2b1a4642018-09-06 11:58:55 -0700145 "libmetricslogger",
Tao Baod2f2ad62018-03-23 23:24:25 -0700146 ],
147
Jerry Zhang152933a2018-05-02 16:56:00 -0700148 static_libs: [
Tao Baoe3f09a72019-10-01 11:55:36 -0700149 "librecovery_utils",
Jerry Zhang152933a2018-05-02 16:56:00 -0700150 ],
151
Tao Baod2f2ad62018-03-23 23:24:25 -0700152 init_rc: [
153 "recovery-persist.rc",
154 ],
155}
156
157// The dynamic executable that runs at init.
158cc_binary {
159 name: "recovery-refresh",
160
161 defaults: [
162 "recovery_defaults",
163 ],
164
165 srcs: [
166 "recovery-refresh.cpp",
Tao Baod2f2ad62018-03-23 23:24:25 -0700167 ],
168
169 shared_libs: [
170 "libbase",
171 "liblog",
172 ],
173
Jerry Zhang152933a2018-05-02 16:56:00 -0700174 static_libs: [
Tao Baoe3f09a72019-10-01 11:55:36 -0700175 "librecovery_utils",
Jerry Zhang152933a2018-05-02 16:56:00 -0700176 ],
177
Tao Baod2f2ad62018-03-23 23:24:25 -0700178 init_rc: [
179 "recovery-refresh.rc",
180 ],
181}
Tao Baoef5e38f2018-07-24 15:34:39 -0700182
183filegroup {
184 name: "res-testdata",
185
186 srcs: [
187 "res-*/images/*_text.png",
188 ],
189}