aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile24
1 files changed, 20 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 730da33..be1a6ca 100644
--- a/Makefile
+++ b/Makefile
@@ -9,7 +9,8 @@ BIN =\
OBJ =\
$(BIN:=.o)\
- common.o
+ common.o\
+ test.o
HDR =\
arg.h\
@@ -21,7 +22,16 @@ ALIASES =\
b384sum\
b512sum
-all: $(BIN)
+# Known answers tests
+KAT_FILES =\
+ kat/blake2b\
+ kat/blake2bp\
+ kat/blake2s\
+ kat/blake2sp\
+ kat/blake2xb\
+ kat/blake2xs
+
+all: $(BIN) test
$(OBJ): $(HDR)
.c.o:
@@ -33,6 +43,12 @@ bsum: bsum.o common.o
b2sum: b2sum.o common.o
$(CC) -o $@ $@.o common.o $(LDFLAGS)
+test: test.o
+ $(CC) -o $@ $@.o $(LDFLAGS)
+
+check: test $(BIN) $(KAT_FILES)
+ ./test
+
install: $(BIN)
mkdir -p -- "$(DESTDIR)$(PREFIX)/bin"
mkdir -p -- "$(DESTDIR)$(MANPREFIX)/man1/"
@@ -49,9 +65,9 @@ uninstall:
clean:
-rm -f -- *.o *.su *.gcov *.gcno *.gcda
- -rm -f -- $(BIN)
+ -rm -f -- $(BIN) test
.SUFFIXES:
.SUFFIXES: .o .c
-.PHONY: all install uninstall clean
+.PHONY: all check install uninstall clean