xref: /freebsd/lib/Makefile (revision eac7052fdebb90caf2f653e06187bdbca837b9c7)
1#	@(#)Makefile	8.1 (Berkeley) 6/4/93
2# $FreeBSD$
3
4.include <src.opts.mk>
5
6# The SUBDIR_BOOTSTRAP list is a small set of libraries which are used by many
7# of the other libraries.  These are built first with a .WAIT between them
8# and the main list to avoid needing a SUBDIR_DEPEND line on every library
9# naming just these few items.
10
11SUBDIR_BOOTSTRAP= \
12	csu \
13	.WAIT \
14	libc \
15	libc_nonshared \
16	libcompiler_rt \
17	${_libclang_rt} \
18	${_libcplusplus} \
19	${_libcxxrt} \
20	libelf \
21	libssp \
22	libssp_nonshared \
23	msun
24
25# The main list; please keep these sorted alphabetically.
26# The only exception is sqlite3: we place it at the start of the list since it
27# takes a long time to build and starting it first improves parallelism.
28
29SUBDIR=	${SUBDIR_BOOTSTRAP} \
30	.WAIT \
31	libsqlite3 \
32	geom \
33	libalias \
34	libarchive \
35	libauditd \
36	libbegemot \
37	libblocksruntime \
38	libbsdstat \
39	libbsm \
40	libbz2 \
41	libcalendar \
42	libcam \
43	libcapsicum \
44	libcasper \
45	libcompat \
46	libcrypt \
47	libdevctl \
48	libdevinfo \
49	libdevstat \
50	libdl \
51	libdwarf \
52	libedit \
53	libelftc \
54	libevent1 \
55	libexecinfo \
56	libexpat \
57	libfetch \
58	libfigpar \
59	libgcc_eh \
60	libgcc_s \
61	libgeom \
62	libifconfig \
63	libipsec \
64	libjail \
65	libkiconv \
66	libkvm \
67	liblua \
68	liblzma \
69	libmemstat \
70	libmd \
71	libmt \
72	lib80211 \
73	libnetbsd \
74	libnetmap \
75	libnv \
76	libopenbsd \
77	libopie \
78	libpam \
79	libpathconv \
80	libpcap \
81	libpjdlog \
82	libproc \
83	libprocstat \
84	libregex \
85	librpcsvc \
86	librss \
87	librt \
88	librtld_db \
89	libsbuf \
90	libsmb \
91	libstdbuf \
92	libstdthreads \
93	libsysdecode \
94	libtacplus \
95	libthread_db \
96	libucl \
97	libufs \
98	libugidfw \
99	libulog \
100	libutil \
101	${_libvgl} \
102	libwrap \
103	libxo \
104	liby \
105	libz \
106	libzstd \
107	ncurses
108
109# Inter-library dependencies.  When the makefile for a library contains LDADD
110# libraries, those libraries should be listed as build order dependencies here.
111
112SUBDIR_DEPEND_geom=	libufs
113SUBDIR_DEPEND_googletest= libregex
114SUBDIR_DEPEND_libarchive= libz libbz2 libexpat liblzma libmd libzstd
115SUBDIR_DEPEND_libauditdm= libbsm
116SUBDIR_DEPEND_libbsnmp= ${_libnetgraph}
117SUBDIR_DEPEND_libc++:= libcxxrt
118# libssp_nonshared doesn't need to be linked into libc on every arch, but it is
119# small enough to build that this bit of serialization is likely insignificant.
120SUBDIR_DEPEND_libc= libcompiler_rt libssp_nonshared
121SUBDIR_DEPEND_libcam= libsbuf
122SUBDIR_DEPEND_libcasper= libnv
123SUBDIR_DEPEND_libdevstat= libkvm
124SUBDIR_DEPEND_libdpv= libfigpar ncurses libutil
125SUBDIR_DEPEND_libedit= ncurses
126SUBDIR_DEPEND_libgeom= libexpat libsbuf
127SUBDIR_DEPEND_librpcsec_gss= libgssapi
128SUBDIR_DEPEND_libmagic= libz
129SUBDIR_DEPEND_libmemstat= libkvm
130SUBDIR_DEPEND_libopie= libmd
131SUBDIR_DEPEND_libpam= libcrypt libopie ${_libradius} librpcsvc libtacplus libutil ${_libypclnt} ${_libcom_err}
132SUBDIR_DEPEND_libpjdlog= libutil
133SUBDIR_DEPEND_libprocstat= libkvm libutil
134SUBDIR_DEPEND_libradius= libmd
135SUBDIR_DEPEND_libsmb= libkiconv
136SUBDIR_DEPEND_libtacplus= libmd
137SUBDIR_DEPEND_libulog= libmd
138SUBDIR_DEPEND_libunbound= ${_libldns}
139SUBDIR_DEPEND_liblzma= ${_libthr}
140.if ${MK_OFED} != "no"
141SUBDIR_DEPEND_libpcap= ofed
142.endif
143
144# NB: keep these sorted by MK_* knobs
145
146SUBDIR.${MK_ATM}+=	libngatm
147SUBDIR.${MK_BEARSSL}+=	libbearssl libsecureboot
148SUBDIR.${MK_BLACKLIST}+=libblacklist
149SUBDIR.${MK_BLUETOOTH}+=libbluetooth libsdp
150SUBDIR.${MK_BSNMP}+=	libbsnmp
151
152.if !defined(COMPAT_32BIT) && !defined(COMPAT_SOFTFP)
153SUBDIR.${MK_CLANG}+=	clang
154.endif
155
156SUBDIR.${MK_CUSE}+= 	libcuse
157SUBDIR.${MK_CXX}+=	libdevdctl
158SUBDIR.${MK_TOOLCHAIN}+=libpe
159SUBDIR.${MK_DIALOG}+=	libdpv
160SUBDIR.${MK_FILE}+=	libmagic
161SUBDIR.${MK_GPIO}+=	libgpio
162SUBDIR.${MK_GSSAPI}+=	libgssapi librpcsec_gss
163SUBDIR.${MK_ICONV}+=	libiconv_modules
164SUBDIR.${MK_KERBEROS_SUPPORT}+=	libcom_err
165SUBDIR.${MK_LDNS}+=	libldns
166SUBDIR.${MK_STATS}+=	libstats
167
168# The libraries under libclang_rt can only be built by clang, and only make
169# sense to build when clang is enabled at all.  Furthermore, they can only be
170# built for certain architectures.
171.if ${MK_CLANG} != "no" && ${COMPILER_TYPE} == "clang" && \
172    (${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \
173    ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "i386" || \
174    ${MACHINE_CPUARCH} == "powerpc")
175_libclang_rt=	libclang_rt
176.endif
177
178.if ${MK_LIBCPLUSPLUS} != "no"
179_libcxxrt=	libcxxrt
180_libcplusplus=	libc++
181_libcplusplus+=	libc++experimental
182.endif
183
184SUBDIR.${MK_EFI}+=	libefivar
185SUBDIR.${MK_GOOGLETEST}+=	googletest
186SUBDIR.${MK_LIBTHR}+=	libthr
187SUBDIR.${MK_NETGRAPH}+=	libnetgraph
188SUBDIR.${MK_NIS}+=	libypclnt
189
190.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
191_libvgl=	libvgl
192.endif
193
194.if ${MACHINE_CPUARCH} == "aarch64"
195SUBDIR.${MK_PMC}+=	libopencsd
196.endif
197
198.if ${MACHINE_CPUARCH} == "amd64"
199SUBDIR.${MK_PMC}+=	libipt
200SUBDIR.${MK_BHYVE}+=	libvmmapi
201.endif
202
203.if ${MACHINE_ARCH} != "powerpc"
204SUBDIR.${MK_OPENMP}+=	libomp
205.endif
206SUBDIR.${MK_OPENSSL}+=	libmp
207SUBDIR.${MK_PMC}+=	libpmc libpmcstat
208SUBDIR.${MK_RADIUS_SUPPORT}+=	libradius
209SUBDIR.${MK_SENDMAIL}+=	libmilter libsm libsmdb libsmutil
210SUBDIR.${MK_TELNET}+=	libtelnet
211SUBDIR.${MK_TESTS_SUPPORT}+=	atf
212SUBDIR.${MK_TESTS_SUPPORT}.${MK_CXX}+=	kyua
213SUBDIR.${MK_TESTS_SUPPORT}.${MK_CXX}+=	liblutok
214SUBDIR.${MK_TESTS}+=	tests
215SUBDIR.${MK_UNBOUND}+=	libunbound
216SUBDIR.${MK_USB}+=	libusbhid libusb
217SUBDIR.${MK_OFED}+=	ofed
218SUBDIR.${MK_VERIEXEC}+=	libveriexec
219SUBDIR.${MK_ZFS}+=	libbe
220
221.if !make(install)
222SUBDIR_PARALLEL=
223.endif
224
225.include <bsd.subdir.mk>
226