Makefile revision 246328
154359Sroberto#	@(#)Makefile	8.1 (Berkeley) 6/4/93
2290000Sglebius# $FreeBSD: head/lib/Makefile 246328 2013-02-04 19:05:53Z des $
354359Sroberto
4290000Sglebius.include <bsd.own.mk>
5290000Sglebius
654359Sroberto# To satisfy shared library or ELF linkage when only the libraries being
754359Sroberto# built are visible:
854359Sroberto#
954359Sroberto# csu must be built before all shared libaries for ELF.
1054359Sroberto# libc must be built before all other shared libraries.
1154359Sroberto# libbsm must be built before libauditd.
1254359Sroberto# libcom_err must be built before libpam.
1354359Sroberto# libcrypt must be built before libpam.
14290000Sglebius# libkvm must be built before libdevstat.
15290000Sglebius# msun must be built before libg++ and libstdc++.
16290000Sglebius# libmd must be built before libatm, libopie, libradius, and libtacplus.
1754359Sroberto# ncurses must be built before libdialog, libedit and libreadline.
1854359Sroberto# libnetgraph must be built before libbsnmp/modules/snmp_netgraph.
1954359Sroberto# libopie must be built before libpam.
2054359Sroberto# libradius must be built before libpam.
2154359Sroberto# librpcsvc must be built before libpam.
2254359Sroberto# libsbuf must be built before libcam.
23290000Sglebius# libtacplus must be built before libpam.
24290000Sglebius# libutil must be built before libpam.
25290000Sglebius# libypclnt must be built before libpam.
26290000Sglebius# libgssapi must be built before librpcsec_gss
27290000Sglebius#
2882498Sroberto# Otherwise, the SUBDIR list should be in alphabetical order.
2954359Sroberto#
3054359Sroberto# Except it appears bind needs to be compiled last
3154359Sroberto
3254359SrobertoSUBDIR_ORDERED=	${_csu} \
3354359Sroberto	libc \
3454359Sroberto	libbsm \
3554359Sroberto	libauditd \
3654359Sroberto	libcompiler_rt \
3754359Sroberto	libcrypt \
3854359Sroberto	libelf \
3954359Sroberto	${_libiconv_modules} \
4054359Sroberto	libkvm \
4154359Sroberto	msun \
4254359Sroberto	libmd \
4354359Sroberto	ncurses \
4454359Sroberto	${_libnetgraph} \
4554359Sroberto	libradius \
4654359Sroberto	librpcsvc \
4754359Sroberto	libsbuf \
4854359Sroberto	libtacplus \
4954359Sroberto	libutil \
5054359Sroberto	${_libypclnt} \
5154359Sroberto	${_libcxxrt} \
52290000Sglebius	${_libcplusplus}
53290000Sglebius
54290000Sglebius.if ${MK_KERBEROS_SUPPORT} != "no"
55290000SglebiusSUBDIR_ORDERED+=	libcom_err
56290000Sglebius.endif
5754359Sroberto
5854359SrobertoSUBDIR=	${SUBDIR_ORDERED} \
5954359Sroberto	libalias \
6054359Sroberto	libarchive \
6154359Sroberto	${_libatm} \
6254359Sroberto	libbegemot \
6354359Sroberto	libblocksruntime \
6454359Sroberto	${_libbluetooth} \
6554359Sroberto	${_libbsnmp} \
6654359Sroberto	libbz2 \
6754359Sroberto	libcalendar \
6854359Sroberto	libcam \
6954359Sroberto	libcompat \
7082498Sroberto	libdevinfo \
7182498Sroberto	libdevstat \
7282498Sroberto	libdwarf \
7382498Sroberto	libedit \
74290000Sglebius	${_libefi} \
75290000Sglebius	libexpat \
76290000Sglebius	libfetch \
7782498Sroberto	libgeom \
7882498Sroberto	${_libgpib} \
7954359Sroberto	${_libgssapi} \
8054359Sroberto	${_librpcsec_gss} \
8154359Sroberto	libipsec \
8254359Sroberto	${_libipx} \
83290000Sglebius	libjail \
84290000Sglebius	libkiconv \
85290000Sglebius	liblzma \
8654359Sroberto	libmagic \
8754359Sroberto	libmandoc \
8854359Sroberto	libmemstat \
8954359Sroberto	${_libmilter} \
9054359Sroberto	${_libmp} \
9154359Sroberto	${_libnandfs} \
9254359Sroberto	libnetbsd \
9354359Sroberto	${_libngatm} \
9454359Sroberto	libopie \
9554359Sroberto	libpam \
9654359Sroberto	libpcap \
9754359Sroberto	${_libpmc} \
9854359Sroberto	${_libproc} \
9954359Sroberto	libprocstat \
10054359Sroberto	librt \
10154359Sroberto	${_librtld_db} \
10254359Sroberto	${_libsdp} \
10354359Sroberto	${_libsm} \
10454359Sroberto	${_libsmdb} \
10554359Sroberto	${_libsmutil} \
10654359Sroberto	libstand \
10754359Sroberto	libstdbuf \
10854359Sroberto	libstdthreads \
109290000Sglebius	${_libtelnet} \
110290000Sglebius	${_libthr} \
111290000Sglebius	libthread_db \
112290000Sglebius	libufs \
113290000Sglebius	libugidfw \
114290000Sglebius	libulog \
115290000Sglebius	${_libusbhid} \
116290000Sglebius	${_libusb} \
117290000Sglebius	${_libvgl} \
118290000Sglebius	${_libvmmapi} \
119290000Sglebius	libwrap \
120290000Sglebius	liby \
121290000Sglebius	libz \
122290000Sglebius	${_atf} \
123290000Sglebius	${_bind} \
124290000Sglebius	${_clang}
125290000Sglebius
126290000Sglebius.if exists(${.CURDIR}/csu/${MACHINE_ARCH}-elf)
127290000Sglebius_csu=csu/${MACHINE_ARCH}-elf
128290000Sglebius.elif exists(${.CURDIR}/csu/${MACHINE_ARCH})
129290000Sglebius_csu=csu/${MACHINE_ARCH}
13054359Sroberto.elif exists(${.CURDIR}/csu/${MACHINE_CPUARCH}/Makefile)
13154359Sroberto_csu=csu/${MACHINE_CPUARCH}
13282498Sroberto.else
13354359Sroberto_csu=csu
13454359Sroberto.endif
13554359Sroberto
13654359Sroberto# NB: keep these sorted by MK_* knobs
13754359Sroberto
13854359Sroberto.if ${MK_ATF} != "no"
13954359Sroberto_atf=		atf
14054359Sroberto.endif
14154359Sroberto
14254359Sroberto.if ${MK_ATM} != "no"
14354359Sroberto_libngatm=	libngatm
14454359Sroberto.endif
14554359Sroberto
14654359Sroberto.if ${MK_BIND} != "no"
14754359Sroberto_bind=		bind
14854359Sroberto.endif
14954359Sroberto
15054359Sroberto.if ${MK_BLUETOOTH} != "no"
15154359Sroberto_libbluetooth=	libbluetooth
15254359Sroberto_libsdp=	libsdp
15354359Sroberto.endif
15454359Sroberto
15554359Sroberto.if ${MK_BSNMP} != "no"
156290000Sglebius_libbsnmp=	libbsnmp
15754359Sroberto.endif
158290000Sglebius
15954359Sroberto.if ${MK_CLANG} != "no" && !defined(COMPAT_32BIT)
16054359Sroberto_clang=		clang
16154359Sroberto.endif
162290000Sglebius
16354359Sroberto.if ${MK_GPIB} != "no"
164290000Sglebius_libgpib=	libgpib
16554359Sroberto.endif
16654359Sroberto
167290000Sglebius.if ${MK_GSSAPI} != "no"
168290000Sglebius_libgssapi=	libgssapi
16954359Sroberto_librpcsec_gss=	librpcsec_gss
17054359Sroberto.endif
17154359Sroberto
17254359Sroberto.if ${MK_ICONV} != "no"
17354359Sroberto_libiconv_modules=	libiconv_modules
17454359Sroberto.endif
17554359Sroberto
17654359Sroberto.if ${MK_IPX} != "no"
17754359Sroberto_libipx=	libipx
17854359Sroberto.endif
17954359Sroberto
18054359Sroberto.if ${MK_LIBCPLUSPLUS} != "no"
18154359Sroberto_libcxxrt=	libcxxrt
18254359Sroberto_libcplusplus=	libc++
18354359Sroberto.endif
18454359Sroberto
18554359Sroberto.if ${MK_LIBTHR} != "no"
18654359Sroberto_libthr=	libthr
18754359Sroberto.endif
18854359Sroberto
18954359Sroberto.if ${MK_NAND} != "no"
190290000Sglebius_libnandfs=	libnandfs
191290000Sglebius.endif
192290000Sglebius
193290000Sglebius.if ${MK_NETGRAPH} != "no"
194290000Sglebius_libnetgraph=	libnetgraph
195290000Sglebius.endif
19654359Sroberto
19754359Sroberto.if ${MK_NIS} != "no"
198290000Sglebius_libypclnt=	libypclnt
19954359Sroberto.endif
20054359Sroberto
20154359Sroberto.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
20254359Sroberto_libvgl=	libvgl
20354359Sroberto_libproc=	libproc
20454359Sroberto_librtld_db=	librtld_db
20554359Sroberto.endif
20654359Sroberto
20754359Sroberto.if ${MACHINE_CPUARCH} == "amd64"
20854359Sroberto_libvmmapi=	libvmmapi
20954359Sroberto.endif
21054359Sroberto
21154359Sroberto.if ${MACHINE_CPUARCH} == "ia64"
21254359Sroberto_libefi=	libefi
21354359Sroberto.endif
21454359Sroberto
21554359Sroberto.if ${MACHINE_CPUARCH} == "mips"
21654359Sroberto_libproc=	libproc
21754359Sroberto_librtld_db=	librtld_db
218290000Sglebius.endif
21954359Sroberto
22054359Sroberto.if ${MACHINE_CPUARCH} == "powerpc"
22154359Sroberto_libproc=	libproc
22254359Sroberto_librtld_db=	librtld_db
22354359Sroberto.endif
22454359Sroberto
22554359Sroberto.if ${MK_OPENSSL} != "no"
22654359Sroberto_libmp=		libmp
22754359Sroberto.endif
22854359Sroberto
229290000Sglebius.if ${MK_PMC} != "no"
23054359Sroberto_libpmc=	libpmc
23154359Sroberto.endif
23254359Sroberto
23354359Sroberto.if ${MK_SENDMAIL} != "no"
23454359Sroberto_libmilter=	libmilter
23554359Sroberto_libsm=		libsm
236290000Sglebius_libsmdb=	libsmdb
237290000Sglebius_libsmutil=	libsmutil
23854359Sroberto.endif
239290000Sglebius
240290000Sglebius.if ${MK_TELNET} != "no"
241290000Sglebius_libtelnet=	libtelnet
242290000Sglebius.endif
243290000Sglebius
24454359Sroberto.if ${MK_USB} != "no"
245290000Sglebius_libusbhid=	libusbhid
246290000Sglebius_libusb=	libusb
247290000Sglebius.endif
24854359Sroberto
249290000Sglebius.include <bsd.subdir.mk>
25054359Sroberto