blob: 6dc386a2947ae6898079ae8a758b8c24e1eced6b [file] [log] [blame]
Ethan Yonker4eca40d2014-11-11 14:52:28 -06001LOCAL_PATH := $(call my-dir)
thatceb7b8e2014-12-09 23:15:16 +01002ifeq ($(TW_INCLUDE_CRYPTO), true)
Ethan Yonker4eca40d2014-11-11 14:52:28 -06003include $(CLEAR_VARS)
4
Ethan Yonker4eca40d2014-11-11 14:52:28 -06005LOCAL_MODULE := libcryptfslollipop
6LOCAL_MODULE_TAGS := eng optional
7LOCAL_CFLAGS :=
8LOCAL_SRC_FILES = cryptfs.c
that183a6f82014-12-31 18:30:50 +01009LOCAL_SHARED_LIBRARIES := libcrypto libhardware libcutils
10LOCAL_C_INCLUDES := external/openssl/include $(commands_recovery_local_path)/crypto/scrypt/lib/crypto
Dees Troyc657cc02015-01-16 22:48:47 +000011
12ifeq ($(TARGET_HW_DISK_ENCRYPTION),true)
maxwenad05c6d2016-08-01 22:21:35 +020013 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 Troyc657cc02015-01-16 22:48:47 +000018 LOCAL_SHARED_LIBRARIES += libcryptfs_hw
19 LOCAL_CFLAGS += -DCONFIG_HW_DISK_ENCRYPTION
20endif
21
Ethan Yonkerc798c9c2015-10-09 11:15:26 -050022ifneq ($(wildcard hardware/libhardware/include/hardware/keymaster0.h),)
23 LOCAL_CFLAGS += -DTW_CRYPTO_HAVE_KEYMASTERX
24 LOCAL_C_INCLUDES += external/boringssl/src/include
25endif
26
Ethan Yonker253368a2014-11-25 15:00:52 -060027LOCAL_WHOLE_STATIC_LIBRARIES += libscrypttwrp_static
28
29include $(BUILD_SHARED_LIBRARY)
30
Dees Troyc657cc02015-01-16 22:48:47 +000031
32
Ethan Yonkerc798c9c2015-10-09 11:15:26 -050033include $(CLEAR_VARS)
34LOCAL_MODULE := twrpdec
35LOCAL_MODULE_TAGS := optional
36LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
37LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
38LOCAL_SRC_FILES := main.c cryptfs.c
39LOCAL_SHARED_LIBRARIES := libcrypto libhardware libcutils libc
40LOCAL_C_INCLUDES := external/openssl/include $(commands_recovery_local_path)/crypto/scrypt/lib/crypto
Dees Troyc657cc02015-01-16 22:48:47 +000041
Ethan Yonkerc798c9c2015-10-09 11:15:26 -050042ifeq ($(TARGET_HW_DISK_ENCRYPTION),true)
maxwenad05c6d2016-08-01 22:21:35 +020043 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 Yonkerc798c9c2015-10-09 11:15:26 -050048 LOCAL_SHARED_LIBRARIES += libcryptfs_hw
49 LOCAL_CFLAGS += -DCONFIG_HW_DISK_ENCRYPTION
50endif
Dees Troyc657cc02015-01-16 22:48:47 +000051
Ethan Yonkerc798c9c2015-10-09 11:15:26 -050052ifneq ($(wildcard hardware/libhardware/include/hardware/keymaster0.h),)
53 LOCAL_CFLAGS += -DTW_CRYPTO_HAVE_KEYMASTERX
54 LOCAL_C_INCLUDES += external/boringssl/src/include
55endif
56
57LOCAL_WHOLE_STATIC_LIBRARIES += libscrypttwrp_static
58include $(BUILD_EXECUTABLE)
Dees Troyc657cc02015-01-16 22:48:47 +000059
Ethan Yonker4eca40d2014-11-11 14:52:28 -060060endif