xref: /freebsd/lib/Makefile (revision aa24f48b361effe51163877d84f1b70d32b77e04)
1#	@(#)Makefile	8.1 (Berkeley) 6/4/93
2# $FreeBSD$
3
4.include <src.opts.mk>
5
6# The SUBDIR_BOOTSTRAP list is a small set of libraries which are used by many
7# of the other libraries.  These are built first with a .WAIT between them
8# and the main list to avoid needing a SUBDIR_DEPEND line on every library
9# naming just these few items.
10
11SUBDIR_BOOTSTRAP= \
12	csu \
13	.WAIT \
14	libc \
15	libc_nonshared \
16	libcompiler_rt \
17	${_libclang_rt} \
18	${_libcplusplus} \
19	${_libcxxrt} \
20	libelf \
21	msun
22
23# The main list; please keep these sorted alphabetically.
24
25SUBDIR=	${SUBDIR_BOOTSTRAP} \
26	.WAIT \
27	libalias \
28	libarchive \
29	libauditd \
30	libbegemot \
31	libblocksruntime \
32	libbsdstat \
33	libbsm \
34	libbz2 \
35	libcalendar \
36	libcam \
37	libcapsicum \
38	libcompat \
39	libcrypt \
40	libdevctl \
41	libdevinfo \
42	libdevstat \
43	libdwarf \
44	libedit \
45	libevent \
46	libexecinfo \
47	libexpat \
48	libfetch \
49	libfigpar \
50	libgeom \
51	libifconfig \
52	libipsec \
53	libjail \
54	libkiconv \
55	libkvm \
56	liblzma \
57	libmemstat \
58	libmd \
59	libmt \
60	lib80211 \
61	libnetbsd \
62	libnv \
63	libopenbsd \
64	libopie \
65	libpam \
66	libpcap \
67	libpjdlog \
68	${_libproc} \
69	libprocstat \
70	librpcsvc \
71	librss \
72	librt \
73	${_librtld_db} \
74	libsbuf \
75	libsmb \
76	libsqlite3 \
77	libstand \
78	libstdbuf \
79	libstdthreads \
80	libsysdecode \
81	libtacplus \
82	libthread_db \
83	libucl \
84	libufs \
85	libugidfw \
86	libulog \
87	libutil \
88	${_libvgl} \
89	libwrap \
90	libxo \
91	liby \
92	libz \
93	libzstd \
94	ncurses
95
96# Inter-library dependencies.  When the makefile for a library contains LDADD
97# libraries, those libraries should be listed as build order dependencies here.
98
99SUBDIR_DEPEND_libarchive= libz libbz2 libexpat liblzma libmd
100SUBDIR_DEPEND_libauditdm= libbsm
101SUBDIR_DEPEND_libbsnmp= ${_libnetgraph}
102SUBDIR_DEPEND_libc++:= libcxxrt
103SUBDIR_DEPEND_libc= libcompiler_rt
104SUBDIR_DEPEND_libcam= libsbuf
105SUBDIR_DEPEND_libcasper= libnv
106SUBDIR_DEPEND_libdevstat= libkvm
107SUBDIR_DEPEND_libdpv= libfigpar ncurses libutil
108SUBDIR_DEPEND_libedit= ncurses
109SUBDIR_DEPEND_libgeom= libexpat libsbuf
110SUBDIR_DEPEND_librpcsec_gss= libgssapi
111SUBDIR_DEPEND_libmagic= libz
112SUBDIR_DEPEND_libmemstat= libkvm
113SUBDIR_DEPEND_libopie= libmd
114SUBDIR_DEPEND_libpam= libcrypt libopie ${_libradius} librpcsvc libtacplus libutil ${_libypclnt} ${_libcom_err}
115SUBDIR_DEPEND_libpjdlog= libutil
116SUBDIR_DEPEND_libprocstat= libkvm libutil
117SUBDIR_DEPEND_libradius= libmd
118SUBDIR_DEPEND_libsmb= libkiconv
119SUBDIR_DEPEND_libtacplus= libmd
120SUBDIR_DEPEND_libulog= libmd
121SUBDIR_DEPEND_libunbound= ${_libldns}
122SUBDIR_DEPEND_liblzma= ${_libthr}
123
124# NB: keep these sorted by MK_* knobs
125
126SUBDIR.${MK_ATM}+=	libngatm
127SUBDIR.${MK_BLACKLIST}+=libblacklist
128SUBDIR.${MK_BLUETOOTH}+=libbluetooth libsdp
129SUBDIR.${MK_BSNMP}+=	libbsnmp
130SUBDIR.${MK_CASPER}+=	libcasper
131
132.if !defined(COMPAT_32BIT) && !defined(COMPAT_SOFTFP)
133SUBDIR.${MK_CLANG}+=	clang
134.endif
135
136SUBDIR.${MK_CUSE}+= 	libcuse
137SUBDIR.${MK_CXX}+=	libdevdctl
138SUBDIR.${MK_TOOLCHAIN}+=libelftc libpe
139SUBDIR.${MK_DIALOG}+=	libdpv
140SUBDIR.${MK_FILE}+=	libmagic
141SUBDIR.${MK_GPIO}+=	libgpio
142SUBDIR.${MK_GSSAPI}+=	libgssapi librpcsec_gss
143SUBDIR.${MK_ICONV}+=	libiconv_modules
144SUBDIR.${MK_KERBEROS_SUPPORT}+=	libcom_err
145SUBDIR.${MK_LDNS}+=	libldns
146
147# The libraries under libclang_rt can only be built by clang, and only make
148# sense to build when clang is enabled at all.  Furthermore, they can only be
149# built for certain architectures.
150.if ${MK_CLANG} != "no" && ${COMPILER_TYPE} == "clang" && \
151    (${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \
152    (${MACHINE_CPUARCH} == "arm" && ${MACHINE_ARCH} != "armeb") || \
153    (${MACHINE_CPUARCH} == "i386"))
154_libclang_rt=	libclang_rt
155.endif
156
157.if ${MK_LIBCPLUSPLUS} != "no"
158_libcxxrt=	libcxxrt
159_libcplusplus=	libc++
160.if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips"
161_libcplusplus+=	libc++experimental
162.endif
163.endif
164
165SUBDIR.${MK_EFI}+=	libefivar
166SUBDIR.${MK_LIBTHR}+=	libthr
167SUBDIR.${MK_LLVM_LIBUNWIND}+=	libgcc_eh
168SUBDIR.${MK_LLVM_LIBUNWIND}+=	libgcc_s
169SUBDIR.${MK_NAND}+=	libnandfs
170SUBDIR.${MK_NETGRAPH}+=	libnetgraph
171SUBDIR.${MK_NIS}+=	libypclnt
172
173.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
174_libvgl=	libvgl
175.endif
176
177.if ${MACHINE_CPUARCH} == "amd64"
178SUBDIR.${MK_BHYVE}+=	libvmmapi
179.endif
180
181.if ${MACHINE_CPUARCH} != "sparc64"
182_libproc=	libproc
183_librtld_db=	librtld_db
184.endif
185
186SUBDIR.${MK_OPENSSL}+=	libmp
187SUBDIR.${MK_PMC}+=	libpmc
188SUBDIR.${MK_RADIUS_SUPPORT}+=	libradius
189SUBDIR.${MK_SENDMAIL}+=	libmilter libsm libsmdb libsmutil
190SUBDIR.${MK_TELNET}+=	libtelnet
191SUBDIR.${MK_TESTS_SUPPORT}+=	atf
192SUBDIR.${MK_TESTS}+=	tests
193SUBDIR.${MK_UNBOUND}+=	libunbound
194SUBDIR.${MK_USB}+=	libusbhid libusb
195
196.if !make(install)
197SUBDIR_PARALLEL=
198.endif
199
200.include <bsd.subdir.mk>
201