xref: /freebsd/lib/Makefile (revision feb2ecc3826dbb12c42a38a94ebe98e97c9c564d)
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.
260e46933cSStanislav Sedov
27fa6d79e8SBryan DrewerySUBDIR=	${SUBDIR_BOOTSTRAP} \
28b8fffe16SWarner Losh	.WAIT \
29e4b0a90eSBrooks Davis	geom \
309b3e440bSWarner Losh	libalias \
319b3e440bSWarner Losh	libarchive \
32a1c70d69SIan Lepore	libauditd \
339b3e440bSWarner Losh	libbegemot \
3439cd938cSEd Schouten	libblocksruntime \
3581bd3d89SAdrian Chadd	libbsdstat \
36a1c70d69SIan Lepore	libbsm \
379b3e440bSWarner Losh	libbz2 \
389b3e440bSWarner Losh	libcalendar \
399b3e440bSWarner Losh	libcam \
407a6e3cf8SMariusz Zaborski	libcapsicum \
41ceb36bc9SMariusz Zaborski	libcasper \
429b3e440bSWarner Losh	libcompat \
43a1c70d69SIan Lepore	libcrypt \
4464de8019SJohn Baldwin	libdevctl \
459b3e440bSWarner Losh	libdevinfo \
469b3e440bSWarner Losh	libdevstat \
477c807d77SEd Maste	libdl \
489b3e440bSWarner Losh	libdwarf \
499b3e440bSWarner Losh	libedit \
505f8eed2fSEd Maste	libelftc \
510d9e60c8SBryan Drewery	libevent \
524b1fb8ffSEd Maste	libexecinfo \
539b3e440bSWarner Losh	libexpat \
549b3e440bSWarner Losh	libfetch \
55041394f3SDevin Teske	libfigpar \
569b3e440bSWarner Losh	libgeom \
57ec214349SKristof Provost	libifconfig \
589b3e440bSWarner Losh	libipsec \
599b3e440bSWarner Losh	libjail \
609b3e440bSWarner Losh	libkiconv \
61a1c70d69SIan Lepore	libkvm \
6281ad8388SMartin Matuska	liblzma \
639b3e440bSWarner Losh	libmemstat \
64a1c70d69SIan Lepore	libmd \
6543518607SKenneth D. Merry	libmt \
66127be1a7SAdrian Chadd	lib80211 \
676bea8766SBrooks Davis	libnetbsd \
68a1c70d69SIan Lepore	libnv \
69a36eca08SCraig Rodrigues	libopenbsd \
709b3e440bSWarner Losh	libopie \
719b3e440bSWarner Losh	libpam \
7282fcadcdSBryan Drewery	libpathconv \
73f39bffc6SKonstantin Belousov	libpcap \
74a1c70d69SIan Lepore	libpjdlog \
75*feb2ecc3SWarner Losh	libproc \
760daf62d9SStanislav Sedov	libprocstat \
77b37f6c98SKyle Evans	libregex \
78a1c70d69SIan Lepore	librpcsvc \
7935c05a4fSAdrian Chadd	librss \
809b3e440bSWarner Losh	librt \
81*feb2ecc3SWarner Losh	librtld_db \
82a1c70d69SIan Lepore	libsbuf \
8391ee3463SIan Lepore	libsmb \
84362492e5SBaptiste Daroussin	libsqlite3 \
856486b015SJeremie Le Hen	libstdbuf \
86fc6f0665SEd Schouten	libstdthreads \
87d6fb4894SJohn Baldwin	libsysdecode \
88a1c70d69SIan Lepore	libtacplus \
899b3e440bSWarner Losh	libthread_db \
904ca4d6a8SBaptiste Daroussin	libucl \
919b3e440bSWarner Losh	libufs \
929b3e440bSWarner Losh	libugidfw \
939b3e440bSWarner Losh	libulog \
94a1c70d69SIan Lepore	libutil \
959b3e440bSWarner Losh	${_libvgl} \
969b3e440bSWarner Losh	libwrap \
97d7790611SMarcel Moolenaar	libxo \
989b3e440bSWarner Losh	liby \
999b3e440bSWarner Losh	libz \
100e2290905SBaptiste Daroussin	libzstd \
101cd060b8dSEd Maste	ncurses
10258f0484fSRodney W. Grimes
103a1c70d69SIan Lepore# Inter-library dependencies.  When the makefile for a library contains LDADD
104a1c70d69SIan Lepore# libraries, those libraries should be listed as build order dependencies here.
105a1c70d69SIan Lepore
106e4b0a90eSBrooks DavisSUBDIR_DEPEND_geom=	libufs
107d567f909SBaptiste DaroussinSUBDIR_DEPEND_libarchive= libz libbz2 libexpat liblzma libmd libzstd
108a1c70d69SIan LeporeSUBDIR_DEPEND_libauditdm= libbsm
109a1c70d69SIan LeporeSUBDIR_DEPEND_libbsnmp= ${_libnetgraph}
110468a365dSBryan DrewerySUBDIR_DEPEND_libc++:= libcxxrt
111cd0d51baSKyle Evans# libssp_nonshared doesn't need to be linked into libc on every arch, but it is
112cd0d51baSKyle Evans# small enough to build that this bit of serialization is likely insignificant.
113cd0d51baSKyle EvansSUBDIR_DEPEND_libc= libcompiler_rt libssp_nonshared
114a1c70d69SIan LeporeSUBDIR_DEPEND_libcam= libsbuf
115c501d73cSMariusz ZaborskiSUBDIR_DEPEND_libcasper= libnv
116a1c70d69SIan LeporeSUBDIR_DEPEND_libdevstat= libkvm
1177fc89952SDevin TeskeSUBDIR_DEPEND_libdpv= libfigpar ncurses libutil
118a1c70d69SIan LeporeSUBDIR_DEPEND_libedit= ncurses
119a1c70d69SIan LeporeSUBDIR_DEPEND_libgeom= libexpat libsbuf
120bc53c94fSEnji CooperSUBDIR_DEPEND_librpcsec_gss= libgssapi
121a1c70d69SIan LeporeSUBDIR_DEPEND_libmagic= libz
122a1c70d69SIan LeporeSUBDIR_DEPEND_libmemstat= libkvm
123a1c70d69SIan LeporeSUBDIR_DEPEND_libopie= libmd
12431a741f4SEnji CooperSUBDIR_DEPEND_libpam= libcrypt libopie ${_libradius} librpcsvc libtacplus libutil ${_libypclnt} ${_libcom_err}
125a1c70d69SIan LeporeSUBDIR_DEPEND_libpjdlog= libutil
126a1c70d69SIan LeporeSUBDIR_DEPEND_libprocstat= libkvm libutil
127a1c70d69SIan LeporeSUBDIR_DEPEND_libradius= libmd
128a1c70d69SIan LeporeSUBDIR_DEPEND_libsmb= libkiconv
129b626f5a7SGlen BarberSUBDIR_DEPEND_libtacplus= libmd
130a1c70d69SIan LeporeSUBDIR_DEPEND_libulog= libmd
131a1c70d69SIan LeporeSUBDIR_DEPEND_libunbound= ${_libldns}
13253200025SRui PauloSUBDIR_DEPEND_liblzma= ${_libthr}
133f39bffc6SKonstantin Belousov.if ${MK_OFED} != "no"
134f39bffc6SKonstantin BelousovSUBDIR_DEPEND_libpcap= ofed
135f39bffc6SKonstantin Belousov.endif
136a1c70d69SIan Lepore
137690f477dSSam Leffler# NB: keep these sorted by MK_* knobs
138690f477dSSam Leffler
139cd060b8dSEd MasteSUBDIR.${MK_ATM}+=	libngatm
140a92958dfSSimon J. GerratySUBDIR.${MK_BEARSSL}+=	libbearssl libsecureboot
141cd060b8dSEd MasteSUBDIR.${MK_BLACKLIST}+=libblacklist
142cd060b8dSEd MasteSUBDIR.${MK_BLUETOOTH}+=libbluetooth libsdp
143cd060b8dSEd MasteSUBDIR.${MK_BSNMP}+=	libbsnmp
144cd060b8dSEd Maste
145cd060b8dSEd Maste.if !defined(COMPAT_32BIT) && !defined(COMPAT_SOFTFP)
146cd060b8dSEd MasteSUBDIR.${MK_CLANG}+=	clang
1475e1847b4SPoul-Henning Kamp.endif
1485e1847b4SPoul-Henning Kamp
149cd060b8dSEd MasteSUBDIR.${MK_CUSE}+= 	libcuse
150cd060b8dSEd MasteSUBDIR.${MK_CXX}+=	libdevdctl
1515f8eed2fSEd MasteSUBDIR.${MK_TOOLCHAIN}+=libpe
152f987297fSEd MasteSUBDIR.${MK_DIALOG}+=	libdpv
153cd060b8dSEd MasteSUBDIR.${MK_FILE}+=	libmagic
154cd060b8dSEd MasteSUBDIR.${MK_GPIO}+=	libgpio
155cd060b8dSEd MasteSUBDIR.${MK_GSSAPI}+=	libgssapi librpcsec_gss
156cd060b8dSEd MasteSUBDIR.${MK_ICONV}+=	libiconv_modules
157cd060b8dSEd MasteSUBDIR.${MK_KERBEROS_SUPPORT}+=	libcom_err
158cd060b8dSEd MasteSUBDIR.${MK_LDNS}+=	libldns
1591a13f2e6SEdward Tomasz NapieralaSUBDIR.${MK_STATS}+=	libstats
1607b5038d7SDag-Erling Smørgrav
1618028b78dSDimitry Andric# The libraries under libclang_rt can only be built by clang, and only make
1628028b78dSDimitry Andric# sense to build when clang is enabled at all.  Furthermore, they can only be
1638028b78dSDimitry Andric# built for certain architectures.
1648028b78dSDimitry Andric.if ${MK_CLANG} != "no" && ${COMPILER_TYPE} == "clang" && \
165b78ee15eSRuslan Bukin    (${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \
1661bb8eb56SDimitry Andric    ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "i386" || \
1671bb8eb56SDimitry Andric    ${MACHINE_CPUARCH} == "powerpc")
1688028b78dSDimitry Andric_libclang_rt=	libclang_rt
1698028b78dSDimitry Andric.endif
1708028b78dSDimitry Andric
17135e370a2SDag-Erling Smørgrav.if ${MK_LIBCPLUSPLUS} != "no"
17235e370a2SDag-Erling Smørgrav_libcxxrt=	libcxxrt
1738e69077bSDimitry Andric_libcplusplus=	libc++
1748e69077bSDimitry Andric_libcplusplus+=	libc++experimental
1758e69077bSDimitry Andric.endif
17635e370a2SDag-Erling Smørgrav
177cd060b8dSEd MasteSUBDIR.${MK_EFI}+=	libefivar
17843e25f47SEnji CooperSUBDIR.${MK_GOOGLETEST}+=	googletest
179cd060b8dSEd MasteSUBDIR.${MK_LIBTHR}+=	libthr
180c7fbd772SEd MasteSUBDIR.${MK_LLVM_LIBUNWIND}+=	libgcc_eh
181c7fbd772SEd MasteSUBDIR.${MK_LLVM_LIBUNWIND}+=	libgcc_s
182cd060b8dSEd MasteSUBDIR.${MK_NETGRAPH}+=	libnetgraph
183cd060b8dSEd MasteSUBDIR.${MK_NIS}+=	libypclnt
184690f477dSSam Leffler
18525faff34SWarner Losh.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
186c9811e98SBruce Evans_libvgl=	libvgl
187abbb0b30SMarcel Moolenaar.endif
188abbb0b30SMarcel Moolenaar
189cde6fa28SRuslan Bukin.if ${MACHINE_CPUARCH} == "aarch64"
190cde6fa28SRuslan BukinSUBDIR.${MK_PMC}+=	libopencsd
191cde6fa28SRuslan Bukin.endif
192cde6fa28SRuslan Bukin
19370d8f36aSPeter Grehan.if ${MACHINE_CPUARCH} == "amd64"
19430b3274fSRuslan BukinSUBDIR.${MK_PMC}+=	libipt
195cd060b8dSEd MasteSUBDIR.${MK_BHYVE}+=	libvmmapi
19602629e46SEnji Cooper.endif
19770d8f36aSPeter Grehan
1986b3555c3SDimitry Andric.if ${MACHINE_ARCH} != "powerpc"
199b0840a28SDimitry AndricSUBDIR.${MK_OPENMP}+=	libomp
2006b3555c3SDimitry Andric.endif
201cd060b8dSEd MasteSUBDIR.${MK_OPENSSL}+=	libmp
202bc82609aSKyle EvansSUBDIR.${MK_PMC}+=	libpmc libpmcstat
203cd060b8dSEd MasteSUBDIR.${MK_RADIUS_SUPPORT}+=	libradius
204cd060b8dSEd MasteSUBDIR.${MK_SENDMAIL}+=	libmilter libsm libsmdb libsmutil
205cd060b8dSEd MasteSUBDIR.${MK_TELNET}+=	libtelnet
206cd060b8dSEd MasteSUBDIR.${MK_TESTS_SUPPORT}+=	atf
207cd060b8dSEd MasteSUBDIR.${MK_TESTS}+=	tests
208cd060b8dSEd MasteSUBDIR.${MK_UNBOUND}+=	libunbound
209cd060b8dSEd MasteSUBDIR.${MK_USB}+=	libusbhid libusb
210f39bffc6SKonstantin BelousovSUBDIR.${MK_OFED}+=	ofed
211a92958dfSSimon J. GerratySUBDIR.${MK_VERIEXEC}+=	libveriexec
2127920ad94SKyle EvansSUBDIR.${MK_ZFS}+=	libbe
213a8ec1b48SMaxim Sobolev
21454ff5d73SDimitry Andric.if !make(install)
21554ff5d73SDimitry AndricSUBDIR_PARALLEL=
21654ff5d73SDimitry Andric.endif
21754ff5d73SDimitry Andric
21858f0484fSRodney W. Grimes.include <bsd.subdir.mk>
219