2012-06-01 08:21:46 +02:00
|
|
|
# Copyright (C) 2007 The Android Open Source Project
|
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
|
2009-03-04 04:28:42 +01:00
|
|
|
LOCAL_PATH := $(call my-dir)
|
|
|
|
|
2017-04-11 01:55:57 +02:00
|
|
|
# Needed by build/make/core/Makefile.
|
|
|
|
RECOVERY_API_VERSION := 3
|
|
|
|
RECOVERY_FSTAB_VERSION := 2
|
|
|
|
|
2018-03-24 06:01:43 +01:00
|
|
|
# TARGET_RECOVERY_UI_LIB should be one of librecovery_ui_{default,wear,vr} or a device-specific
|
|
|
|
# module that defines make_device() and the exact RecoveryUI class for the target. It defaults to
|
|
|
|
# librecovery_ui_default, which uses ScreenRecoveryUI.
|
|
|
|
TARGET_RECOVERY_UI_LIB ?= librecovery_ui_default
|
|
|
|
|
2018-03-27 00:45:54 +02:00
|
|
|
recovery_common_cflags := \
|
|
|
|
-Wall \
|
|
|
|
-Werror \
|
|
|
|
-DRECOVERY_API_VERSION=$(RECOVERY_API_VERSION)
|
|
|
|
|
2018-03-21 00:07:39 +01:00
|
|
|
# librecovery_ui (static library)
|
2016-03-03 20:43:47 +01:00
|
|
|
# ===============================
|
2012-06-01 08:21:46 +02:00
|
|
|
include $(CLEAR_VARS)
|
2009-03-04 04:28:42 +01:00
|
|
|
LOCAL_SRC_FILES := \
|
2018-03-27 00:45:54 +02:00
|
|
|
device.cpp \
|
2011-10-29 00:13:10 +02:00
|
|
|
screen_ui.cpp \
|
2015-04-09 22:40:31 +02:00
|
|
|
ui.cpp \
|
2017-06-13 01:08:33 +02:00
|
|
|
vr_ui.cpp \
|
2018-03-21 00:07:39 +01:00
|
|
|
wear_ui.cpp
|
2009-03-04 04:28:42 +01:00
|
|
|
|
2018-03-21 00:07:39 +01:00
|
|
|
LOCAL_MODULE := librecovery_ui
|
2018-03-24 07:24:25 +01:00
|
|
|
|
2018-03-21 00:07:39 +01:00
|
|
|
LOCAL_STATIC_LIBRARIES := \
|
|
|
|
libminui \
|
2018-05-04 08:01:13 +02:00
|
|
|
libotautil \
|
2018-03-21 00:07:39 +01:00
|
|
|
libbase
|
2009-06-18 02:29:40 +02:00
|
|
|
|
2018-03-27 00:45:54 +02:00
|
|
|
LOCAL_CFLAGS := $(recovery_common_cflags)
|
|
|
|
|
2017-06-21 03:11:21 +02:00
|
|
|
ifneq ($(TARGET_RECOVERY_UI_MARGIN_HEIGHT),)
|
|
|
|
LOCAL_CFLAGS += -DRECOVERY_UI_MARGIN_HEIGHT=$(TARGET_RECOVERY_UI_MARGIN_HEIGHT)
|
|
|
|
else
|
|
|
|
LOCAL_CFLAGS += -DRECOVERY_UI_MARGIN_HEIGHT=0
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($(TARGET_RECOVERY_UI_MARGIN_WIDTH),)
|
|
|
|
LOCAL_CFLAGS += -DRECOVERY_UI_MARGIN_WIDTH=$(TARGET_RECOVERY_UI_MARGIN_WIDTH)
|
|
|
|
else
|
|
|
|
LOCAL_CFLAGS += -DRECOVERY_UI_MARGIN_WIDTH=0
|
|
|
|
endif
|
|
|
|
|
2017-07-28 09:05:40 +02:00
|
|
|
ifneq ($(TARGET_RECOVERY_UI_TOUCH_LOW_THRESHOLD),)
|
|
|
|
LOCAL_CFLAGS += -DRECOVERY_UI_TOUCH_LOW_THRESHOLD=$(TARGET_RECOVERY_UI_TOUCH_LOW_THRESHOLD)
|
|
|
|
else
|
|
|
|
LOCAL_CFLAGS += -DRECOVERY_UI_TOUCH_LOW_THRESHOLD=50
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($(TARGET_RECOVERY_UI_TOUCH_HIGH_THRESHOLD),)
|
|
|
|
LOCAL_CFLAGS += -DRECOVERY_UI_TOUCH_HIGH_THRESHOLD=$(TARGET_RECOVERY_UI_TOUCH_HIGH_THRESHOLD)
|
|
|
|
else
|
|
|
|
LOCAL_CFLAGS += -DRECOVERY_UI_TOUCH_HIGH_THRESHOLD=90
|
|
|
|
endif
|
|
|
|
|
2017-08-03 02:11:04 +02:00
|
|
|
ifneq ($(TARGET_RECOVERY_UI_PROGRESS_BAR_BASELINE),)
|
|
|
|
LOCAL_CFLAGS += -DRECOVERY_UI_PROGRESS_BAR_BASELINE=$(TARGET_RECOVERY_UI_PROGRESS_BAR_BASELINE)
|
|
|
|
else
|
|
|
|
LOCAL_CFLAGS += -DRECOVERY_UI_PROGRESS_BAR_BASELINE=259
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($(TARGET_RECOVERY_UI_ANIMATION_FPS),)
|
|
|
|
LOCAL_CFLAGS += -DRECOVERY_UI_ANIMATION_FPS=$(TARGET_RECOVERY_UI_ANIMATION_FPS)
|
|
|
|
else
|
|
|
|
LOCAL_CFLAGS += -DRECOVERY_UI_ANIMATION_FPS=30
|
|
|
|
endif
|
|
|
|
|
2017-08-11 22:50:24 +02:00
|
|
|
ifneq ($(TARGET_RECOVERY_UI_MENU_UNUSABLE_ROWS),)
|
|
|
|
LOCAL_CFLAGS += -DRECOVERY_UI_MENU_UNUSABLE_ROWS=$(TARGET_RECOVERY_UI_MENU_UNUSABLE_ROWS)
|
|
|
|
else
|
|
|
|
LOCAL_CFLAGS += -DRECOVERY_UI_MENU_UNUSABLE_ROWS=9
|
|
|
|
endif
|
|
|
|
|
2017-06-23 23:33:46 +02:00
|
|
|
ifneq ($(TARGET_RECOVERY_UI_VR_STEREO_OFFSET),)
|
|
|
|
LOCAL_CFLAGS += -DRECOVERY_UI_VR_STEREO_OFFSET=$(TARGET_RECOVERY_UI_VR_STEREO_OFFSET)
|
|
|
|
else
|
|
|
|
LOCAL_CFLAGS += -DRECOVERY_UI_VR_STEREO_OFFSET=0
|
|
|
|
endif
|
|
|
|
|
2018-03-21 00:07:39 +01:00
|
|
|
include $(BUILD_STATIC_LIBRARY)
|
|
|
|
|
2017-10-12 05:25:36 +02:00
|
|
|
librecovery_static_libraries := \
|
|
|
|
$(TARGET_RECOVERY_UI_LIB) \
|
|
|
|
libbootloader_message \
|
|
|
|
libfusesideload \
|
|
|
|
libminadbd \
|
|
|
|
librecovery_ui \
|
|
|
|
libminui \
|
|
|
|
libverifier \
|
|
|
|
libotautil \
|
|
|
|
libasyncio \
|
|
|
|
libbatterymonitor \
|
|
|
|
libcrypto_utils \
|
|
|
|
libcrypto \
|
|
|
|
libext4_utils \
|
|
|
|
libfs_mgr \
|
|
|
|
libpng \
|
|
|
|
libsparse \
|
|
|
|
libvintf_recovery \
|
|
|
|
libvintf \
|
|
|
|
libhidl-gen-utils \
|
|
|
|
libtinyxml2 \
|
|
|
|
libziparchive \
|
|
|
|
libbase \
|
|
|
|
libutils \
|
|
|
|
libcutils \
|
|
|
|
liblog \
|
|
|
|
libselinux \
|
|
|
|
libz \
|
|
|
|
|
2018-05-12 00:13:10 +02:00
|
|
|
# librecovery (static library)
|
|
|
|
# ===============================
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
|
|
|
LOCAL_SRC_FILES := \
|
2017-10-12 05:25:36 +02:00
|
|
|
adb_install.cpp \
|
2018-05-16 22:43:22 +02:00
|
|
|
fsck_unshare_blocks.cpp \
|
2017-10-12 05:25:36 +02:00
|
|
|
fuse_sdcard_provider.cpp \
|
|
|
|
install.cpp \
|
|
|
|
recovery.cpp \
|
|
|
|
roots.cpp \
|
|
|
|
|
|
|
|
LOCAL_C_INCLUDES := \
|
|
|
|
system/vold \
|
2018-05-12 00:13:10 +02:00
|
|
|
|
|
|
|
LOCAL_CFLAGS := $(recovery_common_cflags)
|
|
|
|
|
|
|
|
LOCAL_MODULE := librecovery
|
|
|
|
|
|
|
|
LOCAL_STATIC_LIBRARIES := \
|
2017-10-12 05:25:36 +02:00
|
|
|
$(librecovery_static_libraries)
|
2018-05-12 00:13:10 +02:00
|
|
|
|
|
|
|
include $(BUILD_STATIC_LIBRARY)
|
|
|
|
|
2018-03-21 00:07:39 +01:00
|
|
|
# recovery (static executable)
|
|
|
|
# ===============================
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
|
|
|
LOCAL_SRC_FILES := \
|
2018-05-03 01:56:00 +02:00
|
|
|
logging.cpp \
|
2018-04-26 01:47:04 +02:00
|
|
|
recovery_main.cpp \
|
2018-03-21 00:07:39 +01:00
|
|
|
|
|
|
|
LOCAL_MODULE := recovery
|
|
|
|
|
|
|
|
LOCAL_FORCE_STATIC_EXECUTABLE := true
|
|
|
|
|
2018-05-12 00:13:10 +02:00
|
|
|
LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
|
|
|
|
|
2018-03-08 06:59:52 +01:00
|
|
|
# Cannot link with LLD: undefined symbol: UsbNoPermissionsLongHelpText
|
|
|
|
# http://b/77543887, lld does not handle -Wl,--gc-sections as well as ld.
|
|
|
|
LOCAL_USE_CLANG_LLD := false
|
|
|
|
|
2018-03-27 00:45:54 +02:00
|
|
|
LOCAL_CFLAGS := $(recovery_common_cflags)
|
2018-03-21 00:07:39 +01:00
|
|
|
|
2018-03-24 06:01:43 +01:00
|
|
|
LOCAL_STATIC_LIBRARIES := \
|
|
|
|
librecovery \
|
2017-10-12 05:25:36 +02:00
|
|
|
$(librecovery_static_libraries)
|
2010-06-30 02:36:28 +02:00
|
|
|
|
2016-02-17 21:21:52 +01:00
|
|
|
LOCAL_HAL_STATIC_LIBRARIES := libhealthd
|
|
|
|
|
2018-05-12 00:13:10 +02:00
|
|
|
LOCAL_REQUIRED_MODULES := \
|
2018-06-20 07:18:18 +02:00
|
|
|
e2fsdroid.recovery \
|
|
|
|
mke2fs.recovery \
|
2018-05-12 00:13:10 +02:00
|
|
|
mke2fs.conf
|
|
|
|
|
|
|
|
ifeq ($(TARGET_USERIMAGES_USE_F2FS),true)
|
|
|
|
ifeq ($(HOST_OS),linux)
|
|
|
|
LOCAL_REQUIRED_MODULES += \
|
|
|
|
sload.f2fs \
|
|
|
|
mkfs.f2fs
|
|
|
|
endif
|
|
|
|
endif
|
2009-03-04 04:28:42 +01:00
|
|
|
|
2018-05-16 22:43:22 +02:00
|
|
|
# e2fsck is needed for adb remount -R.
|
|
|
|
ifeq ($(BOARD_EXT4_SHARE_DUP_BLOCKS),true)
|
|
|
|
ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT)))
|
|
|
|
LOCAL_REQUIRED_MODULES += e2fsck_static
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2016-03-09 23:58:16 +01:00
|
|
|
ifeq ($(BOARD_CACHEIMAGE_PARTITION_SIZE),)
|
2018-05-12 00:13:10 +02:00
|
|
|
LOCAL_REQUIRED_MODULES += \
|
|
|
|
recovery-persist \
|
|
|
|
recovery-refresh
|
2016-03-09 23:58:16 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
include $(BUILD_EXECUTABLE)
|
|
|
|
|
2016-06-25 03:22:02 +02:00
|
|
|
include \
|
2016-11-09 00:46:07 +01:00
|
|
|
$(LOCAL_PATH)/boot_control/Android.mk \
|
2016-06-25 03:22:02 +02:00
|
|
|
$(LOCAL_PATH)/minui/Android.mk \
|
2013-10-09 19:14:35 +02:00
|
|
|
$(LOCAL_PATH)/tests/Android.mk \
|
2012-06-01 08:21:46 +02:00
|
|
|
$(LOCAL_PATH)/updater/Android.mk \
|
2018-04-26 00:19:47 +02:00
|
|
|
$(LOCAL_PATH)/updater_sample/Android.mk \
|