xref: /freebsd/lib/Makefile (revision 3f0164abf32b9b761e0a2cb4bdca3a8b84f156d4)
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# msun must be built before libg++ and libstdc++.
16# libmd must be built before libatm, libopie, libradius, and libtacplus.
17# ncurses must be built before libdialog, libedit and libreadline.
18# libnetgraph must be built before libbsnmp/modules/snmp_netgraph.
19# libopie must be built before libpam.
20# libradius must be built before libpam.
21# librpcsvc must be built before libpam.
22# libsbuf must be built before libcam.
23# libtacplus must be built before libpam.
24# libutil must be built before libpam.
25# libypclnt must be built before libpam.
26# libgssapi must be built before librpcsec_gss
27#
28# Otherwise, the SUBDIR list should be in alphabetical order.
29#
30# Except it appears bind needs to be compiled last
31
32SUBDIR_ORDERED=	${_csu} \
33	libc \
34	libbsm \
35	libauditd \
36	libcompiler_rt \
37	libcrypt \
38	libelf \
39	${_libiconv_modules} \
40	libkvm \
41	msun \
42	libmd \
43	ncurses \
44	${_libnetgraph} \
45	libradius \
46	librpcsvc \
47	libsbuf \
48	libtacplus \
49	libutil \
50	${_libypclnt} \
51	${_libcxxrt} \
52	${_libcplusplus}
53
54.if ${MK_KERBEROS_SUPPORT} != "no"
55SUBDIR_ORDERED+=	libcom_err
56.endif
57
58SUBDIR=	${SUBDIR_ORDERED} \
59	libalias \
60	libarchive \
61	${_libatm} \
62	libbegemot \
63	libblocksruntime \
64	${_libbluetooth} \
65	${_libbsnmp} \
66	libbz2 \
67	libcalendar \
68	libcam \
69	libcompat \
70	libdevinfo \
71	libdevstat \
72	libdwarf \
73	libedit \
74	${_libefi} \
75	libexpat \
76	libfetch \
77	libgeom \
78	${_libgpib} \
79	${_libgssapi} \
80	${_librpcsec_gss} \
81	${_libiconv_compat} \
82	libipsec \
83	${_libipx} \
84	libjail \
85	libkiconv \
86	${_libldns} \
87	liblzma \
88	libmagic \
89	libmandoc \
90	libmemstat \
91	${_libmilter} \
92	${_libmp} \
93	${_libnandfs} \
94	libnetbsd \
95	${_libngatm} \
96	libopie \
97	libpam \
98	libpcap \
99	${_libpmc} \
100	${_libproc} \
101	libprocstat \
102	librt \
103	${_librtld_db} \
104	${_libsdp} \
105	${_libsm} \
106	${_libsmb} \
107	${_libsmdb} \
108	${_libsmutil} \
109	libstand \
110	libstdbuf \
111	libstdthreads \
112	${_libtelnet} \
113	${_libthr} \
114	libthread_db \
115	libufs \
116	libugidfw \
117	libulog \
118	${_libusbhid} \
119	${_libusb} \
120	${_libvgl} \
121	${_libvmmapi} \
122	libwrap \
123	liby \
124	libyaml \
125	libz \
126	${_atf} \
127	${_bind} \
128	${_clang}
129
130.if exists(${.CURDIR}/csu/${MACHINE_ARCH}-elf)
131_csu=csu/${MACHINE_ARCH}-elf
132.elif exists(${.CURDIR}/csu/${MACHINE_ARCH})
133_csu=csu/${MACHINE_ARCH}
134.elif exists(${.CURDIR}/csu/${MACHINE_CPUARCH}/Makefile)
135_csu=csu/${MACHINE_CPUARCH}
136.else
137_csu=csu
138.endif
139
140# NB: keep these sorted by MK_* knobs
141
142.if ${MK_ATF} != "no"
143_atf=		atf
144.endif
145
146.if ${MK_ATM} != "no"
147_libngatm=	libngatm
148.endif
149
150.if ${MK_BIND} != "no"
151_bind=		bind
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_CLANG} != "no" && !defined(COMPAT_32BIT)
164_clang=		clang
165.endif
166
167.if ${MK_GPIB} != "no"
168_libgpib=	libgpib
169.endif
170
171.if ${MK_GSSAPI} != "no"
172_libgssapi=	libgssapi
173_librpcsec_gss=	librpcsec_gss
174.endif
175
176.if ${MK_ICONV} != "no"
177_libiconv_modules=	libiconv_modules
178.endif
179
180.if ${MK_IPX} != "no"
181_libipx=	libipx
182.endif
183
184.if ${MK_LDNS} != "no"
185_libldns=	libldns
186.endif
187
188.if ${MK_LIBCPLUSPLUS} != "no"
189_libcxxrt=	libcxxrt
190_libcplusplus=	libc++
191.endif
192
193.if ${MK_LIBICONV_COMPAT} != "no"
194_libiconv_compat=	libiconv_compat
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_USB} != "no"
264_libusbhid=	libusbhid
265_libusb=	libusb
266.endif
267
268.if !defined(LIBRARIES_ONLY)
269afterinstall:
270	${INSTALL_SYMLINK} ../include ${DESTDIR}/usr/lib/include
271.endif
272
273.include <bsd.subdir.mk>
274