changeset 3571:cfb56cc47f9f trunk

append rpath on linking audacious when prefix is specified.
author Yoshiki Yazawa <yaz@cc.rim.or.jp>
date Wed, 19 Sep 2007 18:41:39 +0900
parents bf2b39567b8c
children 625af2797f35 4f99a9e270cf
files buildsys.mk.in
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/buildsys.mk.in	Tue Sep 18 23:23:40 2007 +0200
+++ b/buildsys.mk.in	Wed Sep 19 18:41:39 2007 +0900
@@ -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}; \