sort the object file build so that we get better buffer cache behavior.
[from perry, with fixes from me]
This commit is contained in:
parent
ab01074993
commit
3d2671a09d
|
@ -1,4 +1,4 @@
|
||||||
# $NetBSD: bsd.lib.mk,v 1.157 1999/09/04 21:48:33 fredb Exp $
|
# $NetBSD: bsd.lib.mk,v 1.158 1999/09/12 00:31:34 christos Exp $
|
||||||
# @(#)bsd.lib.mk 8.3 (Berkeley) 4/22/94
|
# @(#)bsd.lib.mk 8.3 (Berkeley) 4/22/94
|
||||||
|
|
||||||
.if !target(__initialized__)
|
.if !target(__initialized__)
|
||||||
|
@ -229,12 +229,16 @@ _LIBS=lib${LIB}.a
|
||||||
_LIBS=
|
_LIBS=
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
|
OBJS+=${SRCS:N*.h:N*.sh:R:S/$/.o/g}
|
||||||
|
|
||||||
.if ${MKPROFILE} != "no"
|
.if ${MKPROFILE} != "no"
|
||||||
_LIBS+=lib${LIB}_p.a
|
_LIBS+=lib${LIB}_p.a
|
||||||
|
POBJS+=${OBJS:.o=.po}
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
.if ${MKPIC} != "no"
|
.if ${MKPIC} != "no"
|
||||||
_LIBS+=lib${LIB}_pic.a
|
_LIBS+=lib${LIB}_pic.a
|
||||||
|
SOBJS+=${OBJS:.o=.so}
|
||||||
.if defined(SHLIB_MAJOR) && defined(SHLIB_MINOR)
|
.if defined(SHLIB_MAJOR) && defined(SHLIB_MINOR)
|
||||||
_LIBS+=lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}
|
_LIBS+=lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}
|
||||||
.endif
|
.endif
|
||||||
|
@ -242,9 +246,12 @@ _LIBS+=lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}
|
||||||
|
|
||||||
.if ${MKLINT} != "no" && ${MKLINKLIB} != "no"
|
.if ${MKLINT} != "no" && ${MKLINKLIB} != "no"
|
||||||
_LIBS+=llib-l${LIB}.ln
|
_LIBS+=llib-l${LIB}.ln
|
||||||
|
LOBJS+=${LSRCS:.c=.ln} ${SRCS:M*.c:.c=.ln}
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
all: ${SRCS} ${_LIBS}
|
ALLOBJS=${OBJS} ${POBJS} ${SOBJS} ${LOBJS}
|
||||||
|
|
||||||
|
all: ${SRCS} ${ALLOBJS:O} ${_LIBS}
|
||||||
|
|
||||||
__archivebuild: .USE
|
__archivebuild: .USE
|
||||||
@rm -f ${.TARGET}
|
@rm -f ${.TARGET}
|
||||||
|
@ -267,11 +274,9 @@ OBJS+= ${SRCS:N*.h:N*.sh:R:S/$/.o/g}
|
||||||
lib${LIB}.a:: ${OBJS} __archivebuild
|
lib${LIB}.a:: ${OBJS} __archivebuild
|
||||||
@echo building standard ${LIB} library
|
@echo building standard ${LIB} library
|
||||||
|
|
||||||
POBJS+= ${OBJS:.o=.po}
|
|
||||||
lib${LIB}_p.a:: ${POBJS} __archivebuild
|
lib${LIB}_p.a:: ${POBJS} __archivebuild
|
||||||
@echo building profiled ${LIB} library
|
@echo building profiled ${LIB} library
|
||||||
|
|
||||||
SOBJS+= ${OBJS:.o=.so}
|
|
||||||
lib${LIB}_pic.a:: ${SOBJS} __archivebuild
|
lib${LIB}_pic.a:: ${SOBJS} __archivebuild
|
||||||
@echo building shared object ${LIB} library
|
@echo building shared object ${LIB} library
|
||||||
|
|
||||||
|
@ -301,7 +306,6 @@ lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}: lib${LIB}_pic.a ${DPADD} \
|
||||||
lib${LIB}.so
|
lib${LIB}.so
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
LOBJS+= ${LSRCS:.c=.ln} ${SRCS:M*.c:.c=.ln}
|
|
||||||
LLIBS?= -lc
|
LLIBS?= -lc
|
||||||
llib-l${LIB}.ln: ${LOBJS}
|
llib-l${LIB}.ln: ${LOBJS}
|
||||||
@echo building llib-l${LIB}.ln
|
@echo building llib-l${LIB}.ln
|
||||||
|
|
Loading…
Reference in New Issue