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