xref: /freebsd/lib/Makefile (revision 3829a7346880c0e2bec70a23c3169714fb0b1e58)
1#	@(#)Makefile	8.1 (Berkeley) 6/4/93
2# $FreeBSD$
3
4.include <bsd.own.mk>
5
6# To satisfy shared library or ELF linkage when only the libraries being
7# built are visible:
8#
9# csu must be built before all shared libaries for ELF.
10# libc must be built before all other shared libraries.
11# libbsm must be built before ibauditd.
12# libcom_err must be built before libpam.
13# libcrypt must be built before libpam.
14# libkvm must be built before libdevstat.
15# msun must be built before libg++ and libstdc++.
16# libmd must be built before libatm, libopie, libradius, and libtacplus.
17# ncurses must be built before libdialog, libedit and libreadline.
18# libnetgraph must be built before libbsnmp/modules/snmp_netgraph.
19# libopie must be built before libpam.
20# libradius must be built before libpam.
21# librpcsvc must be built before libpam.
22# libsbuf must be built before libcam.
23# libtacplus must be built before libpam.
24# libutil must be built before libpam.
25# libypclnt must be built before libpam.
26# libgssapi must be built before librpcsec_gss
27#
28# Otherwise, the SUBDIR list should be in alphabetical order.
29#
30# Except it appears bind needs to be compiled last
31
32SUBDIR_ORDERED=	${_csu} \
33	libc \
34	libbsm \
35	libauditd \
36	libcom_err \
37	libcrypt \
38	libelf \
39	libkvm \
40	msun \
41	libmd \
42	ncurses \
43	${_libnetgraph} \
44	libradius \
45	librpcsvc \
46	libsbuf \
47	libtacplus \
48	libutil \
49	${_libypclnt}
50
51SUBDIR= ${SUBDIR_ORDERED} \
52	libalias \
53	libarchive \
54	${_libatm} \
55	libbegemot \
56	${_libbluetooth} \
57	${_libbsnmp} \
58	libbz2 \
59	libcalendar \
60	libcam \
61	libcompat \
62	libdevinfo \
63	libdevstat \
64	libdisk \
65	libdwarf \
66	libedit \
67	libexpat \
68	libfetch \
69	libftpio \
70	libgeom \
71	${_libgpib} \
72	${_libgssapi} \
73	${_librpcsec_gss} \
74	libipsec \
75	${_libipx} \
76	libjail \
77	libkiconv \
78	liblzma \
79	libmagic \
80	libmemstat \
81	${_libmilter} \
82	${_libmp} \
83	${_libncp} \
84	${_libngatm} \
85	libopie \
86	libpam \
87	libpcap \
88	${_libpmc} \
89	libproc \
90	librt \
91	${_libsdp} \
92	${_libsm} \
93	${_libsmb} \
94	${_libsmdb} \
95	${_libsmutil} \
96	libstand \
97	${_libtelnet} \
98	${_libthr} \
99	libthread_db \
100	libufs \
101	libugidfw \
102	${_libusbhid} \
103	${_libusb} \
104	${_libvgl} \
105	libwrap \
106	liby \
107	libz \
108	${_bind}
109
110.if exists(${.CURDIR}/csu/${MACHINE_ARCH}-elf)
111_csu=csu/${MACHINE_ARCH}-elf
112.elif exists(${.CURDIR}/csu/${MACHINE_ARCH}/Makefile)
113_csu=csu/${MACHINE_ARCH}
114.else
115_csu=csu
116.endif
117
118# NB: keep these sorted by MK_* knobs
119
120.if ${MK_ATM} != "no"
121_libngatm=	libngatm
122.endif
123
124.if ${MK_BIND} != "no"
125_bind=		bind
126.endif
127
128.if ${MK_BLUETOOTH} != "no"
129_libbluetooth=	libbluetooth
130_libsdp=	libsdp
131.endif
132
133.if ${MK_BSNMP} != "no"
134_libbsnmp=	libbsnmp
135.endif
136
137.if ${MK_GPIB} != "no"
138_libgpib=	libgpib
139.endif
140
141.if ${MK_GSSAPI} != "no"
142_libgssapi=	libgssapi
143_librpcsec_gss=	librpcsec_gss
144.endif
145
146.if ${MK_IPX} != "no"
147_libipx=	libipx
148.endif
149
150.if ${MK_LIBTHR} != "no"
151_libthr=	libthr
152.endif
153
154.if ${MK_NETGRAPH} != "no"
155_libnetgraph=	libnetgraph
156.endif
157
158.if ${MK_NIS} != "no"
159_libypclnt=	libypclnt
160.endif
161
162.if ${MACHINE_ARCH} == "i386"
163.if ${MK_NCP} != "no"
164_libncp=	libncp
165.endif
166_libsmb=	libsmb
167_libvgl=	libvgl
168.endif
169
170.if ${MACHINE_ARCH} == "ia64"
171_libsmb=	libsmb
172.endif
173
174.if ${MACHINE_ARCH} == "amd64"
175.if ${MK_NCP} != "no"
176_libncp=	libncp
177.endif
178_libsmb=	libsmb
179_libvgl=	libvgl
180.endif
181
182.if ${MACHINE_ARCH} == "powerpc"
183_libsmb=	libsmb
184.endif
185
186.if ${MK_OPENSSL} != "no"
187_libmp=		libmp
188.endif
189
190.if ${MK_PMC} != "no"
191_libpmc=	libpmc
192.endif
193
194.if ${MK_SENDMAIL} != "no"
195_libmilter=	libmilter
196_libsm=		libsm
197_libsmdb=	libsmdb
198_libsmutil=	libsmutil
199.endif
200
201.if ${MK_TELNET} != "no"
202_libtelnet=	libtelnet
203.endif
204
205.if ${MK_USB} != "no"
206_libusbhid=	libusbhid
207_libusb=	libusb
208.endif
209
210.include <bsd.subdir.mk>
211