]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - lib/Makefile
MFC r317075: Update ELF Tool Chain to upstream r3520
[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         ${_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 .if ${MK_FILE} != "no"
196 _libmagic=      libmagic
197 .endif
198
199 .if ${MK_GPIO} != "no"
200 _libgpio=       libgpio
201 .endif
202
203 .if ${MK_GSSAPI} != "no"
204 _libgssapi=     libgssapi
205 _librpcsec_gss= librpcsec_gss
206 .endif
207
208 .if ${MK_ICONV} != "no"
209 _libiconv_modules=      libiconv_modules
210 .endif
211
212 .if ${MK_KERBEROS_SUPPORT} != "no"
213 _libcom_err= libcom_err
214 .endif
215
216 .if ${MK_LDNS} != "no"
217 _libldns=       libldns
218 .endif
219
220 # The libraries under libclang_rt can only be built by clang, and only make
221 # sense to build when clang is enabled at all.  Furthermore, they can only be
222 # built for certain architectures.
223 .if ${MK_CLANG} != "no" && ${COMPILER_TYPE} == "clang" && \
224     (${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \
225     (${MACHINE_CPUARCH} == "arm" && ${MACHINE_ARCH} != "armeb") || \
226     (${MACHINE_CPUARCH} == "i386"))
227 _libclang_rt=   libclang_rt
228 .endif
229
230 .if ${MK_LIBCPLUSPLUS} != "no"
231 _libcxxrt=      libcxxrt
232 _libcplusplus=  libc++
233 .endif
234
235 .if ${MK_LIBTHR} != "no"
236 _libthr=        libthr
237 .endif
238
239 .if ${MK_NAND} != "no"
240 _libnandfs=     libnandfs
241 .endif
242
243 .if ${MK_NETGRAPH} != "no"
244 _libnetgraph=   libnetgraph
245 .endif
246
247 .if ${MK_NIS} != "no"
248 _libypclnt=     libypclnt
249 .endif
250
251 .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
252 _libvgl=        libvgl
253 _libproc=       libproc
254 _librtld_db=    librtld_db
255 .endif
256
257 .if ${MACHINE_CPUARCH} == "amd64"
258 .if ${MK_BHYVE} != "no"
259 _libvmmapi=     libvmmapi
260 .endif
261 .endif
262
263 .if ${MACHINE_CPUARCH} == "mips"
264 _libproc=       libproc
265 _librtld_db=    librtld_db
266 .endif
267
268 .if ${MACHINE_CPUARCH} == "powerpc"
269 _libproc=       libproc
270 _librtld_db=    librtld_db
271 .endif
272
273 .if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm" || \
274     ${MACHINE_CPUARCH} == "riscv"
275 _libproc=       libproc
276 _librtld_db=    librtld_db
277 .endif
278
279 .if ${MK_OPENSSL} != "no"
280 _libmp=         libmp
281 .endif
282
283 .if ${MK_PMC} != "no"
284 _libpmc=        libpmc
285 .endif
286
287 .if ${MK_RADIUS_SUPPORT} != "no"
288 _libradius=     libradius
289 .endif
290
291 .if ${MK_SENDMAIL} != "no"
292 _libmilter=     libmilter
293 _libsm=         libsm
294 _libsmdb=       libsmdb
295 _libsmutil=     libsmutil
296 .endif
297
298 .if ${MK_TELNET} != "no"
299 _libtelnet=     libtelnet
300 .endif
301
302 .if ${MK_TESTS_SUPPORT} != "no"
303 _atf=           atf
304 .endif
305 .if ${MK_TESTS} != "no"
306 _tests=         tests
307 .endif
308
309 .if ${MK_UNBOUND} != "no"
310 _libunbound=    libunbound
311 .endif
312
313 .if ${MK_USB} != "no"
314 _libusbhid=     libusbhid
315 _libusb=        libusb
316 .endif
317
318 .if !make(install)
319 SUBDIR_PARALLEL=
320 .endif
321
322 .include <bsd.subdir.mk>