added linker options to Makefile needed for shipping shared libraries
[rocksndiamonds.git] / src / Makefile
index 0f8c0997fe9dcff77db7005332cc9ce10e8a5f1a..2fe28d6b37ac158bde97a5d8333e0eae79427ef4 100644 (file)
@@ -117,6 +117,8 @@ OPTIONS = $(DEBUG) -Wall                    # only for debugging purposes
 # OPTIONS = -O3
 
 ifdef BUILD_DIST                       # distribution build
+SYS_LDFLAGS := $(shell echo $(SYS_LDFLAGS) |   \
+                      sed -e "s%-rpath,[^ ]*%-rpath,'\$$ORIGIN/lib'%")
 OPTIONS = -O3 -Wall
 endif