Makefile revision 273449
1#	@(#)Makefile	8.1 (Berkeley) 6/4/93
2# $FreeBSD: head/lib/Makefile 273449 2014-10-22 03:39:11Z imp $
3
4.include <src.opts.mk>
5
6# The SUBDIR_ORDERED list is a small set of libraries which are used by many
7# of the other libraries.  These are built first with a .WAIT between them
8# and the main list to avoid needing a SUBDIR_DEPEND line on every library
9# naming just these few items.
10
11SUBDIR_ORDERED=	${_csu} \
12	.WAIT \
13	libc \
14	libc_nonshared \
15	libcompiler_rt \
16	${_libcplusplus} \
17	${_libcxxrt} \
18	libelf \
19	msun
20
21# The main list; please keep these sorted alphabetically.
22
23SUBDIR=	${SUBDIR_ORDERED} \
24	.WAIT \
25	libalias \
26	libarchive \
27	${_libatm} \
28	libauditd \
29	libbegemot \
30	libblocksruntime \
31	${_libbluetooth} \
32	${_libbsnmp} \
33	libbsdstat \
34	libbsm \
35	libbz2 \
36	libcalendar \
37	libcam \
38	${_libcapsicum} \
39	${_libcasper} \
40	${_libcom_err} \
41	libcompat \
42	libcrypt \
43	libdevinfo \
44	libdevstat \
45	libdwarf \
46	libedit \
47	${_libevent} \
48	libexecinfo \
49	libexpat \
50	libfetch \
51	libgeom \
52	${_libgpib} \
53	${_libgssapi} \
54	${_librpcsec_gss} \
55	${_libiconv_modules} \
56	libipsec \
57	libjail \
58	libkiconv \
59	libkvm \
60	${_libldns} \
61	liblzma \
62	libmagic \
63	libmandoc \
64	libmemstat \
65	libmd \
66	${_libmilter} \
67	${_libmp} \
68	${_libnandfs} \
69	libnetbsd \
70	${_libnetgraph} \
71	${_libngatm} \
72	libnv \
73	libohash \
74	libopie \
75	libpam \
76	libpcap \
77	libpjdlog \
78	${_libpmc} \
79	${_libproc} \
80	libprocstat \
81	libradius \
82	librpcsvc \
83	librt \
84	${_librtld_db} \
85	libsbuf \
86	${_libsdp} \
87	${_libsm} \
88	${_libsmb} \
89	${_libsmdb} \
90	${_libsmutil} \
91	libstand \
92	libstdbuf \
93	libstdthreads \
94	libtacplus \
95	${_libtelnet} \
96	${_libthr} \
97	libthread_db \
98	libucl \
99	libufs \
100	libugidfw \
101	libulog \
102	${_libunbound} \
103	${_libusbhid} \
104	${_libusb} \
105	libutil \
106	${_libvgl} \
107	${_libvmmapi} \
108	libwrap \
109	liby \
110	${_libypclnt} \
111	libz \
112	ncurses \
113	${_atf} \
114	${_clang} \
115	${_cuse} \
116	${_tests}
117
118# Inter-library dependencies.  When the makefile for a library contains LDADD
119# libraries, those libraries should be listed as build order dependencies here.
120
121SUBDIR_DEPEND_libarchive= libz libbz2 libexpat liblzma libmd
122SUBDIR_DEPEND_libatm= libmd
123SUBDIR_DEPEND_libauditdm= libbsm
124SUBDIR_DEPEND_libbsnmp= ${_libnetgraph}
125SUBDIR_DEPEND_libc++= libcxxrt
126SUBDIR_DEPEND_libc= libcompiler_rt
127SUBDIR_DEPEND_libcam= libsbuf
128SUBDIR_DEPEND_libcapsicum= libnv
129SUBDIR_DEPEND_libcasper= libcapsicum libnv libpjdlog
130SUBDIR_DEPEND_libdevstat= libkvm
131SUBDIR_DEPEND_libdiaglog= ncurses
132SUBDIR_DEPEND_libedit= ncurses
133SUBDIR_DEPEND_libg++= msun
134SUBDIR_DEPEND_libgeom= libexpat libsbuf
135SUBDIR_DEPEND_liblibrpcsec_gss= libgssapi
136SUBDIR_DEPEND_libmagic= libz
137SUBDIR_DEPEND_libmemstat= libkvm
138SUBDIR_DEPEND_libopie= libmd
139SUBDIR_DEPEND_libpam= libcrypt libopie libradius librpcsvc libtacplus libutil ${_libypclnt} ${_libcom_err} 
140SUBDIR_DEPEND_libpjdlog= libutil
141SUBDIR_DEPEND_libprocstat= libkvm libutil
142SUBDIR_DEPEND_libradius= libmd
143SUBDIR_DEPEND_libreadline= ncurses
144SUBDIR_DEPEND_libsmb= libkiconv
145SUBDIR_DEPEND_libstdc++= msun
146SUBDIR_DEPEND_libtacplus= libmd
147SUBDIR_DEPEND_libulog= libmd
148SUBDIR_DEPEND_libunbound= ${_libldns}
149
150.if exists(${.CURDIR}/csu/${MACHINE_ARCH}-elf)
151_csu=csu/${MACHINE_ARCH}-elf
152.elif exists(${.CURDIR}/csu/${MACHINE_ARCH})
153_csu=csu/${MACHINE_ARCH}
154.elif exists(${.CURDIR}/csu/${MACHINE_CPUARCH}/Makefile)
155_csu=csu/${MACHINE_CPUARCH}
156.else
157_csu=csu
158.endif
159
160# NB: keep these sorted by MK_* knobs
161
162.if ${MK_ATM} != "no"
163_libngatm=	libngatm
164.endif
165
166.if ${MK_BLUETOOTH} != "no"
167_libbluetooth=	libbluetooth
168_libsdp=	libsdp
169.endif
170
171.if ${MK_BSNMP} != "no"
172_libbsnmp=	libbsnmp
173.endif
174
175.if ${MK_CASPER} != "no"
176_libcapsicum=	libcapsicum
177_libcasper=	libcasper
178.endif
179
180.if ${MK_CLANG} != "no" && !defined(COMPAT_32BIT)
181_clang=		clang
182.endif
183
184.if ${MK_CUSE} != "no"
185_cuse=		libcuse
186.endif
187
188.if ${MK_GPIB} != "no"
189_libgpib=	libgpib
190.endif
191
192.if ${MK_GSSAPI} != "no"
193_libgssapi=	libgssapi
194_librpcsec_gss=	librpcsec_gss
195.endif
196
197.if ${MK_ICONV} != "no"
198_libiconv_modules=	libiconv_modules
199.endif
200
201.if ${MK_KERBEROS_SUPPORT} != "no"
202_libcom_err= libcom_err
203.endif
204
205.if ${MK_LDNS} != "no"
206_libldns=	libldns
207.endif
208
209.if ${MK_LIBCPLUSPLUS} != "no"
210_libcxxrt=	libcxxrt
211_libcplusplus=	libc++
212.endif
213
214.if ${MK_LIBTHR} != "no"
215_libthr=	libthr
216.endif
217
218.if ${MK_NAND} != "no"
219_libnandfs=	libnandfs
220.endif
221
222.if ${MK_NETGRAPH} != "no"
223_libnetgraph=	libnetgraph
224.endif
225
226.if ${MK_NIS} != "no"
227_libypclnt=	libypclnt
228.endif
229
230.if ${MK_PF} != "no"
231_libevent=	libevent
232.endif
233
234.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
235_libsmb=	libsmb
236_libvgl=	libvgl
237_libproc=	libproc
238_librtld_db=	librtld_db
239.endif
240
241.if ${MACHINE_CPUARCH} == "amd64"
242_libvmmapi=	libvmmapi
243.endif
244
245.if ${MACHINE_CPUARCH} == "mips"
246_libproc=	libproc
247_librtld_db=	librtld_db
248.endif
249
250.if ${MACHINE_CPUARCH} == "powerpc"
251_libproc=	libproc
252_librtld_db=	librtld_db
253_libsmb=	libsmb
254.endif
255
256.if ${MACHINE_CPUARCH} == "sparc64"
257_libsmb=	libsmb
258.endif
259
260.if ${MK_OPENSSL} != "no"
261_libmp=		libmp
262.endif
263
264.if ${MK_PMC} != "no"
265_libpmc=	libpmc
266.endif
267
268.if ${MK_SENDMAIL} != "no"
269_libmilter=	libmilter
270_libsm=		libsm
271_libsmdb=	libsmdb
272_libsmutil=	libsmutil
273.endif
274
275.if ${MK_TELNET} != "no"
276_libtelnet=	libtelnet
277.endif
278
279.if ${MK_TESTS_SUPPORT} != "no"
280_atf=		atf
281.endif
282.if ${MK_TESTS} != "no"
283_tests=		tests
284.endif
285
286.if ${MK_UNBOUND} != "no"
287_libunbound=	libunbound
288.endif
289
290.if ${MK_USB} != "no"
291_libusbhid=	libusbhid
292_libusb=	libusb
293.endif
294
295.if !defined(LIBRARIES_ONLY)
296afterinstall:
297	${INSTALL_SYMLINK} ../include ${DESTDIR}/usr/lib/include
298.endif
299
300.if !make(install)
301SUBDIR_PARALLEL=
302.endif
303
304.include <bsd.subdir.mk>
305