blob: bcbcccfa2d3e58182d7e4b0a772da722c0dd2309 [file] [log] [blame]
Ethan Yonkerbd7492d2016-12-07 13:55:01 -06001LOCAL_PATH := $(call my-dir)
2ifeq ($(TW_INCLUDE_CRYPTO), true)
3include $(CLEAR_VARS)
4
5LOCAL_MODULE := libe4crypt
6LOCAL_MODULE_TAGS := eng optional
7LOCAL_CFLAGS :=
Ethan Yonker79f88bd2016-12-09 14:52:12 -06008LOCAL_SRC_FILES := Decrypt.cpp Ext4Crypt.cpp Keymaster.cpp KeyStorage.cpp ScryptParameters.cpp Utils.cpp HashPassword.cpp ext4_crypt.cpp
Ethan Yonkerbd7492d2016-12-07 13:55:01 -06009LOCAL_SHARED_LIBRARIES := libselinux libc libc++ libext4_utils libsoftkeymaster libbase libcrypto libcutils libkeymaster_messages libhardware libprotobuf-cpp-lite
10LOCAL_STATIC_LIBRARIES := libscrypt_static
11LOCAL_C_INCLUDES := system/extras/ext4_utils external/scrypt/lib/crypto system/security/keystore hardware/libhardware/include/hardware system/security/softkeymaster/include/keymaster system/keymaster/include
12
13ifneq ($(wildcard hardware/libhardware/include/hardware/keymaster0.h),)
14 LOCAL_CFLAGS += -DTW_CRYPTO_HAVE_KEYMASTERX
15 LOCAL_C_INCLUDES += external/boringssl/src/include
16endif
17
18include $(BUILD_SHARED_LIBRARY)
19
20
21
22include $(CLEAR_VARS)
23LOCAL_MODULE := twrpfbe
24LOCAL_MODULE_TAGS := optional
25LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
26LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
27LOCAL_SRC_FILES := main.cpp
28LOCAL_SHARED_LIBRARIES := libe4crypt
29#LOCAL_LDFLAGS += -Wl,-dynamic-linker,/sbin/linker64
30
31include $(BUILD_EXECUTABLE)
32
Ethan Yonker79f88bd2016-12-09 14:52:12 -060033include $(CLEAR_VARS)
34LOCAL_MODULE := e4policyget
35LOCAL_MODULE_TAGS := optional
36LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
37LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
38LOCAL_SRC_FILES := e4policyget.cpp
39LOCAL_SHARED_LIBRARIES := libe4crypt
40LOCAL_LDFLAGS += -Wl,-dynamic-linker,/sbin/linker64
41
42include $(BUILD_EXECUTABLE)
43
Ethan Yonkerbd7492d2016-12-07 13:55:01 -060044endif