xref: /freebsd/lib/Makefile (revision e01d128a428f2d8d387a4eff6b3ec602423a1b3a)
158f0484fSRodney W. Grimes#	@(#)Makefile	8.1 (Berkeley) 6/4/93
27f3dea24SPeter Wemm# $FreeBSD$
3c9811e98SBruce Evans
4e1fe3dbaSRuslan Ermilov.include <bsd.own.mk>
5e1fe3dbaSRuslan Ermilov
6c9811e98SBruce Evans# To satisfy shared library or ELF linkage when only the libraries being
7c9811e98SBruce Evans# built are visible:
8c9811e98SBruce Evans#
90f09aefaSBruce Evans# csu must be built before all shared libaries for ELF.
104064334fSRuslan Ermilov# libc must be built before all other shared libraries.
11719728bfSRobert Watson# libbsm must be built before libauditd.
12eae951c9SWarner Losh# libcom_err must be built before libpam.
13eae951c9SWarner Losh# libcrypt must be built before libpam.
14c4a5ef6eSThomas Moestl# libkvm must be built before libdevstat.
158f8790cdSDag-Erling Smørgrav# libldns must be built before libunbound.
16a04f2acdSJosef Karthauser# msun must be built before libg++ and libstdc++.
17ccdee0d9SMark Murray# libmd must be built before libatm, libopie, libradius, and libtacplus.
18af5b5a0fSRong-En Fan# ncurses must be built before libdialog, libedit and libreadline.
19360b288fSHartmut Brandt# libnetgraph must be built before libbsnmp/modules/snmp_netgraph.
2014b42810SKris Kennaway# libopie must be built before libpam.
2160da54eeSJohn Polstra# libradius must be built before libpam.
2276ed168aSMark Murray# librpcsvc must be built before libpam.
2397b877c9SDag-Erling Smørgrav# libsbuf must be built before libcam.
2460da54eeSJohn Polstra# libtacplus must be built before libpam.
25c5da4b13SBruce Evans# libutil must be built before libpam.
2697b877c9SDag-Erling Smørgrav# libypclnt must be built before libpam.
278f55a568SDoug Rabson# libgssapi must be built before librpcsec_gss
28c9811e98SBruce Evans#
29c9811e98SBruce Evans# Otherwise, the SUBDIR list should be in alphabetical order.
30eae951c9SWarner Losh#
31eae951c9SWarner Losh# Except it appears bind needs to be compiled last
32c9811e98SBruce Evans
339b3e440bSWarner LoshSUBDIR_ORDERED=	${_csu} \
349b3e440bSWarner Losh	libc \
359b3e440bSWarner Losh	libbsm \
369b3e440bSWarner Losh	libauditd \
3739cd938cSEd Schouten	libcompiler_rt \
389b3e440bSWarner Losh	libcrypt \
399b3e440bSWarner Losh	libelf \
40ad30f8e7SGabor Kovesdan	${_libiconv_modules} \
419b3e440bSWarner Losh	libkvm \
4271b5e1bbSDag-Erling Smørgrav	${_libldns} \
439b3e440bSWarner Losh	msun \
449b3e440bSWarner Losh	libmd \
459b3e440bSWarner Losh	ncurses \
469b3e440bSWarner Losh	${_libnetgraph} \
479b3e440bSWarner Losh	libradius \
489b3e440bSWarner Losh	librpcsvc \
499b3e440bSWarner Losh	libsbuf \
509b3e440bSWarner Losh	libtacplus \
519b3e440bSWarner Losh	libutil \
5249c8e5e7SDimitry Andric	${_libypclnt} \
5349c8e5e7SDimitry Andric	${_libcxxrt} \
5449c8e5e7SDimitry Andric	${_libcplusplus}
559b3e440bSWarner Losh
560e46933cSStanislav Sedov.if ${MK_KERBEROS_SUPPORT} != "no"
570e46933cSStanislav SedovSUBDIR_ORDERED+=	libcom_err
580e46933cSStanislav Sedov.endif
590e46933cSStanislav Sedov
609b3e440bSWarner LoshSUBDIR=	${SUBDIR_ORDERED} \
619b3e440bSWarner Losh	libalias \
629b3e440bSWarner Losh	libarchive \
639b3e440bSWarner Losh	${_libatm} \
649b3e440bSWarner Losh	libbegemot \
6539cd938cSEd Schouten	libblocksruntime \
669b3e440bSWarner Losh	${_libbluetooth} \
679b3e440bSWarner Losh	${_libbsnmp} \
689b3e440bSWarner Losh	libbz2 \
699b3e440bSWarner Losh	libcalendar \
709b3e440bSWarner Losh	libcam \
719b3e440bSWarner Losh	libcompat \
729b3e440bSWarner Losh	libdevinfo \
739b3e440bSWarner Losh	libdevstat \
749b3e440bSWarner Losh	libdwarf \
759b3e440bSWarner Losh	libedit \
769b3e440bSWarner Losh	${_libefi} \
774b1fb8ffSEd Maste	libexecinfo \
789b3e440bSWarner Losh	libexpat \
799b3e440bSWarner Losh	libfetch \
809b3e440bSWarner Losh	libgeom \
819b3e440bSWarner Losh	${_libgpib} \
829b3e440bSWarner Losh	${_libgssapi} \
839b3e440bSWarner Losh	${_librpcsec_gss} \
849b3e440bSWarner Losh	libipsec \
859b3e440bSWarner Losh	${_libipx} \
869b3e440bSWarner Losh	libjail \
879b3e440bSWarner Losh	libkiconv \
8881ad8388SMartin Matuska	liblzma \
899b3e440bSWarner Losh	libmagic \
90cc4842a1SUlrich Spörlein	libmandoc \
919b3e440bSWarner Losh	libmemstat \
929b3e440bSWarner Losh	${_libmilter} \
939b3e440bSWarner Losh	${_libmp} \
947f725bcdSGrzegorz Bernacki	${_libnandfs} \
956bea8766SBrooks Davis	libnetbsd \
969b3e440bSWarner Losh	${_libngatm} \
979b3e440bSWarner Losh	libopie \
989b3e440bSWarner Losh	libpam \
999b3e440bSWarner Losh	libpcap \
1009b3e440bSWarner Losh	${_libpmc} \
10154bb94d7SRui Paulo	${_libproc} \
1020daf62d9SStanislav Sedov	libprocstat \
1039b3e440bSWarner Losh	librt \
104fb05b666SRui Paulo	${_librtld_db} \
1059b3e440bSWarner Losh	${_libsdp} \
1069b3e440bSWarner Losh	${_libsm} \
107237abf0cSDavide Italiano	${_libsmb} \
1089b3e440bSWarner Losh	${_libsmdb} \
1099b3e440bSWarner Losh	${_libsmutil} \
1109b3e440bSWarner Losh	libstand \
1116486b015SJeremie Le Hen	libstdbuf \
112fc6f0665SEd Schouten	libstdthreads \
1139b3e440bSWarner Losh	${_libtelnet} \
1149b3e440bSWarner Losh	${_libthr} \
1159b3e440bSWarner Losh	libthread_db \
1169b3e440bSWarner Losh	libufs \
1179b3e440bSWarner Losh	libugidfw \
1189b3e440bSWarner Losh	libulog \
1198f8790cdSDag-Erling Smørgrav	${_libunbound} \
1209b3e440bSWarner Losh	${_libusbhid} \
1219b3e440bSWarner Losh	${_libusb} \
1229b3e440bSWarner Losh	${_libvgl} \
123366f6083SPeter Grehan	${_libvmmapi} \
1249b3e440bSWarner Losh	libwrap \
1259b3e440bSWarner Losh	liby \
126e51c53f3SBaptiste Daroussin	libyaml \
1279b3e440bSWarner Losh	libz \
128c175365cSMarcel Moolenaar	${_atf} \
1296513cfc8SRoman Divacky	${_clang}
13058f0484fSRodney W. Grimes
1312bef81cfSWarner Losh.if exists(${.CURDIR}/csu/${MACHINE_ARCH}-elf)
1322bef81cfSWarner Losh_csu=csu/${MACHINE_ARCH}-elf
133b12277d1SNathan Whitehorn.elif exists(${.CURDIR}/csu/${MACHINE_ARCH})
134b12277d1SNathan Whitehorn_csu=csu/${MACHINE_ARCH}
13525faff34SWarner Losh.elif exists(${.CURDIR}/csu/${MACHINE_CPUARCH}/Makefile)
13625faff34SWarner Losh_csu=csu/${MACHINE_CPUARCH}
13756a91a6fSDavid E. O'Brien.else
13856a91a6fSDavid E. O'Brien_csu=csu
139b09f41a4SJohn Birrell.endif
140b09f41a4SJohn Birrell
141690f477dSSam Leffler# NB: keep these sorted by MK_* knobs
142690f477dSSam Leffler
143e1fe3dbaSRuslan Ermilov.if ${MK_ATM} != "no"
1449e9dbe04SHartmut Brandt_libngatm=	libngatm
1455e1847b4SPoul-Henning Kamp.endif
1465e1847b4SPoul-Henning Kamp
147e1fe3dbaSRuslan Ermilov.if ${MK_BLUETOOTH} != "no"
1480986ab12SMaksim Yevmenkin_libbluetooth=	libbluetooth
1490986ab12SMaksim Yevmenkin_libsdp=	libsdp
15018d948adSMaksim Yevmenkin.endif
15123d1e148SMaksim Yevmenkin
152690f477dSSam Leffler.if ${MK_BSNMP} != "no"
153690f477dSSam Leffler_libbsnmp=	libbsnmp
154690f477dSSam Leffler.endif
155690f477dSSam Leffler
156bfc72ed5SEd Schouten.if ${MK_CLANG} != "no" && !defined(COMPAT_32BIT)
1576513cfc8SRoman Divacky_clang=		clang
1586513cfc8SRoman Divacky.endif
1596513cfc8SRoman Divacky
160690f477dSSam Leffler.if ${MK_GPIB} != "no"
161690f477dSSam Leffler_libgpib=	libgpib
162690f477dSSam Leffler.endif
163690f477dSSam Leffler
1646dc51ecaSRuslan Ermilov.if ${MK_GSSAPI} != "no"
1653fe21f77SDoug Barton_libgssapi=	libgssapi
1668f55a568SDoug Rabson_librpcsec_gss=	librpcsec_gss
1673fe21f77SDoug Barton.endif
1683fe21f77SDoug Barton
169ad30f8e7SGabor Kovesdan.if ${MK_ICONV} != "no"
170ad30f8e7SGabor Kovesdan_libiconv_modules=	libiconv_modules
171ad30f8e7SGabor Kovesdan.endif
172ad30f8e7SGabor Kovesdan
173cea557adSRuslan Ermilov.if ${MK_IPX} != "no"
174cea557adSRuslan Ermilov_libipx=	libipx
175cea557adSRuslan Ermilov.endif
176cea557adSRuslan Ermilov
1777b5038d7SDag-Erling Smørgrav.if ${MK_LDNS} != "no"
1787b5038d7SDag-Erling Smørgrav_libldns=	libldns
1797b5038d7SDag-Erling Smørgrav.endif
1807b5038d7SDag-Erling Smørgrav
18135e370a2SDag-Erling Smørgrav.if ${MK_LIBCPLUSPLUS} != "no"
18235e370a2SDag-Erling Smørgrav_libcxxrt=	libcxxrt
18335e370a2SDag-Erling Smørgrav_libcplusplus=	libc++
18435e370a2SDag-Erling Smørgrav.endif
18535e370a2SDag-Erling Smørgrav
186690f477dSSam Leffler.if ${MK_LIBTHR} != "no"
187690f477dSSam Leffler_libthr=	libthr
188690f477dSSam Leffler.endif
189690f477dSSam Leffler
1907f725bcdSGrzegorz Bernacki.if ${MK_NAND} != "no"
1917f725bcdSGrzegorz Bernacki_libnandfs=	libnandfs
1927f725bcdSGrzegorz Bernacki.endif
1937f725bcdSGrzegorz Bernacki
194690f477dSSam Leffler.if ${MK_NETGRAPH} != "no"
195690f477dSSam Leffler_libnetgraph=	libnetgraph
196690f477dSSam Leffler.endif
197690f477dSSam Leffler
198690f477dSSam Leffler.if ${MK_NIS} != "no"
199690f477dSSam Leffler_libypclnt=	libypclnt
200690f477dSSam Leffler.endif
201690f477dSSam Leffler
20225faff34SWarner Losh.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
203237abf0cSDavide Italiano_libsmb=	libsmb
204c9811e98SBruce Evans_libvgl=	libvgl
20554bb94d7SRui Paulo_libproc=	libproc
206fb05b666SRui Paulo_librtld_db=	librtld_db
207abbb0b30SMarcel Moolenaar.endif
208abbb0b30SMarcel Moolenaar
20970d8f36aSPeter Grehan.if ${MACHINE_CPUARCH} == "amd64"
21070d8f36aSPeter Grehan_libvmmapi=	libvmmapi
21170d8f36aSPeter Grehan.endif
21270d8f36aSPeter Grehan
21325faff34SWarner Losh.if ${MACHINE_CPUARCH} == "ia64"
214eb0a7e41SMarcel Moolenaar_libefi=	libefi
215237abf0cSDavide Italiano_libsmb=	libsmb
216e108ac65SMarcel Moolenaar.endif
217e108ac65SMarcel Moolenaar
21807d39325SOleksandr Tymoshenko.if ${MACHINE_CPUARCH} == "mips"
21907d39325SOleksandr Tymoshenko_libproc=	libproc
22007d39325SOleksandr Tymoshenko_librtld_db=	librtld_db
22107d39325SOleksandr Tymoshenko.endif
22207d39325SOleksandr Tymoshenko
223c7570492SJustin Hibbits.if ${MACHINE_CPUARCH} == "powerpc"
224c7570492SJustin Hibbits_libproc=	libproc
225c7570492SJustin Hibbits_librtld_db=	librtld_db
226237abf0cSDavide Italiano_libsmb=	libsmb
227237abf0cSDavide Italiano.endif
228237abf0cSDavide Italiano
229237abf0cSDavide Italiano.if ${MACHINE_CPUARCH} == "sparc64"
230237abf0cSDavide Italiano_libsmb=	libsmb
231c7570492SJustin Hibbits.endif
232c7570492SJustin Hibbits
233690f477dSSam Leffler.if ${MK_OPENSSL} != "no"
234690f477dSSam Leffler_libmp=		libmp
235690f477dSSam Leffler.endif
236690f477dSSam Leffler
237690f477dSSam Leffler.if ${MK_PMC} != "no"
238690f477dSSam Leffler_libpmc=	libpmc
239690f477dSSam Leffler.endif
240690f477dSSam Leffler
241690f477dSSam Leffler.if ${MK_SENDMAIL} != "no"
242690f477dSSam Leffler_libmilter=	libmilter
243690f477dSSam Leffler_libsm=		libsm
244690f477dSSam Leffler_libsmdb=	libsmdb
245690f477dSSam Leffler_libsmutil=	libsmutil
246690f477dSSam Leffler.endif
247690f477dSSam Leffler
248690f477dSSam Leffler.if ${MK_TELNET} != "no"
249690f477dSSam Leffler_libtelnet=	libtelnet
250e9043a12SMike Makonnen.endif
251e9043a12SMike Makonnen
252*e01d128aSJulio Merino.if ${MK_TESTS} != "no"
253*e01d128aSJulio Merino_atf=		atf
254*e01d128aSJulio Merino.endif
255*e01d128aSJulio Merino
2568f8790cdSDag-Erling Smørgrav.if ${MK_UNBOUND} != "no"
2578f8790cdSDag-Erling Smørgrav_libunbound=	libunbound
2588f8790cdSDag-Erling Smørgrav.endif
2598f8790cdSDag-Erling Smørgrav
260e1fe3dbaSRuslan Ermilov.if ${MK_USB} != "no"
261f3e5ff40SBruce Evans_libusbhid=	libusbhid
2626df55934SAndrew Thompson_libusb=	libusb
263a8ec1b48SMaxim Sobolev.endif
264a8ec1b48SMaxim Sobolev
2657be23620SBrooks Davis.if !defined(LIBRARIES_ONLY)
2667c83e443STim Kientzleafterinstall:
2677be23620SBrooks Davis	${INSTALL_SYMLINK} ../include ${DESTDIR}/usr/lib/include
2687be23620SBrooks Davis.endif
2697c83e443STim Kientzle
27058f0484fSRodney W. Grimes.include <bsd.subdir.mk>
271