xref: /freebsd/lib/Makefile (revision 646a7fea0c8a60ce2795ffc1bdf58e0fd0f7d624)
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	libipsec \
82	${_libipx} \
83	libjail \
84	libkiconv \
85	liblzma \
86	libmagic \
87	libmandoc \
88	libmemstat \
89	${_libmilter} \
90	${_libmp} \
91	${_libnandfs} \
92	libnetbsd \
93	${_libngatm} \
94	libopie \
95	libpam \
96	libpcap \
97	${_libpmc} \
98	${_libproc} \
99	libprocstat \
100	librt \
101	${_librtld_db} \
102	${_libsdp} \
103	${_libsm} \
104	${_libsmdb} \
105	${_libsmutil} \
106	libstand \
107	libstdbuf \
108	libstdthreads \
109	${_libtelnet} \
110	${_libthr} \
111	libthread_db \
112	libufs \
113	libugidfw \
114	libulog \
115	${_libusbhid} \
116	${_libusb} \
117	${_libvgl} \
118	${_libvmmapi} \
119	libwrap \
120	liby \
121	libz \
122	${_atf} \
123	${_bind} \
124	${_clang}
125
126.if exists(${.CURDIR}/csu/${MACHINE_ARCH}-elf)
127_csu=csu/${MACHINE_ARCH}-elf
128.elif exists(${.CURDIR}/csu/${MACHINE_ARCH})
129_csu=csu/${MACHINE_ARCH}
130.elif exists(${.CURDIR}/csu/${MACHINE_CPUARCH}/Makefile)
131_csu=csu/${MACHINE_CPUARCH}
132.else
133_csu=csu
134.endif
135
136# NB: keep these sorted by MK_* knobs
137
138.if ${MK_ATF} != "no"
139_atf=		atf
140.endif
141
142.if ${MK_ATM} != "no"
143_libngatm=	libngatm
144.endif
145
146.if ${MK_BIND} != "no"
147_bind=		bind
148.endif
149
150.if ${MK_BLUETOOTH} != "no"
151_libbluetooth=	libbluetooth
152_libsdp=	libsdp
153.endif
154
155.if ${MK_BSNMP} != "no"
156_libbsnmp=	libbsnmp
157.endif
158
159.if ${MK_CLANG} != "no" && !defined(COMPAT_32BIT)
160_clang=		clang
161.endif
162
163.if ${MK_GPIB} != "no"
164_libgpib=	libgpib
165.endif
166
167.if ${MK_GSSAPI} != "no"
168_libgssapi=	libgssapi
169_librpcsec_gss=	librpcsec_gss
170.endif
171
172.if ${MK_ICONV} != "no"
173_libiconv_modules=	libiconv_modules
174.endif
175
176.if ${MK_IPX} != "no"
177_libipx=	libipx
178.endif
179
180.if ${MK_LIBTHR} != "no"
181_libthr=	libthr
182.endif
183
184.if ${MK_NAND} != "no"
185_libnandfs=	libnandfs
186.endif
187
188.if ${MK_NETGRAPH} != "no"
189_libnetgraph=	libnetgraph
190.endif
191
192.if ${MK_NIS} != "no"
193_libypclnt=	libypclnt
194.endif
195
196.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
197_libvgl=	libvgl
198_libproc=	libproc
199_librtld_db=	librtld_db
200.endif
201
202.if ${MACHINE_CPUARCH} == "amd64"
203_libvmmapi=	libvmmapi
204.endif
205
206.if ${MACHINE_CPUARCH} == "ia64"
207_libefi=	libefi
208.endif
209
210.if ${MACHINE_CPUARCH} == "mips"
211_libproc=	libproc
212_librtld_db=	librtld_db
213.endif
214
215.if ${MACHINE_CPUARCH} == "powerpc"
216_libproc=	libproc
217_librtld_db=	librtld_db
218.endif
219
220.if ${MK_OPENSSL} != "no"
221_libmp=		libmp
222.endif
223
224.if ${MK_LIBCPLUSPLUS} != "no"
225_libcxxrt=	libcxxrt
226_libcplusplus=	libc++
227.endif
228
229.if ${MK_PMC} != "no"
230_libpmc=	libpmc
231.endif
232
233.if ${MK_SENDMAIL} != "no"
234_libmilter=	libmilter
235_libsm=		libsm
236_libsmdb=	libsmdb
237_libsmutil=	libsmutil
238.endif
239
240.if ${MK_TELNET} != "no"
241_libtelnet=	libtelnet
242.endif
243
244.if ${MK_USB} != "no"
245_libusbhid=	libusbhid
246_libusb=	libusb
247.endif
248
249.include <bsd.subdir.mk>
250