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