xref: /freebsd/lib/Makefile (revision 3829a7346880c0e2bec70a23c3169714fb0b1e58)
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.
117a0a89d2SRobert Watson# libbsm must be built before ibauditd.
12379e4771SMartin Matuska# libcom_err must be built before libpam.
13379e4771SMartin Matuska# libcrypt must be built before libpam.
14c4a5ef6eSThomas Moestl# libkvm must be built before libdevstat.
15a04f2acdSJosef Karthauser# msun must be built before libg++ and libstdc++.
16ccdee0d9SMark Murray# libmd must be built before libatm, libopie, libradius, and libtacplus.
17af5b5a0fSRong-En Fan# ncurses must be built before libdialog, libedit and libreadline.
18360b288fSHartmut Brandt# libnetgraph must be built before libbsnmp/modules/snmp_netgraph.
1914b42810SKris Kennaway# libopie must be built before libpam.
2060da54eeSJohn Polstra# libradius must be built before libpam.
2176ed168aSMark Murray# librpcsvc must be built before libpam.
2297b877c9SDag-Erling Smørgrav# libsbuf must be built before libcam.
2360da54eeSJohn Polstra# libtacplus must be built before libpam.
24c5da4b13SBruce Evans# libutil must be built before libpam.
2597b877c9SDag-Erling Smørgrav# libypclnt must be built before libpam.
268f55a568SDoug Rabson# libgssapi must be built before librpcsec_gss
27c9811e98SBruce Evans#
28c9811e98SBruce Evans# Otherwise, the SUBDIR list should be in alphabetical order.
29379e4771SMartin Matuska#
30379e4771SMartin Matuska# Except it appears bind needs to be compiled last
31c9811e98SBruce Evans
32379e4771SMartin MatuskaSUBDIR_ORDERED=	${_csu} \
33379e4771SMartin Matuska	libc \
34379e4771SMartin Matuska	libbsm \
35379e4771SMartin Matuska	libauditd \
36379e4771SMartin Matuska	libcom_err \
37379e4771SMartin Matuska	libcrypt \
38379e4771SMartin Matuska	libelf \
39379e4771SMartin Matuska	libkvm \
40379e4771SMartin Matuska	msun \
417a0a89d2SRobert Watson	libmd \
42379e4771SMartin Matuska	ncurses \
43379e4771SMartin Matuska	${_libnetgraph} \
44379e4771SMartin Matuska	libradius \
45379e4771SMartin Matuska	librpcsvc \
46379e4771SMartin Matuska	libsbuf \
47379e4771SMartin Matuska	libtacplus \
48379e4771SMartin Matuska	libutil \
49379e4771SMartin Matuska	${_libypclnt}
50379e4771SMartin Matuska
51379e4771SMartin MatuskaSUBDIR= ${SUBDIR_ORDERED} \
52379e4771SMartin Matuska	libalias \
53379e4771SMartin Matuska	libarchive \
54379e4771SMartin Matuska	${_libatm} \
55379e4771SMartin Matuska	libbegemot \
56379e4771SMartin Matuska	${_libbluetooth} \
57379e4771SMartin Matuska	${_libbsnmp} \
58379e4771SMartin Matuska	libbz2 \
59379e4771SMartin Matuska	libcalendar \
60379e4771SMartin Matuska	libcam \
61379e4771SMartin Matuska	libcompat \
62379e4771SMartin Matuska	libdevinfo \
63379e4771SMartin Matuska	libdevstat \
64379e4771SMartin Matuska	libdisk \
65379e4771SMartin Matuska	libdwarf \
66379e4771SMartin Matuska	libedit \
67379e4771SMartin Matuska	libexpat \
68379e4771SMartin Matuska	libfetch \
69379e4771SMartin Matuska	libftpio \
70379e4771SMartin Matuska	libgeom \
71379e4771SMartin Matuska	${_libgpib} \
72379e4771SMartin Matuska	${_libgssapi} \
73379e4771SMartin Matuska	${_librpcsec_gss} \
74379e4771SMartin Matuska	libipsec \
75379e4771SMartin Matuska	${_libipx} \
76379e4771SMartin Matuska	libjail \
77379e4771SMartin Matuska	libkiconv \
78*3829a734SMartin Matuska	liblzma \
79379e4771SMartin Matuska	libmagic \
80379e4771SMartin Matuska	libmemstat \
81379e4771SMartin Matuska	${_libmilter} \
82379e4771SMartin Matuska	${_libmp} \
83379e4771SMartin Matuska	${_libncp} \
84379e4771SMartin Matuska	${_libngatm} \
85379e4771SMartin Matuska	libopie \
86379e4771SMartin Matuska	libpam \
87379e4771SMartin Matuska	libpcap \
88379e4771SMartin Matuska	${_libpmc} \
89379e4771SMartin Matuska	libproc \
90379e4771SMartin Matuska	librt \
91379e4771SMartin Matuska	${_libsdp} \
92379e4771SMartin Matuska	${_libsm} \
93379e4771SMartin Matuska	${_libsmb} \
947ae5a033SDavid Xu	${_libsmdb} \
95379e4771SMartin Matuska	${_libsmutil} \
96379e4771SMartin Matuska	libstand \
97379e4771SMartin Matuska	${_libtelnet} \
98379e4771SMartin Matuska	${_libthr} \
99379e4771SMartin Matuska	libthread_db \
100379e4771SMartin Matuska	libufs \
101379e4771SMartin Matuska	libugidfw \
102379e4771SMartin Matuska	${_libusbhid} \
103379e4771SMartin Matuska	${_libusb} \
104379e4771SMartin Matuska	${_libvgl} \
105379e4771SMartin Matuska	libwrap \
106379e4771SMartin Matuska	liby \
107379e4771SMartin Matuska	libz \
1086f0e1ffdSAlfred Perlstein	${_bind}
10958f0484fSRodney W. Grimes
11066422f5bSPeter Wemm.if exists(${.CURDIR}/csu/${MACHINE_ARCH}-elf)
11166422f5bSPeter Wemm_csu=csu/${MACHINE_ARCH}-elf
11256a91a6fSDavid E. O'Brien.elif exists(${.CURDIR}/csu/${MACHINE_ARCH}/Makefile)
113c9811e98SBruce Evans_csu=csu/${MACHINE_ARCH}
11456a91a6fSDavid E. O'Brien.else
11556a91a6fSDavid E. O'Brien_csu=csu
116b09f41a4SJohn Birrell.endif
117b09f41a4SJohn Birrell
118690f477dSSam Leffler# NB: keep these sorted by MK_* knobs
119690f477dSSam Leffler
120e1fe3dbaSRuslan Ermilov.if ${MK_ATM} != "no"
1219e9dbe04SHartmut Brandt_libngatm=	libngatm
1225e1847b4SPoul-Henning Kamp.endif
1235e1847b4SPoul-Henning Kamp
124e1fe3dbaSRuslan Ermilov.if ${MK_BIND} != "no"
125cd3ee173SDag-Erling Smørgrav_bind=		bind
126072355e0SPeter Wemm.endif
127072355e0SPeter Wemm
128e1fe3dbaSRuslan Ermilov.if ${MK_BLUETOOTH} != "no"
1290986ab12SMaksim Yevmenkin_libbluetooth=	libbluetooth
1300986ab12SMaksim Yevmenkin_libsdp=	libsdp
13118d948adSMaksim Yevmenkin.endif
13223d1e148SMaksim Yevmenkin
133690f477dSSam Leffler.if ${MK_BSNMP} != "no"
134690f477dSSam Leffler_libbsnmp=	libbsnmp
135690f477dSSam Leffler.endif
136690f477dSSam Leffler
137690f477dSSam Leffler.if ${MK_GPIB} != "no"
138690f477dSSam Leffler_libgpib=	libgpib
139690f477dSSam Leffler.endif
140690f477dSSam Leffler
1416dc51ecaSRuslan Ermilov.if ${MK_GSSAPI} != "no"
1423fe21f77SDoug Barton_libgssapi=	libgssapi
1438f55a568SDoug Rabson_librpcsec_gss=	librpcsec_gss
1443fe21f77SDoug Barton.endif
1453fe21f77SDoug Barton
146cea557adSRuslan Ermilov.if ${MK_IPX} != "no"
147cea557adSRuslan Ermilov_libipx=	libipx
148cea557adSRuslan Ermilov.endif
149cea557adSRuslan Ermilov
150690f477dSSam Leffler.if ${MK_LIBTHR} != "no"
151690f477dSSam Leffler_libthr=	libthr
152690f477dSSam Leffler.endif
153690f477dSSam Leffler
154690f477dSSam Leffler.if ${MK_NETGRAPH} != "no"
155690f477dSSam Leffler_libnetgraph=	libnetgraph
156690f477dSSam Leffler.endif
157690f477dSSam Leffler
158690f477dSSam Leffler.if ${MK_NIS} != "no"
159690f477dSSam Leffler_libypclnt=	libypclnt
160690f477dSSam Leffler.endif
161690f477dSSam Leffler
16223d1e148SMaksim Yevmenkin.if ${MACHINE_ARCH} == "i386"
163cea557adSRuslan Ermilov.if ${MK_NCP} != "no"
16418d948adSMaksim Yevmenkin_libncp=	libncp
165cea557adSRuslan Ermilov.endif
16623eb26faSSheldon Hearn_libsmb=	libsmb
167c9811e98SBruce Evans_libvgl=	libvgl
168abbb0b30SMarcel Moolenaar.endif
169abbb0b30SMarcel Moolenaar
170e108ac65SMarcel Moolenaar.if ${MACHINE_ARCH} == "ia64"
171e108ac65SMarcel Moolenaar_libsmb=	libsmb
172e108ac65SMarcel Moolenaar.endif
173e108ac65SMarcel Moolenaar
17455434686SPeter Wemm.if ${MACHINE_ARCH} == "amd64"
175cea557adSRuslan Ermilov.if ${MK_NCP} != "no"
17655434686SPeter Wemm_libncp=	libncp
177cea557adSRuslan Ermilov.endif
17855434686SPeter Wemm_libsmb=	libsmb
179aa3d547dSXin LI_libvgl=	libvgl
1803d823985SDaniel Eischen.endif
1813d823985SDaniel Eischen
18259fa7082SR. Imura.if ${MACHINE_ARCH} == "powerpc"
18359fa7082SR. Imura_libsmb=	libsmb
18459fa7082SR. Imura.endif
18559fa7082SR. Imura
186690f477dSSam Leffler.if ${MK_OPENSSL} != "no"
187690f477dSSam Leffler_libmp=		libmp
188690f477dSSam Leffler.endif
189690f477dSSam Leffler
190690f477dSSam Leffler.if ${MK_PMC} != "no"
191690f477dSSam Leffler_libpmc=	libpmc
192690f477dSSam Leffler.endif
193690f477dSSam Leffler
194690f477dSSam Leffler.if ${MK_SENDMAIL} != "no"
195690f477dSSam Leffler_libmilter=	libmilter
196690f477dSSam Leffler_libsm=		libsm
197690f477dSSam Leffler_libsmdb=	libsmdb
198690f477dSSam Leffler_libsmutil=	libsmutil
199690f477dSSam Leffler.endif
200690f477dSSam Leffler
201690f477dSSam Leffler.if ${MK_TELNET} != "no"
202690f477dSSam Leffler_libtelnet=	libtelnet
203e9043a12SMike Makonnen.endif
204e9043a12SMike Makonnen
205e1fe3dbaSRuslan Ermilov.if ${MK_USB} != "no"
206f3e5ff40SBruce Evans_libusbhid=	libusbhid
2076df55934SAndrew Thompson_libusb=	libusb
208a8ec1b48SMaxim Sobolev.endif
209a8ec1b48SMaxim Sobolev
21058f0484fSRodney W. Grimes.include <bsd.subdir.mk>
211