summaryrefslogtreecommitdiffstats
path: root/Android.mk
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2018-08-13 18:25:48 +0200
committerGerrit Code Review <noreply-gerritcodereview@google.com>2018-08-13 18:25:48 +0200
commitdf264e0186d37b6976579a4ed2e1f8c761900c8d (patch)
treece4a9ceb9f8d6437c1c41e6faa8a92b0e9574fc7 /Android.mk
parentMerge "tests: Create res-testdata for testdata pickup." (diff)
parentBuild `recovery` with Soong. (diff)
downloadandroid_bootable_recovery-df264e0186d37b6976579a4ed2e1f8c761900c8d.tar
android_bootable_recovery-df264e0186d37b6976579a4ed2e1f8c761900c8d.tar.gz
android_bootable_recovery-df264e0186d37b6976579a4ed2e1f8c761900c8d.tar.bz2
android_bootable_recovery-df264e0186d37b6976579a4ed2e1f8c761900c8d.tar.lz
android_bootable_recovery-df264e0186d37b6976579a4ed2e1f8c761900c8d.tar.xz
android_bootable_recovery-df264e0186d37b6976579a4ed2e1f8c761900c8d.tar.zst
android_bootable_recovery-df264e0186d37b6976579a4ed2e1f8c761900c8d.zip
Diffstat (limited to 'Android.mk')
-rw-r--r--Android.mk194
1 files changed, 6 insertions, 188 deletions
diff --git a/Android.mk b/Android.mk
index 447041617..9888f8616 100644
--- a/Android.mk
+++ b/Android.mk
@@ -23,11 +23,6 @@ RECOVERY_FSTAB_VERSION := 2
# librecovery_ui_default, which uses ScreenRecoveryUI.
TARGET_RECOVERY_UI_LIB ?= librecovery_ui_default
-recovery_common_cflags := \
- -Wall \
- -Werror \
- -DRECOVERY_API_VERSION=$(RECOVERY_API_VERSION)
-
# librecovery_ui_ext (shared library)
# ===================================
include $(CLEAR_VARS)
@@ -49,169 +44,16 @@ LOCAL_WHOLE_STATIC_LIBRARIES := \
LOCAL_SHARED_LIBRARIES := \
libbase \
liblog \
- librecovery_ui
-
-include $(BUILD_SHARED_LIBRARY)
-
-# librecovery_ui (shared library)
-# ===============================
-include $(CLEAR_VARS)
-LOCAL_SRC_FILES := \
- device.cpp \
- screen_ui.cpp \
- ui.cpp \
- vr_ui.cpp \
- wear_ui.cpp
-
-LOCAL_MODULE := librecovery_ui
-
-LOCAL_CFLAGS := $(recovery_common_cflags)
-
-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_STATIC_LIBRARIES := \
- libminui \
- libotautil \
-
-LOCAL_SHARED_LIBRARIES := \
- libbase \
- libpng \
- libz \
+ librecovery_ui.recovery
include $(BUILD_SHARED_LIBRARY)
-# librecovery_ui (static library)
-# ===============================
-include $(CLEAR_VARS)
-LOCAL_SRC_FILES := \
- device.cpp \
- screen_ui.cpp \
- ui.cpp \
- vr_ui.cpp \
- wear_ui.cpp
-
-LOCAL_MODULE := librecovery_ui
-
-LOCAL_CFLAGS := $(recovery_common_cflags)
-
-LOCAL_STATIC_LIBRARIES := \
- libminui \
- libotautil \
-
-LOCAL_SHARED_LIBRARIES := \
- libbase \
- libpng \
- libz \
-
-include $(BUILD_STATIC_LIBRARY)
-
-# Health HAL dependency
-health_hal_static_libraries := \
- android.hardware.health@2.0-impl \
- android.hardware.health@2.0 \
- android.hardware.health@1.0 \
- android.hardware.health@1.0-convert \
- libhealthstoragedefault \
- libhidltransport \
- libhidlbase \
- libhwbinder_noltopgo \
- libvndksupport \
- libbatterymonitor
-
-librecovery_static_libraries := \
- libfusesideload \
- libminadbd \
- libminui \
- libverifier \
- libotautil \
- $(health_hal_static_libraries) \
- libvintf_recovery \
- libvintf \
-
-librecovery_shared_libraries := \
- libasyncio \
- libbase \
- libbootloader_message \
- libcrypto \
- libcrypto_utils \
- libcutils \
- libext4_utils \
- libfs_mgr \
- libhidl-gen-utils \
- liblog \
- libpng \
- libselinux \
- libtinyxml2 \
- libutils \
- libz \
- libziparchive \
-
-# librecovery (static library)
-# ===============================
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := \
- adb_install.cpp \
- fsck_unshare_blocks.cpp \
- fuse_sdcard_provider.cpp \
- install.cpp \
- recovery.cpp \
- roots.cpp \
-
-LOCAL_C_INCLUDES := \
- system/vold \
-
-LOCAL_CFLAGS := $(recovery_common_cflags)
-
-LOCAL_MODULE := librecovery
-
-LOCAL_STATIC_LIBRARIES := \
- $(librecovery_static_libraries)
-
-LOCAL_SHARED_LIBRARIES := \
- $(librecovery_shared_libraries)
-
-include $(BUILD_STATIC_LIBRARY)
-
-# recovery (static executable)
-# ===============================
+# recovery_deps: A phony target that's depended on by `recovery`, which
+# builds additional modules conditionally based on Makefile variables.
+# ======================================================================
include $(CLEAR_VARS)
-LOCAL_SRC_FILES := \
- logging.cpp \
- recovery_main.cpp \
-
-LOCAL_MODULE := recovery
-
-LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/system/bin
-
-# 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
-
-LOCAL_CFLAGS := $(recovery_common_cflags)
-
-LOCAL_STATIC_LIBRARIES := \
- librecovery \
- librecovery_ui_default \
- $(librecovery_static_libraries)
-
-LOCAL_SHARED_LIBRARIES := \
- librecovery_ui \
- $(librecovery_shared_libraries)
-
-LOCAL_HAL_STATIC_LIBRARIES := libhealthd
-
-LOCAL_REQUIRED_MODULES := \
- e2fsdroid.recovery \
- mke2fs.recovery \
- mke2fs.conf
+LOCAL_MODULE := recovery_deps
ifeq ($(TARGET_USERIMAGES_USE_F2FS),true)
ifeq ($(HOST_OS),linux)
@@ -235,31 +77,7 @@ 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 += \
- libasyncio.recovery \
- libbase.recovery \
- libbootloader_message.recovery \
- libcrypto.recovery \
- libcrypto_utils.recovery \
- libcutils.recovery \
- libext4_utils.recovery \
- libfs_mgr.recovery \
- libhidl-gen-utils.recovery \
- liblog.recovery \
- libpng.recovery \
- libselinux.recovery \
- libsparse.recovery \
- libtinyxml2.recovery \
- libutils.recovery \
- libz.recovery \
- libziparchive.recovery \
-
-include $(BUILD_EXECUTABLE)
+include $(BUILD_PHONY_PACKAGE)
include \
$(LOCAL_PATH)/tests/Android.mk \