Makefile revision 260013
1#	@(#)Makefile	8.1 (Berkeley) 6/4/93
2# $FreeBSD: stable/10/lib/Makefile 260013 2013-12-28 20:05:31Z jmmv $
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	libufs \
118	libugidfw \
119	libulog \
120	${_libunbound} \
121	${_libusbhid} \
122	${_libusb} \
123	${_libvgl} \
124	${_libvmmapi} \
125	libwrap \
126	liby \
127	libyaml \
128	libz \
129	${_atf} \
130	${_clang} \
131	${_tests}
132
133.if exists(${.CURDIR}/csu/${MACHINE_ARCH}-elf)
134_csu=csu/${MACHINE_ARCH}-elf
135.elif exists(${.CURDIR}/csu/${MACHINE_ARCH})
136_csu=csu/${MACHINE_ARCH}
137.elif exists(${.CURDIR}/csu/${MACHINE_CPUARCH}/Makefile)
138_csu=csu/${MACHINE_CPUARCH}
139.else
140_csu=csu
141.endif
142
143# NB: keep these sorted by MK_* knobs
144
145.if ${MK_ATM} != "no"
146_libngatm=	libngatm
147.endif
148
149.if ${MK_BLUETOOTH} != "no"
150_libbluetooth=	libbluetooth
151_libsdp=	libsdp
152.endif
153
154.if ${MK_BSNMP} != "no"
155_libbsnmp=	libbsnmp
156.endif
157
158.if ${MK_CLANG} != "no" && !defined(COMPAT_32BIT)
159_clang=		clang
160.endif
161
162.if ${MK_GPIB} != "no"
163_libgpib=	libgpib
164.endif
165
166.if ${MK_GSSAPI} != "no"
167_libgssapi=	libgssapi
168_librpcsec_gss=	librpcsec_gss
169.endif
170
171.if ${MK_ICONV} != "no"
172_libiconv_modules=	libiconv_modules
173.endif
174
175.if ${MK_IPX} != "no"
176_libipx=	libipx
177.endif
178
179.if ${MK_LDNS} != "no"
180_libldns=	libldns
181.endif
182
183.if ${MK_LIBCPLUSPLUS} != "no"
184_libcxxrt=	libcxxrt
185_libcplusplus=	libc++
186.endif
187
188.if ${MK_LIBTHR} != "no"
189_libthr=	libthr
190.endif
191
192.if ${MK_NAND} != "no"
193_libnandfs=	libnandfs
194.endif
195
196.if ${MK_NETGRAPH} != "no"
197_libnetgraph=	libnetgraph
198.endif
199
200.if ${MK_NIS} != "no"
201_libypclnt=	libypclnt
202.endif
203
204.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
205_libsmb=	libsmb
206_libvgl=	libvgl
207_libproc=	libproc
208_librtld_db=	librtld_db
209.endif
210
211.if ${MACHINE_CPUARCH} == "amd64"
212_libvmmapi=	libvmmapi
213.endif
214
215.if ${MACHINE_CPUARCH} == "ia64"
216_libefi=	libefi
217_libsmb=	libsmb
218.endif
219
220.if ${MACHINE_CPUARCH} == "mips"
221_libproc=	libproc
222_librtld_db=	librtld_db
223.endif
224
225.if ${MACHINE_CPUARCH} == "powerpc"
226_libproc=	libproc
227_librtld_db=	librtld_db
228_libsmb=	libsmb
229.endif
230
231.if ${MACHINE_CPUARCH} == "sparc64"
232_libsmb=	libsmb
233.endif
234
235.if ${MK_OPENSSL} != "no"
236_libmp=		libmp
237.endif
238
239.if ${MK_PMC} != "no"
240_libpmc=	libpmc
241.endif
242
243.if ${MK_SENDMAIL} != "no"
244_libmilter=	libmilter
245_libsm=		libsm
246_libsmdb=	libsmdb
247_libsmutil=	libsmutil
248.endif
249
250.if ${MK_TELNET} != "no"
251_libtelnet=	libtelnet
252.endif
253
254.if ${MK_TESTS} != "no"
255_atf=		atf
256_tests=		tests
257.endif
258
259.if ${MK_UNBOUND} != "no"
260_libunbound=	libunbound
261.endif
262
263.if ${MK_USB} != "no"
264_libusbhid=	libusbhid
265_libusb=	libusb
266.endif
267
268.if !defined(LIBRARIES_ONLY)
269afterinstall:
270	${INSTALL_SYMLINK} ../include ${DESTDIR}/usr/lib/include
271.endif
272
273.include <bsd.subdir.mk>
274