aboutsummaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorRichard Barnes <rlb@ipv.sx>2018-07-27 14:47:23 -0400
committerRichard Barnes <rlb@ipv.sx>2018-07-27 15:10:59 -0400
commit5423cd56f12f87b8126f992adebe8485597e241d (patch)
tree45d84fb562a1f9e36ab7109eb8071b4cdb863064 /crypto
parent810024705f5beb98f8e1437eb4db71e94b5ee076 (diff)
downloadplatform_external_libsrtp2-5423cd56f12f87b8126f992adebe8485597e241d.tar.gz
platform_external_libsrtp2-5423cd56f12f87b8126f992adebe8485597e241d.tar.bz2
platform_external_libsrtp2-5423cd56f12f87b8126f992adebe8485597e241d.zip
Clean up library-finding logic
Diffstat (limited to 'crypto')
-rw-r--r--crypto/Makefile.in16
1 files changed, 15 insertions, 1 deletions
diff --git a/crypto/Makefile.in b/crypto/Makefile.in
index 0e3db61..b384a57 100644
--- a/crypto/Makefile.in
+++ b/crypto/Makefile.in
@@ -21,7 +21,21 @@ CRYPTO_LIBDIR = @CRYPTO_LIBDIR@
RANLIB = @RANLIB@
-FIND_LIBRARIES = DYLD_LIBRARY_PATH=../$(CRYPTO_LIBDIR)
+# Specify how tests should find shared libraries on macOS and Linux
+#
+# macOS purges DYLD_LIBRARY_PATH when spawning subprocesses, so it's
+# not possible to pass this in from the outside; we have to specify
+# it for any subprocesses we call. No support for dynamic linked
+# tests on Windows.
+ifneq ($(OS),Windows_NT)
+ UNAME_S = $(shell uname -s)
+ ifeq ($(UNAME_S),Linux)
+ FIND_LIBRARIES = LD_LIBRARY_PATH=../$(CRYPTO_LIBDIR)
+ endif
+ ifeq ($(UNAME_S),Darwin)
+ FIND_LIBRARIES = DYLD_LIBRARY_PATH=../$(CRYPTO_LIBDIR)
+ endif
+endif
# EXE defines the suffix on executables - it's .exe for cygwin, and
# null on linux, bsd, and OS X and other OSes. we define this so that