summaryrefslogtreecommitdiffstats
path: root/crypto/scrypt/Scrypt.mk
diff options
context:
space:
mode:
authorDees Troy <dees_troy@teamw.in>2013-11-10 05:11:43 +0100
committerDees Troy <dees_troy@teamw.in>2013-11-10 05:11:48 +0100
commit4dff2e6234b4caf7201be2c17fde18d637b76c3d (patch)
tree3dec41365d7a597a0c4ff8b3c6fdd2d801623b29 /crypto/scrypt/Scrypt.mk
parentAdd reboot binary if it exists to recovery (diff)
downloadandroid_bootable_recovery-4dff2e6234b4caf7201be2c17fde18d637b76c3d.tar
android_bootable_recovery-4dff2e6234b4caf7201be2c17fde18d637b76c3d.tar.gz
android_bootable_recovery-4dff2e6234b4caf7201be2c17fde18d637b76c3d.tar.bz2
android_bootable_recovery-4dff2e6234b4caf7201be2c17fde18d637b76c3d.tar.lz
android_bootable_recovery-4dff2e6234b4caf7201be2c17fde18d637b76c3d.tar.xz
android_bootable_recovery-4dff2e6234b4caf7201be2c17fde18d637b76c3d.tar.zst
android_bootable_recovery-4dff2e6234b4caf7201be2c17fde18d637b76c3d.zip
Diffstat (limited to 'crypto/scrypt/Scrypt.mk')
-rw-r--r--crypto/scrypt/Scrypt.mk46
1 files changed, 46 insertions, 0 deletions
diff --git a/crypto/scrypt/Scrypt.mk b/crypto/scrypt/Scrypt.mk
new file mode 100644
index 000000000..45af97fc2
--- /dev/null
+++ b/crypto/scrypt/Scrypt.mk
@@ -0,0 +1,46 @@
+local_c_flags := -DUSE_OPENSSL_PBKDF2
+
+local_c_includes := $(log_c_includes) external/openssl/include
+
+local_additional_dependencies := $(LOCAL_PATH)/android-config.mk $(LOCAL_PATH)/Scrypt.mk
+
+include $(LOCAL_PATH)/Scrypt-config.mk
+
+#######################################
+# target static library
+include $(CLEAR_VARS)
+include $(LOCAL_PATH)/android-config.mk
+
+LOCAL_SHARED_LIBRARIES := $(log_shared_libraries)
+
+# If we're building an unbundled build, don't try to use clang since it's not
+# in the NDK yet. This can be removed when a clang version that is fast enough
+# in the NDK.
+ifeq (,$(TARGET_BUILD_APPS))
+LOCAL_CLANG := true
+else
+LOCAL_SDK_VERSION := 9
+endif
+
+LOCAL_SRC_FILES += $(target_src_files)
+LOCAL_CFLAGS += $(target_c_flags)
+LOCAL_C_INCLUDES += $(target_c_includes)
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE:= libscrypttwrp_static
+LOCAL_ADDITIONAL_DEPENDENCIES := $(local_additional_dependencies)
+include $(BUILD_STATIC_LIBRARY)
+
+########################################
+# host static library
+
+include $(CLEAR_VARS)
+include $(LOCAL_PATH)/android-config.mk
+LOCAL_SHARED_LIBRARIES := $(log_shared_libraries)
+LOCAL_SRC_FILES += $(host_src_files)
+LOCAL_CFLAGS += $(host_c_flags)
+LOCAL_C_INCLUDES += $(host_c_includes)
+LOCAL_LDLIBS += -ldl
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE:= libscrypttwrp_static
+LOCAL_ADDITIONAL_DEPENDENCIES := $(local_additional_dependencies)
+include $(BUILD_HOST_STATIC_LIBRARY)