From 844af53646136e5d4533a98893c2117096e64ff7 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Tue, 18 Oct 2011 23:27:39 +0000 Subject: load libmylib.so on GNU/Linux using DT_RUNPATH set to svn path=/trunk/externals/template/; revision=15620 --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 12e2b76..c45006b 100644 --- a/Makefile +++ b/Makefile @@ -154,7 +154,7 @@ ifeq ($(UNAME),Linux) PD_PATH = /usr OPT_CFLAGS = -O6 -funroll-loops -fomit-frame-pointer ALL_CFLAGS += -fPIC - ALL_LDFLAGS += -rdynamic -shared -fPIC + ALL_LDFLAGS += -rdynamic -shared -fPIC -Wl,-rpath,"\$$ORIGIN",--enable-new-dtags SHARED_LDFLAGS += -Wl,-soname,$(SHARED_LIB) -shared ALL_LIBS += -lc $(LIBS_linux) STRIP = strip --strip-unneeded -R .note -R .comment @@ -170,7 +170,7 @@ ifeq ($(UNAME),GNU) PD_PATH = /usr OPT_CFLAGS = -O6 -funroll-loops -fomit-frame-pointer ALL_CFLAGS += -fPIC - ALL_LDFLAGS += -rdynamic -shared -fPIC + ALL_LDFLAGS += -rdynamic -shared -fPIC -Wl,-rpath,"\$$ORIGIN",--enable-new-dtags SHARED_LDFLAGS += -shared -Wl,-soname,$(SHARED_LIB) ALL_LIBS += -lc $(LIBS_linux) STRIP = strip --strip-unneeded -R .note -R .comment @@ -186,7 +186,7 @@ ifeq ($(UNAME),GNU/kFreeBSD) PD_PATH = /usr OPT_CFLAGS = -O6 -funroll-loops -fomit-frame-pointer ALL_CFLAGS += -fPIC - ALL_LDFLAGS += -rdynamic -shared -fPIC + ALL_LDFLAGS += -rdynamic -shared -fPIC -Wl,-rpath,"\$$ORIGIN",--enable-new-dtags SHARED_LDFLAGS += -shared -Wl,-soname,$(SHARED_LIB) ALL_LIBS += -lc $(LIBS_linux) STRIP = strip --strip-unneeded -R .note -R .comment -- cgit v1.2.1