xref: /freebsd/share/mk/bsd.libnames.mk (revision 3eeb75112272ef9ef244a00bc73beef3a146856a)
1# $FreeBSD$
2
3# The include file <bsd.libnames.mk> define library names.
4# Other include files (e.g. bsd.prog.mk, bsd.lib.mk) include this
5# file where necessary.
6
7.if !target(__<bsd.init.mk>__)
8.error bsd.libnames.mk cannot be included directly.
9.endif
10
11LIBDESTDIR=	${SYSROOT:U${DESTDIR}}
12
13.sinclude <src.libnames.mk>
14
15# Src directory locations are also defined in src.libnames.mk.
16
17LIBCRT0?=	${LIBDESTDIR}${LIBDIR_BASE}/crt0.o
18
19LIB80211?=	${LIBDESTDIR}${LIBDIR_BASE}/lib80211.a
20LIBALIAS?=	${LIBDESTDIR}${LIBDIR_BASE}/libalias.a
21LIBARCHIVE?=	${LIBDESTDIR}${LIBDIR_BASE}/libarchive.a
22LIBASN1?=	${LIBDESTDIR}${LIBDIR_BASE}/libasn1.a
23LIBATM?=	${LIBDESTDIR}${LIBDIR_BASE}/libatm.a
24LIBAUDITD?=	${LIBDESTDIR}${LIBDIR_BASE}/libauditd.a
25LIBAVL?=	${LIBDESTDIR}${LIBDIR_BASE}/libavl.a
26LIBBEGEMOT?=	${LIBDESTDIR}${LIBDIR_BASE}/libbegemot.a
27LIBBLACKLIST?=	${LIBDESTDIR}${LIBDIR_BASE}/libblacklist.a
28LIBBLUETOOTH?=	${LIBDESTDIR}${LIBDIR_BASE}/libbluetooth.a
29LIBBSDXML?=	${LIBDESTDIR}${LIBDIR_BASE}/libbsdxml.a
30LIBBSM?=	${LIBDESTDIR}${LIBDIR_BASE}/libbsm.a
31LIBBSNMP?=	${LIBDESTDIR}${LIBDIR_BASE}/libbsnmp.a
32LIBBZ2?=	${LIBDESTDIR}${LIBDIR_BASE}/libbz2.a
33LIBC?=		${LIBDESTDIR}${LIBDIR_BASE}/libc.a
34LIBCALENDAR?=	${LIBDESTDIR}${LIBDIR_BASE}/libcalendar.a
35LIBCAM?=	${LIBDESTDIR}${LIBDIR_BASE}/libcam.a
36LIBCAP_DNS?=	${LIBDESTDIR}${LIBDIR_BASE}/libcap_dns.a
37LIBCAP_GRP?=	${LIBDESTDIR}${LIBDIR_BASE}/libcap_grp.a
38LIBCAP_PWD?=	${LIBDESTDIR}${LIBDIR_BASE}/libcap_pwd.a
39LIBCAP_RANDOM?=	${LIBDESTDIR}${LIBDIR_BASE}/libcap_random.a
40LIBCAP_SYSCTL?=	${LIBDESTDIR}${LIBDIR_BASE}/libcap_sysctl.a
41LIBCAP_SYSLOG?=	${LIBDESTDIR}${LIBDIR_BASE}/libcap_syslog.a
42LIBCASPER?=	${LIBDESTDIR}${LIBDIR_BASE}/libcasper.a
43LIBCOMPAT?=	${LIBDESTDIR}${LIBDIR_BASE}/libcompat.a
44LIBCOMPILER_RT?=${LIBDESTDIR}${LIBDIR_BASE}/libcompiler_rt.a
45LIBCOM_ERR?=	${LIBDESTDIR}${LIBDIR_BASE}/libcom_err.a
46LIBCPLUSPLUS?=	${LIBDESTDIR}${LIBDIR_BASE}/libc++.a
47LIBCRYPT?=	${LIBDESTDIR}${LIBDIR_BASE}/libcrypt.a
48LIBCRYPTO?=	${LIBDESTDIR}${LIBDIR_BASE}/libcrypto.a
49LIBCTF?=	${LIBDESTDIR}${LIBDIR_BASE}/libctf.a
50LIBCURSES?=	${LIBDESTDIR}${LIBDIR_BASE}/libcurses.a
51LIBCUSE?=	${LIBDESTDIR}${LIBDIR_BASE}/libcuse.a
52LIBCXGB4?=	${LIBDESTDIR}${LIBDIR_BASE}/libcxgb4.a
53LIBCXXRT?=	${LIBDESTDIR}${LIBDIR_BASE}/libcxxrt.a
54LIBC_PIC?=	${LIBDESTDIR}${LIBDIR_BASE}/libc_pic.a
55LIBDEVCTL?=	${LIBDESTDIR}${LIBDIR_BASE}/libdevctl.a
56LIBDEVDCTL?=	${LIBDESTDIR}${LIBDIR_BASE}/libdevdctl.a
57LIBDEVINFO?=	${LIBDESTDIR}${LIBDIR_BASE}/libdevinfo.a
58LIBDEVSTAT?=	${LIBDESTDIR}${LIBDIR_BASE}/libdevstat.a
59LIBDIALOG?=	${LIBDESTDIR}${LIBDIR_BASE}/libdialog.a
60LIBDL?=		${LIBDESTDIR}${LIBDIR_BASE}/libdl.a
61LIBDNS?=	${LIBDESTDIR}${LIBDIR_BASE}/libdns.a
62LIBDPV?=	${LIBDESTDIR}${LIBDIR_BASE}/libdpv.a
63LIBDTRACE?=	${LIBDESTDIR}${LIBDIR_BASE}/libdtrace.a
64LIBDWARF?=	${LIBDESTDIR}${LIBDIR_BASE}/libdwarf.a
65LIBEDIT?=	${LIBDESTDIR}${LIBDIR_BASE}/libedit.a
66LIBEFIVAR?=	${LIBDESTDIR}${LIBDIR_BASE}/libefivar.a
67LIBELF?=	${LIBDESTDIR}${LIBDIR_BASE}/libelf.a
68LIBEXECINFO?=	${LIBDESTDIR}${LIBDIR_BASE}/libexecinfo.a
69LIBFETCH?=	${LIBDESTDIR}${LIBDIR_BASE}/libfetch.a
70LIBFIGPAR?=	${LIBDESTDIR}${LIBDIR_BASE}/libfigpar.a
71LIBFL?=		"don't use LIBFL, use LIBL"
72LIBFORM?=	${LIBDESTDIR}${LIBDIR_BASE}/libform.a
73LIBG2C?=	${LIBDESTDIR}${LIBDIR_BASE}/libg2c.a
74LIBGEOM?=	${LIBDESTDIR}${LIBDIR_BASE}/libgeom.a
75LIBGNUREGEX?=	${LIBDESTDIR}${LIBDIR_BASE}/libgnuregex.a
76LIBGPIO?=	${LIBDESTDIR}${LIBDIR_BASE}/libgpio.a
77LIBGSSAPI?=	${LIBDESTDIR}${LIBDIR_BASE}/libgssapi.a
78LIBGSSAPI_KRB5?= ${LIBDESTDIR}${LIBDIR_BASE}/libgssapi_krb5.a
79LIBHDB?=	${LIBDESTDIR}${LIBDIR_BASE}/libhdb.a
80LIBHEIMBASE?=	${LIBDESTDIR}${LIBDIR_BASE}/libheimbase.a
81LIBHEIMNTLM?=	${LIBDESTDIR}${LIBDIR_BASE}/libheimntlm.a
82LIBHEIMSQLITE?=	${LIBDESTDIR}${LIBDIR_BASE}/libheimsqlite.a
83LIBHX509?=	${LIBDESTDIR}${LIBDIR_BASE}/libhx509.a
84LIBIBCM?=	${LIBDESTDIR}${LIBDIR_BASE}/libibcm.a
85LIBIBMAD?=	${LIBDESTDIR}${LIBDIR_BASE}/libibmad.a
86LIBIBNETDISC?=	${LIBDESTDIR}${LIBDIR_BASE}/libibnetdisc.a
87LIBIBUMAD?=	${LIBDESTDIR}${LIBDIR_BASE}/libibumad.a
88LIBIBVERBS?=	${LIBDESTDIR}${LIBDIR_BASE}/libibverbs.a
89LIBIFCONFIG?=	${LIBDESTDIR}${LIBDIR_BASE}/libifconfig.a
90LIBIPSEC?=	${LIBDESTDIR}${LIBDIR_BASE}/libipsec.a
91LIBIPT?=	${LIBDESTDIR}${LIBDIR_BASE}/libipt.a
92LIBJAIL?=	${LIBDESTDIR}${LIBDIR_BASE}/libjail.a
93LIBKADM5CLNT?=	${LIBDESTDIR}${LIBDIR_BASE}/libkadm5clnt.a
94LIBKADM5SRV?=	${LIBDESTDIR}${LIBDIR_BASE}/libkadm5srv.a
95LIBKAFS5?=	${LIBDESTDIR}${LIBDIR_BASE}/libkafs5.a
96LIBKDC?=	${LIBDESTDIR}${LIBDIR_BASE}/libkdc.a
97LIBKEYCAP?=	${LIBDESTDIR}${LIBDIR_BASE}/libkeycap.a
98LIBKICONV?=	${LIBDESTDIR}${LIBDIR_BASE}/libkiconv.a
99LIBKRB5?=	${LIBDESTDIR}${LIBDIR_BASE}/libkrb5.a
100LIBKVM?=	${LIBDESTDIR}${LIBDIR_BASE}/libkvm.a
101LIBL?=		${LIBDESTDIR}${LIBDIR_BASE}/libl.a
102LIBLN?=		"don't use LIBLN, use LIBL"
103LIBLZMA?=	${LIBDESTDIR}${LIBDIR_BASE}/liblzma.a
104LIBM?=		${LIBDESTDIR}${LIBDIR_BASE}/libm.a
105LIBMAGIC?=	${LIBDESTDIR}${LIBDIR_BASE}/libmagic.a
106LIBMD?=		${LIBDESTDIR}${LIBDIR_BASE}/libmd.a
107LIBMEMSTAT?=	${LIBDESTDIR}${LIBDIR_BASE}/libmemstat.a
108LIBMENU?=	${LIBDESTDIR}${LIBDIR_BASE}/libmenu.a
109LIBMILTER?=	${LIBDESTDIR}${LIBDIR_BASE}/libmilter.a
110LIBMLX4?=	${LIBDESTDIR}${LIBDIR_BASE}/libmlx4.a
111LIBMLX5?=	${LIBDESTDIR}${LIBDIR_BASE}/libmlx5.a
112LIBMP?=		${LIBDESTDIR}${LIBDIR_BASE}/libmp.a
113LIBMT?=		${LIBDESTDIR}${LIBDIR_BASE}/libmt.a
114LIBNANDFS?=	${LIBDESTDIR}${LIBDIR_BASE}/libnandfs.a
115LIBNCURSES?=	${LIBDESTDIR}${LIBDIR_BASE}/libncurses.a
116LIBNCURSESW?=	${LIBDESTDIR}${LIBDIR_BASE}/libncursesw.a
117LIBNETGRAPH?=	${LIBDESTDIR}${LIBDIR_BASE}/libnetgraph.a
118LIBNGATM?=	${LIBDESTDIR}${LIBDIR_BASE}/libngatm.a
119LIBNV?=		${LIBDESTDIR}${LIBDIR_BASE}/libnv.a
120LIBNVPAIR?=	${LIBDESTDIR}${LIBDIR_BASE}/libnvpair.a
121LIBOPENCSD?=	${LIBDESTDIR}${LIBDIR_BASE}/libopencsd.a
122LIBOPENSM?=	${LIBDESTDIR}${LIBDIR_BASE}/libopensm.a
123LIBOPIE?=	${LIBDESTDIR}${LIBDIR_BASE}/libopie.a
124LIBOSMCOMP?=	${LIBDESTDIR}${LIBDIR_BASE}/libosmcomp.a
125LIBOSMVENDOR?=	${LIBDESTDIR}${LIBDIR_BASE}/libosmvendor.a
126LIBPAM?=	${LIBDESTDIR}${LIBDIR_BASE}/libpam.a
127LIBPANEL?=	${LIBDESTDIR}${LIBDIR_BASE}/libpanel.a
128LIBPANELW?=	${LIBDESTDIR}${LIBDIR_BASE}/libpanelw.a
129LIBPCAP?=	${LIBDESTDIR}${LIBDIR_BASE}/libpcap.a
130LIBPJDLOG?=	${LIBDESTDIR}${LIBDIR_BASE}/libpjdlog.a
131LIBPMC?=	${LIBDESTDIR}${LIBDIR_BASE}/libpmc.a
132LIBPROC?=	${LIBDESTDIR}${LIBDIR_BASE}/libproc.a
133LIBPROCSTAT?=	${LIBDESTDIR}${LIBDIR_BASE}/libprocstat.a
134LIBPTHREAD?=	${LIBDESTDIR}${LIBDIR_BASE}/libpthread.a
135LIBRADIUS?=	${LIBDESTDIR}${LIBDIR_BASE}/libradius.a
136LIBRDMACM?=	${LIBDESTDIR}${LIBDIR_BASE}/librdmacm.a
137LIBREGEX?=	${LIBDESTDIR}${LIBDIR_BASE}/libregex.a
138LIBROKEN?=	${LIBDESTDIR}${LIBDIR_BASE}/libroken.a
139LIBRPCSEC_GSS?=	${LIBDESTDIR}${LIBDIR_BASE}/librpcsec_gss.a
140LIBRPCSVC?=	${LIBDESTDIR}${LIBDIR_BASE}/librpcsvc.a
141LIBRT?=		${LIBDESTDIR}${LIBDIR_BASE}/librt.a
142LIBRTLD_DB?=	${LIBDESTDIR}${LIBDIR_BASE}/librtld_db.a
143LIBSBUF?=	${LIBDESTDIR}${LIBDIR_BASE}/libsbuf.a
144LIBSDP?=	${LIBDESTDIR}${LIBDIR_BASE}/libsdp.a
145LIBSMB?=	${LIBDESTDIR}${LIBDIR_BASE}/libsmb.a
146LIBSSL?=	${LIBDESTDIR}${LIBDIR_BASE}/libssl.a
147LIBSSP_NONSHARED?=	${LIBDESTDIR}${LIBDIR_BASE}/libssp_nonshared.a
148LIBSTDCPLUSPLUS?= ${LIBDESTDIR}${LIBDIR_BASE}/libstdc++.a
149LIBSTDTHREADS?=	${LIBDESTDIR}${LIBDIR_BASE}/libstdthreads.a
150LIBSYSDECODE?=	${LIBDESTDIR}${LIBDIR_BASE}/libsysdecode.a
151LIBTACPLUS?=	${LIBDESTDIR}${LIBDIR_BASE}/libtacplus.a
152LIBTERMCAP?=	${LIBDESTDIR}${LIBDIR_BASE}/libtermcap.a
153LIBTERMCAPW?=	${LIBDESTDIR}${LIBDIR_BASE}/libtermcapw.a
154LIBTERMLIB?=	"don't use LIBTERMLIB, use LIBTERMCAP"
155LIBTINFO?=	"don't use LIBTINFO, use LIBNCURSES"
156LIBUFS?=	${LIBDESTDIR}${LIBDIR_BASE}/libufs.a
157LIBUGIDFW?=	${LIBDESTDIR}${LIBDIR_BASE}/libugidfw.a
158LIBULOG?=	${LIBDESTDIR}${LIBDIR_BASE}/libulog.a
159LIBUMEM?=	${LIBDESTDIR}${LIBDIR_BASE}/libumem.a
160LIBUSB?=	${LIBDESTDIR}${LIBDIR_BASE}/libusb.a
161LIBUSBHID?=	${LIBDESTDIR}${LIBDIR_BASE}/libusbhid.a
162LIBUTIL?=	${LIBDESTDIR}${LIBDIR_BASE}/libutil.a
163LIBUUTIL?=	${LIBDESTDIR}${LIBDIR_BASE}/libuutil.a
164LIBVGL?=	${LIBDESTDIR}${LIBDIR_BASE}/libvgl.a
165LIBVMMAPI?=	${LIBDESTDIR}${LIBDIR_BASE}/libvmmapi.a
166LIBWIND?=	${LIBDESTDIR}${LIBDIR_BASE}/libwind.a
167LIBWRAP?=	${LIBDESTDIR}${LIBDIR_BASE}/libwrap.a
168LIBXO?=		${LIBDESTDIR}${LIBDIR_BASE}/libxo.a
169LIBXPG4?=	${LIBDESTDIR}${LIBDIR_BASE}/libxpg4.a
170LIBY?=		${LIBDESTDIR}${LIBDIR_BASE}/liby.a
171LIBYPCLNT?=	${LIBDESTDIR}${LIBDIR_BASE}/libypclnt.a
172LIBZ?=		${LIBDESTDIR}${LIBDIR_BASE}/libz.a
173LIBZFS?=	${LIBDESTDIR}${LIBDIR_BASE}/libzfs.a
174LIBZFS_CORE?=	${LIBDESTDIR}${LIBDIR_BASE}/libzfs_core.a
175LIBZPOOL?=	${LIBDESTDIR}${LIBDIR_BASE}/libzpool.a
176
177# enforce the 2 -lpthread and -lc to always be the last in that exact order
178.if defined(LDADD)
179.if ${LDADD:M-lpthread}
180LDADD:=	${LDADD:N-lpthread} -lpthread
181.endif
182.if ${LDADD:M-lc}
183LDADD:=	${LDADD:N-lc} -lc
184.endif
185.endif
186
187# Only do this for src builds.
188.if defined(SRCTOP)
189.if defined(_LIBRARIES) && defined(LIB) && \
190    ${_LIBRARIES:M${LIB}} != ""
191.if !defined(LIB${LIB:tu})
192.error ${.CURDIR}: Missing value for LIB${LIB:tu} in ${_this:T}.  Likely should be: LIB${LIB:tu}?= $${LIBDESTDIR}$${LIBDIR_BASE}/lib${LIB}.a
193.endif
194.endif
195
196# Derive LIB*SRCDIR from LIB*DIR
197.for lib in ${_LIBRARIES}
198LIB${lib:tu}SRCDIR?=	${SRCTOP}/${LIB${lib:tu}DIR:S,^${OBJTOP}/,,}
199.endfor
200.else
201
202# Out of tree builds
203
204# There are LIBADD defined in an out-of-tree build.  Are they *all*
205# in-tree libraries?  If so convert them to LDADD to support
206# partial checkouts.
207.if !empty(LIBADD)
208_convert_libadd=	1
209.for l in ${LIBADD}
210.if empty(LIB${l:tu})
211_convert_libadd=	0
212.endif
213.endfor
214.if ${_convert_libadd} == 1
215.warning Converting out-of-tree build LIBADDs into LDADD.  This is not fully supported.
216.for l in ${LIBADD}
217LDADD+=	-l${l}
218.endfor
219.endif
220.endif
221
222.endif	# defined(SRCTOP)
223