blob: 5dca32a4538b640ce15eb5b42673acc00367191b [file] [log] [blame]
Joe Onorato6396e702012-05-31 23:21:46 -07001# Copyright (C) 2007 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.
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -080014
Joe Onorato6396e702012-05-31 23:21:46 -070015LOCAL_PATH := $(call my-dir)
16
Tao Bao1d866052017-04-10 16:55:57 -070017# Needed by build/make/core/Makefile.
18RECOVERY_API_VERSION := 3
19RECOVERY_FSTAB_VERSION := 2
20
Tao Baof6d25962018-03-23 22:01:43 -070021# TARGET_RECOVERY_UI_LIB should be one of librecovery_ui_{default,wear,vr} or a device-specific
22# module that defines make_device() and the exact RecoveryUI class for the target. It defaults to
23# librecovery_ui_default, which uses ScreenRecoveryUI.
24TARGET_RECOVERY_UI_LIB ?= librecovery_ui_default
25
Elliott Hughes63a31922016-06-09 17:41:22 -070026# libmounts (static library)
27# ===============================
28include $(CLEAR_VARS)
29LOCAL_SRC_FILES := mounts.cpp
Tao Bao5f85d1f2017-03-28 21:12:36 -070030LOCAL_CFLAGS := \
31 -Wall \
32 -Werror
Elliott Hughes63a31922016-06-09 17:41:22 -070033LOCAL_MODULE := libmounts
Tao Bao5f85d1f2017-03-28 21:12:36 -070034LOCAL_STATIC_LIBRARIES := libbase
Elliott Hughes63a31922016-06-09 17:41:22 -070035include $(BUILD_STATIC_LIBRARY)
36
Tao Bao1d866052017-04-10 16:55:57 -070037# librecovery (static library)
38# ===============================
39include $(CLEAR_VARS)
Tao Baof6d25962018-03-23 22:01:43 -070040
Tao Bao1d866052017-04-10 16:55:57 -070041LOCAL_SRC_FILES := \
42 install.cpp
Tao Baof6d25962018-03-23 22:01:43 -070043
Tao Baob24510c2017-04-20 17:54:27 -070044LOCAL_CFLAGS := -Wall -Werror
Tao Bao1d866052017-04-10 16:55:57 -070045LOCAL_CFLAGS += -DRECOVERY_API_VERSION=$(RECOVERY_API_VERSION)
Tao Bao7fdcb192017-04-12 23:52:20 -070046
47ifeq ($(AB_OTA_UPDATER),true)
48 LOCAL_CFLAGS += -DAB_OTA_UPDATER=1
49endif
50
Tao Bao1d866052017-04-10 16:55:57 -070051LOCAL_MODULE := librecovery
52LOCAL_STATIC_LIBRARIES := \
53 libminui \
Tao Baocfe53c22017-10-03 14:37:21 -070054 libotautil \
Tao Bao919d2c92017-04-10 16:55:57 -070055 libvintf_recovery \
Tao Bao1d866052017-04-10 16:55:57 -070056 libcrypto_utils \
57 libcrypto \
Elliott Hughese1bb7a52017-06-28 08:00:17 -070058 libbase \
59 libziparchive \
Tao Bao1d866052017-04-10 16:55:57 -070060
61include $(BUILD_STATIC_LIBRARY)
62
Tianjie Xu5fe5eb62018-03-20 16:07:39 -070063# librecovery_ui (static library)
Tao Baod80a9982016-03-03 11:43:47 -080064# ===============================
Doug Zongker18a78e02014-07-10 07:31:46 -070065include $(CLEAR_VARS)
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -080066LOCAL_SRC_FILES := \
Elliott Hughes9e7ae8a2015-04-09 13:40:31 -070067 screen_ui.cpp \
68 ui.cpp \
Luke Songe2bd8762017-06-12 16:08:33 -070069 vr_ui.cpp \
Tianjie Xu5fe5eb62018-03-20 16:07:39 -070070 wear_ui.cpp
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -080071
Tianjie Xu5fe5eb62018-03-20 16:07:39 -070072LOCAL_CFLAGS := -Wall -Werror
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -080073
Tianjie Xu5fe5eb62018-03-20 16:07:39 -070074LOCAL_MODULE := librecovery_ui
75LOCAL_STATIC_LIBRARIES := \
76 libminui \
77 libbase
Doug Zongkerfb2e3af2009-06-17 17:29:40 -070078
Tao Bao4521b702017-06-20 18:11:21 -070079ifneq ($(TARGET_RECOVERY_UI_MARGIN_HEIGHT),)
80LOCAL_CFLAGS += -DRECOVERY_UI_MARGIN_HEIGHT=$(TARGET_RECOVERY_UI_MARGIN_HEIGHT)
81else
82LOCAL_CFLAGS += -DRECOVERY_UI_MARGIN_HEIGHT=0
83endif
84
85ifneq ($(TARGET_RECOVERY_UI_MARGIN_WIDTH),)
86LOCAL_CFLAGS += -DRECOVERY_UI_MARGIN_WIDTH=$(TARGET_RECOVERY_UI_MARGIN_WIDTH)
87else
88LOCAL_CFLAGS += -DRECOVERY_UI_MARGIN_WIDTH=0
89endif
90
Tao Bao5f8dd992017-07-28 00:05:40 -070091ifneq ($(TARGET_RECOVERY_UI_TOUCH_LOW_THRESHOLD),)
92LOCAL_CFLAGS += -DRECOVERY_UI_TOUCH_LOW_THRESHOLD=$(TARGET_RECOVERY_UI_TOUCH_LOW_THRESHOLD)
93else
94LOCAL_CFLAGS += -DRECOVERY_UI_TOUCH_LOW_THRESHOLD=50
95endif
96
97ifneq ($(TARGET_RECOVERY_UI_TOUCH_HIGH_THRESHOLD),)
98LOCAL_CFLAGS += -DRECOVERY_UI_TOUCH_HIGH_THRESHOLD=$(TARGET_RECOVERY_UI_TOUCH_HIGH_THRESHOLD)
99else
100LOCAL_CFLAGS += -DRECOVERY_UI_TOUCH_HIGH_THRESHOLD=90
101endif
102
Tao Bao0470cee2017-08-02 17:11:04 -0700103ifneq ($(TARGET_RECOVERY_UI_PROGRESS_BAR_BASELINE),)
104LOCAL_CFLAGS += -DRECOVERY_UI_PROGRESS_BAR_BASELINE=$(TARGET_RECOVERY_UI_PROGRESS_BAR_BASELINE)
105else
106LOCAL_CFLAGS += -DRECOVERY_UI_PROGRESS_BAR_BASELINE=259
107endif
108
109ifneq ($(TARGET_RECOVERY_UI_ANIMATION_FPS),)
110LOCAL_CFLAGS += -DRECOVERY_UI_ANIMATION_FPS=$(TARGET_RECOVERY_UI_ANIMATION_FPS)
111else
112LOCAL_CFLAGS += -DRECOVERY_UI_ANIMATION_FPS=30
113endif
114
Tao Baoeea3af32017-08-11 13:50:24 -0700115ifneq ($(TARGET_RECOVERY_UI_MENU_UNUSABLE_ROWS),)
116LOCAL_CFLAGS += -DRECOVERY_UI_MENU_UNUSABLE_ROWS=$(TARGET_RECOVERY_UI_MENU_UNUSABLE_ROWS)
117else
118LOCAL_CFLAGS += -DRECOVERY_UI_MENU_UNUSABLE_ROWS=9
119endif
120
Luke Song9d4839c2017-06-23 14:33:46 -0700121ifneq ($(TARGET_RECOVERY_UI_VR_STEREO_OFFSET),)
122LOCAL_CFLAGS += -DRECOVERY_UI_VR_STEREO_OFFSET=$(TARGET_RECOVERY_UI_VR_STEREO_OFFSET)
123else
124LOCAL_CFLAGS += -DRECOVERY_UI_VR_STEREO_OFFSET=0
125endif
126
Tianjie Xu5fe5eb62018-03-20 16:07:39 -0700127include $(BUILD_STATIC_LIBRARY)
128
129# recovery (static executable)
130# ===============================
131include $(CLEAR_VARS)
132
133LOCAL_SRC_FILES := \
134 adb_install.cpp \
135 device.cpp \
136 fuse_sdcard_provider.cpp \
137 recovery.cpp \
138 roots.cpp \
139 rotate_logs.cpp \
140
Tianjie Xu5fe5eb62018-03-20 16:07:39 -0700141LOCAL_MODULE := recovery
142
143LOCAL_FORCE_STATIC_EXECUTABLE := true
144
145LOCAL_REQUIRED_MODULES := e2fsdroid_static mke2fs_static mke2fs.conf
146
147ifeq ($(TARGET_USERIMAGES_USE_F2FS),true)
148ifeq ($(HOST_OS),linux)
149LOCAL_REQUIRED_MODULES += sload.f2fs mkfs.f2fs
150endif
151endif
152
153LOCAL_CFLAGS += -DRECOVERY_API_VERSION=$(RECOVERY_API_VERSION)
154LOCAL_CFLAGS += -Wall -Werror
155
Dan Albert1ddd3502015-02-18 15:58:15 -0800156LOCAL_C_INCLUDES += \
157 system/vold \
Adrien Grassein3cd669f2014-11-06 14:53:50 +0100158
Tao Baof6d25962018-03-23 22:01:43 -0700159LOCAL_STATIC_LIBRARIES := \
160 librecovery \
161 $(TARGET_RECOVERY_UI_LIB) \
Tao Baob168f5f2017-04-16 15:22:13 -0700162 libverifier \
Yabin Cui53e7a062016-02-17 12:21:52 -0800163 libbatterymonitor \
Yabin Cui2f272c02016-06-24 18:22:02 -0700164 libbootloader_message \
Jin Qianded2dac2017-04-21 14:36:12 -0700165 libfs_mgr \
Alex Deymo31653662017-01-11 14:02:13 -0800166 libext4_utils \
Alex Deymo67f3aa82017-01-11 14:38:20 -0800167 libsparse \
Tianjie Xu8cf5c8f2016-09-08 20:10:11 -0700168 libziparchive \
169 libotautil \
Elliott Hughes63a31922016-06-09 17:41:22 -0700170 libmounts \
Joe Onorato6396e702012-05-31 23:21:46 -0700171 libminadbd \
Jerry Zhangd428e792017-07-13 18:17:35 -0700172 libasyncio \
Doug Zongker18a78e02014-07-10 07:31:46 -0700173 libfusesideload \
Tianjie Xu5fe5eb62018-03-20 16:07:39 -0700174 librecovery_ui \
Joe Onorato6396e702012-05-31 23:21:46 -0700175 libminui \
Joe Onorato6396e702012-05-31 23:21:46 -0700176 libpng \
Josh Gao073164f2016-08-05 15:59:05 -0700177 libcrypto_utils \
178 libcrypto \
Tao Bao919d2c92017-04-10 16:55:57 -0700179 libvintf_recovery \
180 libvintf \
Yifan Hong495c5212018-03-06 17:59:58 -0800181 libhidl-gen-utils \
Tao Bao919d2c92017-04-10 16:55:57 -0700182 libtinyxml2 \
Elliott Hughes8fd86d72015-04-13 14:36:02 -0700183 libbase \
Joe Onorato6396e702012-05-31 23:21:46 -0700184 libcutils \
Yabin Cui53e7a062016-02-17 12:21:52 -0800185 libutils \
Ying Wang4e214822013-04-09 21:41:29 -0700186 liblog \
Jin Qian000148d2017-11-03 11:52:33 -0700187 libselinux \
188 libz
Doug Zongker49c73a72010-06-29 17:36:28 -0700189
Yabin Cui53e7a062016-02-17 12:21:52 -0800190LOCAL_HAL_STATIC_LIBRARIES := libhealthd
191
Elliott Hughes01fcbe12016-05-23 17:43:41 -0700192ifeq ($(AB_OTA_UPDATER),true)
193 LOCAL_CFLAGS += -DAB_OTA_UPDATER=1
194endif
195
Ying Wang5a50b1b2015-03-10 11:56:56 -0700196LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -0800197
Mark Salyzyna4f701a2016-03-09 14:58:16 -0800198ifeq ($(BOARD_CACHEIMAGE_PARTITION_SIZE),)
Jin Qianded2dac2017-04-21 14:36:12 -0700199LOCAL_REQUIRED_MODULES += recovery-persist recovery-refresh
Mark Salyzyna4f701a2016-03-09 14:58:16 -0800200endif
201
202include $(BUILD_EXECUTABLE)
203
204# recovery-persist (system partition dynamic executable run after /data mounts)
205# ===============================
206include $(CLEAR_VARS)
Tianjie Xue113e4d2016-10-21 17:46:13 -0700207LOCAL_SRC_FILES := \
208 recovery-persist.cpp \
209 rotate_logs.cpp
Mark Salyzyna4f701a2016-03-09 14:58:16 -0800210LOCAL_MODULE := recovery-persist
211LOCAL_SHARED_LIBRARIES := liblog libbase
Tianjie Xuc89d1e72017-08-28 14:15:07 -0700212LOCAL_CFLAGS := -Wall -Werror
Mark Salyzyna4f701a2016-03-09 14:58:16 -0800213LOCAL_INIT_RC := recovery-persist.rc
214include $(BUILD_EXECUTABLE)
215
216# recovery-refresh (system partition dynamic executable run at init)
217# ===============================
218include $(CLEAR_VARS)
Tianjie Xue113e4d2016-10-21 17:46:13 -0700219LOCAL_SRC_FILES := \
220 recovery-refresh.cpp \
221 rotate_logs.cpp
Mark Salyzyna4f701a2016-03-09 14:58:16 -0800222LOCAL_MODULE := recovery-refresh
Tianjie Xue113e4d2016-10-21 17:46:13 -0700223LOCAL_SHARED_LIBRARIES := liblog libbase
Tianjie Xuc89d1e72017-08-28 14:15:07 -0700224LOCAL_CFLAGS := -Wall -Werror
Mark Salyzyna4f701a2016-03-09 14:58:16 -0800225LOCAL_INIT_RC := recovery-refresh.rc
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -0800226include $(BUILD_EXECUTABLE)
227
Tao Baod80a9982016-03-03 11:43:47 -0800228# libverifier (static library)
229# ===============================
Kenny Root7a4adb52013-10-09 10:14:35 -0700230include $(CLEAR_VARS)
231LOCAL_MODULE := libverifier
Kenny Root7a4adb52013-10-09 10:14:35 -0700232LOCAL_SRC_FILES := \
Kenny Root7a4adb52013-10-09 10:14:35 -0700233 asn1_decoder.cpp \
Tao Baod7bf82e2017-03-18 09:24:11 -0700234 verifier.cpp
Tao Bao0ecbd762017-01-16 21:16:58 -0800235LOCAL_STATIC_LIBRARIES := \
Tao Bao09e468f2017-09-29 14:39:33 -0700236 libotautil \
Tao Bao0ecbd762017-01-16 21:16:58 -0800237 libcrypto_utils \
238 libcrypto \
239 libbase
Tianjie Xuc89d1e72017-08-28 14:15:07 -0700240LOCAL_CFLAGS := -Wall -Werror
Jed Estep43291862016-02-03 17:02:09 -0800241include $(BUILD_STATIC_LIBRARY)
Doug Zongker73ae31c2009-12-09 17:01:45 -0800242
Tao Baof6d25962018-03-23 22:01:43 -0700243# Generic device that uses ScreenRecoveryUI.
244# ===============================
245include $(CLEAR_VARS)
246LOCAL_SRC_FILES := default_device.cpp
247LOCAL_CFLAGS := -Wall -Werror
248
249LOCAL_MODULE := librecovery_ui_default
250
251include $(BUILD_STATIC_LIBRARY)
252
Tao Bao0470cee2017-08-02 17:11:04 -0700253# Wear default device
254# ===============================
255include $(CLEAR_VARS)
256LOCAL_SRC_FILES := wear_device.cpp
Tianjie Xuc89d1e72017-08-28 14:15:07 -0700257LOCAL_CFLAGS := -Wall -Werror
Tao Bao0470cee2017-08-02 17:11:04 -0700258
259# Should match TARGET_RECOVERY_UI_LIB in BoardConfig.mk.
260LOCAL_MODULE := librecovery_ui_wear
261
262include $(BUILD_STATIC_LIBRARY)
263
Luke Songe2bd8762017-06-12 16:08:33 -0700264# vr headset default device
265# ===============================
266include $(CLEAR_VARS)
267
268LOCAL_SRC_FILES := vr_device.cpp
Tianjie Xuc89d1e72017-08-28 14:15:07 -0700269LOCAL_CFLAGS := -Wall -Werror
Luke Songe2bd8762017-06-12 16:08:33 -0700270
271# should match TARGET_RECOVERY_UI_LIB set in BoardConfig.mk
272LOCAL_MODULE := librecovery_ui_vr
273
274include $(BUILD_STATIC_LIBRARY)
275
Yabin Cui2f272c02016-06-24 18:22:02 -0700276include \
Alex Deymofb00d822016-11-08 15:46:07 -0800277 $(LOCAL_PATH)/boot_control/Android.mk \
Yabin Cui2f272c02016-06-24 18:22:02 -0700278 $(LOCAL_PATH)/minui/Android.mk \
Kenny Root7a4adb52013-10-09 10:14:35 -0700279 $(LOCAL_PATH)/tests/Android.mk \
Joe Onorato6396e702012-05-31 23:21:46 -0700280 $(LOCAL_PATH)/tools/Android.mk \
Joe Onorato6396e702012-05-31 23:21:46 -0700281 $(LOCAL_PATH)/updater/Android.mk \
Tao Bao7197ee02015-12-05 21:21:27 -0800282 $(LOCAL_PATH)/update_verifier/Android.mk \