xref: /freebsd/lib/Makefile (revision d7790611c185ee3e0ea33efcded27447281785bb)
158f0484fSRodney W. Grimes#	@(#)Makefile	8.1 (Berkeley) 6/4/93
27f3dea24SPeter Wemm# $FreeBSD$
3c9811e98SBruce Evans
4c6063d0dSWarner Losh.include <src.opts.mk>
5e1fe3dbaSRuslan Ermilov
6a1c70d69SIan Lepore# The SUBDIR_ORDERED list is a small set of libraries which are used by many
7a1c70d69SIan Lepore# of the other libraries.  These are built first with a .WAIT between them
8a1c70d69SIan Lepore# and the main list to avoid needing a SUBDIR_DEPEND line on every library
9a1c70d69SIan Lepore# naming just these few items.
10c9811e98SBruce Evans
119b3e440bSWarner LoshSUBDIR_ORDERED=	${_csu} \
12b8fffe16SWarner Losh	.WAIT \
139b3e440bSWarner Losh	libc \
14091b8336SPeter Wemm	libc_nonshared \
1539cd938cSEd Schouten	libcompiler_rt \
16a1c70d69SIan Lepore	${_libcplusplus} \
1749c8e5e7SDimitry Andric	${_libcxxrt} \
18a1c70d69SIan Lepore	libelf \
19a1c70d69SIan Lepore	msun
209b3e440bSWarner Losh
21a1c70d69SIan Lepore# The main list; please keep these sorted alphabetically.
220e46933cSStanislav Sedov
239b3e440bSWarner LoshSUBDIR=	${SUBDIR_ORDERED} \
24b8fffe16SWarner Losh	.WAIT \
259b3e440bSWarner Losh	libalias \
269b3e440bSWarner Losh	libarchive \
279b3e440bSWarner Losh	${_libatm} \
28a1c70d69SIan Lepore	libauditd \
299b3e440bSWarner Losh	libbegemot \
3039cd938cSEd Schouten	libblocksruntime \
319b3e440bSWarner Losh	${_libbluetooth} \
329b3e440bSWarner Losh	${_libbsnmp} \
3381bd3d89SAdrian Chadd	libbsdstat \
34a1c70d69SIan Lepore	libbsm \
359b3e440bSWarner Losh	libbz2 \
369b3e440bSWarner Losh	libcalendar \
379b3e440bSWarner Losh	libcam \
38a1c70d69SIan Lepore	${_libcapsicum} \
3942a85952SPawel Jakub Dawidek	${_libcasper} \
40a1c70d69SIan Lepore	${_libcom_err} \
419b3e440bSWarner Losh	libcompat \
42a1c70d69SIan Lepore	libcrypt \
439b3e440bSWarner Losh	libdevinfo \
449b3e440bSWarner Losh	libdevstat \
459b3e440bSWarner Losh	libdwarf \
469b3e440bSWarner Losh	libedit \
47f9721976SXin LI	${_libevent} \
484b1fb8ffSEd Maste	libexecinfo \
499b3e440bSWarner Losh	libexpat \
509b3e440bSWarner Losh	libfetch \
519b3e440bSWarner Losh	libgeom \
529b3e440bSWarner Losh	${_libgpib} \
539b3e440bSWarner Losh	${_libgssapi} \
549b3e440bSWarner Losh	${_librpcsec_gss} \
55a1c70d69SIan Lepore	${_libiconv_modules} \
569b3e440bSWarner Losh	libipsec \
579b3e440bSWarner Losh	libjail \
589b3e440bSWarner Losh	libkiconv \
59a1c70d69SIan Lepore	libkvm \
60a1c70d69SIan Lepore	${_libldns} \
6181ad8388SMartin Matuska	liblzma \
629b3e440bSWarner Losh	libmagic \
63cc4842a1SUlrich Spörlein	libmandoc \
649b3e440bSWarner Losh	libmemstat \
65a1c70d69SIan Lepore	libmd \
669b3e440bSWarner Losh	${_libmilter} \
679b3e440bSWarner Losh	${_libmp} \
687f725bcdSGrzegorz Bernacki	${_libnandfs} \
696bea8766SBrooks Davis	libnetbsd \
70a1c70d69SIan Lepore	${_libnetgraph} \
719b3e440bSWarner Losh	${_libngatm} \
72a1c70d69SIan Lepore	libnv \
73e806d508SBaptiste Daroussin	libohash \
749b3e440bSWarner Losh	libopie \
759b3e440bSWarner Losh	libpam \
769b3e440bSWarner Losh	libpcap \
77a1c70d69SIan Lepore	libpjdlog \
789b3e440bSWarner Losh	${_libpmc} \
7954bb94d7SRui Paulo	${_libproc} \
800daf62d9SStanislav Sedov	libprocstat \
81a1c70d69SIan Lepore	libradius \
82a1c70d69SIan Lepore	librpcsvc \
839b3e440bSWarner Losh	librt \
84fb05b666SRui Paulo	${_librtld_db} \
85a1c70d69SIan Lepore	libsbuf \
869b3e440bSWarner Losh	${_libsdp} \
879b3e440bSWarner Losh	${_libsm} \
88237abf0cSDavide Italiano	${_libsmb} \
899b3e440bSWarner Losh	${_libsmdb} \
909b3e440bSWarner Losh	${_libsmutil} \
919b3e440bSWarner Losh	libstand \
926486b015SJeremie Le Hen	libstdbuf \
93fc6f0665SEd Schouten	libstdthreads \
94a1c70d69SIan Lepore	libtacplus \
959b3e440bSWarner Losh	${_libtelnet} \
969b3e440bSWarner Losh	${_libthr} \
979b3e440bSWarner Losh	libthread_db \
984ca4d6a8SBaptiste Daroussin	libucl \
999b3e440bSWarner Losh	libufs \
1009b3e440bSWarner Losh	libugidfw \
1019b3e440bSWarner Losh	libulog \
1028f8790cdSDag-Erling Smørgrav	${_libunbound} \
1039b3e440bSWarner Losh	${_libusbhid} \
1049b3e440bSWarner Losh	${_libusb} \
105a1c70d69SIan Lepore	libutil \
1069b3e440bSWarner Losh	${_libvgl} \
107366f6083SPeter Grehan	${_libvmmapi} \
1089b3e440bSWarner Losh	libwrap \
109*d7790611SMarcel Moolenaar	libxo \
1109b3e440bSWarner Losh	liby \
111a1c70d69SIan Lepore	${_libypclnt} \
1129b3e440bSWarner Losh	libz \
113a1c70d69SIan Lepore	ncurses \
114c175365cSMarcel Moolenaar	${_atf} \
115cc21b86fSJulio Merino	${_clang} \
11636716419SHans Petter Selasky	${_cuse} \
117cc21b86fSJulio Merino	${_tests}
11858f0484fSRodney W. Grimes
119a1c70d69SIan Lepore# Inter-library dependencies.  When the makefile for a library contains LDADD
120a1c70d69SIan Lepore# libraries, those libraries should be listed as build order dependencies here.
121a1c70d69SIan Lepore
122a1c70d69SIan LeporeSUBDIR_DEPEND_libarchive= libz libbz2 libexpat liblzma libmd
123a1c70d69SIan LeporeSUBDIR_DEPEND_libatm= libmd
124a1c70d69SIan LeporeSUBDIR_DEPEND_libauditdm= libbsm
125a1c70d69SIan LeporeSUBDIR_DEPEND_libbsnmp= ${_libnetgraph}
126a1c70d69SIan LeporeSUBDIR_DEPEND_libc++= libcxxrt
127a1c70d69SIan LeporeSUBDIR_DEPEND_libc= libcompiler_rt
128a1c70d69SIan LeporeSUBDIR_DEPEND_libcam= libsbuf
129a1c70d69SIan LeporeSUBDIR_DEPEND_libcapsicum= libnv
130a1c70d69SIan LeporeSUBDIR_DEPEND_libcasper= libcapsicum libnv libpjdlog
131a1c70d69SIan LeporeSUBDIR_DEPEND_libdevstat= libkvm
132a1c70d69SIan LeporeSUBDIR_DEPEND_libdiaglog= ncurses
133a1c70d69SIan LeporeSUBDIR_DEPEND_libedit= ncurses
134a1c70d69SIan LeporeSUBDIR_DEPEND_libg++= msun
135a1c70d69SIan LeporeSUBDIR_DEPEND_libgeom= libexpat libsbuf
136a1c70d69SIan LeporeSUBDIR_DEPEND_liblibrpcsec_gss= libgssapi
137a1c70d69SIan LeporeSUBDIR_DEPEND_libmagic= libz
138a1c70d69SIan LeporeSUBDIR_DEPEND_libmemstat= libkvm
139a1c70d69SIan LeporeSUBDIR_DEPEND_libopie= libmd
140a1c70d69SIan LeporeSUBDIR_DEPEND_libpam= libcrypt libopie libradius librpcsvc libtacplus libutil ${_libypclnt} ${_libcom_err}
141a1c70d69SIan LeporeSUBDIR_DEPEND_libpjdlog= libutil
142a1c70d69SIan LeporeSUBDIR_DEPEND_libprocstat= libkvm libutil
143a1c70d69SIan LeporeSUBDIR_DEPEND_libradius= libmd
144a1c70d69SIan LeporeSUBDIR_DEPEND_libreadline= ncurses
145a1c70d69SIan LeporeSUBDIR_DEPEND_libsmb= libkiconv
146a1c70d69SIan LeporeSUBDIR_DEPEND_libstdc++= msun
147a1c70d69SIan LeporeSUBDIR_DEPEND_libtacplus= libmd
148a1c70d69SIan LeporeSUBDIR_DEPEND_libulog= libmd
149a1c70d69SIan LeporeSUBDIR_DEPEND_libunbound= ${_libldns}
150a1c70d69SIan Lepore
1512bef81cfSWarner Losh.if exists(${.CURDIR}/csu/${MACHINE_ARCH}-elf)
1522bef81cfSWarner Losh_csu=csu/${MACHINE_ARCH}-elf
153b12277d1SNathan Whitehorn.elif exists(${.CURDIR}/csu/${MACHINE_ARCH})
154b12277d1SNathan Whitehorn_csu=csu/${MACHINE_ARCH}
15525faff34SWarner Losh.elif exists(${.CURDIR}/csu/${MACHINE_CPUARCH}/Makefile)
15625faff34SWarner Losh_csu=csu/${MACHINE_CPUARCH}
15756a91a6fSDavid E. O'Brien.else
15856a91a6fSDavid E. O'Brien_csu=csu
159b09f41a4SJohn Birrell.endif
160b09f41a4SJohn Birrell
161690f477dSSam Leffler# NB: keep these sorted by MK_* knobs
162690f477dSSam Leffler
163e1fe3dbaSRuslan Ermilov.if ${MK_ATM} != "no"
1649e9dbe04SHartmut Brandt_libngatm=	libngatm
1655e1847b4SPoul-Henning Kamp.endif
1665e1847b4SPoul-Henning Kamp
167e1fe3dbaSRuslan Ermilov.if ${MK_BLUETOOTH} != "no"
1680986ab12SMaksim Yevmenkin_libbluetooth=	libbluetooth
1690986ab12SMaksim Yevmenkin_libsdp=	libsdp
17018d948adSMaksim Yevmenkin.endif
17123d1e148SMaksim Yevmenkin
172690f477dSSam Leffler.if ${MK_BSNMP} != "no"
173690f477dSSam Leffler_libbsnmp=	libbsnmp
174690f477dSSam Leffler.endif
175690f477dSSam Leffler
17642a85952SPawel Jakub Dawidek.if ${MK_CASPER} != "no"
17742a85952SPawel Jakub Dawidek_libcapsicum=	libcapsicum
17842a85952SPawel Jakub Dawidek_libcasper=	libcasper
17942a85952SPawel Jakub Dawidek.endif
18042a85952SPawel Jakub Dawidek
181bfc72ed5SEd Schouten.if ${MK_CLANG} != "no" && !defined(COMPAT_32BIT)
1826513cfc8SRoman Divacky_clang=		clang
1836513cfc8SRoman Divacky.endif
1846513cfc8SRoman Divacky
18536716419SHans Petter Selasky.if ${MK_CUSE} != "no"
18636716419SHans Petter Selasky_cuse=		libcuse
18736716419SHans Petter Selasky.endif
18836716419SHans Petter Selasky
189690f477dSSam Leffler.if ${MK_GPIB} != "no"
190690f477dSSam Leffler_libgpib=	libgpib
191690f477dSSam Leffler.endif
192690f477dSSam Leffler
1936dc51ecaSRuslan Ermilov.if ${MK_GSSAPI} != "no"
1943fe21f77SDoug Barton_libgssapi=	libgssapi
1958f55a568SDoug Rabson_librpcsec_gss=	librpcsec_gss
1963fe21f77SDoug Barton.endif
1973fe21f77SDoug Barton
198ad30f8e7SGabor Kovesdan.if ${MK_ICONV} != "no"
199ad30f8e7SGabor Kovesdan_libiconv_modules=	libiconv_modules
200ad30f8e7SGabor Kovesdan.endif
201ad30f8e7SGabor Kovesdan
202a1c70d69SIan Lepore.if ${MK_KERBEROS_SUPPORT} != "no"
203a1c70d69SIan Lepore_libcom_err= libcom_err
204a1c70d69SIan Lepore.endif
205a1c70d69SIan Lepore
2067b5038d7SDag-Erling Smørgrav.if ${MK_LDNS} != "no"
2077b5038d7SDag-Erling Smørgrav_libldns=	libldns
2087b5038d7SDag-Erling Smørgrav.endif
2097b5038d7SDag-Erling Smørgrav
21035e370a2SDag-Erling Smørgrav.if ${MK_LIBCPLUSPLUS} != "no"
21135e370a2SDag-Erling Smørgrav_libcxxrt=	libcxxrt
21235e370a2SDag-Erling Smørgrav_libcplusplus=	libc++
21335e370a2SDag-Erling Smørgrav.endif
21435e370a2SDag-Erling Smørgrav
215690f477dSSam Leffler.if ${MK_LIBTHR} != "no"
216690f477dSSam Leffler_libthr=	libthr
217690f477dSSam Leffler.endif
218690f477dSSam Leffler
2197f725bcdSGrzegorz Bernacki.if ${MK_NAND} != "no"
2207f725bcdSGrzegorz Bernacki_libnandfs=	libnandfs
2217f725bcdSGrzegorz Bernacki.endif
2227f725bcdSGrzegorz Bernacki
223690f477dSSam Leffler.if ${MK_NETGRAPH} != "no"
224690f477dSSam Leffler_libnetgraph=	libnetgraph
225690f477dSSam Leffler.endif
226690f477dSSam Leffler
227690f477dSSam Leffler.if ${MK_NIS} != "no"
228690f477dSSam Leffler_libypclnt=	libypclnt
229690f477dSSam Leffler.endif
230690f477dSSam Leffler
231f9721976SXin LI.if ${MK_PF} != "no"
232f9721976SXin LI_libevent=	libevent
233f9721976SXin LI.endif
234f9721976SXin LI
23525faff34SWarner Losh.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
236237abf0cSDavide Italiano_libsmb=	libsmb
237c9811e98SBruce Evans_libvgl=	libvgl
23854bb94d7SRui Paulo_libproc=	libproc
239fb05b666SRui Paulo_librtld_db=	librtld_db
240abbb0b30SMarcel Moolenaar.endif
241abbb0b30SMarcel Moolenaar
24270d8f36aSPeter Grehan.if ${MACHINE_CPUARCH} == "amd64"
24370d8f36aSPeter Grehan_libvmmapi=	libvmmapi
24470d8f36aSPeter Grehan.endif
24570d8f36aSPeter Grehan
24607d39325SOleksandr Tymoshenko.if ${MACHINE_CPUARCH} == "mips"
24707d39325SOleksandr Tymoshenko_libproc=	libproc
24807d39325SOleksandr Tymoshenko_librtld_db=	librtld_db
24907d39325SOleksandr Tymoshenko.endif
25007d39325SOleksandr Tymoshenko
251c7570492SJustin Hibbits.if ${MACHINE_CPUARCH} == "powerpc"
252c7570492SJustin Hibbits_libproc=	libproc
253c7570492SJustin Hibbits_librtld_db=	librtld_db
254237abf0cSDavide Italiano_libsmb=	libsmb
255237abf0cSDavide Italiano.endif
256237abf0cSDavide Italiano
257237abf0cSDavide Italiano.if ${MACHINE_CPUARCH} == "sparc64"
258237abf0cSDavide Italiano_libsmb=	libsmb
259c7570492SJustin Hibbits.endif
260c7570492SJustin Hibbits
261690f477dSSam Leffler.if ${MK_OPENSSL} != "no"
262690f477dSSam Leffler_libmp=		libmp
263690f477dSSam Leffler.endif
264690f477dSSam Leffler
265690f477dSSam Leffler.if ${MK_PMC} != "no"
266690f477dSSam Leffler_libpmc=	libpmc
267690f477dSSam Leffler.endif
268690f477dSSam Leffler
269690f477dSSam Leffler.if ${MK_SENDMAIL} != "no"
270690f477dSSam Leffler_libmilter=	libmilter
271690f477dSSam Leffler_libsm=		libsm
272690f477dSSam Leffler_libsmdb=	libsmdb
273690f477dSSam Leffler_libsmutil=	libsmutil
274690f477dSSam Leffler.endif
275690f477dSSam Leffler
276690f477dSSam Leffler.if ${MK_TELNET} != "no"
277690f477dSSam Leffler_libtelnet=	libtelnet
278e9043a12SMike Makonnen.endif
279e9043a12SMike Makonnen
280b55e8e6eSWarner Losh.if ${MK_TESTS_SUPPORT} != "no"
281e01d128aSJulio Merino_atf=		atf
282b55e8e6eSWarner Losh.endif
283b55e8e6eSWarner Losh.if ${MK_TESTS} != "no"
284cc21b86fSJulio Merino_tests=		tests
285e01d128aSJulio Merino.endif
286e01d128aSJulio Merino
2878f8790cdSDag-Erling Smørgrav.if ${MK_UNBOUND} != "no"
2888f8790cdSDag-Erling Smørgrav_libunbound=	libunbound
2898f8790cdSDag-Erling Smørgrav.endif
2908f8790cdSDag-Erling Smørgrav
291e1fe3dbaSRuslan Ermilov.if ${MK_USB} != "no"
292f3e5ff40SBruce Evans_libusbhid=	libusbhid
2936df55934SAndrew Thompson_libusb=	libusb
294a8ec1b48SMaxim Sobolev.endif
295a8ec1b48SMaxim Sobolev
2967be23620SBrooks Davis.if !defined(LIBRARIES_ONLY)
2977c83e443STim Kientzleafterinstall:
2987be23620SBrooks Davis	${INSTALL_SYMLINK} ../include ${DESTDIR}/usr/lib/include
2997be23620SBrooks Davis.endif
3007c83e443STim Kientzle
30154ff5d73SDimitry Andric.if !make(install)
30254ff5d73SDimitry AndricSUBDIR_PARALLEL=
30354ff5d73SDimitry Andric.endif
30454ff5d73SDimitry Andric
30558f0484fSRodney W. Grimes.include <bsd.subdir.mk>
306