]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - lib/Makefile
MFC Loader Fixes 2017q4p2: r324453, r324454
[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         libstdbuf \
102         libstdthreads \
103         libsysdecode \
104         libtacplus \
105         ${_libtelnet} \
106         ${_libthr} \
107         libthread_db \
108         libucl \
109         libufs \
110         libugidfw \
111         libulog \
112         ${_libunbound} \
113         ${_libusbhid} \
114         ${_libusb} \
115         libutil \
116         ${_libvgl} \
117         ${_libvmmapi} \
118         libwrap \
119         libxo \
120         liby \
121         ${_libypclnt} \
122         libz \
123         ncurses \
124         ${_atf} \
125         ${_clang} \
126         ${_cuse} \
127         ${_tests}
128
129 # Inter-library dependencies.  When the makefile for a library contains LDADD
130 # libraries, those libraries should be listed as build order dependencies here.
131
132 SUBDIR_DEPEND_libarchive= libz libbz2 libexpat liblzma libmd
133 SUBDIR_DEPEND_libatm= libmd
134 SUBDIR_DEPEND_libauditdm= libbsm
135 SUBDIR_DEPEND_libbsnmp= ${_libnetgraph}
136 SUBDIR_DEPEND_libc++:= libcxxrt
137 SUBDIR_DEPEND_libc= libcompiler_rt
138 SUBDIR_DEPEND_libcam= libsbuf
139 SUBDIR_DEPEND_libcasper= libnv
140 SUBDIR_DEPEND_libdevstat= libkvm
141 SUBDIR_DEPEND_libdpv= libfigpar ncurses libutil
142 SUBDIR_DEPEND_libedit= ncurses
143 SUBDIR_DEPEND_libgeom= libexpat libsbuf
144 SUBDIR_DEPEND_librpcsec_gss= libgssapi
145 SUBDIR_DEPEND_libmagic= libz
146 SUBDIR_DEPEND_libmemstat= libkvm
147 SUBDIR_DEPEND_libopie= libmd
148 SUBDIR_DEPEND_libpam= libcrypt libopie ${_libradius} librpcsvc libtacplus libutil ${_libypclnt} ${_libcom_err} 
149 SUBDIR_DEPEND_libpjdlog= libutil
150 SUBDIR_DEPEND_libprocstat= libkvm libutil
151 SUBDIR_DEPEND_libradius= libmd
152 SUBDIR_DEPEND_libsmb= libkiconv
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_BLACKLIST} != "no"
165 _libblacklist=  libblacklist
166 .endif
167
168 .if ${MK_BLUETOOTH} != "no"
169 _libbluetooth=  libbluetooth
170 _libsdp=        libsdp
171 .endif
172
173 .if ${MK_BSNMP} != "no"
174 _libbsnmp=      libbsnmp
175 .endif
176
177 .if ${MK_CASPER} != "no"
178 _libcasper=     libcasper
179 .endif
180
181 .if ${MK_CLANG} != "no" && !defined(COMPAT_32BIT) && !defined(COMPAT_SOFTFP)
182 _clang=         clang
183 .endif
184
185 .if ${MK_CUSE} != "no"
186 _cuse=          libcuse
187 .endif
188
189 .if ${MK_TOOLCHAIN} != "no"
190 _libpe=         libpe
191 .endif
192
193 SUBDIR.${MK_DIALOG}+=   libdpv
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_EFI} != "no"
236 _libefivar=     libefivar
237 .endif
238
239 .if ${MK_LIBTHR} != "no"
240 _libthr=        libthr
241 .endif
242
243 .if ${MK_NAND} != "no"
244 _libnandfs=     libnandfs
245 .endif
246
247 .if ${MK_NETGRAPH} != "no"
248 _libnetgraph=   libnetgraph
249 .endif
250
251 .if ${MK_NIS} != "no"
252 _libypclnt=     libypclnt
253 .endif
254
255 .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
256 _libvgl=        libvgl
257 _libproc=       libproc
258 _librtld_db=    librtld_db
259 .endif
260
261 .if ${MACHINE_CPUARCH} == "amd64"
262 .if ${MK_BHYVE} != "no"
263 _libvmmapi=     libvmmapi
264 .endif
265 .endif
266
267 .if ${MACHINE_CPUARCH} == "mips"
268 _libproc=       libproc
269 _librtld_db=    librtld_db
270 .endif
271
272 .if ${MACHINE_CPUARCH} == "powerpc"
273 _libproc=       libproc
274 _librtld_db=    librtld_db
275 .endif
276
277 .if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm" || \
278     ${MACHINE_CPUARCH} == "riscv"
279 _libproc=       libproc
280 _librtld_db=    librtld_db
281 .endif
282
283 .if ${MK_OPENSSL} != "no"
284 _libmp=         libmp
285 .endif
286
287 .if ${MK_PMC} != "no"
288 _libpmc=        libpmc
289 .endif
290
291 .if ${MK_RADIUS_SUPPORT} != "no"
292 _libradius=     libradius
293 .endif
294
295 .if ${MK_SENDMAIL} != "no"
296 _libmilter=     libmilter
297 _libsm=         libsm
298 _libsmdb=       libsmdb
299 _libsmutil=     libsmutil
300 .endif
301
302 .if ${MK_TELNET} != "no"
303 _libtelnet=     libtelnet
304 .endif
305
306 .if ${MK_TESTS_SUPPORT} != "no"
307 _atf=           atf
308 .endif
309 .if ${MK_TESTS} != "no"
310 _tests=         tests
311 .endif
312
313 .if ${MK_UNBOUND} != "no"
314 _libunbound=    libunbound
315 .endif
316
317 .if ${MK_USB} != "no"
318 _libusbhid=     libusbhid
319 _libusb=        libusb
320 .endif
321
322 .if !make(install)
323 SUBDIR_PARALLEL=
324 .endif
325
326 .include <bsd.subdir.mk>