]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/blob - lib/Makefile
MFC: r262398,r262399,r262410,r262975
[FreeBSD/stable/10.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         libcompiler_rt \
39         libcrypt \
40         libelf \
41         ${_libiconv_modules} \
42         libkvm \
43         ${_libldns} \
44         msun \
45         libmd \
46         ncurses \
47         ${_libnetgraph} \
48         libradius \
49         librpcsvc \
50         libsbuf \
51         libtacplus \
52         libutil \
53         ${_libypclnt} \
54         ${_libcxxrt} \
55         ${_libcplusplus}
56
57 .if ${MK_KERBEROS_SUPPORT} != "no"
58 SUBDIR_ORDERED+=        libcom_err
59 .endif
60
61 SUBDIR= ${SUBDIR_ORDERED} \
62         libalias \
63         libarchive \
64         ${_libatm} \
65         libbegemot \
66         libblocksruntime \
67         ${_libbluetooth} \
68         ${_libbsnmp} \
69         libbz2 \
70         libcalendar \
71         libcam \
72         libcompat \
73         libdevinfo \
74         libdevstat \
75         libdwarf \
76         libedit \
77         ${_libefi} \
78         libexecinfo \
79         libexpat \
80         libfetch \
81         libgeom \
82         ${_libgpib} \
83         ${_libgssapi} \
84         ${_librpcsec_gss} \
85         libipsec \
86         ${_libipx} \
87         libjail \
88         libkiconv \
89         liblzma \
90         libmagic \
91         libmandoc \
92         libmemstat \
93         ${_libmilter} \
94         ${_libmp} \
95         ${_libnandfs} \
96         libnetbsd \
97         ${_libngatm} \
98         libopie \
99         libpam \
100         libpcap \
101         ${_libpmc} \
102         ${_libproc} \
103         libprocstat \
104         librt \
105         ${_librtld_db} \
106         ${_libsdp} \
107         ${_libsm} \
108         ${_libsmb} \
109         ${_libsmdb} \
110         ${_libsmutil} \
111         libstand \
112         libstdbuf \
113         libstdthreads \
114         ${_libtelnet} \
115         ${_libthr} \
116         libthread_db \
117         libucl \
118         libufs \
119         libugidfw \
120         libulog \
121         ${_libunbound} \
122         ${_libusbhid} \
123         ${_libusb} \
124         ${_libvgl} \
125         ${_libvmmapi} \
126         libwrap \
127         liby \
128         libyaml \
129         libz \
130         ${_atf} \
131         ${_clang} \
132         ${_tests}
133
134 .if exists(${.CURDIR}/csu/${MACHINE_ARCH}-elf)
135 _csu=csu/${MACHINE_ARCH}-elf
136 .elif exists(${.CURDIR}/csu/${MACHINE_ARCH})
137 _csu=csu/${MACHINE_ARCH}
138 .elif exists(${.CURDIR}/csu/${MACHINE_CPUARCH}/Makefile)
139 _csu=csu/${MACHINE_CPUARCH}
140 .else
141 _csu=csu
142 .endif
143
144 # NB: keep these sorted by MK_* knobs
145
146 .if ${MK_ATM} != "no"
147 _libngatm=      libngatm
148 .endif
149
150 .if ${MK_BLUETOOTH} != "no"
151 _libbluetooth=  libbluetooth
152 _libsdp=        libsdp
153 .endif
154
155 .if ${MK_BSNMP} != "no"
156 _libbsnmp=      libbsnmp
157 .endif
158
159 .if ${MK_CLANG} != "no" && !defined(COMPAT_32BIT)
160 _clang=         clang
161 .endif
162
163 .if ${MK_GPIB} != "no"
164 _libgpib=       libgpib
165 .endif
166
167 .if ${MK_GSSAPI} != "no"
168 _libgssapi=     libgssapi
169 _librpcsec_gss= librpcsec_gss
170 .endif
171
172 .if ${MK_ICONV} != "no"
173 _libiconv_modules=      libiconv_modules
174 .endif
175
176 .if ${MK_IPX} != "no"
177 _libipx=        libipx
178 .endif
179
180 .if ${MK_LDNS} != "no"
181 _libldns=       libldns
182 .endif
183
184 .if ${MK_LIBCPLUSPLUS} != "no"
185 _libcxxrt=      libcxxrt
186 _libcplusplus=  libc++
187 .endif
188
189 .if ${MK_LIBTHR} != "no"
190 _libthr=        libthr
191 .endif
192
193 .if ${MK_NAND} != "no"
194 _libnandfs=     libnandfs
195 .endif
196
197 .if ${MK_NETGRAPH} != "no"
198 _libnetgraph=   libnetgraph
199 .endif
200
201 .if ${MK_NIS} != "no"
202 _libypclnt=     libypclnt
203 .endif
204
205 .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
206 _libsmb=        libsmb
207 _libvgl=        libvgl
208 _libproc=       libproc
209 _librtld_db=    librtld_db
210 .endif
211
212 .if ${MACHINE_CPUARCH} == "amd64"
213 _libvmmapi=     libvmmapi
214 .endif
215
216 .if ${MACHINE_CPUARCH} == "ia64"
217 _libefi=        libefi
218 _libsmb=        libsmb
219 .endif
220
221 .if ${MACHINE_CPUARCH} == "mips"
222 _libproc=       libproc
223 _librtld_db=    librtld_db
224 .endif
225
226 .if ${MACHINE_CPUARCH} == "powerpc"
227 _libproc=       libproc
228 _librtld_db=    librtld_db
229 _libsmb=        libsmb
230 .endif
231
232 .if ${MACHINE_CPUARCH} == "sparc64"
233 _libsmb=        libsmb
234 .endif
235
236 .if ${MK_OPENSSL} != "no"
237 _libmp=         libmp
238 .endif
239
240 .if ${MK_PMC} != "no"
241 _libpmc=        libpmc
242 .endif
243
244 .if ${MK_SENDMAIL} != "no"
245 _libmilter=     libmilter
246 _libsm=         libsm
247 _libsmdb=       libsmdb
248 _libsmutil=     libsmutil
249 .endif
250
251 .if ${MK_TELNET} != "no"
252 _libtelnet=     libtelnet
253 .endif
254
255 .if ${MK_TESTS} != "no"
256 _atf=           atf
257 _tests=         tests
258 .endif
259
260 .if ${MK_UNBOUND} != "no"
261 _libunbound=    libunbound
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>