Add support for two modifier variables which will be useful soon:

PRECIOUSLIB causes the shared library to be installed with the system
immutable flag (schg) set.  (You can add other flags for shared-library
installation by modifying SHLINSTALLFLAGS.)

INTERNALLIB disables the generation of non-shared versions of the library.
This may be of use for programs like Taylor UUCP and GCC which have large
internal libraries shared among a number of programs.
This commit is contained in:
Garrett Wollman 1994-08-26 18:58:10 +00:00
parent 24ea21ced4
commit c59ae063cb
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=2298

View File

@ -1,5 +1,5 @@
# from: @(#)bsd.lib.mk 5.26 (Berkeley) 5/2/91
# $Id: bsd.lib.mk,v 1.3 1994/08/08 15:45:55 wollman Exp $
# $Id: bsd.lib.mk,v 1.4 1994/08/10 02:48:07 wollman Exp $
#
.if exists(${.CURDIR}/../Makefile.inc)
@ -112,11 +112,13 @@ BINMODE?= 555
@${LD} -X -r ${.TARGET}
@mv a.out ${.TARGET}
.if !defined(INTERNALLIB)
.if !defined(NOPROFILE)
_LIBS=lib${LIB}.a lib${LIB}_p.a
.else
_LIBS=lib${LIB}.a
.endif
.endif
.if !defined(NOPIC)
.if defined(SHLIB_MAJOR) && defined(SHLIB_MINOR)
@ -205,7 +207,12 @@ afterdepend:
beforeinstall:
.endif
.if defined(PRECIOUSLIB)
SHLINSTALLFLAGS+= -fschg
.endif
realinstall: beforeinstall
.if !defined(INTERNALLIB)
${INSTALL} ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
${INSTALLFLAGS} lib${LIB}.a ${DESTDIR}${LIBDIR}
${RANLIB} -t ${DESTDIR}${LIBDIR}/lib${LIB}.a
@ -214,10 +221,12 @@ realinstall: beforeinstall
${INSTALLFLAGS} lib${LIB}_p.a ${DESTDIR}${LIBDIR}
${RANLIB} -t ${DESTDIR}${LIBDIR}/lib${LIB}_p.a
.endif
.endif
.if !defined(NOPIC)
.if defined(SHLIB_MAJOR) && defined(SHLIB_MINOR)
${INSTALL} ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
${INSTALLFLAGS} lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
${INSTALLFLAGS} ${SHLINSTALLFLAGS} \
lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
${DESTDIR}${LIBDIR}
.endif
.if defined(INSTALL_PIC_ARCHIVE)