xref: /freebsd/lib/Makefile (revision 6bea8766443cc86412928fa25a6e6a4b70a0a3b0)
158f0484fSRodney W. Grimes#	@(#)Makefile	8.1 (Berkeley) 6/4/93
27f3dea24SPeter Wemm# $FreeBSD$
3c9811e98SBruce Evans
4e1fe3dbaSRuslan Ermilov.include <bsd.own.mk>
5e1fe3dbaSRuslan Ermilov
6c9811e98SBruce Evans# To satisfy shared library or ELF linkage when only the libraries being
7c9811e98SBruce Evans# built are visible:
8c9811e98SBruce Evans#
90f09aefaSBruce Evans# csu must be built before all shared libaries for ELF.
104064334fSRuslan Ermilov# libc must be built before all other shared libraries.
11719728bfSRobert Watson# libbsm must be built before libauditd.
12eae951c9SWarner Losh# libcom_err must be built before libpam.
13eae951c9SWarner Losh# libcrypt must be built before libpam.
14c4a5ef6eSThomas Moestl# libkvm must be built before libdevstat.
15a04f2acdSJosef Karthauser# msun must be built before libg++ and libstdc++.
16ccdee0d9SMark Murray# libmd must be built before libatm, libopie, libradius, and libtacplus.
17af5b5a0fSRong-En Fan# ncurses must be built before libdialog, libedit and libreadline.
18360b288fSHartmut Brandt# libnetgraph must be built before libbsnmp/modules/snmp_netgraph.
1914b42810SKris Kennaway# libopie must be built before libpam.
2060da54eeSJohn Polstra# libradius must be built before libpam.
2176ed168aSMark Murray# librpcsvc must be built before libpam.
2297b877c9SDag-Erling Smørgrav# libsbuf must be built before libcam.
2360da54eeSJohn Polstra# libtacplus must be built before libpam.
24c5da4b13SBruce Evans# libutil must be built before libpam.
2597b877c9SDag-Erling Smørgrav# libypclnt must be built before libpam.
268f55a568SDoug Rabson# libgssapi must be built before librpcsec_gss
27c9811e98SBruce Evans#
28c9811e98SBruce Evans# Otherwise, the SUBDIR list should be in alphabetical order.
29eae951c9SWarner Losh#
30eae951c9SWarner Losh# Except it appears bind needs to be compiled last
31c9811e98SBruce Evans
329b3e440bSWarner LoshSUBDIR_ORDERED=	${_csu} \
339b3e440bSWarner Losh	libc \
349b3e440bSWarner Losh	libbsm \
359b3e440bSWarner Losh	libauditd \
3639cd938cSEd Schouten	libcompiler_rt \
379b3e440bSWarner Losh	libcrypt \
389b3e440bSWarner Losh	libelf \
39ad30f8e7SGabor Kovesdan	${_libiconv_modules} \
409b3e440bSWarner Losh	libkvm \
419b3e440bSWarner Losh	msun \
429b3e440bSWarner Losh	libmd \
439b3e440bSWarner Losh	ncurses \
449b3e440bSWarner Losh	${_libnetgraph} \
459b3e440bSWarner Losh	libradius \
469b3e440bSWarner Losh	librpcsvc \
479b3e440bSWarner Losh	libsbuf \
489b3e440bSWarner Losh	libtacplus \
499b3e440bSWarner Losh	libutil \
5049c8e5e7SDimitry Andric	${_libypclnt} \
5149c8e5e7SDimitry Andric	${_libcxxrt} \
5249c8e5e7SDimitry Andric	${_libcplusplus}
537a984708SDavid Chisnall
540e46933cSStanislav Sedov.if ${MK_KERBEROS_SUPPORT} != "no"
550e46933cSStanislav SedovSUBDIR_ORDERED+=	libcom_err
560e46933cSStanislav Sedov.endif
570e46933cSStanislav Sedov
589b3e440bSWarner LoshSUBDIR=	${SUBDIR_ORDERED} \
599b3e440bSWarner Losh	libalias \
609b3e440bSWarner Losh	libarchive \
619b3e440bSWarner Losh	${_libatm} \
629b3e440bSWarner Losh	libbegemot \
6339cd938cSEd Schouten	libblocksruntime \
649b3e440bSWarner Losh	${_libbluetooth} \
659b3e440bSWarner Losh	${_libbsnmp} \
669b3e440bSWarner Losh	libbz2 \
679b3e440bSWarner Losh	libcalendar \
689b3e440bSWarner Losh	libcam \
699b3e440bSWarner Losh	libcompat \
709b3e440bSWarner Losh	libdevinfo \
719b3e440bSWarner Losh	libdevstat \
729b3e440bSWarner Losh	libdisk \
739b3e440bSWarner Losh	libdwarf \
749b3e440bSWarner Losh	libedit \
759b3e440bSWarner Losh	${_libefi} \
769b3e440bSWarner Losh	libexpat \
779b3e440bSWarner Losh	libfetch \
789b3e440bSWarner Losh	libgeom \
799b3e440bSWarner Losh	${_libgpib} \
809b3e440bSWarner Losh	${_libgssapi} \
819b3e440bSWarner Losh	${_librpcsec_gss} \
829b3e440bSWarner Losh	libipsec \
839b3e440bSWarner Losh	${_libipx} \
849b3e440bSWarner Losh	libjail \
859b3e440bSWarner Losh	libkiconv \
8681ad8388SMartin Matuska	liblzma \
879b3e440bSWarner Losh	libmagic \
88cc4842a1SUlrich Spörlein	libmandoc \
899b3e440bSWarner Losh	libmemstat \
909b3e440bSWarner Losh	${_libmilter} \
919b3e440bSWarner Losh	${_libmp} \
927f725bcdSGrzegorz Bernacki	${_libnandfs} \
93*6bea8766SBrooks Davis	libnetbsd \
949b3e440bSWarner Losh	${_libngatm} \
959b3e440bSWarner Losh	libopie \
969b3e440bSWarner Losh	libpam \
979b3e440bSWarner Losh	libpcap \
989b3e440bSWarner Losh	${_libpmc} \
9954bb94d7SRui Paulo	${_libproc} \
1000daf62d9SStanislav Sedov	libprocstat \
1019b3e440bSWarner Losh	librt \
102fb05b666SRui Paulo	${_librtld_db} \
1039b3e440bSWarner Losh	${_libsdp} \
1049b3e440bSWarner Losh	${_libsm} \
1059b3e440bSWarner Losh	${_libsmdb} \
1069b3e440bSWarner Losh	${_libsmutil} \
1079b3e440bSWarner Losh	libstand \
1086486b015SJeremie Le Hen	libstdbuf \
109fc6f0665SEd Schouten	libstdthreads \
1109b3e440bSWarner Losh	${_libtelnet} \
1119b3e440bSWarner Losh	${_libthr} \
1129b3e440bSWarner Losh	libthread_db \
1139b3e440bSWarner Losh	libufs \
1149b3e440bSWarner Losh	libugidfw \
1159b3e440bSWarner Losh	libulog \
1169b3e440bSWarner Losh	${_libusbhid} \
1179b3e440bSWarner Losh	${_libusb} \
1189b3e440bSWarner Losh	${_libvgl} \
1199b3e440bSWarner Losh	libwrap \
1209b3e440bSWarner Losh	liby \
1219b3e440bSWarner Losh	libz \
122c175365cSMarcel Moolenaar	${_atf} \
1236513cfc8SRoman Divacky	${_bind} \
1246513cfc8SRoman Divacky	${_clang}
12558f0484fSRodney W. Grimes
1262bef81cfSWarner Losh.if exists(${.CURDIR}/csu/${MACHINE_ARCH}-elf)
1272bef81cfSWarner Losh_csu=csu/${MACHINE_ARCH}-elf
128b12277d1SNathan Whitehorn.elif exists(${.CURDIR}/csu/${MACHINE_ARCH})
129b12277d1SNathan Whitehorn_csu=csu/${MACHINE_ARCH}
13025faff34SWarner Losh.elif exists(${.CURDIR}/csu/${MACHINE_CPUARCH}/Makefile)
13125faff34SWarner Losh_csu=csu/${MACHINE_CPUARCH}
13256a91a6fSDavid E. O'Brien.else
13356a91a6fSDavid E. O'Brien_csu=csu
134b09f41a4SJohn Birrell.endif
135b09f41a4SJohn Birrell
136690f477dSSam Leffler# NB: keep these sorted by MK_* knobs
137690f477dSSam Leffler
138c175365cSMarcel Moolenaar.if ${MK_ATF} != "no"
139c175365cSMarcel Moolenaar_atf=		atf
140c175365cSMarcel Moolenaar.endif
141c175365cSMarcel Moolenaar
142e1fe3dbaSRuslan Ermilov.if ${MK_ATM} != "no"
1439e9dbe04SHartmut Brandt_libngatm=	libngatm
1445e1847b4SPoul-Henning Kamp.endif
1455e1847b4SPoul-Henning Kamp
146e1fe3dbaSRuslan Ermilov.if ${MK_BIND} != "no"
147cd3ee173SDag-Erling Smørgrav_bind=		bind
148072355e0SPeter Wemm.endif
149072355e0SPeter Wemm
150e1fe3dbaSRuslan Ermilov.if ${MK_BLUETOOTH} != "no"
1510986ab12SMaksim Yevmenkin_libbluetooth=	libbluetooth
1520986ab12SMaksim Yevmenkin_libsdp=	libsdp
15318d948adSMaksim Yevmenkin.endif
15423d1e148SMaksim Yevmenkin
155690f477dSSam Leffler.if ${MK_BSNMP} != "no"
156690f477dSSam Leffler_libbsnmp=	libbsnmp
157690f477dSSam Leffler.endif
158690f477dSSam Leffler
159bfc72ed5SEd Schouten.if ${MK_CLANG} != "no" && !defined(COMPAT_32BIT)
1606513cfc8SRoman Divacky_clang=		clang
1616513cfc8SRoman Divacky.endif
1626513cfc8SRoman Divacky
163690f477dSSam Leffler.if ${MK_GPIB} != "no"
164690f477dSSam Leffler_libgpib=	libgpib
165690f477dSSam Leffler.endif
166690f477dSSam Leffler
1676dc51ecaSRuslan Ermilov.if ${MK_GSSAPI} != "no"
1683fe21f77SDoug Barton_libgssapi=	libgssapi
1698f55a568SDoug Rabson_librpcsec_gss=	librpcsec_gss
1703fe21f77SDoug Barton.endif
1713fe21f77SDoug Barton
172ad30f8e7SGabor Kovesdan.if ${MK_ICONV} != "no"
173ad30f8e7SGabor Kovesdan_libiconv_modules=	libiconv_modules
174ad30f8e7SGabor Kovesdan.endif
175ad30f8e7SGabor Kovesdan
176cea557adSRuslan Ermilov.if ${MK_IPX} != "no"
177cea557adSRuslan Ermilov_libipx=	libipx
178cea557adSRuslan Ermilov.endif
179cea557adSRuslan Ermilov
180690f477dSSam Leffler.if ${MK_LIBTHR} != "no"
181690f477dSSam Leffler_libthr=	libthr
182690f477dSSam Leffler.endif
183690f477dSSam Leffler
1847f725bcdSGrzegorz Bernacki.if ${MK_NAND} != "no"
1857f725bcdSGrzegorz Bernacki_libnandfs=	libnandfs
1867f725bcdSGrzegorz Bernacki.endif
1877f725bcdSGrzegorz Bernacki
188690f477dSSam Leffler.if ${MK_NETGRAPH} != "no"
189690f477dSSam Leffler_libnetgraph=	libnetgraph
190690f477dSSam Leffler.endif
191690f477dSSam Leffler
192690f477dSSam Leffler.if ${MK_NIS} != "no"
193690f477dSSam Leffler_libypclnt=	libypclnt
194690f477dSSam Leffler.endif
195690f477dSSam Leffler
19625faff34SWarner Losh.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
197c9811e98SBruce Evans_libvgl=	libvgl
19854bb94d7SRui Paulo_libproc=	libproc
199fb05b666SRui Paulo_librtld_db=	librtld_db
200abbb0b30SMarcel Moolenaar.endif
201abbb0b30SMarcel Moolenaar
20225faff34SWarner Losh.if ${MACHINE_CPUARCH} == "ia64"
203eb0a7e41SMarcel Moolenaar_libefi=	libefi
204e108ac65SMarcel Moolenaar.endif
205e108ac65SMarcel Moolenaar
20607d39325SOleksandr Tymoshenko.if ${MACHINE_CPUARCH} == "mips"
20707d39325SOleksandr Tymoshenko_libproc=	libproc
20807d39325SOleksandr Tymoshenko_librtld_db=	librtld_db
20907d39325SOleksandr Tymoshenko.endif
21007d39325SOleksandr Tymoshenko
211c7570492SJustin Hibbits.if ${MACHINE_CPUARCH} == "powerpc"
212c7570492SJustin Hibbits_libproc=	libproc
213c7570492SJustin Hibbits_librtld_db=	librtld_db
214c7570492SJustin Hibbits.endif
215c7570492SJustin Hibbits
216690f477dSSam Leffler.if ${MK_OPENSSL} != "no"
217690f477dSSam Leffler_libmp=		libmp
218690f477dSSam Leffler.endif
219690f477dSSam Leffler
22049c8e5e7SDimitry Andric.if ${MK_LIBCPLUSPLUS} != "no"
22149c8e5e7SDimitry Andric_libcxxrt=	libcxxrt
22249c8e5e7SDimitry Andric_libcplusplus=	libc++
22349c8e5e7SDimitry Andric.endif
22449c8e5e7SDimitry Andric
225690f477dSSam Leffler.if ${MK_PMC} != "no"
226690f477dSSam Leffler_libpmc=	libpmc
227690f477dSSam Leffler.endif
228690f477dSSam Leffler
229690f477dSSam Leffler.if ${MK_SENDMAIL} != "no"
230690f477dSSam Leffler_libmilter=	libmilter
231690f477dSSam Leffler_libsm=		libsm
232690f477dSSam Leffler_libsmdb=	libsmdb
233690f477dSSam Leffler_libsmutil=	libsmutil
234690f477dSSam Leffler.endif
235690f477dSSam Leffler
236690f477dSSam Leffler.if ${MK_TELNET} != "no"
237690f477dSSam Leffler_libtelnet=	libtelnet
238e9043a12SMike Makonnen.endif
239e9043a12SMike Makonnen
240e1fe3dbaSRuslan Ermilov.if ${MK_USB} != "no"
241f3e5ff40SBruce Evans_libusbhid=	libusbhid
2426df55934SAndrew Thompson_libusb=	libusb
243a8ec1b48SMaxim Sobolev.endif
244a8ec1b48SMaxim Sobolev
24558f0484fSRodney W. Grimes.include <bsd.subdir.mk>
246