xref: /freebsd/lib/Makefile (revision 366f60834ff8ef709f132fe8976c96a5e2caace9)
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 \
783829a734SMartin 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} \
105*366f6083SPeter Grehan	${_libvmmapi} \
106379e4771SMartin Matuska	libwrap \
107379e4771SMartin Matuska	liby \
108379e4771SMartin Matuska	libz \
1096f0e1ffdSAlfred Perlstein	${_bind}
11058f0484fSRodney W. Grimes
11166422f5bSPeter Wemm.if exists(${.CURDIR}/csu/${MACHINE_ARCH}-elf)
11266422f5bSPeter Wemm_csu=csu/${MACHINE_ARCH}-elf
11356a91a6fSDavid E. O'Brien.elif exists(${.CURDIR}/csu/${MACHINE_ARCH}/Makefile)
114c9811e98SBruce Evans_csu=csu/${MACHINE_ARCH}
11556a91a6fSDavid E. O'Brien.else
11656a91a6fSDavid E. O'Brien_csu=csu
117b09f41a4SJohn Birrell.endif
118b09f41a4SJohn Birrell
119690f477dSSam Leffler# NB: keep these sorted by MK_* knobs
120690f477dSSam Leffler
121e1fe3dbaSRuslan Ermilov.if ${MK_ATM} != "no"
1229e9dbe04SHartmut Brandt_libngatm=	libngatm
1235e1847b4SPoul-Henning Kamp.endif
1245e1847b4SPoul-Henning Kamp
125e1fe3dbaSRuslan Ermilov.if ${MK_BIND} != "no"
126cd3ee173SDag-Erling Smørgrav_bind=		bind
127072355e0SPeter Wemm.endif
128072355e0SPeter Wemm
129e1fe3dbaSRuslan Ermilov.if ${MK_BLUETOOTH} != "no"
1300986ab12SMaksim Yevmenkin_libbluetooth=	libbluetooth
1310986ab12SMaksim Yevmenkin_libsdp=	libsdp
13218d948adSMaksim Yevmenkin.endif
13323d1e148SMaksim Yevmenkin
134690f477dSSam Leffler.if ${MK_BSNMP} != "no"
135690f477dSSam Leffler_libbsnmp=	libbsnmp
136690f477dSSam Leffler.endif
137690f477dSSam Leffler
138690f477dSSam Leffler.if ${MK_GPIB} != "no"
139690f477dSSam Leffler_libgpib=	libgpib
140690f477dSSam Leffler.endif
141690f477dSSam Leffler
1426dc51ecaSRuslan Ermilov.if ${MK_GSSAPI} != "no"
1433fe21f77SDoug Barton_libgssapi=	libgssapi
1448f55a568SDoug Rabson_librpcsec_gss=	librpcsec_gss
1453fe21f77SDoug Barton.endif
1463fe21f77SDoug Barton
147cea557adSRuslan Ermilov.if ${MK_IPX} != "no"
148cea557adSRuslan Ermilov_libipx=	libipx
149cea557adSRuslan Ermilov.endif
150cea557adSRuslan Ermilov
151690f477dSSam Leffler.if ${MK_LIBTHR} != "no"
152690f477dSSam Leffler_libthr=	libthr
153690f477dSSam Leffler.endif
154690f477dSSam Leffler
155690f477dSSam Leffler.if ${MK_NETGRAPH} != "no"
156690f477dSSam Leffler_libnetgraph=	libnetgraph
157690f477dSSam Leffler.endif
158690f477dSSam Leffler
159690f477dSSam Leffler.if ${MK_NIS} != "no"
160690f477dSSam Leffler_libypclnt=	libypclnt
161690f477dSSam Leffler.endif
162690f477dSSam Leffler
16323d1e148SMaksim Yevmenkin.if ${MACHINE_ARCH} == "i386"
164cea557adSRuslan Ermilov.if ${MK_NCP} != "no"
16518d948adSMaksim Yevmenkin_libncp=	libncp
166cea557adSRuslan Ermilov.endif
16723eb26faSSheldon Hearn_libsmb=	libsmb
168c9811e98SBruce Evans_libvgl=	libvgl
169abbb0b30SMarcel Moolenaar.endif
170abbb0b30SMarcel Moolenaar
171e108ac65SMarcel Moolenaar.if ${MACHINE_ARCH} == "ia64"
172e108ac65SMarcel Moolenaar_libsmb=	libsmb
173e108ac65SMarcel Moolenaar.endif
174e108ac65SMarcel Moolenaar
17555434686SPeter Wemm.if ${MACHINE_ARCH} == "amd64"
176cea557adSRuslan Ermilov.if ${MK_NCP} != "no"
17755434686SPeter Wemm_libncp=	libncp
178cea557adSRuslan Ermilov.endif
17955434686SPeter Wemm_libsmb=	libsmb
180aa3d547dSXin LI_libvgl=	libvgl
181*366f6083SPeter Grehan_libvmmapi=	libvmmapi
1823d823985SDaniel Eischen.endif
1833d823985SDaniel Eischen
18459fa7082SR. Imura.if ${MACHINE_ARCH} == "powerpc"
18559fa7082SR. Imura_libsmb=	libsmb
18659fa7082SR. Imura.endif
18759fa7082SR. Imura
188690f477dSSam Leffler.if ${MK_OPENSSL} != "no"
189690f477dSSam Leffler_libmp=		libmp
190690f477dSSam Leffler.endif
191690f477dSSam Leffler
192690f477dSSam Leffler.if ${MK_PMC} != "no"
193690f477dSSam Leffler_libpmc=	libpmc
194690f477dSSam Leffler.endif
195690f477dSSam Leffler
196690f477dSSam Leffler.if ${MK_SENDMAIL} != "no"
197690f477dSSam Leffler_libmilter=	libmilter
198690f477dSSam Leffler_libsm=		libsm
199690f477dSSam Leffler_libsmdb=	libsmdb
200690f477dSSam Leffler_libsmutil=	libsmutil
201690f477dSSam Leffler.endif
202690f477dSSam Leffler
203690f477dSSam Leffler.if ${MK_TELNET} != "no"
204690f477dSSam Leffler_libtelnet=	libtelnet
205e9043a12SMike Makonnen.endif
206e9043a12SMike Makonnen
207e1fe3dbaSRuslan Ermilov.if ${MK_USB} != "no"
208f3e5ff40SBruce Evans_libusbhid=	libusbhid
2096df55934SAndrew Thompson_libusb=	libusb
210a8ec1b48SMaxim Sobolev.endif
211a8ec1b48SMaxim Sobolev
21258f0484fSRodney W. Grimes.include <bsd.subdir.mk>
213