]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - lib/Makefile
Since contrib/libcxxrt's ancestry was never correct, subversion 1.8 and
[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         ${_libcasper} \
40         ${_libcom_err} \
41         libcompat \
42         libcrypt \
43         libdevctl \
44         libdevinfo \
45         libdevstat \
46         libdpv \
47         libdwarf \
48         libedit \
49         ${_libelftc} \
50         libevent \
51         libexecinfo \
52         libexpat \
53         libfetch \
54         libfigpar \
55         libgeom \
56         ${_libgpio} \
57         ${_libgssapi} \
58         ${_librpcsec_gss} \
59         ${_libiconv_modules} \
60         libipsec \
61         libjail \
62         libkiconv \
63         libkvm \
64         ${_libldns} \
65         liblzma \
66         ${_libmagic} \
67         libmemstat \
68         libmd \
69         ${_libmilter} \
70         ${_libmp} \
71         libmt \
72         ${_libnandfs} \
73         lib80211 \
74         libnetbsd \
75         ${_libnetgraph} \
76         ${_libngatm} \
77         libnv \
78         libopenbsd \
79         libopie \
80         libpam \
81         libpcap \
82         ${_libpe} \
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_libcasper= libnv
138 SUBDIR_DEPEND_libdevstat= libkvm
139 SUBDIR_DEPEND_libdpv= libfigpar ncurses libutil
140 SUBDIR_DEPEND_libedit= ncurses
141 SUBDIR_DEPEND_libgeom= libexpat libsbuf
142 SUBDIR_DEPEND_liblibrpcsec_gss= libgssapi
143 SUBDIR_DEPEND_libmagic= libz
144 SUBDIR_DEPEND_libmemstat= libkvm
145 SUBDIR_DEPEND_libopie= libmd
146 SUBDIR_DEPEND_libpam= libcrypt libopie ${_libradius} librpcsvc libtacplus libutil ${_libypclnt} ${_libcom_err} 
147 SUBDIR_DEPEND_libpjdlog= libutil
148 SUBDIR_DEPEND_libprocstat= libkvm libutil
149 SUBDIR_DEPEND_libradius= libmd
150 SUBDIR_DEPEND_libsmb= libkiconv
151 SUBDIR_DEPEND_libstdc++:= msun
152 SUBDIR_DEPEND_libtacplus= libmd
153 SUBDIR_DEPEND_libulog= libmd
154 SUBDIR_DEPEND_libunbound= ${_libldns}
155 SUBDIR_DEPEND_liblzma= ${_libthr}
156
157 # NB: keep these sorted by MK_* knobs
158
159 .if ${MK_ATM} != "no"
160 _libngatm=      libngatm
161 .endif
162
163 .if ${MK_BLUETOOTH} != "no"
164 _libbluetooth=  libbluetooth
165 _libsdp=        libsdp
166 .endif
167
168 .if ${MK_BSNMP} != "no"
169 _libbsnmp=      libbsnmp
170 .endif
171
172 .if ${MK_CASPER} != "no"
173 _libcasper=     libcasper
174 .endif
175
176 .if ${MK_CLANG} != "no" && !defined(COMPAT_32BIT) && !defined(COMPAT_SOFTFP)
177 _clang=         clang
178 .endif
179
180 .if ${MK_CUSE} != "no"
181 _cuse=          libcuse
182 .endif
183
184 .if ${MK_TOOLCHAIN} != "no"
185 _libelftc=      libelftc
186 _libpe=         libpe
187 .endif
188
189 .if ${MK_FILE} != "no"
190 _libmagic=      libmagic
191 .endif
192
193 .if ${MK_GPIO} != "no"
194 _libgpio=       libgpio
195 .endif
196
197 .if ${MK_GSSAPI} != "no"
198 _libgssapi=     libgssapi
199 _librpcsec_gss= librpcsec_gss
200 .endif
201
202 .if ${MK_ICONV} != "no"
203 _libiconv_modules=      libiconv_modules
204 .endif
205
206 .if ${MK_KERBEROS_SUPPORT} != "no"
207 _libcom_err= libcom_err
208 .endif
209
210 .if ${MK_LDNS} != "no"
211 _libldns=       libldns
212 .endif
213
214 # The libraries under libclang_rt can only be built by clang, and only make
215 # sense to build when clang is enabled at all.  Furthermore, they can only be
216 # built for certain architectures.
217 .if ${MK_CLANG} != "no" && ${COMPILER_TYPE} == "clang" && \
218     (${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \
219     (${MACHINE_CPUARCH} == "arm" && ${MACHINE_ARCH} != "armeb") || \
220     (${MACHINE_CPUARCH} == "i386"))
221 _libclang_rt=   libclang_rt
222 .endif
223
224 .if ${MK_LIBCPLUSPLUS} != "no"
225 _libcxxrt=      libcxxrt
226 _libcplusplus=  libc++
227 .endif
228
229 .if ${MK_LIBTHR} != "no"
230 _libthr=        libthr
231 .endif
232
233 .if ${MK_NAND} != "no"
234 _libnandfs=     libnandfs
235 .endif
236
237 .if ${MK_NETGRAPH} != "no"
238 _libnetgraph=   libnetgraph
239 .endif
240
241 .if ${MK_NIS} != "no"
242 _libypclnt=     libypclnt
243 .endif
244
245 .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
246 _libvgl=        libvgl
247 _libproc=       libproc
248 _librtld_db=    librtld_db
249 .endif
250
251 .if ${MACHINE_CPUARCH} == "amd64"
252 .if ${MK_BHYVE} != "no"
253 _libvmmapi=     libvmmapi
254 .endif
255 .endif
256
257 .if ${MACHINE_CPUARCH} == "mips"
258 _libproc=       libproc
259 _librtld_db=    librtld_db
260 .endif
261
262 .if ${MACHINE_CPUARCH} == "powerpc"
263 _libproc=       libproc
264 _librtld_db=    librtld_db
265 .endif
266
267 .if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm" || \
268     ${MACHINE_CPUARCH} == "riscv"
269 _libproc=       libproc
270 _librtld_db=    librtld_db
271 .endif
272
273 .if ${MK_OPENSSL} != "no"
274 _libmp=         libmp
275 .endif
276
277 .if ${MK_PMC} != "no"
278 _libpmc=        libpmc
279 .endif
280
281 .if ${MK_RADIUS_SUPPORT} != "no"
282 _libradius=     libradius
283 .endif
284
285 .if ${MK_SENDMAIL} != "no"
286 _libmilter=     libmilter
287 _libsm=         libsm
288 _libsmdb=       libsmdb
289 _libsmutil=     libsmutil
290 .endif
291
292 .if ${MK_TELNET} != "no"
293 _libtelnet=     libtelnet
294 .endif
295
296 .if ${MK_TESTS_SUPPORT} != "no"
297 _atf=           atf
298 .endif
299 .if ${MK_TESTS} != "no"
300 _tests=         tests
301 .endif
302
303 .if ${MK_UNBOUND} != "no"
304 _libunbound=    libunbound
305 .endif
306
307 .if ${MK_USB} != "no"
308 _libusbhid=     libusbhid
309 _libusb=        libusb
310 .endif
311
312 .if !make(install)
313 SUBDIR_PARALLEL=
314 .endif
315
316 .include <bsd.subdir.mk>