xref: /freebsd/lib/Makefile (revision 5bcb74248e5c3a8a5e7190e99a28563776ccb3ce)
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	${_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	libexecinfo \
48	libexpat \
49	libfetch \
50	libgeom \
51	${_libgpib} \
52	${_libgssapi} \
53	${_librpcsec_gss} \
54	${_libiconv_modules} \
55	libipsec \
56	libjail \
57	libkiconv \
58	libkvm \
59	${_libldns} \
60	liblzma \
61	libmagic \
62	libmandoc \
63	libmemstat \
64	libmd \
65	${_libmilter} \
66	${_libmp} \
67	${_libnandfs} \
68	libnetbsd \
69	${_libnetgraph} \
70	${_libngatm} \
71	libnv \
72	libopie \
73	libpam \
74	libpcap \
75	libpjdlog \
76	${_libpmc} \
77	${_libproc} \
78	libprocstat \
79	libradius \
80	librpcsvc \
81	librt \
82	${_librtld_db} \
83	libsbuf \
84	${_libsdp} \
85	${_libsm} \
86	${_libsmb} \
87	${_libsmdb} \
88	${_libsmutil} \
89	libstand \
90	libstdbuf \
91	libstdthreads \
92	libtacplus \
93	${_libtelnet} \
94	${_libthr} \
95	libthread_db \
96	libucl \
97	libufs \
98	libugidfw \
99	libulog \
100	${_libunbound} \
101	${_libusbhid} \
102	${_libusb} \
103	libutil \
104	${_libvgl} \
105	${_libvmmapi} \
106	libwrap \
107	liby \
108	${_libypclnt} \
109	libz \
110	ncurses \
111	${_atf} \
112	${_clang} \
113	${_cuse} \
114	${_tests}
115
116# Inter-library dependencies.  When the makefile for a library contains LDADD
117# libraries, those libraries should be listed as build order dependencies here.
118
119SUBDIR_DEPEND_libarchive= libz libbz2 libexpat liblzma libmd
120SUBDIR_DEPEND_libatm= libmd
121SUBDIR_DEPEND_libauditdm= libbsm
122SUBDIR_DEPEND_libbsnmp= ${_libnetgraph}
123SUBDIR_DEPEND_libc++= libcxxrt
124SUBDIR_DEPEND_libc= libcompiler_rt
125SUBDIR_DEPEND_libcam= libsbuf
126SUBDIR_DEPEND_libcapsicum= libnv
127SUBDIR_DEPEND_libcasper= libcapsicum libnv libpjdlog
128SUBDIR_DEPEND_libdevstat= libkvm
129SUBDIR_DEPEND_libdiaglog= ncurses
130SUBDIR_DEPEND_libedit= ncurses
131SUBDIR_DEPEND_libg++= msun
132SUBDIR_DEPEND_libgeom= libexpat libsbuf
133SUBDIR_DEPEND_liblibrpcsec_gss= libgssapi
134SUBDIR_DEPEND_libmagic= libz
135SUBDIR_DEPEND_libmemstat= libkvm
136SUBDIR_DEPEND_libopie= libmd
137SUBDIR_DEPEND_libpam= libcrypt libopie libradius librpcsvc libtacplus libutil ${_libypclnt} ${_libcom_err}
138SUBDIR_DEPEND_libpjdlog= libutil
139SUBDIR_DEPEND_libprocstat= libkvm libutil
140SUBDIR_DEPEND_libradius= libmd
141SUBDIR_DEPEND_libreadline= ncurses
142SUBDIR_DEPEND_libsmb= libkiconv
143SUBDIR_DEPEND_libstdc++= msun
144SUBDIR_DEPEND_libtacplus= libmd
145SUBDIR_DEPEND_libulog= libmd
146SUBDIR_DEPEND_libunbound= ${_libldns}
147
148.if exists(${.CURDIR}/csu/${MACHINE_ARCH}-elf)
149_csu=csu/${MACHINE_ARCH}-elf
150.elif exists(${.CURDIR}/csu/${MACHINE_ARCH})
151_csu=csu/${MACHINE_ARCH}
152.elif exists(${.CURDIR}/csu/${MACHINE_CPUARCH}/Makefile)
153_csu=csu/${MACHINE_CPUARCH}
154.else
155_csu=csu
156.endif
157
158# NB: keep these sorted by MK_* knobs
159
160.if ${MK_ATM} != "no"
161_libngatm=	libngatm
162.endif
163
164.if ${MK_BLUETOOTH} != "no"
165_libbluetooth=	libbluetooth
166_libsdp=	libsdp
167.endif
168
169.if ${MK_BSNMP} != "no"
170_libbsnmp=	libbsnmp
171.endif
172
173.if ${MK_CASPER} != "no"
174_libcapsicum=	libcapsicum
175_libcasper=	libcasper
176.endif
177
178.if ${MK_CLANG} != "no" && !defined(COMPAT_32BIT)
179_clang=		clang
180.endif
181
182.if ${MK_CUSE} != "no"
183_cuse=		libcuse
184.endif
185
186.if ${MK_GPIB} != "no"
187_libgpib=	libgpib
188.endif
189
190.if ${MK_GSSAPI} != "no"
191_libgssapi=	libgssapi
192_librpcsec_gss=	librpcsec_gss
193.endif
194
195.if ${MK_ICONV} != "no"
196_libiconv_modules=	libiconv_modules
197.endif
198
199.if ${MK_KERBEROS_SUPPORT} != "no"
200_libcom_err= libcom_err
201.endif
202
203.if ${MK_LDNS} != "no"
204_libldns=	libldns
205.endif
206
207.if ${MK_LIBCPLUSPLUS} != "no"
208_libcxxrt=	libcxxrt
209_libcplusplus=	libc++
210.endif
211
212.if ${MK_LIBTHR} != "no"
213_libthr=	libthr
214.endif
215
216.if ${MK_NAND} != "no"
217_libnandfs=	libnandfs
218.endif
219
220.if ${MK_NETGRAPH} != "no"
221_libnetgraph=	libnetgraph
222.endif
223
224.if ${MK_NIS} != "no"
225_libypclnt=	libypclnt
226.endif
227
228.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
229_libsmb=	libsmb
230_libvgl=	libvgl
231_libproc=	libproc
232_librtld_db=	librtld_db
233.endif
234
235.if ${MACHINE_CPUARCH} == "amd64"
236_libvmmapi=	libvmmapi
237.endif
238
239.if ${MACHINE_CPUARCH} == "mips"
240_libproc=	libproc
241_librtld_db=	librtld_db
242.endif
243
244.if ${MACHINE_CPUARCH} == "powerpc"
245_libproc=	libproc
246_librtld_db=	librtld_db
247_libsmb=	libsmb
248.endif
249
250.if ${MACHINE_CPUARCH} == "sparc64"
251_libsmb=	libsmb
252.endif
253
254.if ${MK_OPENSSL} != "no"
255_libmp=		libmp
256.endif
257
258.if ${MK_PMC} != "no"
259_libpmc=	libpmc
260.endif
261
262.if ${MK_SENDMAIL} != "no"
263_libmilter=	libmilter
264_libsm=		libsm
265_libsmdb=	libsmdb
266_libsmutil=	libsmutil
267.endif
268
269.if ${MK_TELNET} != "no"
270_libtelnet=	libtelnet
271.endif
272
273.if ${MK_TESTS} != "no"
274_atf=		atf
275_tests=		tests
276.endif
277
278.if ${MK_UNBOUND} != "no"
279_libunbound=	libunbound
280.endif
281
282.if ${MK_USB} != "no"
283_libusbhid=	libusbhid
284_libusb=	libusb
285.endif
286
287.if !defined(LIBRARIES_ONLY)
288afterinstall:
289	${INSTALL_SYMLINK} ../include ${DESTDIR}/usr/lib/include
290.endif
291
292.if !make(install)
293SUBDIR_PARALLEL=
294.endif
295
296.include <bsd.subdir.mk>
297