]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - lib/Makefile
MFC r319008:
[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         ${_libcasper} \
42         ${_libcom_err} \
43         libcompat \
44         libcrypt \
45         libdevctl \
46         libdevdctl \
47         libdevinfo \
48         libdevstat \
49         libdpv \
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         libstand \
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 _libelftc=      libelftc
193 _libpe=         libpe
194 .endif
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>