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 | 58f2132 | 2018-08-24 11:17:36 -0500 | [diff] [blame] | 27 | LOCAL_CFLAGS += -Wno-unused-function |
| 28 | |
Ethan Yonker | 253368a | 2014-11-25 15:00:52 -0600 | [diff] [blame] | 29 | LOCAL_WHOLE_STATIC_LIBRARIES += libscrypttwrp_static |
| 30 | |
| 31 | include $(BUILD_SHARED_LIBRARY) |
| 32 | |
Dees Troy | c657cc0 | 2015-01-16 22:48:47 +0000 | [diff] [blame] | 33 | |
| 34 | |
Ethan Yonker | c798c9c | 2015-10-09 11:15:26 -0500 | [diff] [blame] | 35 | include $(CLEAR_VARS) |
| 36 | LOCAL_MODULE := twrpdec |
| 37 | LOCAL_MODULE_TAGS := optional |
| 38 | LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES |
| 39 | LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin |
| 40 | LOCAL_SRC_FILES := main.c cryptfs.c |
| 41 | LOCAL_SHARED_LIBRARIES := libcrypto libhardware libcutils libc |
| 42 | 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] | 43 | |
Ethan Yonker | c798c9c | 2015-10-09 11:15:26 -0500 | [diff] [blame] | 44 | ifeq ($(TARGET_HW_DISK_ENCRYPTION),true) |
maxwen | ad05c6d | 2016-08-01 22:21:35 +0200 | [diff] [blame] | 45 | ifeq ($(TARGET_CRYPTFS_HW_PATH),) |
| 46 | LOCAL_C_INCLUDES += device/qcom/common/cryptfs_hw |
| 47 | else |
| 48 | LOCAL_C_INCLUDES += $(TARGET_CRYPTFS_HW_PATH) |
| 49 | endif |
Ethan Yonker | c798c9c | 2015-10-09 11:15:26 -0500 | [diff] [blame] | 50 | LOCAL_SHARED_LIBRARIES += libcryptfs_hw |
| 51 | LOCAL_CFLAGS += -DCONFIG_HW_DISK_ENCRYPTION |
| 52 | endif |
Dees Troy | c657cc0 | 2015-01-16 22:48:47 +0000 | [diff] [blame] | 53 | |
Ethan Yonker | c798c9c | 2015-10-09 11:15:26 -0500 | [diff] [blame] | 54 | ifneq ($(wildcard hardware/libhardware/include/hardware/keymaster0.h),) |
| 55 | LOCAL_CFLAGS += -DTW_CRYPTO_HAVE_KEYMASTERX |
| 56 | LOCAL_C_INCLUDES += external/boringssl/src/include |
| 57 | endif |
| 58 | |
| 59 | LOCAL_WHOLE_STATIC_LIBRARIES += libscrypttwrp_static |
| 60 | include $(BUILD_EXECUTABLE) |
Dees Troy | c657cc0 | 2015-01-16 22:48:47 +0000 | [diff] [blame] | 61 | |
Ethan Yonker | 4eca40d | 2014-11-11 14:52:28 -0600 | [diff] [blame] | 62 | endif |