xref: /freebsd/lib/Makefile (revision 379e47715a1e0bd31de9fa9f92897026c41aa63b)
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	libmagic \
79	libmemstat \
80	${_libmilter} \
81	${_libmp} \
82	${_libncp} \
83	${_libngatm} \
84	libopie \
85	libpam \
86	libpcap \
87	${_libpmc} \
88	libproc \
89	librt \
90	${_libsdp} \
91	${_libsm} \
92	${_libsmb} \
93	${_libsmdb} \
94	${_libsmutil} \
95	libstand \
96	${_libtelnet} \
97	${_libthr} \
98	libthread_db \
99	libufs \
100	libugidfw \
101	${_libusbhid} \
102	${_libusb} \
103	${_libvgl} \
104	libwrap \
105	liby \
106	libz \
107	${_bind}
108
109.if exists(${.CURDIR}/csu/${MACHINE_ARCH}-elf)
110_csu=csu/${MACHINE_ARCH}-elf
111.elif exists(${.CURDIR}/csu/${MACHINE_ARCH}/Makefile)
112_csu=csu/${MACHINE_ARCH}
113.else
114_csu=csu
115.endif
116
117# NB: keep these sorted by MK_* knobs
118
119.if ${MK_ATM} != "no"
120_libngatm=	libngatm
121.endif
122
123.if ${MK_BIND} != "no"
124_bind=		bind
125.endif
126
127.if ${MK_BLUETOOTH} != "no"
128_libbluetooth=	libbluetooth
129_libsdp=	libsdp
130.endif
131
132.if ${MK_BSNMP} != "no"
133_libbsnmp=	libbsnmp
134.endif
135
136.if ${MK_GPIB} != "no"
137_libgpib=	libgpib
138.endif
139
140.if ${MK_GSSAPI} != "no"
141_libgssapi=	libgssapi
142_librpcsec_gss=	librpcsec_gss
143.endif
144
145.if ${MK_IPX} != "no"
146_libipx=	libipx
147.endif
148
149.if ${MK_LIBTHR} != "no"
150_libthr=	libthr
151.endif
152
153.if ${MK_NETGRAPH} != "no"
154_libnetgraph=	libnetgraph
155.endif
156
157.if ${MK_NIS} != "no"
158_libypclnt=	libypclnt
159.endif
160
161.if ${MACHINE_ARCH} == "i386"
162.if ${MK_NCP} != "no"
163_libncp=	libncp
164.endif
165_libsmb=	libsmb
166_libvgl=	libvgl
167.endif
168
169.if ${MACHINE_ARCH} == "ia64"
170_libsmb=	libsmb
171.endif
172
173.if ${MACHINE_ARCH} == "amd64"
174.if ${MK_NCP} != "no"
175_libncp=	libncp
176.endif
177_libsmb=	libsmb
178_libvgl=	libvgl
179.endif
180
181.if ${MACHINE_ARCH} == "powerpc"
182_libsmb=	libsmb
183.endif
184
185.if ${MK_OPENSSL} != "no"
186_libmp=		libmp
187.endif
188
189.if ${MK_PMC} != "no"
190_libpmc=	libpmc
191.endif
192
193.if ${MK_SENDMAIL} != "no"
194_libmilter=	libmilter
195_libsm=		libsm
196_libsmdb=	libsmdb
197_libsmutil=	libsmutil
198.endif
199
200.if ${MK_TELNET} != "no"
201_libtelnet=	libtelnet
202.endif
203
204.if ${MK_USB} != "no"
205_libusbhid=	libusbhid
206_libusb=	libusb
207.endif
208
209.include <bsd.subdir.mk>
210