xref: /freebsd/lib/Makefile (revision 2f02600abfddfc4e9f20dd384a2e729b451e16bd)
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.
158f8790cdSDag-Erling Smørgrav# libldns must be built before libunbound.
16a04f2acdSJosef Karthauser# msun must be built before libg++ and libstdc++.
17ccdee0d9SMark Murray# libmd must be built before libatm, libopie, libradius, and libtacplus.
18af5b5a0fSRong-En Fan# ncurses must be built before libdialog, libedit and libreadline.
19360b288fSHartmut Brandt# libnetgraph must be built before libbsnmp/modules/snmp_netgraph.
2014b42810SKris Kennaway# libopie must be built before libpam.
2160da54eeSJohn Polstra# libradius must be built before libpam.
2276ed168aSMark Murray# librpcsvc must be built before libpam.
2397b877c9SDag-Erling Smørgrav# libsbuf must be built before libcam.
2460da54eeSJohn Polstra# libtacplus must be built before libpam.
25c5da4b13SBruce Evans# libutil must be built before libpam.
2697b877c9SDag-Erling Smørgrav# libypclnt must be built before libpam.
278f55a568SDoug Rabson# libgssapi must be built before librpcsec_gss
28c9811e98SBruce Evans#
29c9811e98SBruce Evans# Otherwise, the SUBDIR list should be in alphabetical order.
30eae951c9SWarner Losh#
31eae951c9SWarner Losh# Except it appears bind needs to be compiled last
32c9811e98SBruce Evans
339b3e440bSWarner LoshSUBDIR_ORDERED=	${_csu} \
349b3e440bSWarner Losh	libc \
35091b8336SPeter Wemm	libc_nonshared \
369b3e440bSWarner Losh	libbsm \
379b3e440bSWarner Losh	libauditd \
38*2f02600aSPawel Jakub Dawidek	libutil \
39*2f02600aSPawel Jakub Dawidek	libpjdlog \
4039cd938cSEd Schouten	libcompiler_rt \
419b3e440bSWarner Losh	libcrypt \
429b3e440bSWarner Losh	libelf \
43ad30f8e7SGabor Kovesdan	${_libiconv_modules} \
449b3e440bSWarner Losh	libkvm \
4571b5e1bbSDag-Erling Smørgrav	${_libldns} \
469b3e440bSWarner Losh	msun \
479b3e440bSWarner Losh	libmd \
489b3e440bSWarner Losh	ncurses \
499b3e440bSWarner Losh	${_libnetgraph} \
509b3e440bSWarner Losh	libradius \
519b3e440bSWarner Losh	librpcsvc \
529b3e440bSWarner Losh	libsbuf \
539b3e440bSWarner Losh	libtacplus \
5449c8e5e7SDimitry Andric	${_libypclnt} \
5549c8e5e7SDimitry Andric	${_libcxxrt} \
5649c8e5e7SDimitry Andric	${_libcplusplus}
579b3e440bSWarner Losh
580e46933cSStanislav Sedov.if ${MK_KERBEROS_SUPPORT} != "no"
590e46933cSStanislav SedovSUBDIR_ORDERED+=	libcom_err
600e46933cSStanislav Sedov.endif
610e46933cSStanislav Sedov
629b3e440bSWarner LoshSUBDIR=	${SUBDIR_ORDERED} \
639b3e440bSWarner Losh	libalias \
649b3e440bSWarner Losh	libarchive \
659b3e440bSWarner Losh	${_libatm} \
669b3e440bSWarner Losh	libbegemot \
6739cd938cSEd Schouten	libblocksruntime \
689b3e440bSWarner Losh	${_libbluetooth} \
699b3e440bSWarner Losh	${_libbsnmp} \
709b3e440bSWarner Losh	libbz2 \
719b3e440bSWarner Losh	libcalendar \
729b3e440bSWarner Losh	libcam \
739b3e440bSWarner Losh	libcompat \
749b3e440bSWarner Losh	libdevinfo \
759b3e440bSWarner Losh	libdevstat \
769b3e440bSWarner Losh	libdwarf \
779b3e440bSWarner Losh	libedit \
789b3e440bSWarner Losh	${_libefi} \
794b1fb8ffSEd Maste	libexecinfo \
809b3e440bSWarner Losh	libexpat \
819b3e440bSWarner Losh	libfetch \
829b3e440bSWarner Losh	libgeom \
839b3e440bSWarner Losh	${_libgpib} \
849b3e440bSWarner Losh	${_libgssapi} \
859b3e440bSWarner Losh	${_librpcsec_gss} \
869b3e440bSWarner Losh	libipsec \
879b3e440bSWarner Losh	${_libipx} \
889b3e440bSWarner Losh	libjail \
899b3e440bSWarner Losh	libkiconv \
9081ad8388SMartin Matuska	liblzma \
919b3e440bSWarner Losh	libmagic \
92cc4842a1SUlrich Spörlein	libmandoc \
939b3e440bSWarner Losh	libmemstat \
949b3e440bSWarner Losh	${_libmilter} \
959b3e440bSWarner Losh	${_libmp} \
967f725bcdSGrzegorz Bernacki	${_libnandfs} \
976bea8766SBrooks Davis	libnetbsd \
989b3e440bSWarner Losh	${_libngatm} \
9936da5199SPawel Jakub Dawidek	libnv \
1009b3e440bSWarner Losh	libopie \
1019b3e440bSWarner Losh	libpam \
1029b3e440bSWarner Losh	libpcap \
1039b3e440bSWarner Losh	${_libpmc} \
10454bb94d7SRui Paulo	${_libproc} \
1050daf62d9SStanislav Sedov	libprocstat \
1069b3e440bSWarner Losh	librt \
107fb05b666SRui Paulo	${_librtld_db} \
1089b3e440bSWarner Losh	${_libsdp} \
1099b3e440bSWarner Losh	${_libsm} \
110237abf0cSDavide Italiano	${_libsmb} \
1119b3e440bSWarner Losh	${_libsmdb} \
1129b3e440bSWarner Losh	${_libsmutil} \
1139b3e440bSWarner Losh	libstand \
1146486b015SJeremie Le Hen	libstdbuf \
115fc6f0665SEd Schouten	libstdthreads \
1169b3e440bSWarner Losh	${_libtelnet} \
1179b3e440bSWarner Losh	${_libthr} \
1189b3e440bSWarner Losh	libthread_db \
1199b3e440bSWarner Losh	libufs \
1209b3e440bSWarner Losh	libugidfw \
1219b3e440bSWarner Losh	libulog \
1228f8790cdSDag-Erling Smørgrav	${_libunbound} \
1239b3e440bSWarner Losh	${_libusbhid} \
1249b3e440bSWarner Losh	${_libusb} \
1259b3e440bSWarner Losh	${_libvgl} \
126366f6083SPeter Grehan	${_libvmmapi} \
1279b3e440bSWarner Losh	libwrap \
1289b3e440bSWarner Losh	liby \
129e51c53f3SBaptiste Daroussin	libyaml \
1309b3e440bSWarner Losh	libz \
131c175365cSMarcel Moolenaar	${_atf} \
132cc21b86fSJulio Merino	${_clang} \
133cc21b86fSJulio Merino	${_tests}
13458f0484fSRodney W. Grimes
1352bef81cfSWarner Losh.if exists(${.CURDIR}/csu/${MACHINE_ARCH}-elf)
1362bef81cfSWarner Losh_csu=csu/${MACHINE_ARCH}-elf
137b12277d1SNathan Whitehorn.elif exists(${.CURDIR}/csu/${MACHINE_ARCH})
138b12277d1SNathan Whitehorn_csu=csu/${MACHINE_ARCH}
13925faff34SWarner Losh.elif exists(${.CURDIR}/csu/${MACHINE_CPUARCH}/Makefile)
14025faff34SWarner Losh_csu=csu/${MACHINE_CPUARCH}
14156a91a6fSDavid E. O'Brien.else
14256a91a6fSDavid E. O'Brien_csu=csu
143b09f41a4SJohn Birrell.endif
144b09f41a4SJohn Birrell
145690f477dSSam Leffler# NB: keep these sorted by MK_* knobs
146690f477dSSam Leffler
147e1fe3dbaSRuslan Ermilov.if ${MK_ATM} != "no"
1489e9dbe04SHartmut Brandt_libngatm=	libngatm
1495e1847b4SPoul-Henning Kamp.endif
1505e1847b4SPoul-Henning Kamp
151e1fe3dbaSRuslan Ermilov.if ${MK_BLUETOOTH} != "no"
1520986ab12SMaksim Yevmenkin_libbluetooth=	libbluetooth
1530986ab12SMaksim Yevmenkin_libsdp=	libsdp
15418d948adSMaksim Yevmenkin.endif
15523d1e148SMaksim Yevmenkin
156690f477dSSam Leffler.if ${MK_BSNMP} != "no"
157690f477dSSam Leffler_libbsnmp=	libbsnmp
158690f477dSSam Leffler.endif
159690f477dSSam Leffler
160bfc72ed5SEd Schouten.if ${MK_CLANG} != "no" && !defined(COMPAT_32BIT)
1616513cfc8SRoman Divacky_clang=		clang
1626513cfc8SRoman Divacky.endif
1636513cfc8SRoman Divacky
164690f477dSSam Leffler.if ${MK_GPIB} != "no"
165690f477dSSam Leffler_libgpib=	libgpib
166690f477dSSam Leffler.endif
167690f477dSSam Leffler
1686dc51ecaSRuslan Ermilov.if ${MK_GSSAPI} != "no"
1693fe21f77SDoug Barton_libgssapi=	libgssapi
1708f55a568SDoug Rabson_librpcsec_gss=	librpcsec_gss
1713fe21f77SDoug Barton.endif
1723fe21f77SDoug Barton
173ad30f8e7SGabor Kovesdan.if ${MK_ICONV} != "no"
174ad30f8e7SGabor Kovesdan_libiconv_modules=	libiconv_modules
175ad30f8e7SGabor Kovesdan.endif
176ad30f8e7SGabor Kovesdan
177cea557adSRuslan Ermilov.if ${MK_IPX} != "no"
178cea557adSRuslan Ermilov_libipx=	libipx
179cea557adSRuslan Ermilov.endif
180cea557adSRuslan Ermilov
1817b5038d7SDag-Erling Smørgrav.if ${MK_LDNS} != "no"
1827b5038d7SDag-Erling Smørgrav_libldns=	libldns
1837b5038d7SDag-Erling Smørgrav.endif
1847b5038d7SDag-Erling Smørgrav
18535e370a2SDag-Erling Smørgrav.if ${MK_LIBCPLUSPLUS} != "no"
18635e370a2SDag-Erling Smørgrav_libcxxrt=	libcxxrt
18735e370a2SDag-Erling Smørgrav_libcplusplus=	libc++
18835e370a2SDag-Erling Smørgrav.endif
18935e370a2SDag-Erling Smørgrav
190690f477dSSam Leffler.if ${MK_LIBTHR} != "no"
191690f477dSSam Leffler_libthr=	libthr
192690f477dSSam Leffler.endif
193690f477dSSam Leffler
1947f725bcdSGrzegorz Bernacki.if ${MK_NAND} != "no"
1957f725bcdSGrzegorz Bernacki_libnandfs=	libnandfs
1967f725bcdSGrzegorz Bernacki.endif
1977f725bcdSGrzegorz Bernacki
198690f477dSSam Leffler.if ${MK_NETGRAPH} != "no"
199690f477dSSam Leffler_libnetgraph=	libnetgraph
200690f477dSSam Leffler.endif
201690f477dSSam Leffler
202690f477dSSam Leffler.if ${MK_NIS} != "no"
203690f477dSSam Leffler_libypclnt=	libypclnt
204690f477dSSam Leffler.endif
205690f477dSSam Leffler
20625faff34SWarner Losh.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
207237abf0cSDavide Italiano_libsmb=	libsmb
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
219237abf0cSDavide Italiano_libsmb=	libsmb
220e108ac65SMarcel Moolenaar.endif
221e108ac65SMarcel Moolenaar
22207d39325SOleksandr Tymoshenko.if ${MACHINE_CPUARCH} == "mips"
22307d39325SOleksandr Tymoshenko_libproc=	libproc
22407d39325SOleksandr Tymoshenko_librtld_db=	librtld_db
22507d39325SOleksandr Tymoshenko.endif
22607d39325SOleksandr Tymoshenko
227c7570492SJustin Hibbits.if ${MACHINE_CPUARCH} == "powerpc"
228c7570492SJustin Hibbits_libproc=	libproc
229c7570492SJustin Hibbits_librtld_db=	librtld_db
230237abf0cSDavide Italiano_libsmb=	libsmb
231237abf0cSDavide Italiano.endif
232237abf0cSDavide Italiano
233237abf0cSDavide Italiano.if ${MACHINE_CPUARCH} == "sparc64"
234237abf0cSDavide Italiano_libsmb=	libsmb
235c7570492SJustin Hibbits.endif
236c7570492SJustin Hibbits
237690f477dSSam Leffler.if ${MK_OPENSSL} != "no"
238690f477dSSam Leffler_libmp=		libmp
239690f477dSSam Leffler.endif
240690f477dSSam Leffler
241690f477dSSam Leffler.if ${MK_PMC} != "no"
242690f477dSSam Leffler_libpmc=	libpmc
243690f477dSSam Leffler.endif
244690f477dSSam Leffler
245690f477dSSam Leffler.if ${MK_SENDMAIL} != "no"
246690f477dSSam Leffler_libmilter=	libmilter
247690f477dSSam Leffler_libsm=		libsm
248690f477dSSam Leffler_libsmdb=	libsmdb
249690f477dSSam Leffler_libsmutil=	libsmutil
250690f477dSSam Leffler.endif
251690f477dSSam Leffler
252690f477dSSam Leffler.if ${MK_TELNET} != "no"
253690f477dSSam Leffler_libtelnet=	libtelnet
254e9043a12SMike Makonnen.endif
255e9043a12SMike Makonnen
256e01d128aSJulio Merino.if ${MK_TESTS} != "no"
257e01d128aSJulio Merino_atf=		atf
258cc21b86fSJulio Merino_tests=		tests
259e01d128aSJulio Merino.endif
260e01d128aSJulio Merino
2618f8790cdSDag-Erling Smørgrav.if ${MK_UNBOUND} != "no"
2628f8790cdSDag-Erling Smørgrav_libunbound=	libunbound
2638f8790cdSDag-Erling Smørgrav.endif
2648f8790cdSDag-Erling Smørgrav
265e1fe3dbaSRuslan Ermilov.if ${MK_USB} != "no"
266f3e5ff40SBruce Evans_libusbhid=	libusbhid
2676df55934SAndrew Thompson_libusb=	libusb
268a8ec1b48SMaxim Sobolev.endif
269a8ec1b48SMaxim Sobolev
2707be23620SBrooks Davis.if !defined(LIBRARIES_ONLY)
2717c83e443STim Kientzleafterinstall:
2727be23620SBrooks Davis	${INSTALL_SYMLINK} ../include ${DESTDIR}/usr/lib/include
2737be23620SBrooks Davis.endif
2747c83e443STim Kientzle
27558f0484fSRodney W. Grimes.include <bsd.subdir.mk>
276