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