From 7c092fbc7904be18510eed08c72cbad974db8adc Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Sun, 2 Mar 2008 10:40:08 +0000 Subject: If build in a prefix, define the system as prefix. --- mk/prog.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mk/prog.mk') diff --git a/mk/prog.mk b/mk/prog.mk index d8c514f4..a52681f2 100644 --- a/mk/prog.mk +++ b/mk/prog.mk @@ -10,14 +10,14 @@ include ${MK}/sys.mk # so we should embed it if different # This is currently hardcoded for NetBSD which has two dynamic linkers # and we need to use the one in /libexec instead of /usr/libexec -_DYNLINK_SH= if test -e /libexec/ld.elf_so; then \ +_DYNLINK_SH= if test "${PREFIX}" = "" && test -e /libexec/ld.elf_so; then \ echo "-Wl,-dynamic-linker=/libexec/ld.elf_so"; \ else \ echo ""; \ fi _DYNLINK!= ${_DYNLINK_SH} LDFLAGS+= ${_DYNLINK}$(shell ${_DYNLINK_SH}) -LDFLAGS+= -Wl,-rpath=/${LIBNAME} -L/${LIBNAME} +LDFLAGS+= -Wl,-rpath=${PREFIX}/${LIBNAME} -L${PREFIX}/${LIBNAME} LDFLAGS+= ${PROGLDFLAGS} all: depend ${PROG} -- cgit v1.2.3