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