diff options
author | des <des@FreeBSD.org> | 2013-09-08 09:40:23 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2013-09-08 09:40:23 +0000 |
commit | fcb1c0aa6d23f22394a713ca07e5b4fe2d77270f (patch) | |
tree | afa1159b74d646c787c36ea8cc6e9d83b93babe4 /share/mk/bsd.prog.mk | |
parent | b136eed63006963c7bf74ec337f78e9e320493c2 (diff) | |
download | FreeBSD-src-fcb1c0aa6d23f22394a713ca07e5b4fe2d77270f.zip FreeBSD-src-fcb1c0aa6d23f22394a713ca07e5b4fe2d77270f.tar.gz |
Create a private library directory (LIBPRIVATEDIR) for libraries which
we don't want to expose but which can't or shouldn't be static.
To mark a library as private, define PRIVATELIB in its Makefile. It
will be installed in LIBPRIVATEDIR, which is normally /usr/lib/private
(or /usr/lib32/private for 32-bit libraries on 64-bit platforms).
To indicate that a program or library depends on a private library,
define USEPRIVATELIB in its Makefile. The correct version of
LIBPRIVATEDIR will be added to its run-time library search path.
Approved by: re (blanket)
Diffstat (limited to 'share/mk/bsd.prog.mk')
-rw-r--r-- | share/mk/bsd.prog.mk | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/share/mk/bsd.prog.mk b/share/mk/bsd.prog.mk index f4546dc..12f14cb 100644 --- a/share/mk/bsd.prog.mk +++ b/share/mk/bsd.prog.mk @@ -52,6 +52,10 @@ STRIP?= -s LDFLAGS+= -static .endif +.if defined(USEPRIVATELIB) +LDFLAGS+= -L${_SHLIBDIRPREFIX}${LIBPRIVATEDIR} -rpath ${LIBPRIVATEDIR} +.endif + .if ${MK_DEBUG_FILES} != "no" PROG_FULL=${PROG}.full # Use ${DEBUGDIR} for base system debug files, else .debug subdirectory |