aboutsummaryrefslogtreecommitdiff
path: root/tests/bench
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2024-05-05 11:41:46 -0400
committerPaul Duncan <pabs@pablotron.org>2024-05-05 11:41:46 -0400
commit6678b734ef7e91e0cf91d748910b778891a53e88 (patch)
treecd94781cb48f54d31e45a59337512d2263617245 /tests/bench
parentc8536f5094f58db837e5d30f5c24aa1aaabe8eef (diff)
downloadsha3-6678b734ef7e91e0cf91d748910b778891a53e88.tar.bz2
sha3-6678b734ef7e91e0cf91d748910b778891a53e88.zip
sha3.c, Makefile, tests/bench/Makefile: allow overriding SHA3_BACKEND via command-line argument
Diffstat (limited to 'tests/bench')
-rw-r--r--tests/bench/Makefile6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/bench/Makefile b/tests/bench/Makefile
index d1106bf..307cb23 100644
--- a/tests/bench/Makefile
+++ b/tests/bench/Makefile
@@ -1,5 +1,7 @@
-# CFLAGS=-std=c11 -W -Wall -Wextra -Wpedantic -Werror -g -O3 -march=native -mtune=native -DSHA3_BACKEND=0
-CFLAGS=-std=c11 -W -Wall -Wextra -Wpedantic -Werror -g -O3 -march=native -mtune=native
+# get backend from environment, or fall back to 0 if unspecified
+SHA3_BACKEND ?= 0
+
+CFLAGS=-std=c11 -W -Wall -Wextra -Wpedantic -Werror -g -O3 -march=native -mtune=native -DSHA3_BACKEND=$(SHA3_BACKEND)
APP=./bench
OBJS=sha3.o bench.o