blob: 08eb739ddf7779b36c8eb73caada9252d5b73c64 [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
Tao Bao1d866052017-04-10 16:55:57 -070026# librecovery (static library)
27# ===============================
28include $(CLEAR_VARS)
Tao Baof6d25962018-03-23 22:01:43 -070029
Tao Bao1d866052017-04-10 16:55:57 -070030LOCAL_SRC_FILES := \
31 install.cpp
Tao Baof6d25962018-03-23 22:01:43 -070032
Tao Baob24510c2017-04-20 17:54:27 -070033LOCAL_CFLAGS := -Wall -Werror
Tao Bao1d866052017-04-10 16:55:57 -070034LOCAL_CFLAGS += -DRECOVERY_API_VERSION=$(RECOVERY_API_VERSION)
Tao Bao7fdcb192017-04-12 23:52:20 -070035
36ifeq ($(AB_OTA_UPDATER),true)
37 LOCAL_CFLAGS += -DAB_OTA_UPDATER=1
38endif
39
Tao Bao1d866052017-04-10 16:55:57 -070040LOCAL_MODULE := librecovery
Tao Baod2f2ad62018-03-23 23:24:25 -070041
Tao Bao1d866052017-04-10 16:55:57 -070042LOCAL_STATIC_LIBRARIES := \
43 libminui \
Tao Baocfe53c22017-10-03 14:37:21 -070044 libotautil \
Tao Bao919d2c92017-04-10 16:55:57 -070045 libvintf_recovery \
Tao Bao1d866052017-04-10 16:55:57 -070046 libcrypto_utils \
47 libcrypto \
Elliott Hughese1bb7a52017-06-28 08:00:17 -070048 libbase \
49 libziparchive \
Tao Bao1d866052017-04-10 16:55:57 -070050
51include $(BUILD_STATIC_LIBRARY)
52
Tianjie Xu5fe5eb62018-03-20 16:07:39 -070053# librecovery_ui (static library)
Tao Baod80a9982016-03-03 11:43:47 -080054# ===============================
Doug Zongker18a78e02014-07-10 07:31:46 -070055include $(CLEAR_VARS)
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -080056LOCAL_SRC_FILES := \
Elliott Hughes9e7ae8a2015-04-09 13:40:31 -070057 screen_ui.cpp \
58 ui.cpp \
Luke Songe2bd8762017-06-12 16:08:33 -070059 vr_ui.cpp \
Tianjie Xu5fe5eb62018-03-20 16:07:39 -070060 wear_ui.cpp
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -080061
Tianjie Xu5fe5eb62018-03-20 16:07:39 -070062LOCAL_CFLAGS := -Wall -Werror
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -080063
Tianjie Xu5fe5eb62018-03-20 16:07:39 -070064LOCAL_MODULE := librecovery_ui
Tao Baod2f2ad62018-03-23 23:24:25 -070065
Tianjie Xu5fe5eb62018-03-20 16:07:39 -070066LOCAL_STATIC_LIBRARIES := \
67 libminui \
68 libbase
Doug Zongkerfb2e3af2009-06-17 17:29:40 -070069
Tao Bao4521b702017-06-20 18:11:21 -070070ifneq ($(TARGET_RECOVERY_UI_MARGIN_HEIGHT),)
71LOCAL_CFLAGS += -DRECOVERY_UI_MARGIN_HEIGHT=$(TARGET_RECOVERY_UI_MARGIN_HEIGHT)
72else
73LOCAL_CFLAGS += -DRECOVERY_UI_MARGIN_HEIGHT=0
74endif
75
76ifneq ($(TARGET_RECOVERY_UI_MARGIN_WIDTH),)
77LOCAL_CFLAGS += -DRECOVERY_UI_MARGIN_WIDTH=$(TARGET_RECOVERY_UI_MARGIN_WIDTH)
78else
79LOCAL_CFLAGS += -DRECOVERY_UI_MARGIN_WIDTH=0
80endif
81
Tao Bao5f8dd992017-07-28 00:05:40 -070082ifneq ($(TARGET_RECOVERY_UI_TOUCH_LOW_THRESHOLD),)
83LOCAL_CFLAGS += -DRECOVERY_UI_TOUCH_LOW_THRESHOLD=$(TARGET_RECOVERY_UI_TOUCH_LOW_THRESHOLD)
84else
85LOCAL_CFLAGS += -DRECOVERY_UI_TOUCH_LOW_THRESHOLD=50
86endif
87
88ifneq ($(TARGET_RECOVERY_UI_TOUCH_HIGH_THRESHOLD),)
89LOCAL_CFLAGS += -DRECOVERY_UI_TOUCH_HIGH_THRESHOLD=$(TARGET_RECOVERY_UI_TOUCH_HIGH_THRESHOLD)
90else
91LOCAL_CFLAGS += -DRECOVERY_UI_TOUCH_HIGH_THRESHOLD=90
92endif
93
Tao Bao0470cee2017-08-02 17:11:04 -070094ifneq ($(TARGET_RECOVERY_UI_PROGRESS_BAR_BASELINE),)
95LOCAL_CFLAGS += -DRECOVERY_UI_PROGRESS_BAR_BASELINE=$(TARGET_RECOVERY_UI_PROGRESS_BAR_BASELINE)
96else
97LOCAL_CFLAGS += -DRECOVERY_UI_PROGRESS_BAR_BASELINE=259
98endif
99
100ifneq ($(TARGET_RECOVERY_UI_ANIMATION_FPS),)
101LOCAL_CFLAGS += -DRECOVERY_UI_ANIMATION_FPS=$(TARGET_RECOVERY_UI_ANIMATION_FPS)
102else
103LOCAL_CFLAGS += -DRECOVERY_UI_ANIMATION_FPS=30
104endif
105
Tao Baoeea3af32017-08-11 13:50:24 -0700106ifneq ($(TARGET_RECOVERY_UI_MENU_UNUSABLE_ROWS),)
107LOCAL_CFLAGS += -DRECOVERY_UI_MENU_UNUSABLE_ROWS=$(TARGET_RECOVERY_UI_MENU_UNUSABLE_ROWS)
108else
109LOCAL_CFLAGS += -DRECOVERY_UI_MENU_UNUSABLE_ROWS=9
110endif
111
Luke Song9d4839c2017-06-23 14:33:46 -0700112ifneq ($(TARGET_RECOVERY_UI_VR_STEREO_OFFSET),)
113LOCAL_CFLAGS += -DRECOVERY_UI_VR_STEREO_OFFSET=$(TARGET_RECOVERY_UI_VR_STEREO_OFFSET)
114else
115LOCAL_CFLAGS += -DRECOVERY_UI_VR_STEREO_OFFSET=0
116endif
117
Tianjie Xu5fe5eb62018-03-20 16:07:39 -0700118include $(BUILD_STATIC_LIBRARY)
119
120# recovery (static executable)
121# ===============================
122include $(CLEAR_VARS)
123
124LOCAL_SRC_FILES := \
125 adb_install.cpp \
126 device.cpp \
127 fuse_sdcard_provider.cpp \
128 recovery.cpp \
129 roots.cpp \
130 rotate_logs.cpp \
131
Tianjie Xu5fe5eb62018-03-20 16:07:39 -0700132LOCAL_MODULE := recovery
133
134LOCAL_FORCE_STATIC_EXECUTABLE := true
135
136LOCAL_REQUIRED_MODULES := e2fsdroid_static mke2fs_static mke2fs.conf
137
138ifeq ($(TARGET_USERIMAGES_USE_F2FS),true)
139ifeq ($(HOST_OS),linux)
140LOCAL_REQUIRED_MODULES += sload.f2fs mkfs.f2fs
141endif
142endif
143
144LOCAL_CFLAGS += -DRECOVERY_API_VERSION=$(RECOVERY_API_VERSION)
145LOCAL_CFLAGS += -Wall -Werror
146
Dan Albert1ddd3502015-02-18 15:58:15 -0800147LOCAL_C_INCLUDES += \
148 system/vold \
Adrien Grassein3cd669f2014-11-06 14:53:50 +0100149
Tao Baof6d25962018-03-23 22:01:43 -0700150LOCAL_STATIC_LIBRARIES := \
151 librecovery \
152 $(TARGET_RECOVERY_UI_LIB) \
Tao Baob168f5f2017-04-16 15:22:13 -0700153 libverifier \
Yabin Cui53e7a062016-02-17 12:21:52 -0800154 libbatterymonitor \
Yabin Cui2f272c02016-06-24 18:22:02 -0700155 libbootloader_message \
Jin Qianded2dac2017-04-21 14:36:12 -0700156 libfs_mgr \
Alex Deymo31653662017-01-11 14:02:13 -0800157 libext4_utils \
Alex Deymo67f3aa82017-01-11 14:38:20 -0800158 libsparse \
Tianjie Xu8cf5c8f2016-09-08 20:10:11 -0700159 libziparchive \
160 libotautil \
Elliott Hughes63a31922016-06-09 17:41:22 -0700161 libmounts \
Joe Onorato6396e702012-05-31 23:21:46 -0700162 libminadbd \
Jerry Zhangd428e792017-07-13 18:17:35 -0700163 libasyncio \
Doug Zongker18a78e02014-07-10 07:31:46 -0700164 libfusesideload \
Tianjie Xu5fe5eb62018-03-20 16:07:39 -0700165 librecovery_ui \
Joe Onorato6396e702012-05-31 23:21:46 -0700166 libminui \
Joe Onorato6396e702012-05-31 23:21:46 -0700167 libpng \
Josh Gao073164f2016-08-05 15:59:05 -0700168 libcrypto_utils \
169 libcrypto \
Tao Bao919d2c92017-04-10 16:55:57 -0700170 libvintf_recovery \
171 libvintf \
Yifan Hong495c5212018-03-06 17:59:58 -0800172 libhidl-gen-utils \
Tao Bao919d2c92017-04-10 16:55:57 -0700173 libtinyxml2 \
Elliott Hughes8fd86d72015-04-13 14:36:02 -0700174 libbase \
Joe Onorato6396e702012-05-31 23:21:46 -0700175 libcutils \
Yabin Cui53e7a062016-02-17 12:21:52 -0800176 libutils \
Ying Wang4e214822013-04-09 21:41:29 -0700177 liblog \
Jin Qian000148d2017-11-03 11:52:33 -0700178 libselinux \
179 libz
Doug Zongker49c73a72010-06-29 17:36:28 -0700180
Yabin Cui53e7a062016-02-17 12:21:52 -0800181LOCAL_HAL_STATIC_LIBRARIES := libhealthd
182
Elliott Hughes01fcbe12016-05-23 17:43:41 -0700183ifeq ($(AB_OTA_UPDATER),true)
184 LOCAL_CFLAGS += -DAB_OTA_UPDATER=1
185endif
186
Ying Wang5a50b1b2015-03-10 11:56:56 -0700187LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -0800188
Mark Salyzyna4f701a2016-03-09 14:58:16 -0800189ifeq ($(BOARD_CACHEIMAGE_PARTITION_SIZE),)
Jin Qianded2dac2017-04-21 14:36:12 -0700190LOCAL_REQUIRED_MODULES += recovery-persist recovery-refresh
Mark Salyzyna4f701a2016-03-09 14:58:16 -0800191endif
192
193include $(BUILD_EXECUTABLE)
194
Yabin Cui2f272c02016-06-24 18:22:02 -0700195include \
Alex Deymofb00d822016-11-08 15:46:07 -0800196 $(LOCAL_PATH)/boot_control/Android.mk \
Yabin Cui2f272c02016-06-24 18:22:02 -0700197 $(LOCAL_PATH)/minui/Android.mk \
Jiachen Zhao051b9682018-03-30 14:04:51 -0700198 $(LOCAL_PATH)/sample_updater/Android.mk \
Kenny Root7a4adb52013-10-09 10:14:35 -0700199 $(LOCAL_PATH)/tests/Android.mk \
Joe Onorato6396e702012-05-31 23:21:46 -0700200 $(LOCAL_PATH)/tools/Android.mk \
Joe Onorato6396e702012-05-31 23:21:46 -0700201 $(LOCAL_PATH)/updater/Android.mk \
Tao Bao7197ee02015-12-05 21:21:27 -0800202 $(LOCAL_PATH)/update_verifier/Android.mk \