aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2024-08-24 18:02:00 +0200
committerMattias Andrée <maandree@kth.se>2024-08-24 18:02:00 +0200
commit72111e7a53eaad7bea841ab8b09e70642bde00ae (patch)
tree016e0326b794f8a5b9cc03139b8a5ab094ed7411 /Makefile
parentMake it possible for libhashsum_state to grow in future versions (diff)
downloadlibhashsum-72111e7a53eaad7bea841ab8b09e70642bde00ae.tar.gz
libhashsum-72111e7a53eaad7bea841ab8b09e70642bde00ae.tar.bz2
libhashsum-72111e7a53eaad7bea841ab8b09e70642bde00ae.tar.xz
Add support for Keccak, SHA3, SHAKE, and RawSHAKE via libkeccak>=1.3 (this version introduced zerocopy)
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile52
1 files changed, 48 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 039c15b..fd52be7 100644
--- a/Makefile
+++ b/Makefile
@@ -14,6 +14,10 @@ SUPPORT_RIPEMD_128 = $(DEFAULT_SUPPORT)
SUPPORT_RIPEMD_160 = $(DEFAULT_SUPPORT)
SUPPORT_RIPEMD_256 = $(DEFAULT_SUPPORT)
SUPPORT_RIPEMD_320 = $(DEFAULT_SUPPORT)
+SUPPORT_KECCAK = $(DEFAULT_SUPPORT)
+SUPPORT_SHA3 = $(DEFAULT_SUPPORT)
+SUPPORT_SHAKE = $(DEFAULT_SUPPORT)
+SUPPORT_RAWSHAKE = $(DEFAULT_SUPPORT)
CONFIGFILE = config.mk
@@ -32,6 +36,9 @@ LIB_VERSION = $(LIB_MAJOR).$(LIB_MINOR)
LIB_NAME = hashsum
+CPPFLAGS_LIBKECCAK_IF_SUPPORTED =
+LDFLAGS_LIBKECCAK_IF_SUPPORTED =
+
include mk/md2=$(SUPPORT_MD2).mk
include mk/md4=$(SUPPORT_MD4).mk
include mk/md5=$(SUPPORT_MD5).mk
@@ -41,6 +48,10 @@ include mk/ripemd-256=$(SUPPORT_RIPEMD_256).mk
include mk/ripemd-320=$(SUPPORT_RIPEMD_320).mk
include mk/sha1=$(SUPPORT_SHA1).mk
include mk/sha2=$(SUPPORT_SHA2).mk
+include mk/keccak=$(SUPPORT_KECCAK).mk
+include mk/sha3=$(SUPPORT_SHA3).mk
+include mk/shake=$(SUPPORT_SHAKE).mk
+include mk/rawshake=$(SUPPORT_RAWSHAKE).mk
CPPFLAGS_FULL =\
@@ -53,12 +64,18 @@ CPPFLAGS_FULL =\
$(CPPFLAGS_RIPEMD_256)\
$(CPPFLAGS_RIPEMD_320)\
$(CPPFLAGS_SHA1)\
- $(CPPFLAGS_SHA2)
+ $(CPPFLAGS_SHA2)\
+ $(CPPFLAGS_LIBKECCAK_IF_SUPPORTED)\
+ $(CPPFLAGS_KECCAK)\
+ $(CPPFLAGS_SHA3)\
+ $(CPPFLAGS_SHAKE)\
+ $(CPPFLAGS_RAWSHAKE)
LDFLAGS_FULL =\
$(LDFLAGS)\
$(LDFLAGS_SHA1)\
- $(LDFLAGS_SHA2)
+ $(LDFLAGS_SHA2)\
+ $(LDFLAGS_LIBKECCAK_IF_SUPPORTED)
OBJ =\
@@ -80,7 +97,26 @@ OBJ =\
libhashsum_init_sha_512_224_hasher.o\
libhashsum_init_sha_512_256_hasher.o\
libhashsum_init_sha2_hasher.o\
- libhashsum_reverse_byte__.o
+ libhashsum_init_keccak_224_hasher.o\
+ libhashsum_init_keccak_256_hasher.o\
+ libhashsum_init_keccak_384_hasher.o\
+ libhashsum_init_keccak_512_hasher.o\
+ libhashsum_init_keccak_hasher.o\
+ libhashsum_init_sha3_224_hasher.o\
+ libhashsum_init_sha3_256_hasher.o\
+ libhashsum_init_sha3_384_hasher.o\
+ libhashsum_init_sha3_512_hasher.o\
+ libhashsum_init_sha3_hasher.o\
+ libhashsum_init_shake128_hasher.o\
+ libhashsum_init_shake256_hasher.o\
+ libhashsum_init_shake512_hasher.o\
+ libhashsum_init_shake_hasher.o\
+ libhashsum_init_rawshake128_hasher.o\
+ libhashsum_init_rawshake256_hasher.o\
+ libhashsum_init_rawshake512_hasher.o\
+ libhashsum_init_rawshake_hasher.o\
+ libhashsum_reverse_byte__.o\
+ libhashsum_init_keccak__.o
HDR =\
libhashsum.h\
@@ -101,7 +137,15 @@ TEST =\
sha_384.t\
sha_512.t\
sha_512_224.t\
- sha_512_256.t
+ sha_512_256.t\
+ keccak_224.t\
+ keccak_256.t\
+ keccak_384.t\
+ keccak_512.t\
+ sha3_224.t\
+ sha3_256.t\
+ sha3_384.t\
+ sha3_512.t
LOBJ = $(OBJ:.o=.lo)
TOBJ = $(TEST:.t=.o)