]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - lib/Makefile
install: Use posix_spawnp() for starting strip and improve error messages.
[FreeBSD/FreeBSD.git] / lib / Makefile
1 #       @(#)Makefile    8.1 (Berkeley) 6/4/93
2 # $FreeBSD$
3
4 .include <bsd.own.mk>
5
6 # To satisfy shared library or ELF linkage when only the libraries being
7 # built are visible:
8 #
9 # csu must be built before all shared libaries for ELF.
10 # libc must be built before all other shared libraries.
11 # libbsm must be built before libauditd.
12 # libcom_err must be built before libpam.
13 # libcrypt must be built before libpam.
14 # libkvm must be built before libdevstat.
15 # libldns must be built before libunbound.
16 # msun must be built before libg++ and libstdc++.
17 # libmd must be built before libatm, libopie, libradius, and libtacplus.
18 # ncurses must be built before libdialog, libedit and libreadline.
19 # libnetgraph must be built before libbsnmp/modules/snmp_netgraph.
20 # libopie must be built before libpam.
21 # libradius must be built before libpam.
22 # librpcsvc must be built before libpam.
23 # libsbuf must be built before libcam.
24 # libtacplus must be built before libpam.
25 # libutil must be built before libpam.
26 # libypclnt must be built before libpam.
27 # libgssapi must be built before librpcsec_gss
28 #
29 # Otherwise, the SUBDIR list should be in alphabetical order.
30 #
31 # Except it appears bind needs to be compiled last
32
33 SUBDIR_ORDERED= ${_csu} \
34         libc \
35         libc_nonshared \
36         libbsm \
37         libauditd \
38         libutil \
39         libpjdlog \
40         libnv \
41         ${_libcapsicum} \
42         libcompiler_rt \
43         libcrypt \
44         libelf \
45         ${_libiconv_modules} \
46         libkvm \
47         ${_libldns} \
48         msun \
49         libmd \
50         ncurses \
51         ${_libnetgraph} \
52         libradius \
53         librpcsvc \
54         libsbuf \
55         libtacplus \
56         ${_libypclnt} \
57         ${_libcxxrt} \
58         ${_libcplusplus}
59
60 .if ${MK_KERBEROS_SUPPORT} != "no"
61 SUBDIR_ORDERED+=        libcom_err
62 .endif
63
64 SUBDIR= ${SUBDIR_ORDERED} \
65         libalias \
66         libarchive \
67         ${_libatm} \
68         libbegemot \
69         libblocksruntime \
70         ${_libbluetooth} \
71         ${_libbsnmp} \
72         libbsdstat \
73         libbz2 \
74         libcalendar \
75         libcam \
76         ${_libcasper} \
77         libcompat \
78         libdevinfo \
79         libdevstat \
80         libdwarf \
81         libedit \
82         ${_libefi} \
83         libexecinfo \
84         libexpat \
85         libfetch \
86         libgeom \
87         ${_libgpib} \
88         ${_libgssapi} \
89         ${_librpcsec_gss} \
90         libipsec \
91         ${_libipx} \
92         libjail \
93         libkiconv \
94         liblzma \
95         libmagic \
96         libmandoc \
97         libmemstat \
98         ${_libmilter} \
99         ${_libmp} \
100         ${_libnandfs} \
101         libnetbsd \
102         ${_libngatm} \
103         libnv \
104         libopie \
105         libpam \
106         libpcap \
107         ${_libpmc} \
108         ${_libproc} \
109         libprocstat \
110         librt \
111         ${_librtld_db} \
112         ${_libsdp} \
113         ${_libsm} \
114         ${_libsmb} \
115         ${_libsmdb} \
116         ${_libsmutil} \
117         libstand \
118         libstdbuf \
119         libstdthreads \
120         ${_libtelnet} \
121         ${_libthr} \
122         libthread_db \
123         libucl \
124         libufs \
125         libugidfw \
126         libulog \
127         ${_libunbound} \
128         ${_libusbhid} \
129         ${_libusb} \
130         ${_libvgl} \
131         ${_libvmmapi} \
132         libwrap \
133         liby \
134         libz \
135         ${_atf} \
136         ${_clang} \
137         ${_tests}
138
139 .if exists(${.CURDIR}/csu/${MACHINE_ARCH}-elf)
140 _csu=csu/${MACHINE_ARCH}-elf
141 .elif exists(${.CURDIR}/csu/${MACHINE_ARCH})
142 _csu=csu/${MACHINE_ARCH}
143 .elif exists(${.CURDIR}/csu/${MACHINE_CPUARCH}/Makefile)
144 _csu=csu/${MACHINE_CPUARCH}
145 .else
146 _csu=csu
147 .endif
148
149 # NB: keep these sorted by MK_* knobs
150
151 .if ${MK_ATM} != "no"
152 _libngatm=      libngatm
153 .endif
154
155 .if ${MK_BLUETOOTH} != "no"
156 _libbluetooth=  libbluetooth
157 _libsdp=        libsdp
158 .endif
159
160 .if ${MK_BSNMP} != "no"
161 _libbsnmp=      libbsnmp
162 .endif
163
164 .if ${MK_CASPER} != "no"
165 _libcapsicum=   libcapsicum
166 _libcasper=     libcasper
167 .endif
168
169 .if ${MK_CLANG} != "no" && !defined(COMPAT_32BIT)
170 _clang=         clang
171 .endif
172
173 .if ${MK_GPIB} != "no"
174 _libgpib=       libgpib
175 .endif
176
177 .if ${MK_GSSAPI} != "no"
178 _libgssapi=     libgssapi
179 _librpcsec_gss= librpcsec_gss
180 .endif
181
182 .if ${MK_ICONV} != "no"
183 _libiconv_modules=      libiconv_modules
184 .endif
185
186 .if ${MK_IPX} != "no"
187 _libipx=        libipx
188 .endif
189
190 .if ${MK_LDNS} != "no"
191 _libldns=       libldns
192 .endif
193
194 .if ${MK_LIBCPLUSPLUS} != "no"
195 _libcxxrt=      libcxxrt
196 _libcplusplus=  libc++
197 .endif
198
199 .if ${MK_LIBTHR} != "no"
200 _libthr=        libthr
201 .endif
202
203 .if ${MK_NAND} != "no"
204 _libnandfs=     libnandfs
205 .endif
206
207 .if ${MK_NETGRAPH} != "no"
208 _libnetgraph=   libnetgraph
209 .endif
210
211 .if ${MK_NIS} != "no"
212 _libypclnt=     libypclnt
213 .endif
214
215 .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
216 _libsmb=        libsmb
217 _libvgl=        libvgl
218 _libproc=       libproc
219 _librtld_db=    librtld_db
220 .endif
221
222 .if ${MACHINE_CPUARCH} == "amd64"
223 _libvmmapi=     libvmmapi
224 .endif
225
226 .if ${MACHINE_CPUARCH} == "ia64"
227 _libefi=        libefi
228 _libsmb=        libsmb
229 .endif
230
231 .if ${MACHINE_CPUARCH} == "mips"
232 _libproc=       libproc
233 _librtld_db=    librtld_db
234 .endif
235
236 .if ${MACHINE_CPUARCH} == "powerpc"
237 _libproc=       libproc
238 _librtld_db=    librtld_db
239 _libsmb=        libsmb
240 .endif
241
242 .if ${MACHINE_CPUARCH} == "sparc64"
243 _libsmb=        libsmb
244 .endif
245
246 .if ${MK_OPENSSL} != "no"
247 _libmp=         libmp
248 .endif
249
250 .if ${MK_PMC} != "no"
251 _libpmc=        libpmc
252 .endif
253
254 .if ${MK_SENDMAIL} != "no"
255 _libmilter=     libmilter
256 _libsm=         libsm
257 _libsmdb=       libsmdb
258 _libsmutil=     libsmutil
259 .endif
260
261 .if ${MK_TELNET} != "no"
262 _libtelnet=     libtelnet
263 .endif
264
265 .if ${MK_TESTS} != "no"
266 _atf=           atf
267 _tests=         tests
268 .endif
269
270 .if ${MK_UNBOUND} != "no"
271 _libunbound=    libunbound
272 .endif
273
274 .if ${MK_USB} != "no"
275 _libusbhid=     libusbhid
276 _libusb=        libusb
277 .endif
278
279 .if !defined(LIBRARIES_ONLY)
280 afterinstall:
281         ${INSTALL_SYMLINK} ../include ${DESTDIR}/usr/lib/include
282 .endif
283
284 .include <bsd.subdir.mk>