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.
This commit is contained in:
Peter Wemm 1997-09-05 11:45:15 +00:00
parent 986a117274
commit e782d0b55d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=29141
2 changed files with 10 additions and 4 deletions

View File

@ -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

View File

@ -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=