summaryrefslogtreecommitdiffstats
path: root/Android.mk
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2018-03-24 06:01:43 +0100
committerTao Bao <tbao@google.com>2018-03-27 00:26:34 +0200
commitf7e8012be3c2ac4460b577157e377cd695d411ef (patch)
tree2eab0a2d30d427da313c32eb849ed4056477e97a /Android.mk
parent[automerger skipped]Merge "Factor out a menu class for screen ui" am: 549695ae65 (diff)
downloadandroid_bootable_recovery-f7e8012be3c2ac4460b577157e377cd695d411ef.tar
android_bootable_recovery-f7e8012be3c2ac4460b577157e377cd695d411ef.tar.gz
android_bootable_recovery-f7e8012be3c2ac4460b577157e377cd695d411ef.tar.bz2
android_bootable_recovery-f7e8012be3c2ac4460b577157e377cd695d411ef.tar.lz
android_bootable_recovery-f7e8012be3c2ac4460b577157e377cd695d411ef.tar.xz
android_bootable_recovery-f7e8012be3c2ac4460b577157e377cd695d411ef.tar.zst
android_bootable_recovery-f7e8012be3c2ac4460b577157e377cd695d411ef.zip
Diffstat (limited to 'Android.mk')
-rw-r--r--Android.mk30
1 files changed, 19 insertions, 11 deletions
diff --git a/Android.mk b/Android.mk
index 0499a6da8..7359c9fbd 100644
--- a/Android.mk
+++ b/Android.mk
@@ -18,6 +18,11 @@ LOCAL_PATH := $(call my-dir)
RECOVERY_API_VERSION := 3
RECOVERY_FSTAB_VERSION := 2
+# 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
+
# libmounts (static library)
# ===============================
include $(CLEAR_VARS)
@@ -32,8 +37,10 @@ include $(BUILD_STATIC_LIBRARY)
# librecovery (static library)
# ===============================
include $(CLEAR_VARS)
+
LOCAL_SRC_FILES := \
install.cpp
+
LOCAL_CFLAGS := -Wall -Werror
LOCAL_CFLAGS += -DRECOVERY_API_VERSION=$(RECOVERY_API_VERSION)
@@ -131,7 +138,6 @@ LOCAL_SRC_FILES := \
roots.cpp \
rotate_logs.cpp \
-
LOCAL_MODULE := recovery
LOCAL_FORCE_STATIC_EXECUTABLE := true
@@ -163,17 +169,9 @@ LOCAL_STATIC_LIBRARIES := \
libvndksupport \
libbatterymonitor
-LOCAL_STATIC_LIBRARIES += librecovery
-
-# If $(TARGET_RECOVERY_UI_LIB) is defined, the recovery calls make_device() from the
-# $(TARGET_RECOVERY_UI_LIB), which depends on the librecovery_ui.
-ifeq ($(TARGET_RECOVERY_UI_LIB),)
- LOCAL_SRC_FILES += default_device.cpp
-else
- LOCAL_STATIC_LIBRARIES += $(TARGET_RECOVERY_UI_LIB)
-endif
-
LOCAL_STATIC_LIBRARIES += \
+ librecovery \
+ $(TARGET_RECOVERY_UI_LIB) \
libverifier \
libbootloader_message \
libfs_mgr \
@@ -254,6 +252,16 @@ LOCAL_STATIC_LIBRARIES := \
LOCAL_CFLAGS := -Wall -Werror
include $(BUILD_STATIC_LIBRARY)
+# Generic device that uses ScreenRecoveryUI.
+# ===============================
+include $(CLEAR_VARS)
+LOCAL_SRC_FILES := default_device.cpp
+LOCAL_CFLAGS := -Wall -Werror
+
+LOCAL_MODULE := librecovery_ui_default
+
+include $(BUILD_STATIC_LIBRARY)
+
# Wear default device
# ===============================
include $(CLEAR_VARS)