xref: /freebsd/lib/Makefile (revision 7be2362060da1bd780f8590fa8e606db0916cbbc)
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}
539b3e440bSWarner Losh
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	libdwarf \
739b3e440bSWarner Losh	libedit \
749b3e440bSWarner Losh	${_libefi} \
759b3e440bSWarner Losh	libexpat \
769b3e440bSWarner Losh	libfetch \
779b3e440bSWarner Losh	libgeom \
789b3e440bSWarner Losh	${_libgpib} \
799b3e440bSWarner Losh	${_libgssapi} \
809b3e440bSWarner Losh	${_librpcsec_gss} \
819b3e440bSWarner Losh	libipsec \
829b3e440bSWarner Losh	${_libipx} \
839b3e440bSWarner Losh	libjail \
849b3e440bSWarner Losh	libkiconv \
857b5038d7SDag-Erling Smørgrav	${_libldns} \
8681ad8388SMartin Matuska	liblzma \
879b3e440bSWarner Losh	libmagic \
88cc4842a1SUlrich Spörlein	libmandoc \
899b3e440bSWarner Losh	libmemstat \
909b3e440bSWarner Losh	${_libmilter} \
919b3e440bSWarner Losh	${_libmp} \
927f725bcdSGrzegorz Bernacki	${_libnandfs} \
936bea8766SBrooks 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} \
119366f6083SPeter Grehan	${_libvmmapi} \
1209b3e440bSWarner Losh	libwrap \
1219b3e440bSWarner Losh	liby \
122e51c53f3SBaptiste Daroussin	libyaml \
1239b3e440bSWarner Losh	libz \
124c175365cSMarcel Moolenaar	${_atf} \
1256513cfc8SRoman Divacky	${_bind} \
1266513cfc8SRoman Divacky	${_clang}
12758f0484fSRodney W. Grimes
1282bef81cfSWarner Losh.if exists(${.CURDIR}/csu/${MACHINE_ARCH}-elf)
1292bef81cfSWarner Losh_csu=csu/${MACHINE_ARCH}-elf
130b12277d1SNathan Whitehorn.elif exists(${.CURDIR}/csu/${MACHINE_ARCH})
131b12277d1SNathan Whitehorn_csu=csu/${MACHINE_ARCH}
13225faff34SWarner Losh.elif exists(${.CURDIR}/csu/${MACHINE_CPUARCH}/Makefile)
13325faff34SWarner Losh_csu=csu/${MACHINE_CPUARCH}
13456a91a6fSDavid E. O'Brien.else
13556a91a6fSDavid E. O'Brien_csu=csu
136b09f41a4SJohn Birrell.endif
137b09f41a4SJohn Birrell
138690f477dSSam Leffler# NB: keep these sorted by MK_* knobs
139690f477dSSam Leffler
140c175365cSMarcel Moolenaar.if ${MK_ATF} != "no"
141c175365cSMarcel Moolenaar_atf=		atf
142c175365cSMarcel Moolenaar.endif
143c175365cSMarcel Moolenaar
144e1fe3dbaSRuslan Ermilov.if ${MK_ATM} != "no"
1459e9dbe04SHartmut Brandt_libngatm=	libngatm
1465e1847b4SPoul-Henning Kamp.endif
1475e1847b4SPoul-Henning Kamp
148e1fe3dbaSRuslan Ermilov.if ${MK_BIND} != "no"
149cd3ee173SDag-Erling Smørgrav_bind=		bind
150072355e0SPeter Wemm.endif
151072355e0SPeter Wemm
152e1fe3dbaSRuslan Ermilov.if ${MK_BLUETOOTH} != "no"
1530986ab12SMaksim Yevmenkin_libbluetooth=	libbluetooth
1540986ab12SMaksim Yevmenkin_libsdp=	libsdp
15518d948adSMaksim Yevmenkin.endif
15623d1e148SMaksim Yevmenkin
157690f477dSSam Leffler.if ${MK_BSNMP} != "no"
158690f477dSSam Leffler_libbsnmp=	libbsnmp
159690f477dSSam Leffler.endif
160690f477dSSam Leffler
161bfc72ed5SEd Schouten.if ${MK_CLANG} != "no" && !defined(COMPAT_32BIT)
1626513cfc8SRoman Divacky_clang=		clang
1636513cfc8SRoman Divacky.endif
1646513cfc8SRoman Divacky
165690f477dSSam Leffler.if ${MK_GPIB} != "no"
166690f477dSSam Leffler_libgpib=	libgpib
167690f477dSSam Leffler.endif
168690f477dSSam Leffler
1696dc51ecaSRuslan Ermilov.if ${MK_GSSAPI} != "no"
1703fe21f77SDoug Barton_libgssapi=	libgssapi
1718f55a568SDoug Rabson_librpcsec_gss=	librpcsec_gss
1723fe21f77SDoug Barton.endif
1733fe21f77SDoug Barton
174ad30f8e7SGabor Kovesdan.if ${MK_ICONV} != "no"
175ad30f8e7SGabor Kovesdan_libiconv_modules=	libiconv_modules
176ad30f8e7SGabor Kovesdan.endif
177ad30f8e7SGabor Kovesdan
178cea557adSRuslan Ermilov.if ${MK_IPX} != "no"
179cea557adSRuslan Ermilov_libipx=	libipx
180cea557adSRuslan Ermilov.endif
181cea557adSRuslan Ermilov
1827b5038d7SDag-Erling Smørgrav.if ${MK_LDNS} != "no"
1837b5038d7SDag-Erling Smørgrav_libldns=	libldns
1847b5038d7SDag-Erling Smørgrav.endif
1857b5038d7SDag-Erling Smørgrav
18635e370a2SDag-Erling Smørgrav.if ${MK_LIBCPLUSPLUS} != "no"
18735e370a2SDag-Erling Smørgrav_libcxxrt=	libcxxrt
18835e370a2SDag-Erling Smørgrav_libcplusplus=	libc++
18935e370a2SDag-Erling Smørgrav.endif
19035e370a2SDag-Erling Smørgrav
191690f477dSSam Leffler.if ${MK_LIBTHR} != "no"
192690f477dSSam Leffler_libthr=	libthr
193690f477dSSam Leffler.endif
194690f477dSSam Leffler
1957f725bcdSGrzegorz Bernacki.if ${MK_NAND} != "no"
1967f725bcdSGrzegorz Bernacki_libnandfs=	libnandfs
1977f725bcdSGrzegorz Bernacki.endif
1987f725bcdSGrzegorz Bernacki
199690f477dSSam Leffler.if ${MK_NETGRAPH} != "no"
200690f477dSSam Leffler_libnetgraph=	libnetgraph
201690f477dSSam Leffler.endif
202690f477dSSam Leffler
203690f477dSSam Leffler.if ${MK_NIS} != "no"
204690f477dSSam Leffler_libypclnt=	libypclnt
205690f477dSSam Leffler.endif
206690f477dSSam Leffler
20725faff34SWarner Losh.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
208c9811e98SBruce Evans_libvgl=	libvgl
20954bb94d7SRui Paulo_libproc=	libproc
210fb05b666SRui Paulo_librtld_db=	librtld_db
211abbb0b30SMarcel Moolenaar.endif
212abbb0b30SMarcel Moolenaar
21370d8f36aSPeter Grehan.if ${MACHINE_CPUARCH} == "amd64"
21470d8f36aSPeter Grehan_libvmmapi=	libvmmapi
21570d8f36aSPeter Grehan.endif
21670d8f36aSPeter Grehan
21725faff34SWarner Losh.if ${MACHINE_CPUARCH} == "ia64"
218eb0a7e41SMarcel Moolenaar_libefi=	libefi
219e108ac65SMarcel Moolenaar.endif
220e108ac65SMarcel Moolenaar
22107d39325SOleksandr Tymoshenko.if ${MACHINE_CPUARCH} == "mips"
22207d39325SOleksandr Tymoshenko_libproc=	libproc
22307d39325SOleksandr Tymoshenko_librtld_db=	librtld_db
22407d39325SOleksandr Tymoshenko.endif
22507d39325SOleksandr Tymoshenko
226c7570492SJustin Hibbits.if ${MACHINE_CPUARCH} == "powerpc"
227c7570492SJustin Hibbits_libproc=	libproc
228c7570492SJustin Hibbits_librtld_db=	librtld_db
229c7570492SJustin Hibbits.endif
230c7570492SJustin Hibbits
231690f477dSSam Leffler.if ${MK_OPENSSL} != "no"
232690f477dSSam Leffler_libmp=		libmp
233690f477dSSam Leffler.endif
234690f477dSSam Leffler
235690f477dSSam Leffler.if ${MK_PMC} != "no"
236690f477dSSam Leffler_libpmc=	libpmc
237690f477dSSam Leffler.endif
238690f477dSSam Leffler
239690f477dSSam Leffler.if ${MK_SENDMAIL} != "no"
240690f477dSSam Leffler_libmilter=	libmilter
241690f477dSSam Leffler_libsm=		libsm
242690f477dSSam Leffler_libsmdb=	libsmdb
243690f477dSSam Leffler_libsmutil=	libsmutil
244690f477dSSam Leffler.endif
245690f477dSSam Leffler
246690f477dSSam Leffler.if ${MK_TELNET} != "no"
247690f477dSSam Leffler_libtelnet=	libtelnet
248e9043a12SMike Makonnen.endif
249e9043a12SMike Makonnen
250e1fe3dbaSRuslan Ermilov.if ${MK_USB} != "no"
251f3e5ff40SBruce Evans_libusbhid=	libusbhid
2526df55934SAndrew Thompson_libusb=	libusb
253a8ec1b48SMaxim Sobolev.endif
254a8ec1b48SMaxim Sobolev
255*7be23620SBrooks Davis.if !defined(LIBRARIES_ONLY)
2567c83e443STim Kientzleafterinstall:
257*7be23620SBrooks Davis	${INSTALL_SYMLINK} ../include ${DESTDIR}/usr/lib/include
258*7be23620SBrooks Davis.endif
2597c83e443STim Kientzle
26058f0484fSRodney W. Grimes.include <bsd.subdir.mk>
261