]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - lib/Makefile
MFC r320034:
[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         libdwarf \
50         libedit \
51         ${_libefivar} \
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         libipsec \
64         libjail \
65         libkiconv \
66         libkvm \
67         ${_libldns} \
68         liblzma \
69         ${_libmagic} \
70         libmemstat \
71         libmd \
72         ${_libmilter} \
73         ${_libmp} \
74         libmt \
75         ${_libnandfs} \
76         lib80211 \
77         libnetbsd \
78         ${_libnetgraph} \
79         ${_libngatm} \
80         libnv \
81         libopenbsd \
82         libopie \
83         libpam \
84         libpcap \
85         ${_libpe} \
86         libpjdlog \
87         ${_libpmc} \
88         ${_libproc} \
89         libprocstat \
90         ${_libradius} \
91         librpcsvc \
92         librt \
93         ${_librtld_db} \
94         libsbuf \
95         ${_libsdp} \
96         ${_libsm} \
97         libsmb \
98         ${_libsmdb} \
99         ${_libsmutil} \
100         libsqlite3 \
101         libstand \
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 _libelftc=      libelftc
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 ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm" || \
280     ${MACHINE_CPUARCH} == "riscv"
281 _libproc=       libproc
282 _librtld_db=    librtld_db
283 .endif
284
285 .if ${MK_OPENSSL} != "no"
286 _libmp=         libmp
287 .endif
288
289 .if ${MK_PMC} != "no"
290 _libpmc=        libpmc
291 .endif
292
293 .if ${MK_RADIUS_SUPPORT} != "no"
294 _libradius=     libradius
295 .endif
296
297 .if ${MK_SENDMAIL} != "no"
298 _libmilter=     libmilter
299 _libsm=         libsm
300 _libsmdb=       libsmdb
301 _libsmutil=     libsmutil
302 .endif
303
304 .if ${MK_TELNET} != "no"
305 _libtelnet=     libtelnet
306 .endif
307
308 .if ${MK_TESTS_SUPPORT} != "no"
309 _atf=           atf
310 .endif
311 .if ${MK_TESTS} != "no"
312 _tests=         tests
313 .endif
314
315 .if ${MK_UNBOUND} != "no"
316 _libunbound=    libunbound
317 .endif
318
319 .if ${MK_USB} != "no"
320 _libusbhid=     libusbhid
321 _libusb=        libusb
322 .endif
323
324 .if !make(install)
325 SUBDIR_PARALLEL=
326 .endif
327
328 .include <bsd.subdir.mk>