xref: /freebsd/lib/Makefile (revision cde6fa285725aa9ec03c030f1fff8101048aed7c)
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 \
21a1c70d69SIan Lepore	msun
229b3e440bSWarner Losh
23a1c70d69SIan Lepore# The main list; please keep these sorted alphabetically.
240e46933cSStanislav Sedov
25fa6d79e8SBryan DrewerySUBDIR=	${SUBDIR_BOOTSTRAP} \
26b8fffe16SWarner Losh	.WAIT \
279b3e440bSWarner Losh	libalias \
289b3e440bSWarner Losh	libarchive \
29a1c70d69SIan Lepore	libauditd \
309b3e440bSWarner Losh	libbegemot \
3139cd938cSEd Schouten	libblocksruntime \
3281bd3d89SAdrian Chadd	libbsdstat \
33a1c70d69SIan Lepore	libbsm \
349b3e440bSWarner Losh	libbz2 \
359b3e440bSWarner Losh	libcalendar \
369b3e440bSWarner Losh	libcam \
377a6e3cf8SMariusz Zaborski	libcapsicum \
38ceb36bc9SMariusz Zaborski	libcasper \
399b3e440bSWarner Losh	libcompat \
40a1c70d69SIan Lepore	libcrypt \
4164de8019SJohn Baldwin	libdevctl \
429b3e440bSWarner Losh	libdevinfo \
439b3e440bSWarner Losh	libdevstat \
4499ac8154SKonstantin Belousov	${_libdl} \
459b3e440bSWarner Losh	libdwarf \
469b3e440bSWarner Losh	libedit \
475f8eed2fSEd Maste	libelftc \
480d9e60c8SBryan Drewery	libevent \
494b1fb8ffSEd Maste	libexecinfo \
509b3e440bSWarner Losh	libexpat \
519b3e440bSWarner Losh	libfetch \
52041394f3SDevin Teske	libfigpar \
539b3e440bSWarner Losh	libgeom \
54ec214349SKristof Provost	libifconfig \
559b3e440bSWarner Losh	libipsec \
569b3e440bSWarner Losh	libjail \
579b3e440bSWarner Losh	libkiconv \
58a1c70d69SIan Lepore	libkvm \
5981ad8388SMartin Matuska	liblzma \
609b3e440bSWarner Losh	libmemstat \
61a1c70d69SIan Lepore	libmd \
6243518607SKenneth D. Merry	libmt \
63127be1a7SAdrian Chadd	lib80211 \
646bea8766SBrooks Davis	libnetbsd \
65a1c70d69SIan Lepore	libnv \
66a36eca08SCraig Rodrigues	libopenbsd \
679b3e440bSWarner Losh	libopie \
689b3e440bSWarner Losh	libpam \
6982fcadcdSBryan Drewery	libpathconv \
709b3e440bSWarner Losh	libpcap \
71a1c70d69SIan Lepore	libpjdlog \
7254bb94d7SRui Paulo	${_libproc} \
730daf62d9SStanislav Sedov	libprocstat \
74b37f6c98SKyle Evans	libregex \
75a1c70d69SIan Lepore	librpcsvc \
7635c05a4fSAdrian Chadd	librss \
779b3e440bSWarner Losh	librt \
78fb05b666SRui Paulo	${_librtld_db} \
79a1c70d69SIan Lepore	libsbuf \
8091ee3463SIan Lepore	libsmb \
81362492e5SBaptiste Daroussin	libsqlite3 \
826486b015SJeremie Le Hen	libstdbuf \
83fc6f0665SEd Schouten	libstdthreads \
84d6fb4894SJohn Baldwin	libsysdecode \
85a1c70d69SIan Lepore	libtacplus \
869b3e440bSWarner Losh	libthread_db \
874ca4d6a8SBaptiste Daroussin	libucl \
889b3e440bSWarner Losh	libufs \
899b3e440bSWarner Losh	libugidfw \
909b3e440bSWarner Losh	libulog \
91a1c70d69SIan Lepore	libutil \
929b3e440bSWarner Losh	${_libvgl} \
939b3e440bSWarner Losh	libwrap \
94d7790611SMarcel Moolenaar	libxo \
959b3e440bSWarner Losh	liby \
969b3e440bSWarner Losh	libz \
97e2290905SBaptiste Daroussin	libzstd \
98cd060b8dSEd Maste	ncurses
9958f0484fSRodney W. Grimes
100a1c70d69SIan Lepore# Inter-library dependencies.  When the makefile for a library contains LDADD
101a1c70d69SIan Lepore# libraries, those libraries should be listed as build order dependencies here.
102a1c70d69SIan Lepore
103a1c70d69SIan LeporeSUBDIR_DEPEND_libarchive= libz libbz2 libexpat liblzma libmd
104a1c70d69SIan LeporeSUBDIR_DEPEND_libauditdm= libbsm
105a1c70d69SIan LeporeSUBDIR_DEPEND_libbsnmp= ${_libnetgraph}
106468a365dSBryan DrewerySUBDIR_DEPEND_libc++:= libcxxrt
107a1c70d69SIan LeporeSUBDIR_DEPEND_libc= libcompiler_rt
108a1c70d69SIan LeporeSUBDIR_DEPEND_libcam= libsbuf
109c501d73cSMariusz ZaborskiSUBDIR_DEPEND_libcasper= libnv
110a1c70d69SIan LeporeSUBDIR_DEPEND_libdevstat= libkvm
1117fc89952SDevin TeskeSUBDIR_DEPEND_libdpv= libfigpar ncurses libutil
112a1c70d69SIan LeporeSUBDIR_DEPEND_libedit= ncurses
113a1c70d69SIan LeporeSUBDIR_DEPEND_libgeom= libexpat libsbuf
114bc53c94fSEnji CooperSUBDIR_DEPEND_librpcsec_gss= libgssapi
115a1c70d69SIan LeporeSUBDIR_DEPEND_libmagic= libz
116a1c70d69SIan LeporeSUBDIR_DEPEND_libmemstat= libkvm
117a1c70d69SIan LeporeSUBDIR_DEPEND_libopie= libmd
11831a741f4SEnji CooperSUBDIR_DEPEND_libpam= libcrypt libopie ${_libradius} librpcsvc libtacplus libutil ${_libypclnt} ${_libcom_err}
119a1c70d69SIan LeporeSUBDIR_DEPEND_libpjdlog= libutil
120a1c70d69SIan LeporeSUBDIR_DEPEND_libprocstat= libkvm libutil
121a1c70d69SIan LeporeSUBDIR_DEPEND_libradius= libmd
122a1c70d69SIan LeporeSUBDIR_DEPEND_libsmb= libkiconv
123b626f5a7SGlen BarberSUBDIR_DEPEND_libtacplus= libmd
124a1c70d69SIan LeporeSUBDIR_DEPEND_libulog= libmd
125a1c70d69SIan LeporeSUBDIR_DEPEND_libunbound= ${_libldns}
12653200025SRui PauloSUBDIR_DEPEND_liblzma= ${_libthr}
127a1c70d69SIan Lepore
128690f477dSSam Leffler# NB: keep these sorted by MK_* knobs
129690f477dSSam Leffler
130cd060b8dSEd MasteSUBDIR.${MK_ATM}+=	libngatm
131cd060b8dSEd MasteSUBDIR.${MK_BLACKLIST}+=libblacklist
132cd060b8dSEd MasteSUBDIR.${MK_BLUETOOTH}+=libbluetooth libsdp
133cd060b8dSEd MasteSUBDIR.${MK_BSNMP}+=	libbsnmp
134cd060b8dSEd Maste
135cd060b8dSEd Maste.if !defined(COMPAT_32BIT) && !defined(COMPAT_SOFTFP)
136cd060b8dSEd MasteSUBDIR.${MK_CLANG}+=	clang
1375e1847b4SPoul-Henning Kamp.endif
1385e1847b4SPoul-Henning Kamp
139cd060b8dSEd MasteSUBDIR.${MK_CUSE}+= 	libcuse
140cd060b8dSEd MasteSUBDIR.${MK_CXX}+=	libdevdctl
1415f8eed2fSEd MasteSUBDIR.${MK_TOOLCHAIN}+=libpe
142f987297fSEd MasteSUBDIR.${MK_DIALOG}+=	libdpv
143cd060b8dSEd MasteSUBDIR.${MK_FILE}+=	libmagic
144cd060b8dSEd MasteSUBDIR.${MK_GPIO}+=	libgpio
145cd060b8dSEd MasteSUBDIR.${MK_GSSAPI}+=	libgssapi librpcsec_gss
146cd060b8dSEd MasteSUBDIR.${MK_ICONV}+=	libiconv_modules
147cd060b8dSEd MasteSUBDIR.${MK_KERBEROS_SUPPORT}+=	libcom_err
148cd060b8dSEd MasteSUBDIR.${MK_LDNS}+=	libldns
1497b5038d7SDag-Erling Smørgrav
1508028b78dSDimitry Andric# The libraries under libclang_rt can only be built by clang, and only make
1518028b78dSDimitry Andric# sense to build when clang is enabled at all.  Furthermore, they can only be
1528028b78dSDimitry Andric# built for certain architectures.
1538028b78dSDimitry Andric.if ${MK_CLANG} != "no" && ${COMPILER_TYPE} == "clang" && \
154b78ee15eSRuslan Bukin    (${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \
155b78ee15eSRuslan Bukin    (${MACHINE_CPUARCH} == "arm" && ${MACHINE_ARCH} != "armeb") || \
156b78ee15eSRuslan Bukin    (${MACHINE_CPUARCH} == "i386"))
1578028b78dSDimitry Andric_libclang_rt=	libclang_rt
1588028b78dSDimitry Andric.endif
1598028b78dSDimitry Andric
16035e370a2SDag-Erling Smørgrav.if ${MK_LIBCPLUSPLUS} != "no"
16135e370a2SDag-Erling Smørgrav_libcxxrt=	libcxxrt
1628e69077bSDimitry Andric_libcplusplus=	libc++
1638e69077bSDimitry Andric_libcplusplus+=	libc++experimental
1648e69077bSDimitry Andric.endif
16535e370a2SDag-Erling Smørgrav
166cd060b8dSEd MasteSUBDIR.${MK_EFI}+=	libefivar
167cd060b8dSEd MasteSUBDIR.${MK_LIBTHR}+=	libthr
168c7fbd772SEd MasteSUBDIR.${MK_LLVM_LIBUNWIND}+=	libgcc_eh
169c7fbd772SEd MasteSUBDIR.${MK_LLVM_LIBUNWIND}+=	libgcc_s
170cd060b8dSEd MasteSUBDIR.${MK_NAND}+=	libnandfs
171cd060b8dSEd MasteSUBDIR.${MK_NETGRAPH}+=	libnetgraph
172cd060b8dSEd MasteSUBDIR.${MK_NIS}+=	libypclnt
173690f477dSSam Leffler
17425faff34SWarner Losh.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
175c9811e98SBruce Evans_libvgl=	libvgl
176abbb0b30SMarcel Moolenaar.endif
177abbb0b30SMarcel Moolenaar
178*cde6fa28SRuslan Bukin.if ${MACHINE_CPUARCH} == "aarch64"
179*cde6fa28SRuslan BukinSUBDIR.${MK_PMC}+=	libopencsd
180*cde6fa28SRuslan Bukin.endif
181*cde6fa28SRuslan Bukin
18270d8f36aSPeter Grehan.if ${MACHINE_CPUARCH} == "amd64"
18330b3274fSRuslan BukinSUBDIR.${MK_PMC}+=	libipt
184cd060b8dSEd MasteSUBDIR.${MK_BHYVE}+=	libvmmapi
18502629e46SEnji Cooper.endif
18670d8f36aSPeter Grehan
187df283203SEd Maste.if ${MACHINE_CPUARCH} != "sparc64"
188fcb56067SGeorge V. Neville-Neil_libproc=	libproc
189fcb56067SGeorge V. Neville-Neil_librtld_db=	librtld_db
190fcb56067SGeorge V. Neville-Neil.endif
191fcb56067SGeorge V. Neville-Neil
19299ac8154SKonstantin Belousov.if defined(LINKER_FEATURES) && ${LINKER_FEATURES:Mfilter}
19399ac8154SKonstantin Belousov_libdl=		libdl
19499ac8154SKonstantin Belousov.endif
19599ac8154SKonstantin Belousov
196cd060b8dSEd MasteSUBDIR.${MK_OPENSSL}+=	libmp
197d27927f7SRuslan BukinSUBDIR.${MK_PMC}+=	libpmc libpmcstat
198cd060b8dSEd MasteSUBDIR.${MK_RADIUS_SUPPORT}+=	libradius
199cd060b8dSEd MasteSUBDIR.${MK_SENDMAIL}+=	libmilter libsm libsmdb libsmutil
200cd060b8dSEd MasteSUBDIR.${MK_TELNET}+=	libtelnet
201cd060b8dSEd MasteSUBDIR.${MK_TESTS_SUPPORT}+=	atf
202cd060b8dSEd MasteSUBDIR.${MK_TESTS}+=	tests
203cd060b8dSEd MasteSUBDIR.${MK_UNBOUND}+=	libunbound
204cd060b8dSEd MasteSUBDIR.${MK_USB}+=	libusbhid libusb
205a8ec1b48SMaxim Sobolev
20654ff5d73SDimitry Andric.if !make(install)
20754ff5d73SDimitry AndricSUBDIR_PARALLEL=
20854ff5d73SDimitry Andric.endif
20954ff5d73SDimitry Andric
21058f0484fSRodney W. Grimes.include <bsd.subdir.mk>
211