Implement DEPLIBS (in Makefile.inc for now), which adds all the listed
libraries to LDADD & DPADD for the current library, using -L OBJDIR-of-DEPLIB so that the current library can link with the DEPLIB library built but not installed. Set DEPLIBS appropriately, rather than explictly adding LDADD/DPADD for various libraries. Reorder library build order so that libraries that depend upon any other library are built at the end. Whilst this change could be done in a more generic manner (and I intend to work on that), it does remove the need to implement top-level build targets such as "do-lib-des" (etc).
This commit is contained in:
parent
92c5582317
commit
124613b27e
27
lib/Makefile
27
lib/Makefile
@ -1,9 +1,9 @@
|
|||||||
# $NetBSD: Makefile,v 1.88 2003/12/11 09:46:27 dyoung Exp $
|
# $NetBSD: Makefile,v 1.89 2004/07/30 07:02:53 lukem Exp $
|
||||||
# from: @(#)Makefile 5.25.1.1 (Berkeley) 5/7/91
|
# from: @(#)Makefile 5.25.1.1 (Berkeley) 5/7/91
|
||||||
|
|
||||||
.include <bsd.own.mk>
|
.include <bsd.own.mk>
|
||||||
|
|
||||||
SUBDIR= csu libc .WAIT libarch libbsdmalloc libbz2 libcdk libcompat libcrypt \
|
SUBDIR= csu libc .WAIT libarch libbsdmalloc libbz2 libcompat libcrypt \
|
||||||
libcurses libedit libevent libform libintl libkvm libl libm libmagic \
|
libcurses libedit libevent libform libintl libkvm libl libm libmagic \
|
||||||
libmenu libossaudio libpcap libpci libpmc libposix libpthread \
|
libmenu libossaudio libpcap libpci libpmc libposix libpthread \
|
||||||
libpthread_dbg libresolv librmt librpcsvc librt libterm libusbhid \
|
libpthread_dbg libresolv librmt librpcsvc librt libterm libusbhid \
|
||||||
@ -17,7 +17,7 @@ SUBDIR+= libskey
|
|||||||
|
|
||||||
.if (${MKCRYPTO} != "no")
|
.if (${MKCRYPTO} != "no")
|
||||||
# OpenSSL libraries.
|
# OpenSSL libraries.
|
||||||
SUBDIR+= libcrypto libssl libdes
|
SUBDIR+= libcrypto libdes
|
||||||
|
|
||||||
.if (${MKCRYPTO_IDEA} != "no")
|
.if (${MKCRYPTO_IDEA} != "no")
|
||||||
SUBDIR+= libcrypto_idea
|
SUBDIR+= libcrypto_idea
|
||||||
@ -35,13 +35,12 @@ SUBDIR+= libcrypto_rc5
|
|||||||
|
|
||||||
.if (${MKKERBEROS} != "no")
|
.if (${MKKERBEROS} != "no")
|
||||||
# Heimdal Kerberos 5 libraries
|
# Heimdal Kerberos 5 libraries
|
||||||
SUBDIR+= libroken libvers libcom_err libsl libss libasn1 libkrb5 libhdb \
|
SUBDIR+= libroken libvers libcom_err libsl libss libasn1 libhdb \
|
||||||
libkadm5srv libkadm5clnt libgssapi libkafs
|
libkadm5srv libkadm5clnt libgssapi libkafs
|
||||||
|
|
||||||
.if (${MKKERBEROS4} != "no")
|
.if (${MKKERBEROS4} != "no")
|
||||||
# KTH Kerberos 4 libraries
|
# KTH Kerberos 4 libraries
|
||||||
SUBDIR+= libkrb libkdb libkadm
|
SUBDIR+= libkdb libkadm libkstream
|
||||||
SUBDIR+= libkstream
|
|
||||||
.endif # MKKERBEROS4 != no
|
.endif # MKKERBEROS4 != no
|
||||||
.endif # MKKERBEROS != no
|
.endif # MKKERBEROS != no
|
||||||
|
|
||||||
@ -53,4 +52,20 @@ SUBDIR+= libipsec
|
|||||||
# I18N modules
|
# I18N modules
|
||||||
SUBDIR+= i18n_module
|
SUBDIR+= i18n_module
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Libraries that depend upon any listed previously
|
||||||
|
#
|
||||||
|
SUBDIR+= .WAIT
|
||||||
|
SUBDIR+= libcdk
|
||||||
|
.if (${MKCRYPTO} != "no")
|
||||||
|
SUBDIR+= libssl
|
||||||
|
.endif
|
||||||
|
.if (${MKKERBEROS} != "no")
|
||||||
|
SUBDIR+= libkrb5
|
||||||
|
.endif
|
||||||
|
.if (${MKKERBEROS4} != "no")
|
||||||
|
SUBDIR+= libkrb
|
||||||
|
.endif
|
||||||
|
|
||||||
.include <bsd.subdir.mk>
|
.include <bsd.subdir.mk>
|
||||||
|
@ -1,4 +1,18 @@
|
|||||||
# $NetBSD: Makefile.inc,v 1.3 2001/11/05 15:23:49 lukem Exp $
|
# $NetBSD: Makefile.inc,v 1.4 2004/07/30 07:02:53 lukem Exp $
|
||||||
|
|
||||||
WARNS?= 2
|
WARNS?= 2
|
||||||
WFORMAT?= 2
|
WFORMAT?= 2
|
||||||
|
|
||||||
|
|
||||||
|
.if ${MKPIC:Uno} != "no"
|
||||||
|
.if defined(DEPLIBS)
|
||||||
|
.for _lib in ${DEPLIBS}
|
||||||
|
.if !defined(DEPLIBOD.${_lib})
|
||||||
|
DEPLIBOD.${_lib}!= cd ${.CURDIR}/../lib${_lib} && ${PRINTOBJDIR}
|
||||||
|
.MAKEOVERRIDES+= DEPLIBOD.${_lib}
|
||||||
|
.endif
|
||||||
|
LDADD+= -L${DEPLIBOD.${_lib}} -l${_lib}
|
||||||
|
DPADD+= ${DEPLIBOD.${_lib}}/lib${_lib}.so
|
||||||
|
.endfor
|
||||||
|
.endif # defined(DEPLIBS)
|
||||||
|
.endif # MKPIC != no
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# $NetBSD: Makefile,v 1.6 2004/07/30 04:44:54 lukem Exp $
|
# $NetBSD: Makefile,v 1.7 2004/07/30 07:02:53 lukem Exp $
|
||||||
|
|
||||||
NOLINT= # defined
|
NOLINT= # defined
|
||||||
|
|
||||||
@ -9,8 +9,7 @@ DIST= ${NETBSDSRCDIR}/dist
|
|||||||
|
|
||||||
LIB= cdk
|
LIB= cdk
|
||||||
|
|
||||||
LDADD+= -lcurses
|
DEPLIBS= curses
|
||||||
DPADD+= ${LIBCURSES}
|
|
||||||
|
|
||||||
CPPFLAGS+= -I. -I${DIST}/cdk/include -DHAVE_CONFIG_H
|
CPPFLAGS+= -I. -I${DIST}/cdk/include -DHAVE_CONFIG_H
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# $NetBSD: Makefile,v 1.27 2003/07/24 14:16:54 itojun Exp $
|
# $NetBSD: Makefile,v 1.28 2004/07/30 07:02:53 lukem Exp $
|
||||||
|
|
||||||
NOLINT= # defined
|
NOLINT= # defined
|
||||||
|
|
||||||
@ -24,6 +24,8 @@ WARNS?= 1
|
|||||||
|
|
||||||
LIB= krb
|
LIB= krb
|
||||||
|
|
||||||
|
DEPLIBS= des
|
||||||
|
|
||||||
.if ${USETOOLS} != "yes"
|
.if ${USETOOLS} != "yes"
|
||||||
COMPILEETOBJ!= cd ${NETBSDSRCDIR}/lib/libcom_err/compile_et && ${PRINTOBJDIR}
|
COMPILEETOBJ!= cd ${NETBSDSRCDIR}/lib/libcom_err/compile_et && ${PRINTOBJDIR}
|
||||||
TOOL_COMPILE_ET= ${COMPILEETOBJ}/compile_et
|
TOOL_COMPILE_ET= ${COMPILEETOBJ}/compile_et
|
||||||
@ -146,8 +148,5 @@ INFOFLAGS= -I${DIST}/krb4/doc
|
|||||||
fi
|
fi
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
LDADD+= -ldes
|
|
||||||
DPADD+= ${LIBDES}
|
|
||||||
|
|
||||||
.include <bsd.lib.mk>
|
.include <bsd.lib.mk>
|
||||||
.include <bsd.info.mk>
|
.include <bsd.info.mk>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# $NetBSD: Makefile,v 1.30 2004/07/30 06:13:00 lukem Exp $
|
# $NetBSD: Makefile,v 1.31 2004/07/30 07:02:53 lukem Exp $
|
||||||
|
|
||||||
NOLINT= # defined
|
NOLINT= # defined
|
||||||
|
|
||||||
@ -11,8 +11,7 @@ WARNS?= 1
|
|||||||
|
|
||||||
LIB= krb5
|
LIB= krb5
|
||||||
|
|
||||||
LDADD+= -lcrypto -lasn1 -lcom_err -lroken
|
DEPLIBS= crypto asn1 com_err roken
|
||||||
DPADD+= ${LIBCRYPTO} ${LIBASN1} ${LIBCOM_ERR} ${LIBROKEN}
|
|
||||||
|
|
||||||
.if ${USETOOLS} != "yes"
|
.if ${USETOOLS} != "yes"
|
||||||
COMPILEETOBJ!= cd ${NETBSDSRCDIR}/lib/libcom_err/compile_et && ${PRINTOBJDIR}
|
COMPILEETOBJ!= cd ${NETBSDSRCDIR}/lib/libcom_err/compile_et && ${PRINTOBJDIR}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# $NetBSD: Makefile,v 1.8 2004/07/30 04:22:33 lukem Exp $
|
# $NetBSD: Makefile,v 1.9 2004/07/30 07:02:53 lukem Exp $
|
||||||
|
|
||||||
# RCSid:
|
# RCSid:
|
||||||
# Id: Makefile,v 1.33 1998/11/11 11:53:53 sjg Exp
|
# Id: Makefile,v 1.33 1998/11/11 11:53:53 sjg Exp
|
||||||
@ -31,11 +31,11 @@ CRYPTODIST= ${NETBSDSRCDIR}/crypto/dist
|
|||||||
|
|
||||||
.include "srcs.inc"
|
.include "srcs.inc"
|
||||||
|
|
||||||
|
DEPLIBS= crypto
|
||||||
|
|
||||||
# XXX
|
# XXX
|
||||||
.if ${OBJECT_FMT} == "ELF"
|
.if ${OBJECT_FMT} == "ELF"
|
||||||
AFLAGS+=-DELF
|
AFLAGS+=-DELF
|
||||||
LDADD+= -lcrypto
|
|
||||||
DPADD+= ${LIBCRYPTO}
|
|
||||||
.else
|
.else
|
||||||
AFLAGS+=-DOUT
|
AFLAGS+=-DOUT
|
||||||
.endif
|
.endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user