]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - lib/Makefile
Merge xz 5.2.0.
[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         libmandoc \
69         libmemstat \
70         libmd \
71         ${_libmilter} \
72         ${_libmp} \
73         ${_libnandfs} \
74         libnetbsd \
75         ${_libnetgraph} \
76         ${_libngatm} \
77         libnv \
78         libohash \
79         libopie \
80         libpam \
81         libpcap \
82         libpjdlog \
83         ${_libpmc} \
84         ${_libproc} \
85         libprocstat \
86         ${_libradius} \
87         librpcsvc \
88         librt \
89         ${_librtld_db} \
90         libsbuf \
91         ${_libsdp} \
92         ${_libsm} \
93         ${_libsmb} \
94         ${_libsmdb} \
95         ${_libsmutil} \
96         libsqlite3 \
97         libstand \
98         libstdbuf \
99         libstdthreads \
100         libtacplus \
101         ${_libtelnet} \
102         ${_libthr} \
103         libthread_db \
104         libucl \
105         libufs \
106         libugidfw \
107         libulog \
108         ${_libunbound} \
109         ${_libusbhid} \
110         ${_libusb} \
111         libutil \
112         ${_libvgl} \
113         ${_libvmmapi} \
114         libwrap \
115         libxo \
116         liby \
117         ${_libypclnt} \
118         libz \
119         ncurses \
120         ${_atf} \
121         ${_clang} \
122         ${_cuse} \
123         ${_tests}
124
125 # Inter-library dependencies.  When the makefile for a library contains LDADD
126 # libraries, those libraries should be listed as build order dependencies here.
127
128 SUBDIR_DEPEND_libarchive= libz libbz2 libexpat liblzma libmd
129 SUBDIR_DEPEND_libatm= libmd
130 SUBDIR_DEPEND_libauditdm= libbsm
131 SUBDIR_DEPEND_libbsnmp= ${_libnetgraph}
132 SUBDIR_DEPEND_libc++= libcxxrt
133 SUBDIR_DEPEND_libc= libcompiler_rt
134 SUBDIR_DEPEND_libcam= libsbuf
135 SUBDIR_DEPEND_libcapsicum= libnv
136 SUBDIR_DEPEND_libcasper= libcapsicum libnv libpjdlog
137 SUBDIR_DEPEND_libdevstat= libkvm
138 SUBDIR_DEPEND_libdpv= libfigpar ncurses libutil
139 SUBDIR_DEPEND_libedit= ncurses
140 SUBDIR_DEPEND_libg++= msun
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_libreadline= ncurses
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 .if exists(${.CURDIR}/csu/${MACHINE_ARCH}-elf)
159 _csu=csu/${MACHINE_ARCH}-elf
160 .elif exists(${.CURDIR}/csu/${MACHINE_ARCH})
161 _csu=csu/${MACHINE_ARCH}
162 .elif exists(${.CURDIR}/csu/${MACHINE_CPUARCH}/Makefile)
163 _csu=csu/${MACHINE_CPUARCH}
164 .else
165 _csu=csu
166 .endif
167
168 # NB: keep these sorted by MK_* knobs
169
170 .if ${MK_ATM} != "no"
171 _libngatm=      libngatm
172 .endif
173
174 .if ${MK_BLUETOOTH} != "no"
175 _libbluetooth=  libbluetooth
176 _libsdp=        libsdp
177 .endif
178
179 .if ${MK_BSNMP} != "no"
180 _libbsnmp=      libbsnmp
181 .endif
182
183 .if ${MK_CASPER} != "no"
184 _libcapsicum=   libcapsicum
185 _libcasper=     libcasper
186 .endif
187
188 .if ${MK_CLANG} != "no" && !defined(COMPAT_32BIT)
189 _clang=         clang
190 .endif
191
192 .if ${MK_CUSE} != "no"
193 _cuse=          libcuse
194 .endif
195
196 .if ${MK_ELFTOOLCHAIN_TOOLS} != "no"
197 _libelftc=      libelftc
198 .endif
199
200 .if ${MK_FILE} != "no"
201 _libmagic=      libmagic
202 .endif
203
204 .if ${MK_GPIO} != "no"
205 _libgpio=       libgpio
206 .endif
207
208 .if ${MK_GSSAPI} != "no"
209 _libgssapi=     libgssapi
210 _librpcsec_gss= librpcsec_gss
211 .endif
212
213 .if ${MK_ICONV} != "no"
214 _libiconv_modules=      libiconv_modules
215 .endif
216
217 .if ${MK_KERBEROS_SUPPORT} != "no"
218 _libcom_err= libcom_err
219 .endif
220
221 .if ${MK_LDNS} != "no"
222 _libldns=       libldns
223 .endif
224
225 # The libraries under libclang_rt can only be built by clang, and only make
226 # sense to build when clang is enabled at all.  Furthermore, they can only be
227 # built for certain architectures.
228 .if ${MK_CLANG} != "no" && ${COMPILER_TYPE} == "clang" && \
229     (${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" || \
230     (${MACHINE_CPUARCH} == "arm" && ${MACHINE_ARCH} != "armeb"))
231 _libclang_rt=   libclang_rt
232 .endif
233
234 .if ${MK_LIBCPLUSPLUS} != "no"
235 _libcxxrt=      libcxxrt
236 _libcplusplus=  libc++
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 ${MK_PF} != "no"
256 _libevent=      libevent
257 .endif
258
259 .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
260 _libsmb=        libsmb
261 _libvgl=        libvgl
262 _libproc=       libproc
263 _librtld_db=    librtld_db
264 .endif
265
266 .if ${MACHINE_CPUARCH} == "amd64"
267 .if ${MK_BHYVE} != "no"
268 _libvmmapi=     libvmmapi
269 .endif
270 .endif
271
272 .if ${MACHINE_CPUARCH} == "mips"
273 _libproc=       libproc
274 _librtld_db=    librtld_db
275 .endif
276
277 .if ${MACHINE_CPUARCH} == "powerpc"
278 _libproc=       libproc
279 _librtld_db=    librtld_db
280 _libsmb=        libsmb
281 .endif
282
283 .if ${MACHINE_CPUARCH} == "sparc64"
284 _libsmb=        libsmb
285 .endif
286
287 .if ${MK_OPENSSL} != "no"
288 _libmp=         libmp
289 .endif
290
291 .if ${MK_PMC} != "no"
292 _libpmc=        libpmc
293 .endif
294
295 .if ${MK_RADIUS_SUPPORT} != "no"
296 _libradius=     libradius
297 .endif
298
299 .if ${MK_SENDMAIL} != "no"
300 _libmilter=     libmilter
301 _libsm=         libsm
302 _libsmdb=       libsmdb
303 _libsmutil=     libsmutil
304 .endif
305
306 .if ${MK_TELNET} != "no"
307 _libtelnet=     libtelnet
308 .endif
309
310 .if ${MK_TESTS_SUPPORT} != "no"
311 _atf=           atf
312 .endif
313 .if ${MK_TESTS} != "no"
314 _tests=         tests
315 .endif
316
317 .if ${MK_UNBOUND} != "no"
318 _libunbound=    libunbound
319 .endif
320
321 .if ${MK_USB} != "no"
322 _libusbhid=     libusbhid
323 _libusb=        libusb
324 .endif
325
326 .if !defined(LIBRARIES_ONLY)
327 afterinstall:
328         ${INSTALL_SYMLINK} ../include ${DESTDIR}/usr/lib/include
329 .endif
330
331 .if !make(install)
332 SUBDIR_PARALLEL=
333 .endif
334
335 .include <bsd.subdir.mk>