Avoid like in Makefile.rules ld: -rpath can only be used when targeting Mac OS X 10.5 or later --- unittests/Makefile.unittest +++ unittests/Makefile.unittest @@ -37,7 +37,9 @@ ifeq ($(ENABLE_SHARED), 1) # Add the absolute path to the dynamic library. This is ok because # we'll never install unittests. +ifneq ($(DARWIN_MAJVERS),4) LD.Flags += $(RPATH) -Wl,$(SharedLibDir) +endif # Also set {DYLD,LD}_LIBRARY_PATH because OSX ignores the rpath most # of the time. Run.Shared := $(SHLIBPATH_VAR)="$(SharedLibDir)$${$(SHLIBPATH_VAR):+:}$$$(SHLIBPATH_VAR)"