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