aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Makefile9
1 files changed, 8 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 7c94a28..32c3dfb 100644
--- a/Makefile
+++ b/Makefile
@@ -10,6 +10,7 @@ BIN =\
keccak-256sum\
keccak-384sum\
keccak-512sum\
+ sha3sum\
sha3-224sum\
sha3-256sum\
sha3-384sum\
@@ -22,11 +23,12 @@ BIN =\
MAN1 = $(BIN:=.1)
HDR = arg.h common.h
+keccaksum = Keccak[]
keccak-224sum = Keccak-224
keccak-256sum = Keccak-256
keccak-384sum = Keccak-384
keccak-512sum = Keccak-512
-keccaksum = Keccak[]
+sha3sum = SHA3
sha3-224sum = SHA3-224
sha3-256sum = SHA3-256
sha3-384sum = SHA3-384
@@ -48,6 +50,11 @@ all: $(BIN) $(MAN1)
%.1: xsum.man
u=$$(printf '%s\n' $* | tr a-z A-Z); \
sed -e 's/xsum/$*/g' -e 's/XSUM/'"$$u"'/g' -e 's/Xsum/$($*)/g' < xsum.man > $@
+ if test $* = sha3sum; then \
+ sed -i 's/^\\# ONLY SHA3: //' $@; \
+ else \
+ sed -i '/^\\# ONLY SHA3: /d' $@; \
+ fi
keccak-%sum.c:
printf '%s\n' '#include "common.h"' 'KECCAK_MAIN($*)' > $@