xref: /freebsd/lib/Makefile (revision 2e8ed2b83037fa36d96d81615fc7c211b4e29735)
1#	@(#)Makefile	8.1 (Berkeley) 6/4/93
2# $FreeBSD$
3
4.include <src.opts.mk>
5
6# To satisfy shared library or ELF linkage when only the libraries being
7# built are visible:
8#
9# csu must be built before all shared libaries for ELF.
10# libc must be built before all other shared libraries.
11# libbsm must be built before libauditd.
12# libcom_err must be built before libpam.
13# libcrypt must be built before libpam.
14# libkvm must be built before libdevstat.
15# libldns must be built before libunbound.
16# msun must be built before libg++ and libstdc++.
17# libmd must be built before libatm, libopie, libradius, and libtacplus.
18# ncurses must be built before libdialog, libedit and libreadline.
19# libnetgraph must be built before libbsnmp/modules/snmp_netgraph.
20# libopie must be built before libpam.
21# libradius must be built before libpam.
22# librpcsvc must be built before libpam.
23# libsbuf must be built before libcam.
24# libtacplus must be built before libpam.
25# libutil must be built before libpam.
26# libypclnt must be built before libpam.
27# libgssapi must be built before librpcsec_gss
28#
29# Otherwise, the SUBDIR list should be in alphabetical order.
30#
31# Except it appears bind needs to be compiled last
32
33SUBDIR_ORDERED=	${_csu} \
34	.WAIT \
35	libc \
36	libc_nonshared \
37	.WAIT \
38	msun \
39	.WAIT \
40	libbsm \
41	libauditd \
42	libutil \
43	libpjdlog \
44	libnv \
45	${_libcapsicum} \
46	libcompiler_rt \
47	libcrypt \
48	libelf \
49	${_libiconv_modules} \
50	libkvm \
51	${_libldns} \
52	libmd \
53	ncurses \
54	${_libnetgraph} \
55	libradius \
56	librpcsvc \
57	libsbuf \
58	libtacplus \
59	${_libypclnt} \
60	${_libcxxrt} \
61	${_libcplusplus}
62
63.if ${MK_KERBEROS_SUPPORT} != "no"
64SUBDIR_ORDERED+=	libcom_err
65.endif
66
67SUBDIR=	${SUBDIR_ORDERED} \
68	.WAIT \
69	libalias \
70	libarchive \
71	${_libatm} \
72	libbegemot \
73	libblocksruntime \
74	${_libbluetooth} \
75	${_libbsnmp} \
76	libbsdstat \
77	libbz2 \
78	libcalendar \
79	libcam \
80	${_libcasper} \
81	libcompat \
82	libdevinfo \
83	libdevstat \
84	libdwarf \
85	libedit \
86	${_libefi} \
87	libexecinfo \
88	libexpat \
89	libfetch \
90	libgeom \
91	${_libgpib} \
92	${_libgssapi} \
93	${_librpcsec_gss} \
94	libipsec \
95	libjail \
96	libkiconv \
97	liblzma \
98	libmagic \
99	libmandoc \
100	libmemstat \
101	${_libmilter} \
102	${_libmp} \
103	${_libnandfs} \
104	libnetbsd \
105	${_libngatm} \
106	libopie \
107	libpam \
108	libpcap \
109	${_libpmc} \
110	${_libproc} \
111	libprocstat \
112	librt \
113	${_librtld_db} \
114	${_libsdp} \
115	${_libsm} \
116	${_libsmb} \
117	${_libsmdb} \
118	${_libsmutil} \
119	libstand \
120	libstdbuf \
121	libstdthreads \
122	${_libtelnet} \
123	${_libthr} \
124	libthread_db \
125	libucl \
126	libufs \
127	libugidfw \
128	libulog \
129	${_libunbound} \
130	${_libusbhid} \
131	${_libusb} \
132	${_libvgl} \
133	${_libvmmapi} \
134	libwrap \
135	liby \
136	libz \
137	${_atf} \
138	${_clang} \
139	${_tests}
140
141.if exists(${.CURDIR}/csu/${MACHINE_ARCH}-elf)
142_csu=csu/${MACHINE_ARCH}-elf
143.elif exists(${.CURDIR}/csu/${MACHINE_ARCH})
144_csu=csu/${MACHINE_ARCH}
145.elif exists(${.CURDIR}/csu/${MACHINE_CPUARCH}/Makefile)
146_csu=csu/${MACHINE_CPUARCH}
147.else
148_csu=csu
149.endif
150
151# NB: keep these sorted by MK_* knobs
152
153.if ${MK_ATM} != "no"
154_libngatm=	libngatm
155.endif
156
157.if ${MK_BLUETOOTH} != "no"
158_libbluetooth=	libbluetooth
159_libsdp=	libsdp
160.endif
161
162.if ${MK_BSNMP} != "no"
163_libbsnmp=	libbsnmp
164.endif
165
166.if ${MK_CASPER} != "no"
167_libcapsicum=	libcapsicum
168_libcasper=	libcasper
169.endif
170
171.if ${MK_CLANG} != "no" && !defined(COMPAT_32BIT)
172_clang=		clang
173.endif
174
175.if ${MK_GPIB} != "no"
176_libgpib=	libgpib
177.endif
178
179.if ${MK_GSSAPI} != "no"
180_libgssapi=	libgssapi
181_librpcsec_gss=	librpcsec_gss
182.endif
183
184.if ${MK_ICONV} != "no"
185_libiconv_modules=	libiconv_modules
186.endif
187
188.if ${MK_LDNS} != "no"
189_libldns=	libldns
190.endif
191
192.if ${MK_LIBCPLUSPLUS} != "no"
193_libcxxrt=	libcxxrt
194_libcplusplus=	libc++
195.endif
196
197.if ${MK_LIBTHR} != "no"
198_libthr=	libthr
199.endif
200
201.if ${MK_NAND} != "no"
202_libnandfs=	libnandfs
203.endif
204
205.if ${MK_NETGRAPH} != "no"
206_libnetgraph=	libnetgraph
207.endif
208
209.if ${MK_NIS} != "no"
210_libypclnt=	libypclnt
211.endif
212
213.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
214_libsmb=	libsmb
215_libvgl=	libvgl
216_libproc=	libproc
217_librtld_db=	librtld_db
218.endif
219
220.if ${MACHINE_CPUARCH} == "amd64"
221_libvmmapi=	libvmmapi
222.endif
223
224.if ${MACHINE_CPUARCH} == "ia64"
225_libefi=	libefi
226_libsmb=	libsmb
227.endif
228
229.if ${MACHINE_CPUARCH} == "mips"
230_libproc=	libproc
231_librtld_db=	librtld_db
232.endif
233
234.if ${MACHINE_CPUARCH} == "powerpc"
235_libproc=	libproc
236_librtld_db=	librtld_db
237_libsmb=	libsmb
238.endif
239
240.if ${MACHINE_CPUARCH} == "sparc64"
241_libsmb=	libsmb
242.endif
243
244.if ${MK_OPENSSL} != "no"
245_libmp=		libmp
246.endif
247
248.if ${MK_PMC} != "no"
249_libpmc=	libpmc
250.endif
251
252.if ${MK_SENDMAIL} != "no"
253_libmilter=	libmilter
254_libsm=		libsm
255_libsmdb=	libsmdb
256_libsmutil=	libsmutil
257.endif
258
259.if ${MK_TELNET} != "no"
260_libtelnet=	libtelnet
261.endif
262
263.if ${MK_TESTS} != "no"
264_atf=		atf
265_tests=		tests
266.endif
267
268.if ${MK_UNBOUND} != "no"
269_libunbound=	libunbound
270.endif
271
272.if ${MK_USB} != "no"
273_libusbhid=	libusbhid
274_libusb=	libusb
275.endif
276
277.if !defined(LIBRARIES_ONLY)
278afterinstall:
279	${INSTALL_SYMLINK} ../include ${DESTDIR}/usr/lib/include
280.endif
281
282.if !make(install)
283SUBDIR_PARALLEL=
284.endif
285
286.include <bsd.subdir.mk>
287