diff options
author | Mattias Andrée <maandree@kth.se> | 2022-02-21 22:50:44 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2022-02-21 22:50:44 +0100 |
commit | 2690fcaea7973b0e2272b46a838c585adb3609ea (patch) | |
tree | 09519d157c15fa60918e10f8e2ef442fdc1c2307 /Makefile | |
parent | Fix readme (diff) | |
download | blakesum-2690fcaea7973b0e2272b46a838c585adb3609ea.tar.gz blakesum-2690fcaea7973b0e2272b46a838c585adb3609ea.tar.bz2 blakesum-2690fcaea7973b0e2272b46a838c585adb3609ea.tar.xz |
Add tests
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 24 |
1 files changed, 20 insertions, 4 deletions
@@ -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 |