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