Joe Onorato | 6396e70 | 2012-05-31 23:21:46 -0700 | [diff] [blame] | 1 | # 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 Project | c24a8e6 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 14 | |
Joe Onorato | 6396e70 | 2012-05-31 23:21:46 -0700 | [diff] [blame] | 15 | LOCAL_PATH := $(call my-dir) |
| 16 | |
Tao Bao | 1d86605 | 2017-04-10 16:55:57 -0700 | [diff] [blame] | 17 | # Needed by build/make/core/Makefile. |
| 18 | RECOVERY_API_VERSION := 3 |
| 19 | RECOVERY_FSTAB_VERSION := 2 |
| 20 | |
Tao Bao | f6d2596 | 2018-03-23 22:01:43 -0700 | [diff] [blame] | 21 | # 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. |
| 24 | TARGET_RECOVERY_UI_LIB ?= librecovery_ui_default |
| 25 | |
Tao Bao | 1d86605 | 2017-04-10 16:55:57 -0700 | [diff] [blame] | 26 | # librecovery (static library) |
| 27 | # =============================== |
| 28 | include $(CLEAR_VARS) |
Tao Bao | f6d2596 | 2018-03-23 22:01:43 -0700 | [diff] [blame] | 29 | |
Tao Bao | 1d86605 | 2017-04-10 16:55:57 -0700 | [diff] [blame] | 30 | LOCAL_SRC_FILES := \ |
| 31 | install.cpp |
Tao Bao | f6d2596 | 2018-03-23 22:01:43 -0700 | [diff] [blame] | 32 | |
Tao Bao | b24510c | 2017-04-20 17:54:27 -0700 | [diff] [blame] | 33 | LOCAL_CFLAGS := -Wall -Werror |
Tao Bao | 1d86605 | 2017-04-10 16:55:57 -0700 | [diff] [blame] | 34 | LOCAL_CFLAGS += -DRECOVERY_API_VERSION=$(RECOVERY_API_VERSION) |
Tao Bao | 7fdcb19 | 2017-04-12 23:52:20 -0700 | [diff] [blame] | 35 | |
| 36 | ifeq ($(AB_OTA_UPDATER),true) |
| 37 | LOCAL_CFLAGS += -DAB_OTA_UPDATER=1 |
| 38 | endif |
| 39 | |
Tao Bao | 1d86605 | 2017-04-10 16:55:57 -0700 | [diff] [blame] | 40 | LOCAL_MODULE := librecovery |
Tao Bao | d2f2ad6 | 2018-03-23 23:24:25 -0700 | [diff] [blame] | 41 | |
Tao Bao | 1d86605 | 2017-04-10 16:55:57 -0700 | [diff] [blame] | 42 | LOCAL_STATIC_LIBRARIES := \ |
| 43 | libminui \ |
Tao Bao | cfe53c2 | 2017-10-03 14:37:21 -0700 | [diff] [blame] | 44 | libotautil \ |
Tao Bao | 919d2c9 | 2017-04-10 16:55:57 -0700 | [diff] [blame] | 45 | libvintf_recovery \ |
Tao Bao | 1d86605 | 2017-04-10 16:55:57 -0700 | [diff] [blame] | 46 | libcrypto_utils \ |
| 47 | libcrypto \ |
Elliott Hughes | e1bb7a5 | 2017-06-28 08:00:17 -0700 | [diff] [blame] | 48 | libbase \ |
| 49 | libziparchive \ |
Tao Bao | 1d86605 | 2017-04-10 16:55:57 -0700 | [diff] [blame] | 50 | |
| 51 | include $(BUILD_STATIC_LIBRARY) |
| 52 | |
Tianjie Xu | 5fe5eb6 | 2018-03-20 16:07:39 -0700 | [diff] [blame] | 53 | # librecovery_ui (static library) |
Tao Bao | d80a998 | 2016-03-03 11:43:47 -0800 | [diff] [blame] | 54 | # =============================== |
Doug Zongker | 18a78e0 | 2014-07-10 07:31:46 -0700 | [diff] [blame] | 55 | include $(CLEAR_VARS) |
The Android Open Source Project | c24a8e6 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 56 | LOCAL_SRC_FILES := \ |
Elliott Hughes | 9e7ae8a | 2015-04-09 13:40:31 -0700 | [diff] [blame] | 57 | screen_ui.cpp \ |
| 58 | ui.cpp \ |
Luke Song | e2bd876 | 2017-06-12 16:08:33 -0700 | [diff] [blame] | 59 | vr_ui.cpp \ |
Tianjie Xu | 5fe5eb6 | 2018-03-20 16:07:39 -0700 | [diff] [blame] | 60 | wear_ui.cpp |
The Android Open Source Project | c24a8e6 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 61 | |
Tianjie Xu | 5fe5eb6 | 2018-03-20 16:07:39 -0700 | [diff] [blame] | 62 | LOCAL_CFLAGS := -Wall -Werror |
The Android Open Source Project | c24a8e6 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 63 | |
Tianjie Xu | 5fe5eb6 | 2018-03-20 16:07:39 -0700 | [diff] [blame] | 64 | LOCAL_MODULE := librecovery_ui |
Tao Bao | d2f2ad6 | 2018-03-23 23:24:25 -0700 | [diff] [blame] | 65 | |
Tianjie Xu | 5fe5eb6 | 2018-03-20 16:07:39 -0700 | [diff] [blame] | 66 | LOCAL_STATIC_LIBRARIES := \ |
| 67 | libminui \ |
| 68 | libbase |
Doug Zongker | fb2e3af | 2009-06-17 17:29:40 -0700 | [diff] [blame] | 69 | |
Tao Bao | 4521b70 | 2017-06-20 18:11:21 -0700 | [diff] [blame] | 70 | ifneq ($(TARGET_RECOVERY_UI_MARGIN_HEIGHT),) |
| 71 | LOCAL_CFLAGS += -DRECOVERY_UI_MARGIN_HEIGHT=$(TARGET_RECOVERY_UI_MARGIN_HEIGHT) |
| 72 | else |
| 73 | LOCAL_CFLAGS += -DRECOVERY_UI_MARGIN_HEIGHT=0 |
| 74 | endif |
| 75 | |
| 76 | ifneq ($(TARGET_RECOVERY_UI_MARGIN_WIDTH),) |
| 77 | LOCAL_CFLAGS += -DRECOVERY_UI_MARGIN_WIDTH=$(TARGET_RECOVERY_UI_MARGIN_WIDTH) |
| 78 | else |
| 79 | LOCAL_CFLAGS += -DRECOVERY_UI_MARGIN_WIDTH=0 |
| 80 | endif |
| 81 | |
Tao Bao | 5f8dd99 | 2017-07-28 00:05:40 -0700 | [diff] [blame] | 82 | ifneq ($(TARGET_RECOVERY_UI_TOUCH_LOW_THRESHOLD),) |
| 83 | LOCAL_CFLAGS += -DRECOVERY_UI_TOUCH_LOW_THRESHOLD=$(TARGET_RECOVERY_UI_TOUCH_LOW_THRESHOLD) |
| 84 | else |
| 85 | LOCAL_CFLAGS += -DRECOVERY_UI_TOUCH_LOW_THRESHOLD=50 |
| 86 | endif |
| 87 | |
| 88 | ifneq ($(TARGET_RECOVERY_UI_TOUCH_HIGH_THRESHOLD),) |
| 89 | LOCAL_CFLAGS += -DRECOVERY_UI_TOUCH_HIGH_THRESHOLD=$(TARGET_RECOVERY_UI_TOUCH_HIGH_THRESHOLD) |
| 90 | else |
| 91 | LOCAL_CFLAGS += -DRECOVERY_UI_TOUCH_HIGH_THRESHOLD=90 |
| 92 | endif |
| 93 | |
Tao Bao | 0470cee | 2017-08-02 17:11:04 -0700 | [diff] [blame] | 94 | ifneq ($(TARGET_RECOVERY_UI_PROGRESS_BAR_BASELINE),) |
| 95 | LOCAL_CFLAGS += -DRECOVERY_UI_PROGRESS_BAR_BASELINE=$(TARGET_RECOVERY_UI_PROGRESS_BAR_BASELINE) |
| 96 | else |
| 97 | LOCAL_CFLAGS += -DRECOVERY_UI_PROGRESS_BAR_BASELINE=259 |
| 98 | endif |
| 99 | |
| 100 | ifneq ($(TARGET_RECOVERY_UI_ANIMATION_FPS),) |
| 101 | LOCAL_CFLAGS += -DRECOVERY_UI_ANIMATION_FPS=$(TARGET_RECOVERY_UI_ANIMATION_FPS) |
| 102 | else |
| 103 | LOCAL_CFLAGS += -DRECOVERY_UI_ANIMATION_FPS=30 |
| 104 | endif |
| 105 | |
Tao Bao | eea3af3 | 2017-08-11 13:50:24 -0700 | [diff] [blame] | 106 | ifneq ($(TARGET_RECOVERY_UI_MENU_UNUSABLE_ROWS),) |
| 107 | LOCAL_CFLAGS += -DRECOVERY_UI_MENU_UNUSABLE_ROWS=$(TARGET_RECOVERY_UI_MENU_UNUSABLE_ROWS) |
| 108 | else |
| 109 | LOCAL_CFLAGS += -DRECOVERY_UI_MENU_UNUSABLE_ROWS=9 |
| 110 | endif |
| 111 | |
Luke Song | 9d4839c | 2017-06-23 14:33:46 -0700 | [diff] [blame] | 112 | ifneq ($(TARGET_RECOVERY_UI_VR_STEREO_OFFSET),) |
| 113 | LOCAL_CFLAGS += -DRECOVERY_UI_VR_STEREO_OFFSET=$(TARGET_RECOVERY_UI_VR_STEREO_OFFSET) |
| 114 | else |
| 115 | LOCAL_CFLAGS += -DRECOVERY_UI_VR_STEREO_OFFSET=0 |
| 116 | endif |
| 117 | |
Tianjie Xu | 5fe5eb6 | 2018-03-20 16:07:39 -0700 | [diff] [blame] | 118 | include $(BUILD_STATIC_LIBRARY) |
| 119 | |
| 120 | # recovery (static executable) |
| 121 | # =============================== |
| 122 | include $(CLEAR_VARS) |
| 123 | |
| 124 | LOCAL_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 Xu | 5fe5eb6 | 2018-03-20 16:07:39 -0700 | [diff] [blame] | 132 | LOCAL_MODULE := recovery |
| 133 | |
| 134 | LOCAL_FORCE_STATIC_EXECUTABLE := true |
| 135 | |
Chih-Hung Hsieh | 83847e6 | 2018-03-07 21:59:52 -0800 | [diff] [blame] | 136 | # Cannot link with LLD: undefined symbol: UsbNoPermissionsLongHelpText |
| 137 | # http://b/77543887, lld does not handle -Wl,--gc-sections as well as ld. |
| 138 | LOCAL_USE_CLANG_LLD := false |
| 139 | |
Tianjie Xu | 5fe5eb6 | 2018-03-20 16:07:39 -0700 | [diff] [blame] | 140 | LOCAL_REQUIRED_MODULES := e2fsdroid_static mke2fs_static mke2fs.conf |
| 141 | |
| 142 | ifeq ($(TARGET_USERIMAGES_USE_F2FS),true) |
| 143 | ifeq ($(HOST_OS),linux) |
| 144 | LOCAL_REQUIRED_MODULES += sload.f2fs mkfs.f2fs |
| 145 | endif |
| 146 | endif |
| 147 | |
| 148 | LOCAL_CFLAGS += -DRECOVERY_API_VERSION=$(RECOVERY_API_VERSION) |
| 149 | LOCAL_CFLAGS += -Wall -Werror |
| 150 | |
Dan Albert | 1ddd350 | 2015-02-18 15:58:15 -0800 | [diff] [blame] | 151 | LOCAL_C_INCLUDES += \ |
| 152 | system/vold \ |
Adrien Grassein | 3cd669f | 2014-11-06 14:53:50 +0100 | [diff] [blame] | 153 | |
Tao Bao | f6d2596 | 2018-03-23 22:01:43 -0700 | [diff] [blame] | 154 | LOCAL_STATIC_LIBRARIES := \ |
| 155 | librecovery \ |
| 156 | $(TARGET_RECOVERY_UI_LIB) \ |
Tao Bao | b168f5f | 2017-04-16 15:22:13 -0700 | [diff] [blame] | 157 | libverifier \ |
Yabin Cui | 53e7a06 | 2016-02-17 12:21:52 -0800 | [diff] [blame] | 158 | libbatterymonitor \ |
Yabin Cui | 2f272c0 | 2016-06-24 18:22:02 -0700 | [diff] [blame] | 159 | libbootloader_message \ |
Jin Qian | ded2dac | 2017-04-21 14:36:12 -0700 | [diff] [blame] | 160 | libfs_mgr \ |
Alex Deymo | 3165366 | 2017-01-11 14:02:13 -0800 | [diff] [blame] | 161 | libext4_utils \ |
Alex Deymo | 67f3aa8 | 2017-01-11 14:38:20 -0800 | [diff] [blame] | 162 | libsparse \ |
Tianjie Xu | 8cf5c8f | 2016-09-08 20:10:11 -0700 | [diff] [blame] | 163 | libziparchive \ |
| 164 | libotautil \ |
Elliott Hughes | 63a3192 | 2016-06-09 17:41:22 -0700 | [diff] [blame] | 165 | libmounts \ |
Joe Onorato | 6396e70 | 2012-05-31 23:21:46 -0700 | [diff] [blame] | 166 | libminadbd \ |
Jerry Zhang | d428e79 | 2017-07-13 18:17:35 -0700 | [diff] [blame] | 167 | libasyncio \ |
Doug Zongker | 18a78e0 | 2014-07-10 07:31:46 -0700 | [diff] [blame] | 168 | libfusesideload \ |
Tianjie Xu | 5fe5eb6 | 2018-03-20 16:07:39 -0700 | [diff] [blame] | 169 | librecovery_ui \ |
Joe Onorato | 6396e70 | 2012-05-31 23:21:46 -0700 | [diff] [blame] | 170 | libminui \ |
Joe Onorato | 6396e70 | 2012-05-31 23:21:46 -0700 | [diff] [blame] | 171 | libpng \ |
Josh Gao | 073164f | 2016-08-05 15:59:05 -0700 | [diff] [blame] | 172 | libcrypto_utils \ |
| 173 | libcrypto \ |
Tao Bao | 919d2c9 | 2017-04-10 16:55:57 -0700 | [diff] [blame] | 174 | libvintf_recovery \ |
| 175 | libvintf \ |
Yifan Hong | 495c521 | 2018-03-06 17:59:58 -0800 | [diff] [blame] | 176 | libhidl-gen-utils \ |
Tao Bao | 919d2c9 | 2017-04-10 16:55:57 -0700 | [diff] [blame] | 177 | libtinyxml2 \ |
Elliott Hughes | 8fd86d7 | 2015-04-13 14:36:02 -0700 | [diff] [blame] | 178 | libbase \ |
Joe Onorato | 6396e70 | 2012-05-31 23:21:46 -0700 | [diff] [blame] | 179 | libcutils \ |
Yabin Cui | 53e7a06 | 2016-02-17 12:21:52 -0800 | [diff] [blame] | 180 | libutils \ |
Ying Wang | 4e21482 | 2013-04-09 21:41:29 -0700 | [diff] [blame] | 181 | liblog \ |
Jin Qian | 000148d | 2017-11-03 11:52:33 -0700 | [diff] [blame] | 182 | libselinux \ |
| 183 | libz |
Doug Zongker | 49c73a7 | 2010-06-29 17:36:28 -0700 | [diff] [blame] | 184 | |
Yabin Cui | 53e7a06 | 2016-02-17 12:21:52 -0800 | [diff] [blame] | 185 | LOCAL_HAL_STATIC_LIBRARIES := libhealthd |
| 186 | |
Elliott Hughes | 01fcbe1 | 2016-05-23 17:43:41 -0700 | [diff] [blame] | 187 | ifeq ($(AB_OTA_UPDATER),true) |
| 188 | LOCAL_CFLAGS += -DAB_OTA_UPDATER=1 |
| 189 | endif |
| 190 | |
Ying Wang | 5a50b1b | 2015-03-10 11:56:56 -0700 | [diff] [blame] | 191 | LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin |
The Android Open Source Project | c24a8e6 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 192 | |
Mark Salyzyn | a4f701a | 2016-03-09 14:58:16 -0800 | [diff] [blame] | 193 | ifeq ($(BOARD_CACHEIMAGE_PARTITION_SIZE),) |
Jin Qian | ded2dac | 2017-04-21 14:36:12 -0700 | [diff] [blame] | 194 | LOCAL_REQUIRED_MODULES += recovery-persist recovery-refresh |
Mark Salyzyn | a4f701a | 2016-03-09 14:58:16 -0800 | [diff] [blame] | 195 | endif |
| 196 | |
| 197 | include $(BUILD_EXECUTABLE) |
| 198 | |
Yabin Cui | 2f272c0 | 2016-06-24 18:22:02 -0700 | [diff] [blame] | 199 | include \ |
Alex Deymo | fb00d82 | 2016-11-08 15:46:07 -0800 | [diff] [blame] | 200 | $(LOCAL_PATH)/boot_control/Android.mk \ |
Yabin Cui | 2f272c0 | 2016-06-24 18:22:02 -0700 | [diff] [blame] | 201 | $(LOCAL_PATH)/minui/Android.mk \ |
Kenny Root | 7a4adb5 | 2013-10-09 10:14:35 -0700 | [diff] [blame] | 202 | $(LOCAL_PATH)/tests/Android.mk \ |
Joe Onorato | 6396e70 | 2012-05-31 23:21:46 -0700 | [diff] [blame] | 203 | $(LOCAL_PATH)/tools/Android.mk \ |
Joe Onorato | 6396e70 | 2012-05-31 23:21:46 -0700 | [diff] [blame] | 204 | $(LOCAL_PATH)/updater/Android.mk \ |
Tao Bao | 32118f6 | 2018-04-25 15:19:47 -0700 | [diff] [blame] | 205 | $(LOCAL_PATH)/updater_sample/Android.mk \ |