Makefile revision 244557
134689Sbde#	@(#)Makefile	8.1 (Berkeley) 6/4/93
250476Speter# $FreeBSD: head/lib/Makefile 244557 2012-12-21 20:37:38Z brooks $
31573Srgrimes
434689Sbde.include <bsd.own.mk>
534689Sbde
634689Sbde# To satisfy shared library or ELF linkage when only the libraries being
738752Sbde# built are visible:
8117675Smarkm#
9117675Smarkm# csu must be built before all shared libaries for ELF.
1081133Stmm# libc must be built before all other shared libraries.
1159897Sjoe# libbsm must be built before libauditd.
1279471Smarkm# libcom_err must be built before libpam.
1350731Speter# libcrypt must be built before libpam.
14122568Sharti# libkvm must be built before libdevstat.
1559353Skris# msun must be built before libg++ and libstdc++.
1641257Sjdp# libmd must be built before libatm, libopie, libradius, and libtacplus.
1782355Smarkm# ncurses must be built before libdialog, libedit and libreadline.
1894690Sdes# libnetgraph must be built before libbsnmp/modules/snmp_netgraph.
1941257Sjdp# libopie must be built before libpam.
2056081Sbde# libradius must be built before libpam.
2194690Sdes# librpcsvc must be built before libpam.
2234689Sbde# libsbuf must be built before libcam.
2334689Sbde# libtacplus must be built before libpam.
2434689Sbde# libutil must be built before libpam.
25122568Sharti# libypclnt must be built before libpam.
26122568Sharti# libgssapi must be built before librpcsec_gss
27121054Semax#
28122406Sharti# Otherwise, the SUBDIR list should be in alphabetical order.
29111204Sobrien#
30110546Sphk# Except it appears bind needs to be compiled last
31120492Sfjoe
32122568ShartiSUBDIR_ORDERED=	${_csu} \
33121340Sharti	libc \
34121340Sharti	libbsm \
35121340Sharti	libauditd \
3634689Sbde	libcompiler_rt \
37103436Speter	libcrypt \
38103436Speter	libelf \
3972309Sobrien	${_libiconv_modules} \
4034689Sbde	libkvm \
4172309Sobrien	msun \
4272309Sobrien	libmd \
431573Srgrimes	ncurses \
441573Srgrimes	${_libnetgraph} \
45116906Smarcel	libradius \
46119002Sobrien	librpcsvc \
47108753Smarcel	libsbuf \
4834689Sbde	libtacplus \
4917706Sjulian	libutil \
50116906Smarcel	${_libypclnt} \
5117706Sjulian	${_libcxxrt} \
52119508Sphk	${_libcplusplus}
53119508Sphk
54121340Sharti.if ${MK_KERBEROS_SUPPORT} != "no"
55119508SphkSUBDIR_ORDERED+=	libcom_err
56119508Sphk.endif
5753927Speter
5853922SpeterSUBDIR=	${SUBDIR_ORDERED} \
5953922Speter	libalias \
6053922Speter	libarchive \
6186252Sgshapiro	${_libatm} \
6290796Sgshapiro	libbegemot \
6390796Sgshapiro	libblocksruntime \
6486252Sgshapiro	${_libbluetooth} \
6586252Sgshapiro	${_libbsnmp} \
6686252Sgshapiro	libbz2 \
6786252Sgshapiro	libcalendar \
68119553Sphk	libcam \
69119553Sphk	libcompat \
70119553Sphk	libdevinfo \
71119553Sphk	libdevstat \
7234689Sbde	libdisk \
7338477Sgpalmer	libdwarf \
74121054Semax	libedit \
7552228Sbp	${_libefi} \
76121054Semax	libexpat \
7787960Ssheldonh	libfetch \
7834689Sbde	libgeom \
7936026Sjb	${_libgpib} \
8034689Sbde	${_libgssapi} \
8141912Sdfr	${_librpcsec_gss} \
8241912Sdfr	libipsec \
8372309Sobrien	${_libipx} \
8441912Sdfr	libjail \
8541912Sdfr	libkiconv \
86117950Speter	liblzma \
87117950Speter	libmagic \
88117950Speter	libmandoc \
89118694Sdeischen	libmemstat \
90118694Sdeischen	${_libmilter} \
91118694Sdeischen	${_libmp} \
92118675Sdeischen	${_libnandfs} \
93118675Sdeischen	libnetbsd \
94117950Speter	${_libngatm} \
95118675Sdeischen	libopie \
96117950Speter	libpam \
97117797Smtm	libpcap \
98117797Smtm	${_libpmc} \
99117797Smtm	${_libproc} \
100117797Smtm	libprocstat \
101117797Smtm	librt \
102117797Smtm	${_librtld_db} \
103111204Sobrien	${_libsdp} \
104114279Sru	${_libsm} \
105111204Sobrien	${_libsmdb} \
106111204Sobrien	${_libsmutil} \
107117978Smarkm	libstand \
10881054Ssobomax	libstdbuf \
10981054Ssobomax	libstdthreads \
11081054Ssobomax	${_libtelnet} \
1111573Srgrimes	${_libthr} \
112	libthread_db \
113	libufs \
114	libugidfw \
115	libulog \
116	${_libusbhid} \
117	${_libusb} \
118	${_libvgl} \
119	libwrap \
120	liby \
121	libz \
122	${_atf} \
123	${_bind} \
124	${_clang}
125
126.if exists(${.CURDIR}/csu/${MACHINE_ARCH}-elf)
127_csu=csu/${MACHINE_ARCH}-elf
128.elif exists(${.CURDIR}/csu/${MACHINE_ARCH})
129_csu=csu/${MACHINE_ARCH}
130.elif exists(${.CURDIR}/csu/${MACHINE_CPUARCH}/Makefile)
131_csu=csu/${MACHINE_CPUARCH}
132.else
133_csu=csu
134.endif
135
136# NB: keep these sorted by MK_* knobs
137
138.if ${MK_ATF} != "no"
139_atf=		atf
140.endif
141
142.if ${MK_ATM} != "no"
143_libngatm=	libngatm
144.endif
145
146.if ${MK_BIND} != "no"
147_bind=		bind
148.endif
149
150.if ${MK_BLUETOOTH} != "no"
151_libbluetooth=	libbluetooth
152_libsdp=	libsdp
153.endif
154
155.if ${MK_BSNMP} != "no"
156_libbsnmp=	libbsnmp
157.endif
158
159.if ${MK_CLANG} != "no" && !defined(COMPAT_32BIT)
160_clang=		clang
161.endif
162
163.if ${MK_GPIB} != "no"
164_libgpib=	libgpib
165.endif
166
167.if ${MK_GSSAPI} != "no"
168_libgssapi=	libgssapi
169_librpcsec_gss=	librpcsec_gss
170.endif
171
172.if ${MK_ICONV} != "no"
173_libiconv_modules=	libiconv_modules
174.endif
175
176.if ${MK_IPX} != "no"
177_libipx=	libipx
178.endif
179
180.if ${MK_LIBTHR} != "no"
181_libthr=	libthr
182.endif
183
184.if ${MK_NAND} != "no"
185_libnandfs=	libnandfs
186.endif
187
188.if ${MK_NETGRAPH} != "no"
189_libnetgraph=	libnetgraph
190.endif
191
192.if ${MK_NIS} != "no"
193_libypclnt=	libypclnt
194.endif
195
196.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
197_libvgl=	libvgl
198_libproc=	libproc
199_librtld_db=	librtld_db
200.endif
201
202.if ${MACHINE_CPUARCH} == "ia64"
203_libefi=	libefi
204.endif
205
206.if ${MACHINE_CPUARCH} == "mips"
207_libproc=	libproc
208_librtld_db=	librtld_db
209.endif
210
211.if ${MACHINE_CPUARCH} == "powerpc"
212_libproc=	libproc
213_librtld_db=	librtld_db
214.endif
215
216.if ${MK_OPENSSL} != "no"
217_libmp=		libmp
218.endif
219
220.if ${MK_LIBCPLUSPLUS} != "no"
221_libcxxrt=	libcxxrt
222_libcplusplus=	libc++
223.endif
224
225.if ${MK_PMC} != "no"
226_libpmc=	libpmc
227.endif
228
229.if ${MK_SENDMAIL} != "no"
230_libmilter=	libmilter
231_libsm=		libsm
232_libsmdb=	libsmdb
233_libsmutil=	libsmutil
234.endif
235
236.if ${MK_TELNET} != "no"
237_libtelnet=	libtelnet
238.endif
239
240.if ${MK_USB} != "no"
241_libusbhid=	libusbhid
242_libusb=	libusb
243.endif
244
245.include <bsd.subdir.mk>
246