blob: 16dfd28fd6a27264af4943b2eded5894e5d2b003 [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)
13 LOCAL_C_INCLUDES += device/qcom/common/cryptfs_hw
14 LOCAL_SHARED_LIBRARIES += libcryptfs_hw
15 LOCAL_CFLAGS += -DCONFIG_HW_DISK_ENCRYPTION
16endif
17
Ethan Yonkerc798c9c2015-10-09 11:15:26 -050018ifneq ($(wildcard hardware/libhardware/include/hardware/keymaster0.h),)
19 LOCAL_CFLAGS += -DTW_CRYPTO_HAVE_KEYMASTERX
20 LOCAL_C_INCLUDES += external/boringssl/src/include
21endif
22
Ethan Yonker253368a2014-11-25 15:00:52 -060023LOCAL_WHOLE_STATIC_LIBRARIES += libscrypttwrp_static
24
25include $(BUILD_SHARED_LIBRARY)
26
Dees Troyc657cc02015-01-16 22:48:47 +000027
28
Ethan Yonkerc798c9c2015-10-09 11:15:26 -050029include $(CLEAR_VARS)
30LOCAL_MODULE := twrpdec
31LOCAL_MODULE_TAGS := optional
32LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
33LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
34LOCAL_SRC_FILES := main.c cryptfs.c
35LOCAL_SHARED_LIBRARIES := libcrypto libhardware libcutils libc
36LOCAL_C_INCLUDES := external/openssl/include $(commands_recovery_local_path)/crypto/scrypt/lib/crypto
Dees Troyc657cc02015-01-16 22:48:47 +000037
Ethan Yonkerc798c9c2015-10-09 11:15:26 -050038ifeq ($(TARGET_HW_DISK_ENCRYPTION),true)
39 LOCAL_C_INCLUDES += device/qcom/common/cryptfs_hw
40 LOCAL_SHARED_LIBRARIES += libcryptfs_hw
41 LOCAL_CFLAGS += -DCONFIG_HW_DISK_ENCRYPTION
42endif
Dees Troyc657cc02015-01-16 22:48:47 +000043
Ethan Yonkerc798c9c2015-10-09 11:15:26 -050044ifneq ($(wildcard hardware/libhardware/include/hardware/keymaster0.h),)
45 LOCAL_CFLAGS += -DTW_CRYPTO_HAVE_KEYMASTERX
46 LOCAL_C_INCLUDES += external/boringssl/src/include
47endif
48
49LOCAL_WHOLE_STATIC_LIBRARIES += libscrypttwrp_static
50include $(BUILD_EXECUTABLE)
Dees Troyc657cc02015-01-16 22:48:47 +000051
Ethan Yonker4eca40d2014-11-11 14:52:28 -060052endif