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