From aceb39e183d078c3e125b61c28eb4f3d209d843c Mon Sep 17 00:00:00 2001 From: peter Date: Fri, 5 Sep 1997 11:45:15 +0000 Subject: 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. --- share/mk/bsd.lib.mk | 9 ++++++--- share/mk/sys.mk | 5 ++++- 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= -- cgit v1.1