version 1.88, 1997/03/23 00:52:20 |
version 1.93, 1997/04/17 06:32:23 |
|
|
# $NetBSD$ |
# $NetBSD$ |
# @(#)bsd.lib.mk 5.26 (Berkeley) 5/2/91 |
# @(#)bsd.lib.mk 8.3 (Berkeley) 4/22/94 |
|
|
.if exists(${.CURDIR}/../Makefile.inc) |
.if exists(${.CURDIR}/../Makefile.inc) |
.include "${.CURDIR}/../Makefile.inc" |
.include "${.CURDIR}/../Makefile.inc" |
Line 156 all: ${_LIBS} _SUBDIRUSE |
|
Line 156 all: ${_LIBS} _SUBDIRUSE |
|
|
|
OBJS+= ${SRCS:N*.h:R:S/$/.o/g} |
OBJS+= ${SRCS:N*.h:R:S/$/.o/g} |
|
|
lib${LIB}.a:: ${OBJS} |
__archivebuild: .USE |
|
@rm -f ${.TARGET} |
|
@${AR} cq ${.TARGET} `NM=${NM} lorder ${.ALLSRC} | tsort -q` |
|
${RANLIB} ${.TARGET} |
|
|
|
__archiveinstall: .USE |
|
${INSTALL} ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m 600 ${.ALLSRC} \ |
|
${.TARGET} |
|
${RANLIB} -t ${.TARGET} |
|
chmod ${LIBMODE} ${.TARGET} |
|
|
|
lib${LIB}.a:: ${OBJS} __archivebuild |
@echo building standard ${LIB} library |
@echo building standard ${LIB} library |
@rm -f lib${LIB}.a |
|
@${AR} cq lib${LIB}.a `lorder ${OBJS} | tsort -q` |
|
${RANLIB} lib${LIB}.a |
|
|
|
POBJS+= ${OBJS:.o=.po} |
POBJS+= ${OBJS:.o=.po} |
lib${LIB}_p.a:: ${POBJS} |
lib${LIB}_p.a:: ${POBJS} __archivebuild |
@echo building profiled ${LIB} library |
@echo building profiled ${LIB} library |
@rm -f lib${LIB}_p.a |
|
@${AR} cq lib${LIB}_p.a `lorder ${POBJS} | tsort -q` |
|
${RANLIB} lib${LIB}_p.a |
|
|
|
SOBJS+= ${OBJS:.o=.so} |
SOBJS+= ${OBJS:.o=.so} |
lib${LIB}_pic.a:: ${SOBJS} |
lib${LIB}_pic.a:: ${SOBJS} __archivebuild |
@echo building shared object ${LIB} library |
@echo building shared object ${LIB} library |
@rm -f lib${LIB}_pic.a |
|
@${AR} cq lib${LIB}_pic.a `lorder ${SOBJS} | tsort -q` |
|
${RANLIB} lib${LIB}_pic.a |
|
|
|
lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}: lib${LIB}_pic.a ${DPADD} \ |
lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}: lib${LIB}_pic.a ${DPADD} \ |
${SHLIB_LDSTARTFILE} ${SHLIB_LDENDFILE} |
${SHLIB_LDSTARTFILE} ${SHLIB_LDENDFILE} |
Line 182 lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINO |
|
Line 184 lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINO |
|
@rm -f lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} |
@rm -f lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} |
.if (${SHLIB_TYPE} == "a.out") |
.if (${SHLIB_TYPE} == "a.out") |
$(LD) -x -Bshareable -Bforcearchive \ |
$(LD) -x -Bshareable -Bforcearchive \ |
-o lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} lib${LIB}_pic.a ${LDADD} |
-o ${.TARGET} lib${LIB}_pic.a ${LDADD} |
.elif (${SHLIB_TYPE} == "ELF") |
.elif (${SHLIB_TYPE} == "ELF") |
$(LD) -x -shared -o lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \ |
$(LD) -x -shared -o ${.TARGET} \ |
-soname lib${LIB}.so.${SHLIB_SOVERSION} ${SHLIB_LDSTARTFILE} \ |
-soname lib${LIB}.so.${SHLIB_SOVERSION} ${SHLIB_LDSTARTFILE} \ |
--whole-archive lib${LIB}_pic.a --no-whole-archive ${LDADD} \ |
--whole-archive lib${LIB}_pic.a --no-whole-archive ${LDADD} \ |
${SHLIB_LDENDFILE} |
${SHLIB_LDENDFILE} |
Line 224 afterdepend: .depend |
|
Line 226 afterdepend: .depend |
|
beforeinstall: |
beforeinstall: |
.endif |
.endif |
|
|
realinstall: |
libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}.a |
# ranlib lib${LIB}.a |
.if !defined(UPDATE) |
${INSTALL} ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m 600 lib${LIB}.a \ |
.PHONY: ${DESTDIR}${LIBDIR}/lib${LIB}.a |
${DESTDIR}${LIBDIR} |
.endif |
${RANLIB} -t ${DESTDIR}${LIBDIR}/lib${LIB}.a |
.if !defined(BUILD) |
chmod ${LIBMODE} ${DESTDIR}${LIBDIR}/lib${LIB}.a |
${DESTDIR}${LIBDIR}/lib${LIB}.a: .MADE |
|
.endif |
|
|
|
${DESTDIR}${LIBDIR}/lib${LIB}.a: lib${LIB}.a __archiveinstall |
|
|
.if !defined(NOPROFILE) |
.if !defined(NOPROFILE) |
# ranlib lib${LIB}_p.a |
libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}_p.a |
${INSTALL} ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m 600 \ |
.if !defined(UPDATE) |
lib${LIB}_p.a ${DESTDIR}${LIBDIR} |
.PHONY: ${DESTDIR}${LIBDIR}/lib${LIB}_p.a |
${RANLIB} -t ${DESTDIR}${LIBDIR}/lib${LIB}_p.a |
.endif |
chmod ${LIBMODE} ${DESTDIR}${LIBDIR}/lib${LIB}_p.a |
.if !defined(BUILD) |
|
${DESTDIR}${LIBDIR}/lib${LIB}_p.a: .MADE |
.endif |
.endif |
|
|
|
${DESTDIR}${LIBDIR}/lib${LIB}_p.a: lib${LIB}_p.a __archiveinstall |
|
.endif |
|
|
.if !defined(NOPIC) |
.if !defined(NOPIC) |
# ranlib lib${LIB}_pic.a |
libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a |
${INSTALL} ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m 600 \ |
.if !defined(UPDATE) |
lib${LIB}_pic.a ${DESTDIR}${LIBDIR} |
.PHONY: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a |
${RANLIB} -t ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a |
.endif |
chmod ${LIBMODE} ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a |
.if !defined(BUILD) |
|
${DESTDIR}${LIBDIR}/lib${LIB}_pic.a: .MADE |
|
.endif |
|
|
|
${DESTDIR}${LIBDIR}/lib${LIB}_pic.a: lib${LIB}_pic.a __archiveinstall |
.endif |
.endif |
|
|
.if !defined(NOPIC) && defined(SHLIB_MAJOR) && defined(SHLIB_MINOR) |
.if !defined(NOPIC) && defined(SHLIB_MAJOR) && defined(SHLIB_MINOR) |
${INSTALL} ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ |
libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} |
lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} ${DESTDIR}${LIBDIR} |
.if !defined(UPDATE) |
|
.PHONY: ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} |
|
.endif |
|
.if !defined(BUILD) |
|
${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}: .MADE |
|
.endif |
|
|
|
${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}: lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} |
|
${INSTALL} ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} ${.ALLSRC} \ |
|
${.TARGET} |
.if (${SHLIB_TYPE} == "ELF") |
.if (${SHLIB_TYPE} == "ELF") |
rm -f ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_MAJOR} |
rm -f ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_MAJOR} |
ln -s lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \ |
ln -s lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \ |
|
|
${DESTDIR}${LIBDIR}/lib${LIB}.so |
${DESTDIR}${LIBDIR}/lib${LIB}.so |
.endif |
.endif |
.endif |
.endif |
|
|
.if !defined(NOLINT) |
.if !defined(NOLINT) |
|
libinstall:: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln |
|
.if !defined(UPDATE) |
|
.PHONY: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln |
|
.endif |
|
.if !defined(BUILD) |
|
${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln: .MADE |
|
.endif |
|
|
|
${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln llib-l${LIB}.ln |
${INSTALL} ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ |
${INSTALL} ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ |
llib-l${LIB}.ln ${DESTDIR}${LINTLIBDIR} |
llib-l${LIB}.ln ${DESTDIR}${LINTLIBDIR} |
.endif |
.endif |
.if defined(LINKS) && !empty(LINKS) |
|
@set ${LINKS}; \ |
|
while test $$# -ge 2; do \ |
|
l=${DESTDIR}$$1; \ |
|
shift; \ |
|
t=${DESTDIR}$$1; \ |
|
shift; \ |
|
echo $$t -\> $$l; \ |
|
rm -f $$t; \ |
|
ln $$l $$t; \ |
|
done; true |
|
.endif |
|
.if defined(SYMLINKS) && !empty(SYMLINKS) |
|
@set ${SYMLINKS}; \ |
|
while test $$# -ge 2; do \ |
|
l=$$1; \ |
|
shift; \ |
|
t=${DESTDIR}$$1; \ |
|
shift; \ |
|
echo $$t -\> $$l; \ |
|
rm -f $$t; \ |
|
ln -s $$l $$t; \ |
|
done; true |
|
.endif |
|
|
|
install: maninstall _SUBDIRUSE |
libinstall:: linksinstall |
maninstall: afterinstall |
realinstall: libinstall filesinstall |
|
|
|
install: ${MANINSTALL} _SUBDIRUSE |
|
${MANINSTALL}: afterinstall |
afterinstall: realinstall |
afterinstall: realinstall |
realinstall: beforeinstall |
realinstall: beforeinstall |
.endif |
.endif |
Line 300 realinstall: beforeinstall |
|
Line 314 realinstall: beforeinstall |
|
.endif |
.endif |
|
|
.include <bsd.obj.mk> |
.include <bsd.obj.mk> |
|
.include <bsd.links.mk> |
|
.include <bsd.files.mk> |
|
.include <bsd.inc.mk> |
.include <bsd.dep.mk> |
.include <bsd.dep.mk> |
.include <bsd.subdir.mk> |
.include <bsd.subdir.mk> |
.include <bsd.sys.mk> |
.include <bsd.sys.mk> |