summaryrefslogtreecommitdiffstats
path: root/Android.mk
diff options
context:
space:
mode:
Diffstat (limited to 'Android.mk')
-rw-r--r--Android.mk122
1 files changed, 73 insertions, 49 deletions
diff --git a/Android.mk b/Android.mk
index 93e658c5a..9542080ca 100644
--- a/Android.mk
+++ b/Android.mk
@@ -28,7 +28,32 @@ recovery_common_cflags := \
-Werror \
-DRECOVERY_API_VERSION=$(RECOVERY_API_VERSION)
-# librecovery_ui (static library)
+# librecovery_ui_ext (shared library)
+# ===================================
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := librecovery_ui_ext
+
+# LOCAL_MODULE_PATH for shared libraries is unsupported in multiarch builds.
+LOCAL_MULTILIB := first
+
+ifeq ($(TARGET_IS_64_BIT),true)
+LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/system/lib64
+else
+LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/system/lib
+endif
+
+LOCAL_WHOLE_STATIC_LIBRARIES := \
+ $(TARGET_RECOVERY_UI_LIB)
+
+LOCAL_SHARED_LIBRARIES := \
+ libbase \
+ liblog \
+ librecovery_ui
+
+include $(BUILD_SHARED_LIBRARY)
+
+# librecovery_ui (shared library)
# ===============================
include $(CLEAR_VARS)
LOCAL_SRC_FILES := \
@@ -40,69 +65,56 @@ LOCAL_SRC_FILES := \
LOCAL_MODULE := librecovery_ui
-LOCAL_STATIC_LIBRARIES := \
- libminui \
- libotautil \
- libbase
-
LOCAL_CFLAGS := $(recovery_common_cflags)
-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
+LOCAL_MULTILIB := first
-ifneq ($(TARGET_RECOVERY_UI_MARGIN_WIDTH),)
-LOCAL_CFLAGS += -DRECOVERY_UI_MARGIN_WIDTH=$(TARGET_RECOVERY_UI_MARGIN_WIDTH)
+ifeq ($(TARGET_IS_64_BIT),true)
+LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/system/lib64
else
-LOCAL_CFLAGS += -DRECOVERY_UI_MARGIN_WIDTH=0
+LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/system/lib
endif
-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
+LOCAL_STATIC_LIBRARIES := \
+ libminui \
+ libotautil \
-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
+LOCAL_SHARED_LIBRARIES := \
+ libbase \
+ libpng \
+ libz \
-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
+include $(BUILD_SHARED_LIBRARY)
-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
+# librecovery_ui (static library)
+# ===============================
+include $(CLEAR_VARS)
+LOCAL_SRC_FILES := \
+ device.cpp \
+ screen_ui.cpp \
+ ui.cpp \
+ vr_ui.cpp \
+ wear_ui.cpp
-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
+LOCAL_MODULE := librecovery_ui
-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
+LOCAL_CFLAGS := $(recovery_common_cflags)
+
+LOCAL_STATIC_LIBRARIES := \
+ libminui \
+ libotautil \
+
+LOCAL_SHARED_LIBRARIES := \
+ libbase \
+ libpng \
+ libz \
include $(BUILD_STATIC_LIBRARY)
librecovery_static_libraries := \
- $(TARGET_RECOVERY_UI_LIB) \
libbootloader_message \
libfusesideload \
libminadbd \
- librecovery_ui \
libminui \
libverifier \
libotautil \
@@ -160,8 +172,6 @@ LOCAL_SRC_FILES := \
LOCAL_MODULE := recovery
-LOCAL_FORCE_STATIC_EXECUTABLE := true
-
LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/system/bin
# Cannot link with LLD: undefined symbol: UsbNoPermissionsLongHelpText
@@ -172,8 +182,12 @@ LOCAL_CFLAGS := $(recovery_common_cflags)
LOCAL_STATIC_LIBRARIES := \
librecovery \
+ librecovery_ui_default \
$(librecovery_static_libraries)
+LOCAL_SHARED_LIBRARIES := \
+ librecovery_ui \
+
LOCAL_HAL_STATIC_LIBRARIES := libhealthd
LOCAL_REQUIRED_MODULES := \
@@ -202,11 +216,21 @@ LOCAL_REQUIRED_MODULES += \
recovery-refresh
endif
+LOCAL_REQUIRED_MODULES += \
+ librecovery_ui_ext
+
+# TODO(b/110380063): Explicitly install the following shared libraries to recovery, until `recovery`
+# module is built with Soong (with `recovery: true` flag).
+LOCAL_REQUIRED_MODULES += \
+ libbase.recovery \
+ liblog.recovery \
+ libpng.recovery \
+ libz.recovery \
+
include $(BUILD_EXECUTABLE)
include \
$(LOCAL_PATH)/boot_control/Android.mk \
- $(LOCAL_PATH)/minui/Android.mk \
$(LOCAL_PATH)/tests/Android.mk \
$(LOCAL_PATH)/updater/Android.mk \
$(LOCAL_PATH)/updater_sample/Android.mk \