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