aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2017-10-14 13:33:07 +0200
committerMattias Andrée <maandree@kth.se>2017-10-14 13:33:07 +0200
commitb5612bbbcbfd4fff7e8552579a7dd81a141d90d3 (patch)
tree1ed81a17345ac89a5ce89e232ac478b84297a4ce /Makefile
parentUse arg.h instead of argparser (diff)
downloadsha3sum-b5612bbbcbfd4fff7e8552579a7dd81a141d90d3.tar.gz
sha3sum-b5612bbbcbfd4fff7e8552579a7dd81a141d90d3.tar.bz2
sha3sum-b5612bbbcbfd4fff7e8552579a7dd81a141d90d3.tar.xz
Generate all C files except common.c and keccaksum.c
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 13 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 8981243..ca8a99d 100644
--- a/Makefile
+++ b/Makefile
@@ -49,6 +49,18 @@ all: $(BIN) $(MAN1)
u=$$(printf '%s\n' $* | tr a-z A-Z); \
sed -e 's/xsum/$*/g' -e 's/XSUM/'"$$u"'/g' -e 's/Xsum/$($*)/g' < xsum.1 > $@
+keccak-%sum.c:
+ printf '%s\n' '#include "common.h"' 'KECCAK_MAIN($*)' > $@
+
+sha3-%sum.c:
+ printf '%s\n' '#include "common.h"' 'SHA3_MAIN($*)' > $@
+
+rawshake%sum.c:
+ printf '%s\n' '#include "common.h"' 'RAWSHAKE_MAIN($*)' > $@
+
+shake%sum.c:
+ printf '%s\n' '#include "common.h"' 'SHAKE_MAIN($*)' > $@
+
install:
mkdir -p -- "$(DESTDIR)$(PREFIX)/bin"
mkdir -p -- "$(DESTDIR)$(MANPREFIX)/man1"
@@ -64,7 +76,7 @@ uninstall:
-rmdir -- "$(DESTDIR)$(PREFIX)/share/licenses/sha3sum"
clean:
- -rm -r -- $(MAN1) $(BIN)
+ -rm -r -- $(MAN1) $(BIN) keccak-*sum.c sha3-*sum.c rawshake*sum.c shake*sum.c
.SUFFIXES: