From b29a5e27c33291f8134ea5f28e84e672a3c25199 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=2E=20Andrei=20M=C4=83ce=C8=99?= Date: Thu, 22 Dec 2016 06:19:44 -0500 Subject: build: Consolidate the crypto_utils presence tests No point checking filesystem repeatedly/check may change in future Change-Id: I0413b07b850f785eb5150c6ed18836cc56e94d6f --- Android.mk | 2 ++ minadbd/Android.mk | 3 ++- prebuilt/Android.mk | 4 +++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Android.mk b/Android.mk index 582b710ea..971991845 100644 --- a/Android.mk +++ b/Android.mk @@ -302,6 +302,8 @@ ifeq ($(TW_INCLUDE_CRYPTO), true) LOCAL_SHARED_LIBRARIES += libe4crypt endif endif +WITH_CRYPTO_UTILS := \ + $(if $(wildcard system/core/libcrypto_utils/Android.mk),true) ifeq ($(TW_USE_MODEL_HARDWARE_ID_FOR_DEVICE_ID), true) LOCAL_CFLAGS += -DTW_USE_MODEL_HARDWARE_ID_FOR_DEVICE_ID endif diff --git a/minadbd/Android.mk b/minadbd/Android.mk index 3d675dda5..24d16350f 100644 --- a/minadbd/Android.mk +++ b/minadbd/Android.mk @@ -30,7 +30,8 @@ ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 24; echo $$?),0) LOCAL_SHARED_LIBRARIES += libmincrypttwrp LOCAL_CFLAGS += -DUSE_MINCRYPT else - LOCAL_SHARED_LIBRARIES += libcrypto + LOCAL_SHARED_LIBRARIES += libcrypto \ + $(if $(WITH_CRYPTO_UTILS),libcrypto_utils) endif include $(BUILD_SHARED_LIBRARY) diff --git a/prebuilt/Android.mk b/prebuilt/Android.mk index b5891acdf..3206346e0 100644 --- a/prebuilt/Android.mk +++ b/prebuilt/Android.mk @@ -96,7 +96,9 @@ ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 23; echo $$?),0) RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libgccdemangle.so endif ifeq ($(shell test $(PLATFORM_SDK_VERSION) -gt 23; echo $$?),0) - RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcrypto.so + + RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcrypto.so \ + $(if $(WITH_CRYPTO_UTILS),$(TARGET_OUT_SHARED_LIBRARIES)/libcrypto_utils.so) RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libpackagelistparser.so RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/liblzma.so endif -- cgit v1.2.3