summaryrefslogtreecommitdiff
path: root/core/lib/libtomcrypt/src/hashes/sha2/sub.mk
diff options
context:
space:
mode:
Diffstat (limited to 'core/lib/libtomcrypt/src/hashes/sha2/sub.mk')
-rw-r--r--core/lib/libtomcrypt/src/hashes/sha2/sub.mk17
1 files changed, 17 insertions, 0 deletions
diff --git a/core/lib/libtomcrypt/src/hashes/sha2/sub.mk b/core/lib/libtomcrypt/src/hashes/sha2/sub.mk
new file mode 100644
index 0000000..e6ff9bf
--- /dev/null
+++ b/core/lib/libtomcrypt/src/hashes/sha2/sub.mk
@@ -0,0 +1,17 @@
+srcs-$(CFG_CRYPTO_SHA224) += sha224.c
+
+# SHA-224 needs SHA-256
+SHA256 := $(call cfg-one-enabled, CFG_CRYPTO_SHA224 CFG_CRYPTO_SHA256)
+ifeq ($(SHA256),y)
+SHA256_CE := $(call cfg-one-enabled, CFG_CRYPTO_SHA256_ARM32_CE CFG_CRYPTO_SHA256_ARM64_CE)
+ifeq ($(SHA256_CE),y)
+srcs-y += sha256_armv8a_ce.c
+srcs-$(CFG_CRYPTO_SHA256_ARM32_CE) += sha256_armv8a_ce_a32.S
+srcs-$(CFG_CRYPTO_SHA256_ARM64_CE) += sha256_armv8a_ce_a64.S
+else
+srcs-y += sha256.c
+endif
+endif
+
+srcs-$(CFG_CRYPTO_SHA384) += sha384.c
+srcs-$(CFG_CRYPTO_SHA512) += sha512.c