2007-08-30 01:34:17 +04:00
|
|
|
# $NetBSD: bsd.shlib.mk,v 1.6 2007/08/29 21:34:17 hira Exp $
|
Only use the MKDYNAMICROOT semantics (i.e. -rpath=/lib,/usr/lib and
-dynamic-linker=/libexec/ld.elf_so) if the BINDIR of the program being
built is /bin or /sbin.
The reason we do this is because now all programs *except* those in
/bin and /sbin (i.e. the "special cases") match the default the compiler
uses, which is what is used for things in e.g. xsrc, pkgsrc, and other
random 3rd party programs.
This is done by decoupling where a shlib is installed from how it
is located. Two new variables, SHLIBINSTALLDIR and SHLINKINSTALLDIR,
contain the former information, and key off MKDYNAMICROOT only. SHLIBDIR
and SHLINKDIR contain the latter, and key off MKDYNAMICROOT and BINDIR.
The SHLIBINSTALLDIR, SHLIBDIR, _LIBSODIR, SHLINKINSTALLDIR, and
SHLINKDIR parameters are moved to a new <bsd.shlib.mk>; see bsd.README
for usage details.
2002-09-28 01:37:50 +04:00
|
|
|
|
|
|
|
.if !defined(_BSD_SHLIB_MK_)
|
|
|
|
_BSD_SHLIB_MK_=1
|
|
|
|
|
|
|
|
.if ${MKDYNAMICROOT} == "no"
|
|
|
|
SHLIBINSTALLDIR?= /usr/lib
|
|
|
|
.else
|
|
|
|
SHLIBINSTALLDIR?= /lib
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if ${MKDYNAMICROOT} == "no" || \
|
2005-03-12 16:21:12 +03:00
|
|
|
(${BINDIR:Ux} != "/bin" && ${BINDIR:Ux} != "/sbin" && \
|
2006-11-11 17:41:20 +03:00
|
|
|
${BINDIR:Ux} != "/libexec" && ${USE_SHLIBDIR:Uno} == "no")
|
Only use the MKDYNAMICROOT semantics (i.e. -rpath=/lib,/usr/lib and
-dynamic-linker=/libexec/ld.elf_so) if the BINDIR of the program being
built is /bin or /sbin.
The reason we do this is because now all programs *except* those in
/bin and /sbin (i.e. the "special cases") match the default the compiler
uses, which is what is used for things in e.g. xsrc, pkgsrc, and other
random 3rd party programs.
This is done by decoupling where a shlib is installed from how it
is located. Two new variables, SHLIBINSTALLDIR and SHLINKINSTALLDIR,
contain the former information, and key off MKDYNAMICROOT only. SHLIBDIR
and SHLINKDIR contain the latter, and key off MKDYNAMICROOT and BINDIR.
The SHLIBINSTALLDIR, SHLIBDIR, _LIBSODIR, SHLINKINSTALLDIR, and
SHLINKDIR parameters are moved to a new <bsd.shlib.mk>; see bsd.README
for usage details.
2002-09-28 01:37:50 +04:00
|
|
|
SHLIBDIR?= /usr/lib
|
|
|
|
.else
|
|
|
|
SHLIBDIR?= /lib
|
|
|
|
.endif
|
|
|
|
|
2004-01-02 19:12:36 +03:00
|
|
|
.if ${USE_SHLIBDIR:Uno} != "no"
|
Only use the MKDYNAMICROOT semantics (i.e. -rpath=/lib,/usr/lib and
-dynamic-linker=/libexec/ld.elf_so) if the BINDIR of the program being
built is /bin or /sbin.
The reason we do this is because now all programs *except* those in
/bin and /sbin (i.e. the "special cases") match the default the compiler
uses, which is what is used for things in e.g. xsrc, pkgsrc, and other
random 3rd party programs.
This is done by decoupling where a shlib is installed from how it
is located. Two new variables, SHLIBINSTALLDIR and SHLINKINSTALLDIR,
contain the former information, and key off MKDYNAMICROOT only. SHLIBDIR
and SHLINKDIR contain the latter, and key off MKDYNAMICROOT and BINDIR.
The SHLIBINSTALLDIR, SHLIBDIR, _LIBSODIR, SHLINKINSTALLDIR, and
SHLINKDIR parameters are moved to a new <bsd.shlib.mk>; see bsd.README
for usage details.
2002-09-28 01:37:50 +04:00
|
|
|
_LIBSODIR?= ${SHLIBINSTALLDIR}
|
|
|
|
.else
|
|
|
|
_LIBSODIR?= ${LIBDIR}
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if ${MKDYNAMICROOT} == "no"
|
|
|
|
SHLINKINSTALLDIR?= /usr/libexec
|
|
|
|
.else
|
|
|
|
SHLINKINSTALLDIR?= /libexec
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if ${MKDYNAMICROOT} == "no" || \
|
2007-08-30 01:34:17 +04:00
|
|
|
(${BINDIR:Ux} != "/bin" && ${BINDIR:Ux} != "/sbin" && \
|
|
|
|
${BINDIR:Ux} != "/libexec")
|
Only use the MKDYNAMICROOT semantics (i.e. -rpath=/lib,/usr/lib and
-dynamic-linker=/libexec/ld.elf_so) if the BINDIR of the program being
built is /bin or /sbin.
The reason we do this is because now all programs *except* those in
/bin and /sbin (i.e. the "special cases") match the default the compiler
uses, which is what is used for things in e.g. xsrc, pkgsrc, and other
random 3rd party programs.
This is done by decoupling where a shlib is installed from how it
is located. Two new variables, SHLIBINSTALLDIR and SHLINKINSTALLDIR,
contain the former information, and key off MKDYNAMICROOT only. SHLIBDIR
and SHLINKDIR contain the latter, and key off MKDYNAMICROOT and BINDIR.
The SHLIBINSTALLDIR, SHLIBDIR, _LIBSODIR, SHLINKINSTALLDIR, and
SHLINKDIR parameters are moved to a new <bsd.shlib.mk>; see bsd.README
for usage details.
2002-09-28 01:37:50 +04:00
|
|
|
SHLINKDIR?= /usr/libexec
|
|
|
|
.else
|
|
|
|
SHLINKDIR?= /libexec
|
|
|
|
.endif
|
|
|
|
|
2003-07-28 06:38:33 +04:00
|
|
|
.endif # !defined(_BSD_SHLIB_MK_)
|