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 --- crypto/crypttools/Android.mk | 2 +- crypto/fs_mgr/Android.mk | 4 +++- crypto/jb/Android.mk | 5 ++++- crypto/scrypt/Scrypt-config.mk | 4 ++-- 4 files changed, 10 insertions(+), 5 deletions(-) (limited to 'crypto') diff --git a/crypto/crypttools/Android.mk b/crypto/crypttools/Android.mk index a2f8dfed5..fc62583c4 100644 --- a/crypto/crypttools/Android.mk +++ b/crypto/crypttools/Android.mk @@ -10,6 +10,6 @@ LOCAL_STATIC_LIBRARIES += libfs_mgrtwrp libc libcutils LOCAL_MODULE_CLASS := UTILITY_EXECUTABLES LOCAL_MODULE_PATH := $(PRODUCT_OUT)/utilities LOCAL_FORCE_STATIC_EXECUTABLE := true -LOCAL_C_INCLUDES := bootable/recovery/crypto/jb/ +LOCAL_C_INCLUDES := $(commands_recovery_local_path)/crypto/jb/ include $(BUILD_EXECUTABLE) endif \ No newline at end of file diff --git a/crypto/fs_mgr/Android.mk b/crypto/fs_mgr/Android.mk index 4196710af..8dd9d4ca2 100644 --- a/crypto/fs_mgr/Android.mk +++ b/crypto/fs_mgr/Android.mk @@ -10,7 +10,9 @@ LOCAL_C_INCLUDES := $(LOCAL_PATH)/include LOCAL_MODULE:= libfs_mgrtwrp LOCAL_SHARED_LIBRARIES := libext4_utils LOCAL_STATIC_LIBRARIES := liblogwraptwrp libmincrypttwrp -LOCAL_C_INCLUDES += system/extras/ext4_utils bootable/recovery/libmincrypt/includes +LOCAL_C_INCLUDES += \ + system/extras/ext4_utils \ + $(commands_recovery_local_path)/libmincrypt/includes LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include include $(BUILD_STATIC_LIBRARY) diff --git a/crypto/jb/Android.mk b/crypto/jb/Android.mk index dc458fd14..03840873a 100644 --- a/crypto/jb/Android.mk +++ b/crypto/jb/Android.mk @@ -7,7 +7,10 @@ LOCAL_MODULE_TAGS := eng LOCAL_MODULES_TAGS = optional LOCAL_CFLAGS = LOCAL_SRC_FILES = cryptfs.c -LOCAL_C_INCLUDES += system/extras/ext4_utils external/openssl/include bootable/recovery/crypto/scrypt/lib/crypto +LOCAL_C_INCLUDES += \ + system/extras/ext4_utils \ + external/openssl/include \ + $(commands_recovery_local_path)/crypto/scrypt/lib/crypto LOCAL_SHARED_LIBRARIES += libc liblog libcutils libcrypto libext4_utils LOCAL_STATIC_LIBRARIES += libfs_mgrtwrp libscrypttwrp_static liblogwraptwrp libmincrypttwrp diff --git a/crypto/scrypt/Scrypt-config.mk b/crypto/scrypt/Scrypt-config.mk index bdaeccf30..c0b00d873 100644 --- a/crypto/scrypt/Scrypt-config.mk +++ b/crypto/scrypt/Scrypt-config.mk @@ -77,7 +77,7 @@ target_arch := unknown_arch endif target_c_flags := $(common_c_flags) $($(target_arch)_c_flags) $(local_c_flags) -target_c_includes := $(addprefix bootable/recovery/crypto/scrypt/,$(common_c_includes)) $(local_c_includes) +target_c_includes := $(addprefix $(commands_recovery_local_path)/crypto/scrypt/,$(common_c_includes)) $(local_c_includes) target_src_files := $(common_src_files) $($(target_arch)_src_files) target_src_files := $(filter-out $($(target_arch)_exclude_files), $(target_src_files)) @@ -97,7 +97,7 @@ host_arch := unknown_arch endif host_c_flags := $(common_c_flags) $($(host_arch)_c_flags) $(local_c_flags) -host_c_includes := $(addprefix bootable/recovery/crypto/scrypt/,$(common_c_includes)) $(local_c_includes) +host_c_includes := $(addprefix $(commands_recovery_local_path)/crypto/scrypt/,$(common_c_includes)) $(local_c_includes) host_src_files := $(common_src_files) $($(host_arch)_src_files) host_src_files := $(filter-out $($(host_arch)_exclude_files), $(host_src_files)) -- cgit v1.2.3