Ethan Yonker | 4eca40d | 2014-11-11 14:52:28 -0600 | [diff] [blame] | 1 | LOCAL_PATH := $(call my-dir) |
that | ceb7b8e | 2014-12-09 23:15:16 +0100 | [diff] [blame] | 2 | ifeq ($(TW_INCLUDE_CRYPTO), true) |
Ethan Yonker | 4eca40d | 2014-11-11 14:52:28 -0600 | [diff] [blame] | 3 | include $(CLEAR_VARS) |
| 4 | |
Ethan Yonker | 4eca40d | 2014-11-11 14:52:28 -0600 | [diff] [blame] | 5 | LOCAL_MODULE := libcryptfslollipop |
| 6 | LOCAL_MODULE_TAGS := eng optional |
| 7 | LOCAL_CFLAGS := |
| 8 | LOCAL_SRC_FILES = cryptfs.c |
that | 183a6f8 | 2014-12-31 18:30:50 +0100 | [diff] [blame] | 9 | LOCAL_SHARED_LIBRARIES := libcrypto libhardware libcutils |
| 10 | LOCAL_C_INCLUDES := external/openssl/include $(commands_recovery_local_path)/crypto/scrypt/lib/crypto |
Dees Troy | c657cc0 | 2015-01-16 22:48:47 +0000 | [diff] [blame] | 11 | |
| 12 | ifeq ($(TARGET_HW_DISK_ENCRYPTION),true) |
maxwen | ad05c6d | 2016-08-01 22:21:35 +0200 | [diff] [blame] | 13 | ifeq ($(TARGET_CRYPTFS_HW_PATH),) |
| 14 | LOCAL_C_INCLUDES += device/qcom/common/cryptfs_hw |
| 15 | else |
| 16 | LOCAL_C_INCLUDES += $(TARGET_CRYPTFS_HW_PATH) |
| 17 | endif |
Dees Troy | c657cc0 | 2015-01-16 22:48:47 +0000 | [diff] [blame] | 18 | LOCAL_SHARED_LIBRARIES += libcryptfs_hw |
| 19 | LOCAL_CFLAGS += -DCONFIG_HW_DISK_ENCRYPTION |
| 20 | endif |
| 21 | |
Ethan Yonker | c798c9c | 2015-10-09 11:15:26 -0500 | [diff] [blame] | 22 | ifneq ($(wildcard hardware/libhardware/include/hardware/keymaster0.h),) |
| 23 | LOCAL_CFLAGS += -DTW_CRYPTO_HAVE_KEYMASTERX |
| 24 | LOCAL_C_INCLUDES += external/boringssl/src/include |
| 25 | endif |
| 26 | |
Ethan Yonker | 253368a | 2014-11-25 15:00:52 -0600 | [diff] [blame] | 27 | LOCAL_WHOLE_STATIC_LIBRARIES += libscrypttwrp_static |
| 28 | |
| 29 | include $(BUILD_SHARED_LIBRARY) |
| 30 | |
Dees Troy | c657cc0 | 2015-01-16 22:48:47 +0000 | [diff] [blame] | 31 | |
| 32 | |
Ethan Yonker | c798c9c | 2015-10-09 11:15:26 -0500 | [diff] [blame] | 33 | include $(CLEAR_VARS) |
| 34 | LOCAL_MODULE := twrpdec |
| 35 | LOCAL_MODULE_TAGS := optional |
| 36 | LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES |
| 37 | LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin |
| 38 | LOCAL_SRC_FILES := main.c cryptfs.c |
| 39 | LOCAL_SHARED_LIBRARIES := libcrypto libhardware libcutils libc |
| 40 | LOCAL_C_INCLUDES := external/openssl/include $(commands_recovery_local_path)/crypto/scrypt/lib/crypto |
Dees Troy | c657cc0 | 2015-01-16 22:48:47 +0000 | [diff] [blame] | 41 | |
Ethan Yonker | c798c9c | 2015-10-09 11:15:26 -0500 | [diff] [blame] | 42 | ifeq ($(TARGET_HW_DISK_ENCRYPTION),true) |
maxwen | ad05c6d | 2016-08-01 22:21:35 +0200 | [diff] [blame] | 43 | ifeq ($(TARGET_CRYPTFS_HW_PATH),) |
| 44 | LOCAL_C_INCLUDES += device/qcom/common/cryptfs_hw |
| 45 | else |
| 46 | LOCAL_C_INCLUDES += $(TARGET_CRYPTFS_HW_PATH) |
| 47 | endif |
Ethan Yonker | c798c9c | 2015-10-09 11:15:26 -0500 | [diff] [blame] | 48 | LOCAL_SHARED_LIBRARIES += libcryptfs_hw |
| 49 | LOCAL_CFLAGS += -DCONFIG_HW_DISK_ENCRYPTION |
| 50 | endif |
Dees Troy | c657cc0 | 2015-01-16 22:48:47 +0000 | [diff] [blame] | 51 | |
Ethan Yonker | c798c9c | 2015-10-09 11:15:26 -0500 | [diff] [blame] | 52 | ifneq ($(wildcard hardware/libhardware/include/hardware/keymaster0.h),) |
| 53 | LOCAL_CFLAGS += -DTW_CRYPTO_HAVE_KEYMASTERX |
| 54 | LOCAL_C_INCLUDES += external/boringssl/src/include |
| 55 | endif |
| 56 | |
| 57 | LOCAL_WHOLE_STATIC_LIBRARIES += libscrypttwrp_static |
| 58 | include $(BUILD_EXECUTABLE) |
Dees Troy | c657cc0 | 2015-01-16 22:48:47 +0000 | [diff] [blame] | 59 | |
Ethan Yonker | 4eca40d | 2014-11-11 14:52:28 -0600 | [diff] [blame] | 60 | endif |