337f8776b0
This allows <bsd.lib.mk> to correctly set the RPATH of libraries that use USE_SHLIBDIR=yes to /lib, so that dependent libraries can be found from /lib when /usr/lib isn't mounted yet. This was the intention of the _LIBLDOPTS support in <bsd.lib.mk>. Fixes problem reported by Dan Carosone with when /sbin/cgdconfig is dynamically linked against libcrypto.so but not libcrypt.so (it was relying upon libcrypto.so to pull in libcrypt.so).
40 lines
767 B
Makefile
40 lines
767 B
Makefile
# $NetBSD: bsd.shlib.mk,v 1.4 2005/03/12 13:21:12 lukem Exp $
|
|
|
|
.if !defined(_BSD_SHLIB_MK_)
|
|
_BSD_SHLIB_MK_=1
|
|
|
|
.if ${MKDYNAMICROOT} == "no"
|
|
SHLIBINSTALLDIR?= /usr/lib
|
|
.else
|
|
SHLIBINSTALLDIR?= /lib
|
|
.endif
|
|
|
|
.if ${MKDYNAMICROOT} == "no" || \
|
|
(${BINDIR:Ux} != "/bin" && ${BINDIR:Ux} != "/sbin" && \
|
|
${USE_SHLIBDIR:Uno} == "no")
|
|
SHLIBDIR?= /usr/lib
|
|
.else
|
|
SHLIBDIR?= /lib
|
|
.endif
|
|
|
|
.if ${USE_SHLIBDIR:Uno} != "no"
|
|
_LIBSODIR?= ${SHLIBINSTALLDIR}
|
|
.else
|
|
_LIBSODIR?= ${LIBDIR}
|
|
.endif
|
|
|
|
.if ${MKDYNAMICROOT} == "no"
|
|
SHLINKINSTALLDIR?= /usr/libexec
|
|
.else
|
|
SHLINKINSTALLDIR?= /libexec
|
|
.endif
|
|
|
|
.if ${MKDYNAMICROOT} == "no" || \
|
|
(${BINDIR:Ux} != "/bin" && ${BINDIR:Ux} != "/sbin")
|
|
SHLINKDIR?= /usr/libexec
|
|
.else
|
|
SHLINKDIR?= /libexec
|
|
.endif
|
|
|
|
.endif # !defined(_BSD_SHLIB_MK_)
|