summaryrefslogtreecommitdiffstats
path: root/crypto/lollipop/Android.mk
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/lollipop/Android.mk')
-rw-r--r--crypto/lollipop/Android.mk40
1 files changed, 25 insertions, 15 deletions
diff --git a/crypto/lollipop/Android.mk b/crypto/lollipop/Android.mk
index 938e0d184..16dfd28fd 100644
--- a/crypto/lollipop/Android.mk
+++ b/crypto/lollipop/Android.mk
@@ -15,28 +15,38 @@ ifeq ($(TARGET_HW_DISK_ENCRYPTION),true)
LOCAL_CFLAGS += -DCONFIG_HW_DISK_ENCRYPTION
endif
+ifneq ($(wildcard hardware/libhardware/include/hardware/keymaster0.h),)
+ LOCAL_CFLAGS += -DTW_CRYPTO_HAVE_KEYMASTERX
+ LOCAL_C_INCLUDES += external/boringssl/src/include
+endif
+
LOCAL_WHOLE_STATIC_LIBRARIES += libscrypttwrp_static
include $(BUILD_SHARED_LIBRARY)
-#include $(CLEAR_VARS)
-#LOCAL_MODULE := twrpdec
-#LOCAL_MODULE_TAGS := eng optional
-#LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
-#LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
-#LOCAL_SRC_FILES := main.c cryptfs.c
-#LOCAL_SHARED_LIBRARIES := libcrypto libhardware libcutils libc
-#LOCAL_C_INCLUDES := external/openssl/include $(commands_recovery_local_path)/crypto/scrypt/lib/crypto
+include $(CLEAR_VARS)
+LOCAL_MODULE := twrpdec
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
+LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
+LOCAL_SRC_FILES := main.c cryptfs.c
+LOCAL_SHARED_LIBRARIES := libcrypto libhardware libcutils libc
+LOCAL_C_INCLUDES := external/openssl/include $(commands_recovery_local_path)/crypto/scrypt/lib/crypto
+
+ifeq ($(TARGET_HW_DISK_ENCRYPTION),true)
+ LOCAL_C_INCLUDES += device/qcom/common/cryptfs_hw
+ LOCAL_SHARED_LIBRARIES += libcryptfs_hw
+ LOCAL_CFLAGS += -DCONFIG_HW_DISK_ENCRYPTION
+endif
-#ifeq ($(TARGET_HW_DISK_ENCRYPTION),true)
-# LOCAL_C_INCLUDES += device/qcom/common/cryptfs_hw
-# LOCAL_SHARED_LIBRARIES += libcryptfs_hw
-# LOCAL_CFLAGS += -DCONFIG_HW_DISK_ENCRYPTION
-#endif
+ifneq ($(wildcard hardware/libhardware/include/hardware/keymaster0.h),)
+ LOCAL_CFLAGS += -DTW_CRYPTO_HAVE_KEYMASTERX
+ LOCAL_C_INCLUDES += external/boringssl/src/include
+endif
-#LOCAL_WHOLE_STATIC_LIBRARIES += libscrypttwrp_static
-#include $(BUILD_EXECUTABLE)
+LOCAL_WHOLE_STATIC_LIBRARIES += libscrypttwrp_static
+include $(BUILD_EXECUTABLE)
endif