blob: 67e73c80f0e1099b8c070aa3cdddc730683f6b4e [file] [log] [blame]
Dees Troy4dff2e62013-11-10 04:11:43 +00001local_c_flags := -DUSE_OPENSSL_PBKDF2
2
Ethan Yonkerc798c9c2015-10-09 11:15:26 -05003local_c_includes := $(log_c_includes) external/openssl/include external/boringssl/src/include
Dees Troy4dff2e62013-11-10 04:11:43 +00004
5local_additional_dependencies := $(LOCAL_PATH)/android-config.mk $(LOCAL_PATH)/Scrypt.mk
6
7include $(LOCAL_PATH)/Scrypt-config.mk
8
9#######################################
10# target static library
11include $(CLEAR_VARS)
12include $(LOCAL_PATH)/android-config.mk
13
14LOCAL_SHARED_LIBRARIES := $(log_shared_libraries)
15
16# If we're building an unbundled build, don't try to use clang since it's not
17# in the NDK yet. This can be removed when a clang version that is fast enough
18# in the NDK.
19ifeq (,$(TARGET_BUILD_APPS))
20LOCAL_CLANG := true
21else
22LOCAL_SDK_VERSION := 9
23endif
24
25LOCAL_SRC_FILES += $(target_src_files)
26LOCAL_CFLAGS += $(target_c_flags)
Ethan Yonkerb7896262014-12-18 15:30:31 -060027LOCAL_C_INCLUDES += $(target_c_includes) $(commands_recovery_local_path)/crypto/scrypt/lib/util
Dees Troy4dff2e62013-11-10 04:11:43 +000028LOCAL_MODULE_TAGS := optional
29LOCAL_MODULE:= libscrypttwrp_static
Ethan Yonkerabf1fb02019-04-24 16:09:07 -050030ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 28; echo $$?),0)
31 LOCAL_REQUIRED_MODULES := $(local_additional_dependencies)
32else
33 LOCAL_ADDITIONAL_DEPENDENCIES := $(local_additional_dependencies)
34endif
Dees Troy4dff2e62013-11-10 04:11:43 +000035include $(BUILD_STATIC_LIBRARY)
36
37########################################
38# host static library
39
40include $(CLEAR_VARS)
41include $(LOCAL_PATH)/android-config.mk
42LOCAL_SHARED_LIBRARIES := $(log_shared_libraries)
43LOCAL_SRC_FILES += $(host_src_files)
44LOCAL_CFLAGS += $(host_c_flags)
Ethan Yonkerb7896262014-12-18 15:30:31 -060045LOCAL_C_INCLUDES += $(host_c_includes) $(commands_recovery_local_path)/crypto/scrypt/lib/util
Dees Troy4dff2e62013-11-10 04:11:43 +000046LOCAL_LDLIBS += -ldl
47LOCAL_MODULE_TAGS := optional
48LOCAL_MODULE:= libscrypttwrp_static
Ethan Yonkerabf1fb02019-04-24 16:09:07 -050049ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 28; echo $$?),0)
50 LOCAL_REQUIRED_MODULES := $(local_additional_dependencies)
51else
52 LOCAL_ADDITIONAL_DEPENDENCIES := $(local_additional_dependencies)
53endif
Dees Troy4dff2e62013-11-10 04:11:43 +000054include $(BUILD_HOST_STATIC_LIBRARY)