Improve make pthread linking mechanism
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
diff --git a/tests/Makefile b/tests/Makefile
index 72429a6..29197b7 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -58,7 +58,7 @@
EXEXT=
SHARED_SUFFIX=
-ifdef PTHREAD
+ifeq ($(THREADING),pthread)
LOCAL_LDFLAGS += -lpthread
endif
endif
diff --git a/tests/scripts/all.sh b/tests/scripts/all.sh
index 65203e8..933c563 100755
--- a/tests/scripts/all.sh
+++ b/tests/scripts/all.sh
@@ -218,7 +218,7 @@
done
# Option to enable linking with pthreads under make
- MAKE_THREADING_FLAGS="PTHREAD=1"
+ MAKE_THREADING_FLAGS="THREADING=pthread"
}
# Test whether the component $1 is included in the command line patterns.