]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - lib/Makefile
Merge branch 'releng/11.3' into releng-CDN/11.3
[FreeBSD/FreeBSD.git] / lib / Makefile
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
11 SUBDIR_BOOTSTRAP= \
12         csu \
13         .WAIT \
14         libc \
15         libc_nonshared \
16         libcompiler_rt \
17         ${_libclang_rt} \
18         ${_libcplusplus} \
19         ${_libcxxrt} \
20         libelf \
21         msun
22
23 # The main list; please keep these sorted alphabetically.
24
25 SUBDIR= ${SUBDIR_BOOTSTRAP} \
26         .WAIT \
27         libalias \
28         libarchive \
29         ${_libatm} \
30         libauditd \
31         libbegemot \
32         ${_libblacklist} \
33         libblocksruntime \
34         ${_libbluetooth} \
35         ${_libbsnmp} \
36         libbsdstat \
37         libbsm \
38         libbz2 \
39         libcalendar \
40         libcam \
41         libcapsicum \
42         ${_libcasper} \
43         ${_libcom_err} \
44         libcompat \
45         libcrypt \
46         libdevctl \
47         libdevdctl \
48         libdevinfo \
49         libdevstat \
50         ${_libdl} \
51         libdwarf \
52         libedit \
53         ${_libefivar} \
54         libelftc \
55         libevent \
56         libexecinfo \
57         libexpat \
58         libfetch \
59         libfigpar \
60         libgeom \
61         ${_libgpio} \
62         ${_libgssapi} \
63         ${_librpcsec_gss} \
64         ${_libiconv_modules} \
65         libipsec \
66         libjail \
67         libkiconv \
68         libkvm \
69         ${_libldns} \
70         liblzma \
71         ${_libmagic} \
72         libmemstat \
73         libmd \
74         ${_libmilter} \
75         ${_libmp} \
76         libmt \
77         ${_libnandfs} \
78         lib80211 \
79         libnetbsd \
80         ${_libnetgraph} \
81         ${_libngatm} \
82         libnv \
83         libopenbsd \
84         libopie \
85         libpam \
86         libpcap \
87         ${_libpe} \
88         libpjdlog \
89         ${_libpmc} \
90         ${_libproc} \
91         libprocstat \
92         ${_libradius} \
93         librpcsvc \
94         librt \
95         ${_librtld_db} \
96         libsbuf \
97         ${_libsdp} \
98         ${_libsm} \
99         libsmb \
100         ${_libsmdb} \
101         ${_libsmutil} \
102         libsqlite3 \
103         libstdbuf \
104         libstdthreads \
105         libsysdecode \
106         libtacplus \
107         ${_libtelnet} \
108         ${_libthr} \
109         libthread_db \
110         libucl \
111         libufs \
112         libugidfw \
113         libulog \
114         ${_libunbound} \
115         ${_libusbhid} \
116         ${_libusb} \
117         libutil \
118         ${_libvgl} \
119         ${_libvmmapi} \
120         libwrap \
121         libxo \
122         liby \
123         ${_libypclnt} \
124         libz \
125         ncurses \
126         ${_atf} \
127         ${_clang} \
128         ${_cuse} \
129         ${_tests}
130
131 # Inter-library dependencies.  When the makefile for a library contains LDADD
132 # libraries, those libraries should be listed as build order dependencies here.
133
134 SUBDIR_DEPEND_libarchive= libz libbz2 libexpat liblzma libmd
135 SUBDIR_DEPEND_libatm= libmd
136 SUBDIR_DEPEND_libauditdm= libbsm
137 SUBDIR_DEPEND_libbsnmp= ${_libnetgraph}
138 SUBDIR_DEPEND_libc++:= libcxxrt
139 SUBDIR_DEPEND_libc= libcompiler_rt
140 SUBDIR_DEPEND_libcam= libsbuf
141 SUBDIR_DEPEND_libcasper= libnv
142 SUBDIR_DEPEND_libdevstat= libkvm
143 SUBDIR_DEPEND_libdpv= libfigpar ncurses libutil
144 SUBDIR_DEPEND_libedit= ncurses
145 SUBDIR_DEPEND_libgeom= libexpat libsbuf
146 SUBDIR_DEPEND_librpcsec_gss= libgssapi
147 SUBDIR_DEPEND_libmagic= libz
148 SUBDIR_DEPEND_libmemstat= libkvm
149 SUBDIR_DEPEND_libopie= libmd
150 SUBDIR_DEPEND_libpam= libcrypt libopie ${_libradius} librpcsvc libtacplus libutil ${_libypclnt} ${_libcom_err} 
151 SUBDIR_DEPEND_libpjdlog= libutil
152 SUBDIR_DEPEND_libprocstat= libkvm libutil
153 SUBDIR_DEPEND_libradius= libmd
154 SUBDIR_DEPEND_libsmb= libkiconv
155 SUBDIR_DEPEND_libtacplus= libmd
156 SUBDIR_DEPEND_libulog= libmd
157 SUBDIR_DEPEND_libunbound= ${_libldns}
158 SUBDIR_DEPEND_liblzma= ${_libthr}
159 .if ${MK_OFED} != "no"
160 SUBDIR_DEPEND_libpcap= ofed
161 .endif
162
163 # NB: keep these sorted by MK_* knobs
164
165 .if ${MK_ATM} != "no"
166 _libngatm=      libngatm
167 .endif
168
169 .if ${MK_BLACKLIST} != "no"
170 _libblacklist=  libblacklist
171 .endif
172
173 .if ${MK_BLUETOOTH} != "no"
174 _libbluetooth=  libbluetooth
175 _libsdp=        libsdp
176 .endif
177
178 .if ${MK_BSNMP} != "no"
179 _libbsnmp=      libbsnmp
180 .endif
181
182 .if ${MK_CASPER} != "no"
183 _libcasper=     libcasper
184 .endif
185
186 .if ${MK_CLANG} != "no" && !defined(COMPAT_32BIT) && !defined(COMPAT_SOFTFP)
187 _clang=         clang
188 .endif
189
190 .if ${MK_CUSE} != "no"
191 _cuse=          libcuse
192 .endif
193
194 .if ${MK_TOOLCHAIN} != "no"
195 _libpe=         libpe
196 .endif
197
198 SUBDIR.${MK_DIALOG}+=   libdpv
199
200 .if ${MK_FILE} != "no"
201 _libmagic=      libmagic
202 .endif
203
204 .if ${MK_GPIO} != "no"
205 _libgpio=       libgpio
206 .endif
207
208 .if ${MK_GSSAPI} != "no"
209 _libgssapi=     libgssapi
210 _librpcsec_gss= librpcsec_gss
211 .endif
212
213 .if ${MK_ICONV} != "no"
214 _libiconv_modules=      libiconv_modules
215 .endif
216
217 .if ${MK_KERBEROS_SUPPORT} != "no"
218 _libcom_err= libcom_err
219 .endif
220
221 .if ${MK_LDNS} != "no"
222 _libldns=       libldns
223 .endif
224
225 # The libraries under libclang_rt can only be built by clang, and only make
226 # sense to build when clang is enabled at all.  Furthermore, they can only be
227 # built for certain architectures.
228 .if ${MK_CLANG} != "no" && ${COMPILER_TYPE} == "clang" && \
229     (${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \
230     (${MACHINE_CPUARCH} == "arm" && ${MACHINE_ARCH} != "armeb") || \
231     (${MACHINE_CPUARCH} == "i386"))
232 _libclang_rt=   libclang_rt
233 .endif
234
235 .if ${MK_LIBCPLUSPLUS} != "no"
236 _libcxxrt=      libcxxrt
237 _libcplusplus=  libc++ libc++experimental
238 _libcplusplus+= libc++fs
239 .endif
240
241 .if ${MK_EFI} != "no"
242 _libefivar=     libefivar
243 .endif
244
245 .if ${MK_LIBTHR} != "no"
246 _libthr=        libthr
247 .endif
248
249 .if ${MK_NAND} != "no"
250 _libnandfs=     libnandfs
251 .endif
252
253 .if ${MK_NETGRAPH} != "no"
254 _libnetgraph=   libnetgraph
255 .endif
256
257 .if ${MK_NIS} != "no"
258 _libypclnt=     libypclnt
259 .endif
260
261 .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
262 _libvgl=        libvgl
263 _libproc=       libproc
264 _librtld_db=    librtld_db
265 .endif
266
267 .if ${MACHINE_CPUARCH} == "amd64"
268 .if ${MK_BHYVE} != "no"
269 _libvmmapi=     libvmmapi
270 .endif
271 .endif
272
273 .if ${MACHINE_CPUARCH} == "mips"
274 _libproc=       libproc
275 _librtld_db=    librtld_db
276 .endif
277
278 .if ${MACHINE_CPUARCH} == "powerpc"
279 _libproc=       libproc
280 _librtld_db=    librtld_db
281 .endif
282
283 .if defined(LINKER_FEATURES) && ${LINKER_FEATURES:Mfilter}
284 _libdl=         libdl
285 .endif
286
287 .if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm" || \
288     ${MACHINE_CPUARCH} == "riscv"
289 _libproc=       libproc
290 _librtld_db=    librtld_db
291 .endif
292 SUBDIR.${MK_OFED}+=     ofed
293 SUBDIR.${MK_ZFS}+=      libbe
294
295 SUBDIR.${MK_OPENMP}+=   libomp
296
297 .if ${MK_OPENSSL} != "no"
298 _libmp=         libmp
299 .endif
300
301 .if ${MK_PMC} != "no"
302 _libpmc=        libpmc
303 .endif
304
305 .if ${MK_RADIUS_SUPPORT} != "no"
306 _libradius=     libradius
307 .endif
308
309 .if ${MK_SENDMAIL} != "no"
310 _libmilter=     libmilter
311 _libsm=         libsm
312 _libsmdb=       libsmdb
313 _libsmutil=     libsmutil
314 .endif
315
316 .if ${MK_TELNET} != "no"
317 _libtelnet=     libtelnet
318 .endif
319
320 .if ${MK_TESTS_SUPPORT} != "no"
321 _atf=           atf
322 .endif
323 .if ${MK_TESTS} != "no"
324 _tests=         tests
325 .endif
326
327 .if ${MK_UNBOUND} != "no"
328 _libunbound=    libunbound
329 .endif
330
331 .if ${MK_USB} != "no"
332 _libusbhid=     libusbhid
333 _libusb=        libusb
334 .endif
335
336 .if !make(install)
337 SUBDIR_PARALLEL=
338 .endif
339
340 .include <bsd.subdir.mk>