xref: /freebsd/lib/Makefile (revision 100353cfbf882e23c911300ebd0cb458bd3ee975)
158f0484fSRodney W. Grimes#	@(#)Makefile	8.1 (Berkeley) 6/4/93
27f3dea24SPeter Wemm# $FreeBSD$
3c9811e98SBruce Evans
4c6063d0dSWarner Losh.include <src.opts.mk>
5e1fe3dbaSRuslan Ermilov
6fa6d79e8SBryan Drewery# The SUBDIR_BOOTSTRAP list is a small set of libraries which are used by many
7a1c70d69SIan Lepore# of the other libraries.  These are built first with a .WAIT between them
8a1c70d69SIan Lepore# and the main list to avoid needing a SUBDIR_DEPEND line on every library
9a1c70d69SIan Lepore# naming just these few items.
10c9811e98SBruce Evans
11fa6d79e8SBryan DrewerySUBDIR_BOOTSTRAP= \
12fa6d79e8SBryan Drewery	csu \
13b8fffe16SWarner Losh	.WAIT \
149b3e440bSWarner Losh	libc \
15091b8336SPeter Wemm	libc_nonshared \
1639cd938cSEd Schouten	libcompiler_rt \
178028b78dSDimitry Andric	${_libclang_rt} \
18a1c70d69SIan Lepore	${_libcplusplus} \
1949c8e5e7SDimitry Andric	${_libcxxrt} \
20a1c70d69SIan Lepore	libelf \
21cd0d51baSKyle Evans	libssp \
22cd0d51baSKyle Evans	libssp_nonshared \
23a1c70d69SIan Lepore	msun
249b3e440bSWarner Losh
25a1c70d69SIan Lepore# The main list; please keep these sorted alphabetically.
2618de62a9SAlex Richardson# The only exception is sqlite3: we place it at the start of the list since it
2718de62a9SAlex Richardson# takes a long time to build and starting it first improves parallelism.
280e46933cSStanislav Sedov
29fa6d79e8SBryan DrewerySUBDIR=	${SUBDIR_BOOTSTRAP} \
30b8fffe16SWarner Losh	.WAIT \
3118de62a9SAlex Richardson	libsqlite3 \
32e4b0a90eSBrooks Davis	geom \
33*100353cfSJakub Wojciech Klama	lib9p \
349b3e440bSWarner Losh	libalias \
359b3e440bSWarner Losh	libarchive \
36a1c70d69SIan Lepore	libauditd \
379b3e440bSWarner Losh	libbegemot \
3839cd938cSEd Schouten	libblocksruntime \
3981bd3d89SAdrian Chadd	libbsdstat \
40a1c70d69SIan Lepore	libbsm \
419b3e440bSWarner Losh	libbz2 \
429b3e440bSWarner Losh	libcalendar \
439b3e440bSWarner Losh	libcam \
447a6e3cf8SMariusz Zaborski	libcapsicum \
45ceb36bc9SMariusz Zaborski	libcasper \
469b3e440bSWarner Losh	libcompat \
47a1c70d69SIan Lepore	libcrypt \
4864de8019SJohn Baldwin	libdevctl \
499b3e440bSWarner Losh	libdevinfo \
509b3e440bSWarner Losh	libdevstat \
517c807d77SEd Maste	libdl \
529b3e440bSWarner Losh	libdwarf \
539b3e440bSWarner Losh	libedit \
545f8eed2fSEd Maste	libelftc \
55c5ea81f7SEd Maste	libevent1 \
564b1fb8ffSEd Maste	libexecinfo \
579b3e440bSWarner Losh	libexpat \
589b3e440bSWarner Losh	libfetch \
59041394f3SDevin Teske	libfigpar \
60c4501804SEd Maste	libgcc_eh \
61c4501804SEd Maste	libgcc_s \
629b3e440bSWarner Losh	libgeom \
63ec214349SKristof Provost	libifconfig \
649b3e440bSWarner Losh	libipsec \
659b3e440bSWarner Losh	libjail \
669b3e440bSWarner Losh	libkiconv \
67a1c70d69SIan Lepore	libkvm \
68564b9ff2SBrooks Davis	liblua \
6981ad8388SMartin Matuska	liblzma \
709b3e440bSWarner Losh	libmemstat \
71a1c70d69SIan Lepore	libmd \
7243518607SKenneth D. Merry	libmt \
73127be1a7SAdrian Chadd	lib80211 \
746bea8766SBrooks Davis	libnetbsd \
755c4f8d80SVincenzo Maffione	libnetmap \
76a1c70d69SIan Lepore	libnv \
77a36eca08SCraig Rodrigues	libopenbsd \
789b3e440bSWarner Losh	libopie \
799b3e440bSWarner Losh	libpam \
8082fcadcdSBryan Drewery	libpathconv \
81f39bffc6SKonstantin Belousov	libpcap \
82a1c70d69SIan Lepore	libpjdlog \
83feb2ecc3SWarner Losh	libproc \
840daf62d9SStanislav Sedov	libprocstat \
85b37f6c98SKyle Evans	libregex \
86a1c70d69SIan Lepore	librpcsvc \
8735c05a4fSAdrian Chadd	librss \
889b3e440bSWarner Losh	librt \
89feb2ecc3SWarner Losh	librtld_db \
90a1c70d69SIan Lepore	libsbuf \
9191ee3463SIan Lepore	libsmb \
926486b015SJeremie Le Hen	libstdbuf \
93fc6f0665SEd Schouten	libstdthreads \
94d6fb4894SJohn Baldwin	libsysdecode \
95a1c70d69SIan Lepore	libtacplus \
969b3e440bSWarner Losh	libthread_db \
974ca4d6a8SBaptiste Daroussin	libucl \
989b3e440bSWarner Losh	libufs \
999b3e440bSWarner Losh	libugidfw \
1009b3e440bSWarner Losh	libulog \
101a1c70d69SIan Lepore	libutil \
1029b3e440bSWarner Losh	${_libvgl} \
1039b3e440bSWarner Losh	libwrap \
104d7790611SMarcel Moolenaar	libxo \
1059b3e440bSWarner Losh	liby \
1069b3e440bSWarner Losh	libz \
107e2290905SBaptiste Daroussin	libzstd \
108cd060b8dSEd Maste	ncurses
10958f0484fSRodney W. Grimes
110a1c70d69SIan Lepore# Inter-library dependencies.  When the makefile for a library contains LDADD
111a1c70d69SIan Lepore# libraries, those libraries should be listed as build order dependencies here.
112a1c70d69SIan Lepore
113e4b0a90eSBrooks DavisSUBDIR_DEPEND_geom=	libufs
114eb578fecSKyle EvansSUBDIR_DEPEND_googletest= libregex
115d567f909SBaptiste DaroussinSUBDIR_DEPEND_libarchive= libz libbz2 libexpat liblzma libmd libzstd
116a1c70d69SIan LeporeSUBDIR_DEPEND_libauditdm= libbsm
117a1c70d69SIan LeporeSUBDIR_DEPEND_libbsnmp= ${_libnetgraph}
118468a365dSBryan DrewerySUBDIR_DEPEND_libc++:= libcxxrt
119cd0d51baSKyle Evans# libssp_nonshared doesn't need to be linked into libc on every arch, but it is
120cd0d51baSKyle Evans# small enough to build that this bit of serialization is likely insignificant.
121cd0d51baSKyle EvansSUBDIR_DEPEND_libc= libcompiler_rt libssp_nonshared
122a1c70d69SIan LeporeSUBDIR_DEPEND_libcam= libsbuf
123c501d73cSMariusz ZaborskiSUBDIR_DEPEND_libcasper= libnv
124a1c70d69SIan LeporeSUBDIR_DEPEND_libdevstat= libkvm
1257fc89952SDevin TeskeSUBDIR_DEPEND_libdpv= libfigpar ncurses libutil
126a1c70d69SIan LeporeSUBDIR_DEPEND_libedit= ncurses
127a1c70d69SIan LeporeSUBDIR_DEPEND_libgeom= libexpat libsbuf
128bc53c94fSEnji CooperSUBDIR_DEPEND_librpcsec_gss= libgssapi
129a1c70d69SIan LeporeSUBDIR_DEPEND_libmagic= libz
130a1c70d69SIan LeporeSUBDIR_DEPEND_libmemstat= libkvm
131a1c70d69SIan LeporeSUBDIR_DEPEND_libopie= libmd
13231a741f4SEnji CooperSUBDIR_DEPEND_libpam= libcrypt libopie ${_libradius} librpcsvc libtacplus libutil ${_libypclnt} ${_libcom_err}
133a1c70d69SIan LeporeSUBDIR_DEPEND_libpjdlog= libutil
134a1c70d69SIan LeporeSUBDIR_DEPEND_libprocstat= libkvm libutil
135a1c70d69SIan LeporeSUBDIR_DEPEND_libradius= libmd
136a1c70d69SIan LeporeSUBDIR_DEPEND_libsmb= libkiconv
137b626f5a7SGlen BarberSUBDIR_DEPEND_libtacplus= libmd
138a1c70d69SIan LeporeSUBDIR_DEPEND_libulog= libmd
139a1c70d69SIan LeporeSUBDIR_DEPEND_libunbound= ${_libldns}
14053200025SRui PauloSUBDIR_DEPEND_liblzma= ${_libthr}
141f39bffc6SKonstantin Belousov.if ${MK_OFED} != "no"
142f39bffc6SKonstantin BelousovSUBDIR_DEPEND_libpcap= ofed
143f39bffc6SKonstantin Belousov.endif
144a1c70d69SIan Lepore
145690f477dSSam Leffler# NB: keep these sorted by MK_* knobs
146690f477dSSam Leffler
147cd060b8dSEd MasteSUBDIR.${MK_ATM}+=	libngatm
148a92958dfSSimon J. GerratySUBDIR.${MK_BEARSSL}+=	libbearssl libsecureboot
149cd060b8dSEd MasteSUBDIR.${MK_BLACKLIST}+=libblacklist
150cd060b8dSEd MasteSUBDIR.${MK_BLUETOOTH}+=libbluetooth libsdp
151cd060b8dSEd MasteSUBDIR.${MK_BSNMP}+=	libbsnmp
152cd060b8dSEd Maste
153cd060b8dSEd Maste.if !defined(COMPAT_32BIT) && !defined(COMPAT_SOFTFP)
154cd060b8dSEd MasteSUBDIR.${MK_CLANG}+=	clang
1555e1847b4SPoul-Henning Kamp.endif
1565e1847b4SPoul-Henning Kamp
157cd060b8dSEd MasteSUBDIR.${MK_CUSE}+= 	libcuse
158cd060b8dSEd MasteSUBDIR.${MK_CXX}+=	libdevdctl
1595f8eed2fSEd MasteSUBDIR.${MK_TOOLCHAIN}+=libpe
160f987297fSEd MasteSUBDIR.${MK_DIALOG}+=	libdpv
161cd060b8dSEd MasteSUBDIR.${MK_FILE}+=	libmagic
162cd060b8dSEd MasteSUBDIR.${MK_GPIO}+=	libgpio
163cd060b8dSEd MasteSUBDIR.${MK_GSSAPI}+=	libgssapi librpcsec_gss
164cd060b8dSEd MasteSUBDIR.${MK_ICONV}+=	libiconv_modules
165cd060b8dSEd MasteSUBDIR.${MK_KERBEROS_SUPPORT}+=	libcom_err
166cd060b8dSEd MasteSUBDIR.${MK_LDNS}+=	libldns
1671a13f2e6SEdward Tomasz NapieralaSUBDIR.${MK_STATS}+=	libstats
1687b5038d7SDag-Erling Smørgrav
1698028b78dSDimitry Andric# The libraries under libclang_rt can only be built by clang, and only make
1708028b78dSDimitry Andric# sense to build when clang is enabled at all.  Furthermore, they can only be
1718028b78dSDimitry Andric# built for certain architectures.
1728028b78dSDimitry Andric.if ${MK_CLANG} != "no" && ${COMPILER_TYPE} == "clang" && \
173b78ee15eSRuslan Bukin    (${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \
1741bb8eb56SDimitry Andric    ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "i386" || \
1751bb8eb56SDimitry Andric    ${MACHINE_CPUARCH} == "powerpc")
1768028b78dSDimitry Andric_libclang_rt=	libclang_rt
1778028b78dSDimitry Andric.endif
1788028b78dSDimitry Andric
17935e370a2SDag-Erling Smørgrav.if ${MK_LIBCPLUSPLUS} != "no"
18035e370a2SDag-Erling Smørgrav_libcxxrt=	libcxxrt
1818e69077bSDimitry Andric_libcplusplus=	libc++
1828e69077bSDimitry Andric_libcplusplus+=	libc++experimental
1838e69077bSDimitry Andric.endif
18435e370a2SDag-Erling Smørgrav
185cd060b8dSEd MasteSUBDIR.${MK_EFI}+=	libefivar
18643e25f47SEnji CooperSUBDIR.${MK_GOOGLETEST}+=	googletest
187cd060b8dSEd MasteSUBDIR.${MK_LIBTHR}+=	libthr
188cd060b8dSEd MasteSUBDIR.${MK_NETGRAPH}+=	libnetgraph
189cd060b8dSEd MasteSUBDIR.${MK_NIS}+=	libypclnt
190690f477dSSam Leffler
19125faff34SWarner Losh.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
192c9811e98SBruce Evans_libvgl=	libvgl
193abbb0b30SMarcel Moolenaar.endif
194abbb0b30SMarcel Moolenaar
195cde6fa28SRuslan Bukin.if ${MACHINE_CPUARCH} == "aarch64"
196cde6fa28SRuslan BukinSUBDIR.${MK_PMC}+=	libopencsd
197cde6fa28SRuslan Bukin.endif
198cde6fa28SRuslan Bukin
19970d8f36aSPeter Grehan.if ${MACHINE_CPUARCH} == "amd64"
20030b3274fSRuslan BukinSUBDIR.${MK_PMC}+=	libipt
201cd060b8dSEd MasteSUBDIR.${MK_BHYVE}+=	libvmmapi
20202629e46SEnji Cooper.endif
20370d8f36aSPeter Grehan
2046b3555c3SDimitry Andric.if ${MACHINE_ARCH} != "powerpc"
205b0840a28SDimitry AndricSUBDIR.${MK_OPENMP}+=	libomp
2066b3555c3SDimitry Andric.endif
207cd060b8dSEd MasteSUBDIR.${MK_OPENSSL}+=	libmp
208bc82609aSKyle EvansSUBDIR.${MK_PMC}+=	libpmc libpmcstat
209cd060b8dSEd MasteSUBDIR.${MK_RADIUS_SUPPORT}+=	libradius
210cd060b8dSEd MasteSUBDIR.${MK_SENDMAIL}+=	libmilter libsm libsmdb libsmutil
211cd060b8dSEd MasteSUBDIR.${MK_TELNET}+=	libtelnet
212cd060b8dSEd MasteSUBDIR.${MK_TESTS_SUPPORT}+=	atf
213b0d29bc4SBrooks DavisSUBDIR.${MK_TESTS_SUPPORT}.${MK_CXX}+=	kyua
214c697fb7fSBrooks DavisSUBDIR.${MK_TESTS_SUPPORT}.${MK_CXX}+=	liblutok
215cd060b8dSEd MasteSUBDIR.${MK_TESTS}+=	tests
216cd060b8dSEd MasteSUBDIR.${MK_UNBOUND}+=	libunbound
217cd060b8dSEd MasteSUBDIR.${MK_USB}+=	libusbhid libusb
218f39bffc6SKonstantin BelousovSUBDIR.${MK_OFED}+=	ofed
219a92958dfSSimon J. GerratySUBDIR.${MK_VERIEXEC}+=	libveriexec
2207920ad94SKyle EvansSUBDIR.${MK_ZFS}+=	libbe
221a8ec1b48SMaxim Sobolev
22254ff5d73SDimitry Andric.if !make(install)
22354ff5d73SDimitry AndricSUBDIR_PARALLEL=
22454ff5d73SDimitry Andric.endif
22554ff5d73SDimitry Andric
22658f0484fSRodney W. Grimes.include <bsd.subdir.mk>
227