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