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