Use @rpath and @loader_path to avoid absolute path

With "-Wl,-rpath,@loader_path/../lib" the linker embeds
@loader_path/../lib as the target binary's rpath.
Here @loader_path means the path of the binary that initiates the
With "-install_name @rpath/libfoo.dylib " the linker runtime searches
libfoo.dylib in the binary's embeded rpath.

With this change you can call dlopen() without specifying the full path
of the shared library.

Change-Id: If9beb3f6f4642a377bff603bab5ba3fdb96211bf
1 file changed