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