blob: d727ca2af27187f67ddba40f4bd484dd3577f9d8 [file] [log] [blame]
Joe Onorato6396e702012-05-31 23:21:46 -07001# 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 Projectc24a8e62009-03-03 19:28:42 -080014
Joe Onorato6396e702012-05-31 23:21:46 -070015LOCAL_PATH := $(call my-dir)
16
Tao Bao673bb6f2018-08-03 20:56:25 -070017# Needed by build/make/core/Makefile. Must be consistent with the value in Android.bp.
Tao Bao1d866052017-04-10 16:55:57 -070018RECOVERY_API_VERSION := 3
19RECOVERY_FSTAB_VERSION := 2
20
Tao Baof7e80122018-03-23 22:01:43 -070021# 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
Tao Bao42c45e22018-07-31 09:37:12 -070026# 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 \
Tao Bao5fc72a12018-08-07 14:38:51 -070047 librecovery_ui.recovery
Tao Bao42c45e22018-07-31 09:37:12 -070048
49include $(BUILD_SHARED_LIBRARY)
50
Tao Bao5fc72a12018-08-07 14:38:51 -070051# recovery_deps: A phony target that's depended on by `recovery`, which
52# builds additional modules conditionally based on Makefile variables.
53# ======================================================================
Tao Baofd0ace82017-10-11 20:25:36 -070054include $(CLEAR_VARS)
55
Tao Bao5fc72a12018-08-07 14:38:51 -070056LOCAL_MODULE := recovery_deps
Tao Bao9e309972018-05-11 15:13:10 -070057
58ifeq ($(TARGET_USERIMAGES_USE_F2FS),true)
Tao Bao9e309972018-05-11 15:13:10 -070059LOCAL_REQUIRED_MODULES += \
Tao Baoc674dfb2018-12-20 14:25:15 -080060 make_f2fs.recovery \
61 sload_f2fs.recovery
Tao Bao9e309972018-05-11 15:13:10 -070062endif
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -080063
Tianjie Xu2b1a4642018-09-06 11:58:55 -070064# On A/B devices recovery-persist reads the recovery related file from the persist storage and
65# copies them into /data/misc/recovery. Then, for both A/B and non-A/B devices, recovery-persist
66# parses the last_install file and reports the embedded update metrics. Also, the last_install file
67# will be deteleted after the report.
68LOCAL_REQUIRED_MODULES += recovery-persist
Mark Salyzyna4f701a2016-03-09 14:58:16 -080069ifeq ($(BOARD_CACHEIMAGE_PARTITION_SIZE),)
Tianjie Xu2b1a4642018-09-06 11:58:55 -070070LOCAL_REQUIRED_MODULES += recovery-refresh
Mark Salyzyna4f701a2016-03-09 14:58:16 -080071endif
72
Tao Bao5fc72a12018-08-07 14:38:51 -070073include $(BUILD_PHONY_PACKAGE)
Mark Salyzyna4f701a2016-03-09 14:58:16 -080074
Yabin Cui2f272c02016-06-24 18:22:02 -070075include \
Joe Onorato6396e702012-05-31 23:21:46 -070076 $(LOCAL_PATH)/updater/Android.mk \