Makefile revision 242723
134689Sbde#	@(#)Makefile	8.1 (Berkeley) 6/4/93
250476Speter# $FreeBSD: head/lib/Makefile 242723 2012-11-07 23:45:09Z jhibbits $
31573Srgrimes
4156813Sru.include <bsd.own.mk>
5156813Sru
634689Sbde# To satisfy shared library or ELF linkage when only the libraries being
734689Sbde# built are visible:
834689Sbde#
938752Sbde# csu must be built before all shared libaries for ELF.
10173017Sru# libc must be built before all other shared libraries.
11228989Srwatson# libbsm must be built before libauditd.
12204738Simp# libcom_err must be built before libpam.
13204738Simp# libcrypt must be built before libpam.
1481133Stmm# libkvm must be built before libdevstat.
1559897Sjoe# msun must be built before libg++ and libstdc++.
1679471Smarkm# libmd must be built before libatm, libopie, libradius, and libtacplus.
17166131Srafan# ncurses must be built before libdialog, libedit and libreadline.
18122568Sharti# libnetgraph must be built before libbsnmp/modules/snmp_netgraph.
1959353Skris# libopie must be built before libpam.
2041257Sjdp# libradius must be built before libpam.
2182355Smarkm# librpcsvc must be built before libpam.
2294690Sdes# libsbuf must be built before libcam.
2341257Sjdp# libtacplus must be built before libpam.
2456081Sbde# libutil must be built before libpam.
2594690Sdes# libypclnt must be built before libpam.
26181344Sdfr# libgssapi must be built before librpcsec_gss
2734689Sbde#
2834689Sbde# Otherwise, the SUBDIR list should be in alphabetical order.
29204738Simp#
30204738Simp# Except it appears bind needs to be compiled last
3134689Sbde
32205113SimpSUBDIR_ORDERED=	${_csu} \
33205113Simp	libc \
34205113Simp	libbsm \
35205113Simp	libauditd \
36215127Sed	libcompiler_rt \
37205113Simp	libcrypt \
38205113Simp	libelf \
39219019Sgabor	${_libiconv_modules} \
40205113Simp	libkvm \
41205113Simp	msun \
42205113Simp	libmd \
43205113Simp	ncurses \
44205113Simp	${_libnetgraph} \
45205113Simp	libradius \
46205113Simp	librpcsvc \
47205113Simp	libsbuf \
48205113Simp	libtacplus \
49205113Simp	libutil \
50227987Sdim	${_libypclnt} \
51227987Sdim	${_libcxxrt} \
52227987Sdim	${_libcplusplus}
53205113Simp
54233337Sstas.if ${MK_KERBEROS_SUPPORT} != "no"
55233337SstasSUBDIR_ORDERED+=	libcom_err
56233337Sstas.endif
57233337Sstas
58205113SimpSUBDIR=	${SUBDIR_ORDERED} \
59205113Simp	libalias \
60205113Simp	libarchive \
61205113Simp	${_libatm} \
62205113Simp	libbegemot \
63215127Sed	libblocksruntime \
64205113Simp	${_libbluetooth} \
65205113Simp	${_libbsnmp} \
66205113Simp	libbz2 \
67205113Simp	libcalendar \
68205113Simp	libcam \
69205113Simp	libcompat \
70205113Simp	libdevinfo \
71205113Simp	libdevstat \
72205113Simp	libdisk \
73205113Simp	libdwarf \
74205113Simp	libedit \
75205113Simp	${_libefi} \
76205113Simp	libexpat \
77205113Simp	libfetch \
78205113Simp	libgeom \
79205113Simp	${_libgpib} \
80205113Simp	${_libgssapi} \
81205113Simp	${_librpcsec_gss} \
82205113Simp	libipsec \
83205113Simp	${_libipx} \
84205113Simp	libjail \
85205113Simp	libkiconv \
86207842Smm	liblzma \
87205113Simp	libmagic \
88241774Suqs	libmandoc \
89205113Simp	libmemstat \
90205113Simp	${_libmilter} \
91205113Simp	${_libmp} \
92235537Sgber	${_libnandfs} \
93205113Simp	${_libngatm} \
94205113Simp	libopie \
95205113Simp	libpam \
96205113Simp	libpcap \
97205113Simp	${_libpmc} \
98210682Srpaulo	${_libproc} \
99221807Sstas	libprocstat \
100205113Simp	librt \
101210690Srpaulo	${_librtld_db} \
102205113Simp	${_libsdp} \
103205113Simp	${_libsm} \
104205113Simp	${_libsmdb} \
105205113Simp	${_libsmutil} \
106205113Simp	libstand \
107234772Sjlh	libstdbuf \
108228904Sed	libstdthreads \
109205113Simp	${_libtelnet} \
110205113Simp	${_libthr} \
111205113Simp	libthread_db \
112205113Simp	libufs \
113205113Simp	libugidfw \
114205113Simp	libulog \
115205113Simp	${_libusbhid} \
116205113Simp	${_libusb} \
117205113Simp	${_libvgl} \
118205113Simp	libwrap \
119205113Simp	liby \
120205113Simp	libz \
121241823Smarcel	${_atf} \
122208964Srdivacky	${_bind} \
123208964Srdivacky	${_clang}
12434689Sbde
125211759Simp.if exists(${.CURDIR}/csu/${MACHINE_ARCH}-elf)
126211759Simp_csu=csu/${MACHINE_ARCH}-elf
127211934Snwhitehorn.elif exists(${.CURDIR}/csu/${MACHINE_ARCH})
128211934Snwhitehorn_csu=csu/${MACHINE_ARCH}
129211725Simp.elif exists(${.CURDIR}/csu/${MACHINE_CPUARCH}/Makefile)
130211725Simp_csu=csu/${MACHINE_CPUARCH}
13172309Sobrien.else
13272309Sobrien_csu=csu
1331573Srgrimes.endif
1341573Srgrimes
135183242Ssam# NB: keep these sorted by MK_* knobs
136183242Ssam
137241823Smarcel.if ${MK_ATF} != "no"
138241823Smarcel_atf=		atf
139241823Smarcel.endif
140241823Smarcel
141156813Sru.if ${MK_ATM} != "no"
142121340Sharti_libngatm=	libngatm
143119508Sphk.endif
144119508Sphk
145156813Sru.if ${MK_BIND} != "no"
146135549Sdes_bind=		bind
14753922Speter.endif
14853922Speter
149156813Sru.if ${MK_BLUETOOTH} != "no"
150125123Semax_libbluetooth=	libbluetooth
151125123Semax_libsdp=	libsdp
152125123Semax.endif
153131768Semax
154183242Ssam.if ${MK_BSNMP} != "no"
155183242Ssam_libbsnmp=	libbsnmp
156183242Ssam.endif
157183242Ssam
158209400Sed.if ${MK_CLANG} != "no" && !defined(COMPAT_32BIT)
159208964Srdivacky_clang=		clang
160208964Srdivacky.endif
161208964Srdivacky
162183242Ssam.if ${MK_GPIB} != "no"
163183242Ssam_libgpib=	libgpib
164183242Ssam.endif
165183242Ssam
166174548Sru.if ${MK_GSSAPI} != "no"
167174519Sdougb_libgssapi=	libgssapi
168181344Sdfr_librpcsec_gss=	librpcsec_gss
169174519Sdougb.endif
170174519Sdougb
171219019Sgabor.if ${MK_ICONV} != "no"
172219019Sgabor_libiconv_modules=	libiconv_modules
173219019Sgabor.endif
174219019Sgabor
175156905Sru.if ${MK_IPX} != "no"
176156905Sru_libipx=	libipx
177156905Sru.endif
178156905Sru
179183242Ssam.if ${MK_LIBTHR} != "no"
180183242Ssam_libthr=	libthr
181183242Ssam.endif
182183242Ssam
183235537Sgber.if ${MK_NAND} != "no"
184235537Sgber_libnandfs=	libnandfs
185235537Sgber.endif
186235537Sgber
187183242Ssam.if ${MK_NETGRAPH} != "no"
188183242Ssam_libnetgraph=	libnetgraph
189183242Ssam.endif
190183242Ssam
191183242Ssam.if ${MK_NIS} != "no"
192183242Ssam_libypclnt=	libypclnt
193183242Ssam.endif
194183242Ssam
195211725Simp.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
19634689Sbde_libvgl=	libvgl
197210682Srpaulo_libproc=	libproc
198210690Srpaulo_librtld_db=	librtld_db
19936026Sjb.endif
20034689Sbde
201211725Simp.if ${MACHINE_CPUARCH} == "ia64"
202203181Smarcel_libefi=	libefi
203161524Smarcel.endif
204161524Smarcel
205233413Sgonzo.if ${MACHINE_CPUARCH} == "mips"
206233413Sgonzo_libproc=	libproc
207233413Sgonzo_librtld_db=	librtld_db
208233413Sgonzo.endif
209233413Sgonzo
210242723Sjhibbits.if ${MACHINE_CPUARCH} == "powerpc"
211242723Sjhibbits_libproc=	libproc
212242723Sjhibbits_librtld_db=	librtld_db
213242723Sjhibbits.endif
214242723Sjhibbits
215183242Ssam.if ${MK_OPENSSL} != "no"
216183242Ssam_libmp=		libmp
217117797Smtm.endif
218117797Smtm
219227987Sdim.if ${MK_LIBCPLUSPLUS} != "no"
220227987Sdim_libcxxrt=	libcxxrt
221227987Sdim_libcplusplus=	libc++
222227987Sdim.endif
223227987Sdim
224183242Ssam.if ${MK_PMC} != "no"
225183242Ssam_libpmc=	libpmc
226129225Scognet.endif
227129225Scognet
228183242Ssam.if ${MK_SENDMAIL} != "no"
229183242Ssam_libmilter=	libmilter
230183242Ssam_libsm=		libsm
231183242Ssam_libsmdb=	libsmdb
232183242Ssam_libsmutil=	libsmutil
233126799Sphk.endif
234126799Sphk
235183242Ssam.if ${MK_TELNET} != "no"
236183242Ssam_libtelnet=	libtelnet
237141403Sphk.endif
238141403Sphk
239183242Ssam.if ${MK_USB} != "no"
240183242Ssam_libusbhid=	libusbhid
241189589Sthompsa_libusb=	libusb
242183242Ssam.endif
243183242Ssam
2441573Srgrimes.include <bsd.subdir.mk>
245