Makefile revision 264303
1#	@(#)Makefile	8.1 (Berkeley) 6/4/93
2# $FreeBSD: stable/10/lib/Makefile 264303 2014-04-09 18:16:58Z dim $
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
33SUBDIR_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"
58SUBDIR_ORDERED+=	libcom_err
59.endif
60
61SUBDIR=	${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)
270afterinstall:
271	${INSTALL_SYMLINK} ../include ${DESTDIR}/usr/lib/include
272.endif
273
274.if !make(install)
275SUBDIR_PARALLEL=
276.endif
277
278.include <bsd.subdir.mk>
279