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