xref: /freebsd/lib/Makefile (revision c7fbd7722d7c6640bee5fbf8af3a0b1343eefd8b)
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 \
389b3e440bSWarner Losh	libcompat \
39a1c70d69SIan Lepore	libcrypt \
4064de8019SJohn Baldwin	libdevctl \
419b3e440bSWarner Losh	libdevinfo \
429b3e440bSWarner Losh	libdevstat \
439b3e440bSWarner Losh	libdwarf \
449b3e440bSWarner Losh	libedit \
450d9e60c8SBryan Drewery	libevent \
464b1fb8ffSEd Maste	libexecinfo \
479b3e440bSWarner Losh	libexpat \
489b3e440bSWarner Losh	libfetch \
49041394f3SDevin Teske	libfigpar \
509b3e440bSWarner Losh	libgeom \
51ec214349SKristof Provost	libifconfig \
529b3e440bSWarner Losh	libipsec \
539b3e440bSWarner Losh	libjail \
549b3e440bSWarner Losh	libkiconv \
55a1c70d69SIan Lepore	libkvm \
5681ad8388SMartin Matuska	liblzma \
579b3e440bSWarner Losh	libmemstat \
58a1c70d69SIan Lepore	libmd \
5943518607SKenneth D. Merry	libmt \
60127be1a7SAdrian Chadd	lib80211 \
616bea8766SBrooks Davis	libnetbsd \
62a1c70d69SIan Lepore	libnv \
63a36eca08SCraig Rodrigues	libopenbsd \
649b3e440bSWarner Losh	libopie \
659b3e440bSWarner Losh	libpam \
669b3e440bSWarner Losh	libpcap \
67a1c70d69SIan Lepore	libpjdlog \
6854bb94d7SRui Paulo	${_libproc} \
690daf62d9SStanislav Sedov	libprocstat \
70a1c70d69SIan Lepore	librpcsvc \
7135c05a4fSAdrian Chadd	librss \
729b3e440bSWarner Losh	librt \
73fb05b666SRui Paulo	${_librtld_db} \
74a1c70d69SIan Lepore	libsbuf \
7591ee3463SIan Lepore	libsmb \
76362492e5SBaptiste Daroussin	libsqlite3 \
779b3e440bSWarner Losh	libstand \
786486b015SJeremie Le Hen	libstdbuf \
79fc6f0665SEd Schouten	libstdthreads \
80d6fb4894SJohn Baldwin	libsysdecode \
81a1c70d69SIan Lepore	libtacplus \
829b3e440bSWarner Losh	libthread_db \
834ca4d6a8SBaptiste Daroussin	libucl \
849b3e440bSWarner Losh	libufs \
859b3e440bSWarner Losh	libugidfw \
869b3e440bSWarner Losh	libulog \
87a1c70d69SIan Lepore	libutil \
889b3e440bSWarner Losh	${_libvgl} \
899b3e440bSWarner Losh	libwrap \
90d7790611SMarcel Moolenaar	libxo \
919b3e440bSWarner Losh	liby \
929b3e440bSWarner Losh	libz \
93cd060b8dSEd Maste	ncurses
9458f0484fSRodney W. Grimes
95a1c70d69SIan Lepore# Inter-library dependencies.  When the makefile for a library contains LDADD
96a1c70d69SIan Lepore# libraries, those libraries should be listed as build order dependencies here.
97a1c70d69SIan Lepore
98a1c70d69SIan LeporeSUBDIR_DEPEND_libarchive= libz libbz2 libexpat liblzma libmd
99a1c70d69SIan LeporeSUBDIR_DEPEND_libauditdm= libbsm
100a1c70d69SIan LeporeSUBDIR_DEPEND_libbsnmp= ${_libnetgraph}
101468a365dSBryan DrewerySUBDIR_DEPEND_libc++:= libcxxrt
102a1c70d69SIan LeporeSUBDIR_DEPEND_libc= libcompiler_rt
103a1c70d69SIan LeporeSUBDIR_DEPEND_libcam= libsbuf
104c501d73cSMariusz ZaborskiSUBDIR_DEPEND_libcasper= libnv
105a1c70d69SIan LeporeSUBDIR_DEPEND_libdevstat= libkvm
1067fc89952SDevin TeskeSUBDIR_DEPEND_libdpv= libfigpar ncurses libutil
107a1c70d69SIan LeporeSUBDIR_DEPEND_libedit= ncurses
108a1c70d69SIan LeporeSUBDIR_DEPEND_libgeom= libexpat libsbuf
109a1c70d69SIan LeporeSUBDIR_DEPEND_liblibrpcsec_gss= libgssapi
110a1c70d69SIan LeporeSUBDIR_DEPEND_libmagic= libz
111a1c70d69SIan LeporeSUBDIR_DEPEND_libmemstat= libkvm
112a1c70d69SIan LeporeSUBDIR_DEPEND_libopie= libmd
11331a741f4SEnji CooperSUBDIR_DEPEND_libpam= libcrypt libopie ${_libradius} librpcsvc libtacplus libutil ${_libypclnt} ${_libcom_err}
114a1c70d69SIan LeporeSUBDIR_DEPEND_libpjdlog= libutil
115a1c70d69SIan LeporeSUBDIR_DEPEND_libprocstat= libkvm libutil
116a1c70d69SIan LeporeSUBDIR_DEPEND_libradius= libmd
117a1c70d69SIan LeporeSUBDIR_DEPEND_libsmb= libkiconv
118b626f5a7SGlen BarberSUBDIR_DEPEND_libtacplus= libmd
119a1c70d69SIan LeporeSUBDIR_DEPEND_libulog= libmd
120a1c70d69SIan LeporeSUBDIR_DEPEND_libunbound= ${_libldns}
12153200025SRui PauloSUBDIR_DEPEND_liblzma= ${_libthr}
122a1c70d69SIan Lepore
123690f477dSSam Leffler# NB: keep these sorted by MK_* knobs
124690f477dSSam Leffler
125cd060b8dSEd MasteSUBDIR.${MK_ATM}+=	libngatm
126cd060b8dSEd MasteSUBDIR.${MK_BLACKLIST}+=libblacklist
127cd060b8dSEd MasteSUBDIR.${MK_BLUETOOTH}+=libbluetooth libsdp
128cd060b8dSEd MasteSUBDIR.${MK_BSNMP}+=	libbsnmp
129cd060b8dSEd MasteSUBDIR.${MK_CASPER}+=	libcasper
130cd060b8dSEd Maste
131cd060b8dSEd Maste.if !defined(COMPAT_32BIT) && !defined(COMPAT_SOFTFP)
132cd060b8dSEd MasteSUBDIR.${MK_CLANG}+=	clang
1335e1847b4SPoul-Henning Kamp.endif
1345e1847b4SPoul-Henning Kamp
135cd060b8dSEd MasteSUBDIR.${MK_CUSE}+= 	libcuse
136cd060b8dSEd MasteSUBDIR.${MK_CXX}+=	libdevdctl
137cd060b8dSEd MasteSUBDIR.${MK_TOOLCHAIN}+=libelftc libpe
138f987297fSEd MasteSUBDIR.${MK_DIALOG}+=	libdpv
139cd060b8dSEd MasteSUBDIR.${MK_FILE}+=	libmagic
140cd060b8dSEd MasteSUBDIR.${MK_GPIO}+=	libgpio
141cd060b8dSEd MasteSUBDIR.${MK_GSSAPI}+=	libgssapi librpcsec_gss
142cd060b8dSEd MasteSUBDIR.${MK_ICONV}+=	libiconv_modules
143cd060b8dSEd MasteSUBDIR.${MK_KERBEROS_SUPPORT}+=	libcom_err
144cd060b8dSEd MasteSUBDIR.${MK_LDNS}+=	libldns
1457b5038d7SDag-Erling Smørgrav
1468028b78dSDimitry Andric# The libraries under libclang_rt can only be built by clang, and only make
1478028b78dSDimitry Andric# sense to build when clang is enabled at all.  Furthermore, they can only be
1488028b78dSDimitry Andric# built for certain architectures.
1498028b78dSDimitry Andric.if ${MK_CLANG} != "no" && ${COMPILER_TYPE} == "clang" && \
150b78ee15eSRuslan Bukin    (${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \
151b78ee15eSRuslan Bukin    (${MACHINE_CPUARCH} == "arm" && ${MACHINE_ARCH} != "armeb") || \
152b78ee15eSRuslan Bukin    (${MACHINE_CPUARCH} == "i386"))
1538028b78dSDimitry Andric_libclang_rt=	libclang_rt
1548028b78dSDimitry Andric.endif
1558028b78dSDimitry Andric
15635e370a2SDag-Erling Smørgrav.if ${MK_LIBCPLUSPLUS} != "no"
15735e370a2SDag-Erling Smørgrav_libcxxrt=	libcxxrt
15835e370a2SDag-Erling Smørgrav_libcplusplus=	libc++
15935e370a2SDag-Erling Smørgrav.endif
16035e370a2SDag-Erling Smørgrav
161cd060b8dSEd MasteSUBDIR.${MK_EFI}+=	libefivar
162cd060b8dSEd MasteSUBDIR.${MK_LIBTHR}+=	libthr
163*c7fbd772SEd MasteSUBDIR.${MK_LLVM_LIBUNWIND}+=	libgcc_eh
164*c7fbd772SEd MasteSUBDIR.${MK_LLVM_LIBUNWIND}+=	libgcc_s
165cd060b8dSEd MasteSUBDIR.${MK_NAND}+=	libnandfs
166cd060b8dSEd MasteSUBDIR.${MK_NETGRAPH}+=	libnetgraph
167cd060b8dSEd MasteSUBDIR.${MK_NIS}+=	libypclnt
168690f477dSSam Leffler
16925faff34SWarner Losh.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
170c9811e98SBruce Evans_libvgl=	libvgl
171abbb0b30SMarcel Moolenaar.endif
172abbb0b30SMarcel Moolenaar
17370d8f36aSPeter Grehan.if ${MACHINE_CPUARCH} == "amd64"
174cd060b8dSEd MasteSUBDIR.${MK_BHYVE}+=	libvmmapi
17502629e46SEnji Cooper.endif
17670d8f36aSPeter Grehan
177df283203SEd Maste.if ${MACHINE_CPUARCH} != "sparc64"
178fcb56067SGeorge V. Neville-Neil_libproc=	libproc
179fcb56067SGeorge V. Neville-Neil_librtld_db=	librtld_db
180fcb56067SGeorge V. Neville-Neil.endif
181fcb56067SGeorge V. Neville-Neil
182cd060b8dSEd MasteSUBDIR.${MK_OPENSSL}+=	libmp
183cd060b8dSEd MasteSUBDIR.${MK_PMC}+=	libpmc
184cd060b8dSEd MasteSUBDIR.${MK_RADIUS_SUPPORT}+=	libradius
185cd060b8dSEd MasteSUBDIR.${MK_SENDMAIL}+=	libmilter libsm libsmdb libsmutil
186cd060b8dSEd MasteSUBDIR.${MK_TELNET}+=	libtelnet
187cd060b8dSEd MasteSUBDIR.${MK_TESTS_SUPPORT}+=	atf
188cd060b8dSEd MasteSUBDIR.${MK_TESTS}+=	tests
189cd060b8dSEd MasteSUBDIR.${MK_UNBOUND}+=	libunbound
190cd060b8dSEd MasteSUBDIR.${MK_USB}+=	libusbhid libusb
191a8ec1b48SMaxim Sobolev
19254ff5d73SDimitry Andric.if !make(install)
19354ff5d73SDimitry AndricSUBDIR_PARALLEL=
19454ff5d73SDimitry Andric.endif
19554ff5d73SDimitry Andric
19658f0484fSRodney W. Grimes.include <bsd.subdir.mk>
197