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