From 55c75cad80479f35928f20fba7dcfbc3aec9994e Mon Sep 17 00:00:00 2001 From: Matt Mower Date: Sun, 31 Aug 2014 11:30:15 -0500 Subject: Build block TWRP with RECOVERY_VARIANT Enable TWRP to reside alongside other recoveries with the naming convention: bootable/recovery(-flag). If TWRP resides at bootable/recovery and a device does not specify RECOVERY_VARIANT, then it will build like normal. If TWRP resides at bootable/recovery-twrp, then its makefiles will only be parsed if a device specifies 'RECOVERY_VARIANT := twrp'. This prevents TWRP specific makefile warnings/errors (notably, missing DEVICE_RESOLUTION) when another recovery is being built. Change-Id: I8f02fffcd79c309c7123b9428eedc69af02e126e --- Android.mk | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'Android.mk') diff --git a/Android.mk b/Android.mk index ea6bb57c9..089485a15 100644 --- a/Android.mk +++ b/Android.mk @@ -14,6 +14,14 @@ LOCAL_PATH := $(call my-dir) +ifeq ($(RECOVERY_VARIANT),) +ifeq ($(LOCAL_PATH),bootable/recovery) +RECOVERY_VARIANT := twrp +endif +endif + +ifeq ($(RECOVERY_VARIANT),twrp) + include $(CLEAR_VARS) TARGET_RECOVERY_GUI := true @@ -321,7 +329,7 @@ include $(CLEAR_VARS) LOCAL_MODULE := verifier_test LOCAL_FORCE_STATIC_EXECUTABLE := true LOCAL_MODULE_TAGS := tests -LOCAL_C_INCLUDES := bootable/recovery/libmincrypt/includes +LOCAL_C_INCLUDES := $(LOCAL_PATH)/libmincrypt/includes LOCAL_SRC_FILES := \ verifier_test.cpp \ verifier.cpp \ @@ -339,7 +347,7 @@ include $(CLEAR_VARS) LOCAL_MODULE := libaosprecovery LOCAL_MODULE_TAGS := eng LOCAL_MODULES_TAGS = optional -LOCAL_C_INCLUDES := bootable/recovery/libmincrypt/includes +LOCAL_C_INCLUDES := $(LOCAL_PATH)/libmincrypt/includes LOCAL_SRC_FILES = adb_install.cpp bootloader.cpp verifier.cpp mtdutils/mtdutils.c legacy_property_service.c LOCAL_SHARED_LIBRARIES += libc liblog libcutils libmtdutils LOCAL_STATIC_LIBRARIES += libmincrypttwrp @@ -418,3 +426,7 @@ endif ifeq ($(TW_INCLUDE_FB2PNG), true) include $(commands_recovery_local_path)/fb2png/Android.mk endif + +commands_recovery_local_path := + +endif -- cgit v1.2.3