xref: /freebsd/lib/Makefile (revision 97bd480fe38abb5950359b9d864a62037b4ab5f7)
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	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	libucl \
123	libufs \
124	libugidfw \
125	libulog \
126	${_libunbound} \
127	${_libusbhid} \
128	${_libusb} \
129	${_libvgl} \
130	${_libvmmapi} \
131	libwrap \
132	liby \
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_LDNS} != "no"
186_libldns=	libldns
187.endif
188
189.if ${MK_LIBCPLUSPLUS} != "no"
190_libcxxrt=	libcxxrt
191_libcplusplus=	libc++
192.endif
193
194.if ${MK_LIBTHR} != "no"
195_libthr=	libthr
196.endif
197
198.if ${MK_NAND} != "no"
199_libnandfs=	libnandfs
200.endif
201
202.if ${MK_NETGRAPH} != "no"
203_libnetgraph=	libnetgraph
204.endif
205
206.if ${MK_NIS} != "no"
207_libypclnt=	libypclnt
208.endif
209
210.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
211_libsmb=	libsmb
212_libvgl=	libvgl
213_libproc=	libproc
214_librtld_db=	librtld_db
215.endif
216
217.if ${MACHINE_CPUARCH} == "amd64"
218_libvmmapi=	libvmmapi
219.endif
220
221.if ${MACHINE_CPUARCH} == "ia64"
222_libefi=	libefi
223_libsmb=	libsmb
224.endif
225
226.if ${MACHINE_CPUARCH} == "mips"
227_libproc=	libproc
228_librtld_db=	librtld_db
229.endif
230
231.if ${MACHINE_CPUARCH} == "powerpc"
232_libproc=	libproc
233_librtld_db=	librtld_db
234_libsmb=	libsmb
235.endif
236
237.if ${MACHINE_CPUARCH} == "sparc64"
238_libsmb=	libsmb
239.endif
240
241.if ${MK_OPENSSL} != "no"
242_libmp=		libmp
243.endif
244
245.if ${MK_PMC} != "no"
246_libpmc=	libpmc
247.endif
248
249.if ${MK_SENDMAIL} != "no"
250_libmilter=	libmilter
251_libsm=		libsm
252_libsmdb=	libsmdb
253_libsmutil=	libsmutil
254.endif
255
256.if ${MK_TELNET} != "no"
257_libtelnet=	libtelnet
258.endif
259
260.if ${MK_TESTS} != "no"
261_atf=		atf
262_tests=		tests
263.endif
264
265.if ${MK_UNBOUND} != "no"
266_libunbound=	libunbound
267.endif
268
269.if ${MK_USB} != "no"
270_libusbhid=	libusbhid
271_libusb=	libusb
272.endif
273
274.if !defined(LIBRARIES_ONLY)
275afterinstall:
276	${INSTALL_SYMLINK} ../include ${DESTDIR}/usr/lib/include
277.endif
278
279.include <bsd.subdir.mk>
280