diff options
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/config/Make.rules | 6 | ||||
-rw-r--r-- | cpp/config/Make.rules.AIX | 7 | ||||
-rw-r--r-- | cpp/config/Make.rules.HP-UX | 14 | ||||
-rw-r--r-- | cpp/config/Make.rules.Linux | 6 | ||||
-rw-r--r-- | cpp/config/Make.rules.SunOS | 8 |
5 files changed, 27 insertions, 14 deletions
diff --git a/cpp/config/Make.rules b/cpp/config/Make.rules index 12697cea897..84e552db2aa 100644 --- a/cpp/config/Make.rules +++ b/cpp/config/Make.rules @@ -14,6 +14,12 @@ prefix ?= /opt/Ice-$(VERSION) # +# When creating an executable, shall we add install_libdir to the +# runpath embedded in this executable? +# +ADD_LIBDIR_TO_RPATH ?= yes + +# # Define OPTIMIZE as yes if you want to build with # optimization. Otherwise Ice is build with debug information. # diff --git a/cpp/config/Make.rules.AIX b/cpp/config/Make.rules.AIX index ddd1fbd6f9d..0a7fc26c200 100644 --- a/cpp/config/Make.rules.AIX +++ b/cpp/config/Make.rules.AIX @@ -43,8 +43,11 @@ else CXXFLAGS += -g endif - -LDPLATFORMFLAGS = -Wl,-blibpath:$(install_libdir):/usr/lpp/xlopt:/usr/lib/threads:/usr/vacpp/lib:/usr/lib:/lib +ifeq ($(ADD_LIBDIR_TO_RPATH),yes) + LDPLATFORMFLAGS = -Wl,-blibpath:$(install_libdir):/usr/lpp/xlopt:/usr/lib/threads:/usr/vacpp/lib:/usr/lib:/lib +else + LDPLATFORMFLAGS = -Wl,-blibpath:/usr/lpp/xlopt:/usr/lib/threads:/usr/vacpp/lib:/usr/lib:/lib +endif mklibfilename = lib$(1).a diff --git a/cpp/config/Make.rules.HP-UX b/cpp/config/Make.rules.HP-UX index 0b764eacdc6..180eabbdcfc 100644 --- a/cpp/config/Make.rules.HP-UX +++ b/cpp/config/Make.rules.HP-UX @@ -45,15 +45,11 @@ endif # CXXLIBS = -lCsup_v2 -lstd_v2 -# -# On HP-UX, we need -L for all dependent libraries -# - -LIBPATH = - - - -LDPLATFORMFLAGS = -Wl,+s -Wl,+b$(install_libdir) $(LIBPATH) +ifeq ($(ADD_LIBDIR_TO_RPATH),yes) + LDPLATFORMFLAGS = -Wl,+s -Wl,+b$(install_libdir) +else + LDPLATFORMFLAGS = -Wl,+s +endif mklibfilename = $(if $(2),lib$(1).$(2),lib$(1).sl) mksoname = $(if $(2),lib$(1).$(2),lib$(1).sl) diff --git a/cpp/config/Make.rules.Linux b/cpp/config/Make.rules.Linux index 8491b8abd6f..bab0d07e767 100644 --- a/cpp/config/Make.rules.Linux +++ b/cpp/config/Make.rules.Linux @@ -107,7 +107,11 @@ ifeq ($(CXX),c++) rpathlink = -Wl,-rpath-link,$(1) - LDPLATFORMFLAGS = -Wl,--enable-new-dtags -Wl,-rpath,$(install_libdir) + ifeq ($(ADD_LIBDIR_TO_RPATH),yes) + LDPLATFORMFLAGS = -Wl,--enable-new-dtags -Wl,-rpath,$(install_libdir) + else + LDPLATFORMFLAGS = -Wl,--enable-new-dtags + endif endif diff --git a/cpp/config/Make.rules.SunOS b/cpp/config/Make.rules.SunOS index 2b85b11e950..6a27390cd53 100644 --- a/cpp/config/Make.rules.SunOS +++ b/cpp/config/Make.rules.SunOS @@ -100,8 +100,12 @@ ifeq ($(CXX),CC) mklib = $(CXX) -xar -o $(1) $(2) - LDPLATFORMFLAGS = -R $(install_libdir) -z text - + ifeq ($(ADD_LIBDIR_TO_RPATH),yes) + LDPLATFORMFLAGS = -R $(install_libdir) -z text + else + LDPLATFORMFLAGS = -z text + endif + endif ifeq ($(CXX),gcc) |