Makefile revision 252356
1#	@(#)Makefile	8.1 (Berkeley) 6/4/93
2# $FreeBSD: head/lib/Makefile 252356 2013-06-28 21:00:08Z davide $
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
32SUBDIR_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"
55SUBDIR_ORDERED+=	libcom_err
56.endif
57
58SUBDIR=	${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	libexpat \
76	libfetch \
77	libgeom \
78	${_libgpib} \
79	${_libgssapi} \
80	${_librpcsec_gss} \
81	libipsec \
82	${_libipx} \
83	libjail \
84	libkiconv \
85	${_libldns} \
86	liblzma \
87	libmagic \
88	libmandoc \
89	libmemstat \
90	${_libmilter} \
91	${_libmp} \
92	${_libnandfs} \
93	libnetbsd \
94	${_libngatm} \
95	libopie \
96	libpam \
97	libpcap \
98	${_libpmc} \
99	${_libproc} \
100	libprocstat \
101	librt \
102	${_librtld_db} \
103	${_libsdp} \
104	${_libsm} \
105	${_libsmb} \
106	${_libsmdb} \
107	${_libsmutil} \
108	libstand \
109	libstdbuf \
110	libstdthreads \
111	${_libtelnet} \
112	${_libthr} \
113	libthread_db \
114	libufs \
115	libugidfw \
116	libulog \
117	${_libusbhid} \
118	${_libusb} \
119	${_libvgl} \
120	${_libvmmapi} \
121	libwrap \
122	liby \
123	libyaml \
124	libz \
125	${_atf} \
126	${_bind} \
127	${_clang}
128
129.if exists(${.CURDIR}/csu/${MACHINE_ARCH}-elf)
130_csu=csu/${MACHINE_ARCH}-elf
131.elif exists(${.CURDIR}/csu/${MACHINE_ARCH})
132_csu=csu/${MACHINE_ARCH}
133.elif exists(${.CURDIR}/csu/${MACHINE_CPUARCH}/Makefile)
134_csu=csu/${MACHINE_CPUARCH}
135.else
136_csu=csu
137.endif
138
139# NB: keep these sorted by MK_* knobs
140
141.if ${MK_ATF} != "no"
142_atf=		atf
143.endif
144
145.if ${MK_ATM} != "no"
146_libngatm=	libngatm
147.endif
148
149.if ${MK_BIND} != "no"
150_bind=		bind
151.endif
152
153.if ${MK_BLUETOOTH} != "no"
154_libbluetooth=	libbluetooth
155_libsdp=	libsdp
156.endif
157
158.if ${MK_BSNMP} != "no"
159_libbsnmp=	libbsnmp
160.endif
161
162.if ${MK_CLANG} != "no" && !defined(COMPAT_32BIT)
163_clang=		clang
164.endif
165
166.if ${MK_GPIB} != "no"
167_libgpib=	libgpib
168.endif
169
170.if ${MK_GSSAPI} != "no"
171_libgssapi=	libgssapi
172_librpcsec_gss=	librpcsec_gss
173.endif
174
175.if ${MK_ICONV} != "no"
176_libiconv_modules=	libiconv_modules
177.endif
178
179.if ${MK_IPX} != "no"
180_libipx=	libipx
181.endif
182
183.if ${MK_LDNS} != "no"
184_libldns=	libldns
185.endif
186
187.if ${MK_LIBCPLUSPLUS} != "no"
188_libcxxrt=	libcxxrt
189_libcplusplus=	libc++
190.endif
191
192.if ${MK_LIBTHR} != "no"
193_libthr=	libthr
194.endif
195
196.if ${MK_NAND} != "no"
197_libnandfs=	libnandfs
198.endif
199
200.if ${MK_NETGRAPH} != "no"
201_libnetgraph=	libnetgraph
202.endif
203
204.if ${MK_NIS} != "no"
205_libypclnt=	libypclnt
206.endif
207
208.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
209_libsmb=	libsmb
210_libvgl=	libvgl
211_libproc=	libproc
212_librtld_db=	librtld_db
213.endif
214
215.if ${MACHINE_CPUARCH} == "amd64"
216_libvmmapi=	libvmmapi
217.endif
218
219.if ${MACHINE_CPUARCH} == "ia64"
220_libefi=	libefi
221_libsmb=	libsmb
222.endif
223
224.if ${MACHINE_CPUARCH} == "mips"
225_libproc=	libproc
226_librtld_db=	librtld_db
227.endif
228
229.if ${MACHINE_CPUARCH} == "powerpc"
230_libproc=	libproc
231_librtld_db=	librtld_db
232_libsmb=	libsmb
233.endif
234
235.if ${MACHINE_CPUARCH} == "sparc64"
236_libsmb=	libsmb
237.endif
238
239.if ${MK_OPENSSL} != "no"
240_libmp=		libmp
241.endif
242
243.if ${MK_PMC} != "no"
244_libpmc=	libpmc
245.endif
246
247.if ${MK_SENDMAIL} != "no"
248_libmilter=	libmilter
249_libsm=		libsm
250_libsmdb=	libsmdb
251_libsmutil=	libsmutil
252.endif
253
254.if ${MK_TELNET} != "no"
255_libtelnet=	libtelnet
256.endif
257
258.if ${MK_USB} != "no"
259_libusbhid=	libusbhid
260_libusb=	libusb
261.endif
262
263.if !defined(LIBRARIES_ONLY)
264afterinstall:
265	${INSTALL_SYMLINK} ../include ${DESTDIR}/usr/lib/include
266.endif
267
268.include <bsd.subdir.mk>
269