summaryrefslogtreecommitdiffstats
path: root/share/mk/bsd.lib.mk
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1997-09-05 11:45:15 +0000
committerpeter <peter@FreeBSD.org>1997-09-05 11:45:15 +0000
commitaceb39e183d078c3e125b61c28eb4f3d209d843c (patch)
tree66a82cc9837ebc69274f1e198fcba1d388d0b721 /share/mk/bsd.lib.mk
parent572d82313f682971f03ba47c832271490846a004 (diff)
downloadFreeBSD-src-aceb39e183d078c3e125b61c28eb4f3d209d843c.zip
FreeBSD-src-aceb39e183d078c3e125b61c28eb4f3d209d843c.tar.gz
Restore the BINFORMAT?= in sys.mk, or it's painfully difficult to use
.if in Makefiles. bsd.prog.mk and bsd.lib.mk do not depend on it however. Allow overriding of the -soname arg when building the lib*crypt.so* libs since libdescrypt.so and libscrupt.so both need a -soname of libcrypt.so so that the symlink is obeyed at runtime rather than at compile time.
Diffstat (limited to 'share/mk/bsd.lib.mk')
-rw-r--r--share/mk/bsd.lib.mk9
1 files changed, 6 insertions, 3 deletions
diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk
index 1e82779..465b5f7 100644
--- a/share/mk/bsd.lib.mk
+++ b/share/mk/bsd.lib.mk
@@ -1,5 +1,5 @@
# from: @(#)bsd.lib.mk 5.26 (Berkeley) 5/2/91
-# $Id: bsd.lib.mk,v 1.61 1997/08/30 23:23:13 peter Exp $
+# $Id: bsd.lib.mk,v 1.62 1997/09/05 09:09:55 peter Exp $
#
.if exists(${.CURDIR}/../Makefile.inc)
@@ -16,6 +16,10 @@ SHLIB_MINOR != . ${.CURDIR}/shlib_version ; echo $$minor
.endif
.endif
+.if !defined(NOPIC) && ${BINFORMAT} == elf
+SONAME?= lib${LIB}.so.${SHLIB_MAJOR}
+.endif
+
.if defined(DESTDIR)
CFLAGS+= -I${DESTDIR}/usr/include
CXXINCLUDES+= -I${DESTDIR}/usr/include/g++
@@ -174,8 +178,7 @@ lib${LIB}.so.${SHLIB_MAJOR}: ${SOBJS}
@${ECHO} building shared ${LIB} library \(version ${SHLIB_MAJOR}\)
@rm -f lib${LIB}.so.${SHLIB_MAJOR}
@${LDDESTDIRENV} ${CC} -shared -Wl,-x \
- -o lib${LIB}.so.${SHLIB_MAJOR} \
- -Wl,-soname,lib${LIB}.so.${SHLIB_MAJOR} \
+ -o lib${LIB}.so.${SHLIB_MAJOR} -Wl,-soname,${SONAME} \
`lorder ${SOBJS} | tsort -q` ${LDDESTDIR} ${LDADD}
.endif
OpenPOWER on IntegriCloud