aboutsummaryrefslogtreecommitdiff
path: root/tests/GNUmakefile
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2016-06-14 18:57:06 -0400
committerRob Austein <sra@hactrn.net>2016-06-14 18:57:06 -0400
commit282617c06a8b5eff135d1cf6f1d6fe148f632c5a (patch)
tree694ac1e2f35dc364422219a4622abfc7cb5a88a7 /tests/GNUmakefile
parent97c3a85d32893ec5f17ecd807a45bac935e42dd5 (diff)
Collapse RPC_CLIENT and RPC_SERVER makefile settings into a single RPC_MODE setting.
Diffstat (limited to 'tests/GNUmakefile')
-rw-r--r--tests/GNUmakefile28
1 files changed, 18 insertions, 10 deletions
diff --git a/tests/GNUmakefile b/tests/GNUmakefile
index 5e2b3ea..f4299a0 100644
--- a/tests/GNUmakefile
+++ b/tests/GNUmakefile
@@ -32,16 +32,24 @@ LIB = ../libhal.a
# Which tests to build depends on how the library was compiled.
-ifeq (${RPC_SERVER},yes)
- BIN += test-rpc_server
-endif
+CORE_TESTS = test-aes-key-wrap test-hash test-pbkdf2 test-ecdsa test-bus test-trng test-rsa test-mkmif
+SERVER_TESTS = test-rpc_server
+CLIENT_TESTS = test-rpc_hash test-rpc_pkey test-rpc_get_version test-rpc_get_random
-ifeq (${RPC_CLIENT},none)
- BIN += test-aes-key-wrap test-hash test-pbkdf2 test-ecdsa test-bus test-trng test-rsa
-endif
+ALL_TESTS = ${CORE_TESTS} ${SERVER_TESTS} ${CLIENT_TESTS}
+
+ifeq "${RPC_MODE}" "none"
+
+ BIN += ${CORE_TESTS}
+
+else ifeq "${RPC_MODE}" "server"
+
+ BIN += ${CORE_TESTS} ${SERVER_TESTS}
+
+else
+
+ BIN += ${CLIENT_TESTS}
-ifeq (${RPC_CLIENT},local)
- BIN += test-rpc_hash test-rpc_pkey test-rpc_get_version test-rpc_get_random
endif
CFLAGS = -g3 -Wall -fPIC -std=c99 -I..
@@ -51,8 +59,8 @@ all: ${BIN}
test: all
for i in ${BIN}; do (set -x; ./$$i); done
-clean:
- rm -f *.o ${BIN}
+clean distclean:
+ rm -f *.o ${ALL_TESTS}
${BIN}: %: %.o ${LIB}
${CC} ${CFLAGS} -o $@ $^ ${LDFLAGS}