Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/share/mk Make it easier build binaries against the host's li...
details: https://anonhg.NetBSD.org/src/rev/2fd6e294f6b7
branches: trunk
changeset: 782677:2fd6e294f6b7
user: pooka <pooka%NetBSD.org@localhost>
date: Tue Nov 13 22:30:38 2012 +0000
description:
Make it easier build binaries against the host's libs, e.g.
libpthread which might be in /lib/x86_64-linux-gnu/libpthread.so.0
or some other unholy place.
diffstat:
share/mk/bsd.README | 7 ++++++-
share/mk/bsd.lib.mk | 6 +++++-
2 files changed, 11 insertions(+), 2 deletions(-)
diffs (43 lines):
diff -r c9bc8005a17f -r 2fd6e294f6b7 share/mk/bsd.README
--- a/share/mk/bsd.README Tue Nov 13 20:47:58 2012 +0000
+++ b/share/mk/bsd.README Tue Nov 13 22:30:38 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.README,v 1.306 2012/11/04 16:27:28 christos Exp $
+# $NetBSD: bsd.README,v 1.307 2012/11/13 22:30:38 pooka Exp $
# @(#)bsd.README 8.2 (Berkeley) 4/2/94
This is the README file for the make "include" files for the NetBSD
@@ -1165,6 +1165,11 @@
* DPADD gets ${LIBDO.libname}/liblibname.so or
${LIBDO.libname}/liblibname.a added.
+ The special value "_external" for LIBDO.lib makes the
+ build system to assume the library comes from outside
+ of the NetBSD source tree and only causes -llibname
+ to be added to LDADD.
+
This variable may be used for individual libraries, as
well as in parent directories to cache common libraries
as a build-time optimization.
diff -r c9bc8005a17f -r 2fd6e294f6b7 share/mk/bsd.lib.mk
--- a/share/mk/bsd.lib.mk Tue Nov 13 20:47:58 2012 +0000
+++ b/share/mk/bsd.lib.mk Tue Nov 13 22:30:38 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.lib.mk,v 1.324 2012/08/23 21:21:16 joerg Exp $
+# $NetBSD: bsd.lib.mk,v 1.325 2012/11/13 22:30:38 pooka Exp $
# @(#)bsd.lib.mk 8.3 (Berkeley) 4/22/94
.include <bsd.init.mk>
@@ -54,8 +54,12 @@
LIBDO.${_lib}!= cd "${_dir}" && ${PRINTOBJDIR}
.MAKEOVERRIDES+=LIBDO.${_lib}
.endif
+.if ${LIBDO.${_lib}} == "_external"
+LDADD+= -l${_lib}
+.else
LDADD+= -L${LIBDO.${_lib}} -l${_lib}
DPADD+= ${LIBDO.${_lib}}/lib${_lib}.so
+.endif
.endfor
.endif # }
Home |
Main Index |
Thread Index |
Old Index