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