crypto-client test: ensure that client/server are linked against proper MbedTLS libraries

Ensure that both server and client can call mbedtls_version_get_string_full()
to verify that they are linked against proper libraries.

Note: each side (client/server) performs the call against its own
MbedTLS library. There is no IPC communication involved in this
test. Client/server communication will come later.

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
diff --git a/tests/psa-client-server/psasim/Makefile b/tests/psa-client-server/psasim/Makefile
index a84483c..50fd0ad 100644
--- a/tests/psa-client-server/psasim/Makefile
+++ b/tests/psa-client-server/psasim/Makefile
@@ -1,4 +1,4 @@
-CFLAGS ?= -Wall -Werror -std=c99 -D_XOPEN_SOURCE=1 -D_POSIX_C_SOURCE=200809L
+CFLAGS += -Wall -Werror -std=c99 -D_XOPEN_SOURCE=1 -D_POSIX_C_SOURCE=200809L
 
 ifeq ($(DEBUG),1)
 	CFLAGS += -DDEBUG -O0 -g
@@ -9,10 +9,10 @@
 all: lib test
 
 lib:
-	$(MAKE) -C src CFLAGS="$(CFLAGS)"
+	$(MAKE) -C src CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
 
 test: lib
-	$(MAKE) -C test CFLAGS="$(CFLAGS)"
+	$(MAKE) -C test CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
 
 clean:
 	rm -f $(PSA_LIB) $(PSA_LIB_OBJS)