summaryrefslogtreecommitdiffstats
path: root/share/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
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')
-rw-r--r--share/mk/bsd.lib.mk9
-rw-r--r--share/mk/sys.mk5
2 files changed, 10 insertions, 4 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
diff --git a/share/mk/sys.mk b/share/mk/sys.mk
index 946fa86..72a5e78 100644
--- a/share/mk/sys.mk
+++ b/share/mk/sys.mk
@@ -1,5 +1,5 @@
# from: @(#)sys.mk 8.2 (Berkeley) 3/21/94
-# $Id: sys.mk,v 1.24 1997/08/30 23:23:18 peter Exp $
+# $Id: sys.mk,v 1.25 1997/09/05 09:09:56 peter Exp $
unix ?= We run FreeBSD, not UNIX.
@@ -94,6 +94,9 @@ YFLAGS ?=
YFLAGS ?= -d
.endif
+# Default executable format
+BINFORMAT ?= aout
+
# For tags rule.
GTAGSFLAGS= -se
HTAGSFLAGS=
OpenPOWER on IntegriCloud