blob: 1be412138394b528aff5b2789b6046208a22e197 [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 Yonker58f21322018-08-24 11:17:36 -050027LOCAL_CFLAGS += -Wno-unused-function
28
Ethan Yonker253368a2014-11-25 15:00:52 -060029LOCAL_WHOLE_STATIC_LIBRARIES += libscrypttwrp_static
30
31include $(BUILD_SHARED_LIBRARY)
32
Dees Troyc657cc02015-01-16 22:48:47 +000033
34
Ethan Yonkerc798c9c2015-10-09 11:15:26 -050035include $(CLEAR_VARS)
36LOCAL_MODULE := twrpdec
37LOCAL_MODULE_TAGS := optional
38LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
39LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
40LOCAL_SRC_FILES := main.c cryptfs.c
41LOCAL_SHARED_LIBRARIES := libcrypto libhardware libcutils libc
42LOCAL_C_INCLUDES := external/openssl/include $(commands_recovery_local_path)/crypto/scrypt/lib/crypto
Dees Troyc657cc02015-01-16 22:48:47 +000043
Ethan Yonkerc798c9c2015-10-09 11:15:26 -050044ifeq ($(TARGET_HW_DISK_ENCRYPTION),true)
maxwenad05c6d2016-08-01 22:21:35 +020045 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 Yonkerc798c9c2015-10-09 11:15:26 -050050 LOCAL_SHARED_LIBRARIES += libcryptfs_hw
51 LOCAL_CFLAGS += -DCONFIG_HW_DISK_ENCRYPTION
52endif
Dees Troyc657cc02015-01-16 22:48:47 +000053
Ethan Yonkerc798c9c2015-10-09 11:15:26 -050054ifneq ($(wildcard hardware/libhardware/include/hardware/keymaster0.h),)
55 LOCAL_CFLAGS += -DTW_CRYPTO_HAVE_KEYMASTERX
56 LOCAL_C_INCLUDES += external/boringssl/src/include
57endif
58
59LOCAL_WHOLE_STATIC_LIBRARIES += libscrypttwrp_static
60include $(BUILD_EXECUTABLE)
Dees Troyc657cc02015-01-16 22:48:47 +000061
Ethan Yonker4eca40d2014-11-11 14:52:28 -060062endif