]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - lib/Makefile
MFC r322324: capsicum_helpers: Add FIODTYPE to default ioctls allowed
[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
160 # NB: keep these sorted by MK_* knobs
161
162 .if ${MK_ATM} != "no"
163 _libngatm=      libngatm
164 .endif
165
166 .if ${MK_BLACKLIST} != "no"
167 _libblacklist=  libblacklist
168 .endif
169
170 .if ${MK_BLUETOOTH} != "no"
171 _libbluetooth=  libbluetooth
172 _libsdp=        libsdp
173 .endif
174
175 .if ${MK_BSNMP} != "no"
176 _libbsnmp=      libbsnmp
177 .endif
178
179 .if ${MK_CASPER} != "no"
180 _libcasper=     libcasper
181 .endif
182
183 .if ${MK_CLANG} != "no" && !defined(COMPAT_32BIT) && !defined(COMPAT_SOFTFP)
184 _clang=         clang
185 .endif
186
187 .if ${MK_CUSE} != "no"
188 _cuse=          libcuse
189 .endif
190
191 .if ${MK_TOOLCHAIN} != "no"
192 _libpe=         libpe
193 .endif
194
195 SUBDIR.${MK_DIALOG}+=   libdpv
196
197 .if ${MK_FILE} != "no"
198 _libmagic=      libmagic
199 .endif
200
201 .if ${MK_GPIO} != "no"
202 _libgpio=       libgpio
203 .endif
204
205 .if ${MK_GSSAPI} != "no"
206 _libgssapi=     libgssapi
207 _librpcsec_gss= librpcsec_gss
208 .endif
209
210 .if ${MK_ICONV} != "no"
211 _libiconv_modules=      libiconv_modules
212 .endif
213
214 .if ${MK_KERBEROS_SUPPORT} != "no"
215 _libcom_err= libcom_err
216 .endif
217
218 .if ${MK_LDNS} != "no"
219 _libldns=       libldns
220 .endif
221
222 # The libraries under libclang_rt can only be built by clang, and only make
223 # sense to build when clang is enabled at all.  Furthermore, they can only be
224 # built for certain architectures.
225 .if ${MK_CLANG} != "no" && ${COMPILER_TYPE} == "clang" && \
226     (${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \
227     (${MACHINE_CPUARCH} == "arm" && ${MACHINE_ARCH} != "armeb") || \
228     (${MACHINE_CPUARCH} == "i386"))
229 _libclang_rt=   libclang_rt
230 .endif
231
232 .if ${MK_LIBCPLUSPLUS} != "no"
233 _libcxxrt=      libcxxrt
234 _libcplusplus=  libc++
235 .endif
236
237 .if ${MK_EFI} != "no"
238 _libefivar=     libefivar
239 .endif
240
241 .if ${MK_LIBTHR} != "no"
242 _libthr=        libthr
243 .endif
244
245 .if ${MK_NAND} != "no"
246 _libnandfs=     libnandfs
247 .endif
248
249 .if ${MK_NETGRAPH} != "no"
250 _libnetgraph=   libnetgraph
251 .endif
252
253 .if ${MK_NIS} != "no"
254 _libypclnt=     libypclnt
255 .endif
256
257 .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
258 _libvgl=        libvgl
259 _libproc=       libproc
260 _librtld_db=    librtld_db
261 .endif
262
263 .if ${MACHINE_CPUARCH} == "amd64"
264 .if ${MK_BHYVE} != "no"
265 _libvmmapi=     libvmmapi
266 .endif
267 .endif
268
269 .if ${MACHINE_CPUARCH} == "mips"
270 _libproc=       libproc
271 _librtld_db=    librtld_db
272 .endif
273
274 .if ${MACHINE_CPUARCH} == "powerpc"
275 _libproc=       libproc
276 _librtld_db=    librtld_db
277 .endif
278
279 .if defined(LINKER_FEATURES) && ${LINKER_FEATURES:Mfilter}
280 _libdl=         libdl
281 .endif
282
283 .if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm" || \
284     ${MACHINE_CPUARCH} == "riscv"
285 _libproc=       libproc
286 _librtld_db=    librtld_db
287 .endif
288
289 .if ${MK_OPENSSL} != "no"
290 _libmp=         libmp
291 .endif
292
293 .if ${MK_PMC} != "no"
294 _libpmc=        libpmc
295 .endif
296
297 .if ${MK_RADIUS_SUPPORT} != "no"
298 _libradius=     libradius
299 .endif
300
301 .if ${MK_SENDMAIL} != "no"
302 _libmilter=     libmilter
303 _libsm=         libsm
304 _libsmdb=       libsmdb
305 _libsmutil=     libsmutil
306 .endif
307
308 .if ${MK_TELNET} != "no"
309 _libtelnet=     libtelnet
310 .endif
311
312 .if ${MK_TESTS_SUPPORT} != "no"
313 _atf=           atf
314 .endif
315 .if ${MK_TESTS} != "no"
316 _tests=         tests
317 .endif
318
319 .if ${MK_UNBOUND} != "no"
320 _libunbound=    libunbound
321 .endif
322
323 .if ${MK_USB} != "no"
324 _libusbhid=     libusbhid
325 _libusb=        libusb
326 .endif
327
328 .if !make(install)
329 SUBDIR_PARALLEL=
330 .endif
331
332 .include <bsd.subdir.mk>