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. 14 15LOCAL_PATH := $(call my-dir) 16 17# Needed by build/make/core/Makefile. Must be consistent with the value in Android.bp. 18RECOVERY_API_VERSION := 3 19RECOVERY_FSTAB_VERSION := 2 20 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. 24TARGET_RECOVERY_UI_LIB ?= librecovery_ui_default 25 26# librecovery_ui_ext (shared library) 27# =================================== 28include $(CLEAR_VARS) 29 30LOCAL_MODULE := librecovery_ui_ext 31 32# LOCAL_MODULE_PATH for shared libraries is unsupported in multiarch builds. 33LOCAL_MULTILIB := first 34 35ifeq ($(TARGET_IS_64_BIT),true) 36LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/system/lib64 37else 38LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/system/lib 39endif 40 41LOCAL_WHOLE_STATIC_LIBRARIES := \ 42 $(TARGET_RECOVERY_UI_LIB) 43 44LOCAL_SHARED_LIBRARIES := \ 45 libbase \ 46 liblog \ 47 librecovery_ui.recovery 48 49include $(BUILD_SHARED_LIBRARY) 50 51# recovery_deps: A phony target that's depended on by `recovery`, which 52# builds additional modules conditionally based on Makefile variables. 53# ====================================================================== 54include $(CLEAR_VARS) 55 56LOCAL_MODULE := recovery_deps 57 58ifeq ($(TARGET_USERIMAGES_USE_F2FS),true) 59ifeq ($(HOST_OS),linux) 60LOCAL_REQUIRED_MODULES += \ 61 make_f2fs.recovery \ 62 sload_f2fs.recovery 63endif 64endif 65 66# On A/B devices recovery-persist reads the recovery related file from the persist storage and 67# copies them into /data/misc/recovery. Then, for both A/B and non-A/B devices, recovery-persist 68# parses the last_install file and reports the embedded update metrics. Also, the last_install file 69# will be deteleted after the report. 70LOCAL_REQUIRED_MODULES += recovery-persist 71ifeq ($(BOARD_CACHEIMAGE_PARTITION_SIZE),) 72LOCAL_REQUIRED_MODULES += recovery-refresh 73endif 74 75include $(BUILD_PHONY_PACKAGE) 76 77include \ 78 $(LOCAL_PATH)/updater/Android.mk \ 79