From b5612bbbcbfd4fff7e8552579a7dd81a141d90d3 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sat, 14 Oct 2017 13:33:07 +0200 Subject: Generate all C files except common.c and keccaksum.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- Makefile | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'Makefile') 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: -- cgit v1.2.3-70-g09d2