aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-11-05 23:09:35 +0100
committerMattias Andrée <maandree@operamail.com>2014-11-05 23:09:35 +0100
commitd0fd9ebaec312d9d6742fbe939bab75729771bb1 (patch)
tree2f5112937bcfcfcdd86afcfa9893d319b983f60a /Makefile
parentupdate the test for the last commit (diff)
downloadlibkeccak-d0fd9ebaec312d9d6742fbe939bab75729771bb1.tar.gz
libkeccak-d0fd9ebaec312d9d6742fbe939bab75729771bb1.tar.bz2
libkeccak-d0fd9ebaec312d9d6742fbe939bab75729771bb1.tar.xz
add benchmark program
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 13 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index cb7ab19..47612ed 100644
--- a/Makefile
+++ b/Makefile
@@ -86,7 +86,7 @@ LIB_OBJ = digest files generalised-spec hex state
.PHONY: all
-all: lib test
+all: lib test benchmark
.PHONY: lib
@@ -120,6 +120,18 @@ obj/test.o: src/test.c src/libkeccak/*.h src/libkeccak.h
$(CC) $(FLAGS) $(CFLAGS) $(CPPFLAGS) -Isrc -O3 -c -o $@ $<
+.PHONY: benchmark
+benchmark: bin/benchmark
+
+bin/benchmark: obj/benchmark.o bin/libkeccak.so
+ $(CC) $(FLAGS) $(LDFLAGS) -Lbin -lkeccak -o $@ $<
+
+obj/benchmark.o: src/benchmark.c src/libkeccak/*.h src/libkeccak.h
+ @mkdir -p obj
+ $(CC) $(FLAGS) $(CFLAGS) $(CPPFLAGS) -Isrc -O3 -c -o $@ $<
+
+
+
.PHONY: check
check: bin/test
@test $$(sha256sum LICENSE | cut -d ' ' -f 1) = \