changeset 3584:4f99a9e270cf trunk

Automated merge with ssh://hg.atheme.org//hg/audacious
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 19 Sep 2007 17:47:30 +0300
parents d3ba8bcf9fd6 (current diff) cfb56cc47f9f (diff)
children 8e50c2cd44f0 fe3a1ae77f80
files
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/buildsys.mk.in	Wed Sep 19 17:47:18 2007 +0300
+++ b/buildsys.mk.in	Wed Sep 19 17:47:30 2007 +0300
@@ -70,6 +70,10 @@
 OBJS5 = ${OBJS4:.erl=.beam}
 OBJS += ${OBJS5:.m=.o}
 
+ifneq ($(strip $(prefix)),)
+	RPATH = -Wl,-rpath=${libdir}
+endif
+
 .SILENT:
 .SUFFIXES: .beam .c .cc .cxx .d .erl .m
 .PHONY: all subdirs depend install uninstall clean distclean
@@ -100,7 +104,7 @@
 
 ${PROG} ${PROG_NOINST}: ${EXT_DEPS} ${OBJS}
 	${LINK_STATUS}
-	if ${LD} -o $@ ${OBJS} ${LDFLAGS} ${LIBS}; then \
+	if ${LD} -o $@ ${OBJS} ${LDFLAGS} ${LIBS} ${RPATH}; then \
 		${LINK_OK}; \
 	else \
 		${LINK_FAILED}; \