Makefile revision 249634
1#	@(#)Makefile	8.1 (Berkeley) 6/4/93
2# $FreeBSD: head/lib/Makefile 249634 2013-04-19 05:13:57Z kientzle $
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	${_libsmdb} \
106	${_libsmutil} \
107	libstand \
108	libstdbuf \
109	libstdthreads \
110	${_libtelnet} \
111	${_libthr} \
112	libthread_db \
113	libufs \
114	libugidfw \
115	libulog \
116	${_libusbhid} \
117	${_libusb} \
118	${_libvgl} \
119	${_libvmmapi} \
120	libwrap \
121	liby \
122	libyaml \
123	libz \
124	${_atf} \
125	${_bind} \
126	${_clang}
127
128.if exists(${.CURDIR}/csu/${MACHINE_ARCH}-elf)
129_csu=csu/${MACHINE_ARCH}-elf
130.elif exists(${.CURDIR}/csu/${MACHINE_ARCH})
131_csu=csu/${MACHINE_ARCH}
132.elif exists(${.CURDIR}/csu/${MACHINE_CPUARCH}/Makefile)
133_csu=csu/${MACHINE_CPUARCH}
134.else
135_csu=csu
136.endif
137
138# NB: keep these sorted by MK_* knobs
139
140.if ${MK_ATF} != "no"
141_atf=		atf
142.endif
143
144.if ${MK_ATM} != "no"
145_libngatm=	libngatm
146.endif
147
148.if ${MK_BIND} != "no"
149_bind=		bind
150.endif
151
152.if ${MK_BLUETOOTH} != "no"
153_libbluetooth=	libbluetooth
154_libsdp=	libsdp
155.endif
156
157.if ${MK_BSNMP} != "no"
158_libbsnmp=	libbsnmp
159.endif
160
161.if ${MK_CLANG} != "no" && !defined(COMPAT_32BIT)
162_clang=		clang
163.endif
164
165.if ${MK_GPIB} != "no"
166_libgpib=	libgpib
167.endif
168
169.if ${MK_GSSAPI} != "no"
170_libgssapi=	libgssapi
171_librpcsec_gss=	librpcsec_gss
172.endif
173
174.if ${MK_ICONV} != "no"
175_libiconv_modules=	libiconv_modules
176.endif
177
178.if ${MK_IPX} != "no"
179_libipx=	libipx
180.endif
181
182.if ${MK_LDNS} != "no"
183_libldns=	libldns
184.endif
185
186.if ${MK_LIBCPLUSPLUS} != "no"
187_libcxxrt=	libcxxrt
188_libcplusplus=	libc++
189.endif
190
191.if ${MK_LIBTHR} != "no"
192_libthr=	libthr
193.endif
194
195.if ${MK_NAND} != "no"
196_libnandfs=	libnandfs
197.endif
198
199.if ${MK_NETGRAPH} != "no"
200_libnetgraph=	libnetgraph
201.endif
202
203.if ${MK_NIS} != "no"
204_libypclnt=	libypclnt
205.endif
206
207.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
208_libvgl=	libvgl
209_libproc=	libproc
210_librtld_db=	librtld_db
211.endif
212
213.if ${MACHINE_CPUARCH} == "amd64"
214_libvmmapi=	libvmmapi
215.endif
216
217.if ${MACHINE_CPUARCH} == "ia64"
218_libefi=	libefi
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.endif
230
231.if ${MK_OPENSSL} != "no"
232_libmp=		libmp
233.endif
234
235.if ${MK_PMC} != "no"
236_libpmc=	libpmc
237.endif
238
239.if ${MK_SENDMAIL} != "no"
240_libmilter=	libmilter
241_libsm=		libsm
242_libsmdb=	libsmdb
243_libsmutil=	libsmutil
244.endif
245
246.if ${MK_TELNET} != "no"
247_libtelnet=	libtelnet
248.endif
249
250.if ${MK_USB} != "no"
251_libusbhid=	libusbhid
252_libusb=	libusb
253.endif
254
255afterinstall:
256	ln -hfs ../include ${DESTDIR}/usr/lib/include
257
258.include <bsd.subdir.mk>
259