xref: /freebsd/share/mk/bsd.libnames.mk (revision 683b025adebfc2bb0d488c1d8d89e14379045ccc)
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
41LIBCASPER?=	${LIBDESTDIR}${LIBDIR_BASE}/libcasper.a
42LIBCOMPAT?=	${LIBDESTDIR}${LIBDIR_BASE}/libcompat.a
43LIBCOMPILER_RT?=${LIBDESTDIR}${LIBDIR_BASE}/libcompiler_rt.a
44LIBCOM_ERR?=	${LIBDESTDIR}${LIBDIR_BASE}/libcom_err.a
45LIBCPLUSPLUS?=	${LIBDESTDIR}${LIBDIR_BASE}/libc++.a
46LIBCRYPT?=	${LIBDESTDIR}${LIBDIR_BASE}/libcrypt.a
47LIBCRYPTO?=	${LIBDESTDIR}${LIBDIR_BASE}/libcrypto.a
48LIBCTF?=	${LIBDESTDIR}${LIBDIR_BASE}/libctf.a
49LIBCURSES?=	${LIBDESTDIR}${LIBDIR_BASE}/libcurses.a
50LIBCUSE?=	${LIBDESTDIR}${LIBDIR_BASE}/libcuse.a
51LIBCXGB4?=	${LIBDESTDIR}${LIBDIR_BASE}/libcxgb4.a
52LIBCXXRT?=	${LIBDESTDIR}${LIBDIR_BASE}/libcxxrt.a
53LIBC_PIC?=	${LIBDESTDIR}${LIBDIR_BASE}/libc_pic.a
54LIBDEVCTL?=	${LIBDESTDIR}${LIBDIR_BASE}/libdevctl.a
55LIBDEVDCTL?=	${LIBDESTDIR}${LIBDIR_BASE}/libdevdctl.a
56LIBDEVINFO?=	${LIBDESTDIR}${LIBDIR_BASE}/libdevinfo.a
57LIBDEVSTAT?=	${LIBDESTDIR}${LIBDIR_BASE}/libdevstat.a
58LIBDIALOG?=	${LIBDESTDIR}${LIBDIR_BASE}/libdialog.a
59LIBDL?=		${LIBDESTDIR}${LIBDIR_BASE}/libdl.a
60LIBDNS?=	${LIBDESTDIR}${LIBDIR_BASE}/libdns.a
61LIBDPV?=	${LIBDESTDIR}${LIBDIR_BASE}/libdpv.a
62LIBDTRACE?=	${LIBDESTDIR}${LIBDIR_BASE}/libdtrace.a
63LIBDWARF?=	${LIBDESTDIR}${LIBDIR_BASE}/libdwarf.a
64LIBEDIT?=	${LIBDESTDIR}${LIBDIR_BASE}/libedit.a
65LIBEFIVAR?=	${LIBDESTDIR}${LIBDIR_BASE}/libefivar.a
66LIBELF?=	${LIBDESTDIR}${LIBDIR_BASE}/libelf.a
67LIBEXECINFO?=	${LIBDESTDIR}${LIBDIR_BASE}/libexecinfo.a
68LIBFETCH?=	${LIBDESTDIR}${LIBDIR_BASE}/libfetch.a
69LIBFIGPAR?=	${LIBDESTDIR}${LIBDIR_BASE}/libfigpar.a
70LIBFL?=		"don't use LIBFL, use LIBL"
71LIBFORM?=	${LIBDESTDIR}${LIBDIR_BASE}/libform.a
72LIBG2C?=	${LIBDESTDIR}${LIBDIR_BASE}/libg2c.a
73LIBGEOM?=	${LIBDESTDIR}${LIBDIR_BASE}/libgeom.a
74LIBGNUREGEX?=	${LIBDESTDIR}${LIBDIR_BASE}/libgnuregex.a
75LIBGPIO?=	${LIBDESTDIR}${LIBDIR_BASE}/libgpio.a
76LIBGSSAPI?=	${LIBDESTDIR}${LIBDIR_BASE}/libgssapi.a
77LIBGSSAPI_KRB5?= ${LIBDESTDIR}${LIBDIR_BASE}/libgssapi_krb5.a
78LIBHDB?=	${LIBDESTDIR}${LIBDIR_BASE}/libhdb.a
79LIBHEIMBASE?=	${LIBDESTDIR}${LIBDIR_BASE}/libheimbase.a
80LIBHEIMNTLM?=	${LIBDESTDIR}${LIBDIR_BASE}/libheimntlm.a
81LIBHEIMSQLITE?=	${LIBDESTDIR}${LIBDIR_BASE}/libheimsqlite.a
82LIBHX509?=	${LIBDESTDIR}${LIBDIR_BASE}/libhx509.a
83LIBIBCM?=	${LIBDESTDIR}${LIBDIR_BASE}/libibcm.a
84LIBIBCOMMON?=	${LIBDESTDIR}${LIBDIR_BASE}/libibcommon.a
85LIBIBMAD?=	${LIBDESTDIR}${LIBDIR_BASE}/libibmad.a
86LIBIBSDP?=	${LIBDESTDIR}${LIBDIR_BASE}/libibsdp.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
91LIBJAIL?=	${LIBDESTDIR}${LIBDIR_BASE}/libjail.a
92LIBKADM5CLNT?=	${LIBDESTDIR}${LIBDIR_BASE}/libkadm5clnt.a
93LIBKADM5SRV?=	${LIBDESTDIR}${LIBDIR_BASE}/libkadm5srv.a
94LIBKAFS5?=	${LIBDESTDIR}${LIBDIR_BASE}/libkafs5.a
95LIBKDC?=	${LIBDESTDIR}${LIBDIR_BASE}/libkdc.a
96LIBKEYCAP?=	${LIBDESTDIR}${LIBDIR_BASE}/libkeycap.a
97LIBKICONV?=	${LIBDESTDIR}${LIBDIR_BASE}/libkiconv.a
98LIBKRB5?=	${LIBDESTDIR}${LIBDIR_BASE}/libkrb5.a
99LIBKVM?=	${LIBDESTDIR}${LIBDIR_BASE}/libkvm.a
100LIBL?=		${LIBDESTDIR}${LIBDIR_BASE}/libl.a
101LIBLN?=		"don't use LIBLN, use LIBL"
102LIBLZMA?=	${LIBDESTDIR}${LIBDIR_BASE}/liblzma.a
103LIBM?=		${LIBDESTDIR}${LIBDIR_BASE}/libm.a
104LIBMAGIC?=	${LIBDESTDIR}${LIBDIR_BASE}/libmagic.a
105LIBMD?=		${LIBDESTDIR}${LIBDIR_BASE}/libmd.a
106LIBMEMSTAT?=	${LIBDESTDIR}${LIBDIR_BASE}/libmemstat.a
107LIBMENU?=	${LIBDESTDIR}${LIBDIR_BASE}/libmenu.a
108LIBMILTER?=	${LIBDESTDIR}${LIBDIR_BASE}/libmilter.a
109LIBMLX4?=	${LIBDESTDIR}${LIBDIR_BASE}/libmlx4.a
110LIBMP?=		${LIBDESTDIR}${LIBDIR_BASE}/libmp.a
111LIBMT?=		${LIBDESTDIR}${LIBDIR_BASE}/libmt.a
112LIBMTHCA?=	${LIBDESTDIR}${LIBDIR_BASE}/libmthca.a
113LIBNANDFS?=	${LIBDESTDIR}${LIBDIR_BASE}/libnandfs.a
114LIBNCURSES?=	${LIBDESTDIR}${LIBDIR_BASE}/libncurses.a
115LIBNCURSESW?=	${LIBDESTDIR}${LIBDIR_BASE}/libncursesw.a
116LIBNETGRAPH?=	${LIBDESTDIR}${LIBDIR_BASE}/libnetgraph.a
117LIBNGATM?=	${LIBDESTDIR}${LIBDIR_BASE}/libngatm.a
118LIBNV?=		${LIBDESTDIR}${LIBDIR_BASE}/libnv.a
119LIBNVPAIR?=	${LIBDESTDIR}${LIBDIR_BASE}/libnvpair.a
120LIBOPENSM?=	${LIBDESTDIR}${LIBDIR_BASE}/libopensm.a
121LIBOPIE?=	${LIBDESTDIR}${LIBDIR_BASE}/libopie.a
122LIBOSMCOMP?=	${LIBDESTDIR}${LIBDIR_BASE}/libosmcomp.a
123LIBOSMVENDOR?=	${LIBDESTDIR}${LIBDIR_BASE}/libosmvendor.a
124LIBPAM?=	${LIBDESTDIR}${LIBDIR_BASE}/libpam.a
125LIBPANEL?=	${LIBDESTDIR}${LIBDIR_BASE}/libpanel.a
126LIBPANELW?=	${LIBDESTDIR}${LIBDIR_BASE}/libpanelw.a
127LIBPCAP?=	${LIBDESTDIR}${LIBDIR_BASE}/libpcap.a
128LIBPJDLOG?=	${LIBDESTDIR}${LIBDIR_BASE}/libpjdlog.a
129LIBPMC?=	${LIBDESTDIR}${LIBDIR_BASE}/libpmc.a
130LIBPROC?=	${LIBDESTDIR}${LIBDIR_BASE}/libproc.a
131LIBPROCSTAT?=	${LIBDESTDIR}${LIBDIR_BASE}/libprocstat.a
132LIBPTHREAD?=	${LIBDESTDIR}${LIBDIR_BASE}/libpthread.a
133LIBRADIUS?=	${LIBDESTDIR}${LIBDIR_BASE}/libradius.a
134LIBRDMACM?=	${LIBDESTDIR}${LIBDIR_BASE}/librdmacm.a
135LIBROKEN?=	${LIBDESTDIR}${LIBDIR_BASE}/libroken.a
136LIBRPCSEC_GSS?=	${LIBDESTDIR}${LIBDIR_BASE}/librpcsec_gss.a
137LIBRPCSVC?=	${LIBDESTDIR}${LIBDIR_BASE}/librpcsvc.a
138LIBRT?=		${LIBDESTDIR}${LIBDIR_BASE}/librt.a
139LIBRTLD_DB?=	${LIBDESTDIR}${LIBDIR_BASE}/librtld_db.a
140LIBSBUF?=	${LIBDESTDIR}${LIBDIR_BASE}/libsbuf.a
141LIBSDP?=	${LIBDESTDIR}${LIBDIR_BASE}/libsdp.a
142LIBSMB?=	${LIBDESTDIR}${LIBDIR_BASE}/libsmb.a
143LIBSSL?=	${LIBDESTDIR}${LIBDIR_BASE}/libssl.a
144LIBSSP_NONSHARED?=	${LIBDESTDIR}${LIBDIR_BASE}/libssp_nonshared.a
145LIBSTAND?=	${LIBDESTDIR}${LIBDIR_BASE}/libstand.a
146LIBSTDCPLUSPLUS?= ${LIBDESTDIR}${LIBDIR_BASE}/libstdc++.a
147LIBSTDTHREADS?=	${LIBDESTDIR}${LIBDIR_BASE}/libstdthreads.a
148LIBSYSDECODE?=	${LIBDESTDIR}${LIBDIR_BASE}/libsysdecode.a
149LIBTACPLUS?=	${LIBDESTDIR}${LIBDIR_BASE}/libtacplus.a
150LIBTERMCAP?=	${LIBDESTDIR}${LIBDIR_BASE}/libtermcap.a
151LIBTERMCAPW?=	${LIBDESTDIR}${LIBDIR_BASE}/libtermcapw.a
152LIBTERMLIB?=	"don't use LIBTERMLIB, use LIBTERMCAP"
153LIBTINFO?=	"don't use LIBTINFO, use LIBNCURSES"
154LIBUFS?=	${LIBDESTDIR}${LIBDIR_BASE}/libufs.a
155LIBUGIDFW?=	${LIBDESTDIR}${LIBDIR_BASE}/libugidfw.a
156LIBULOG?=	${LIBDESTDIR}${LIBDIR_BASE}/libulog.a
157LIBUMEM?=	${LIBDESTDIR}${LIBDIR_BASE}/libumem.a
158LIBUSB?=	${LIBDESTDIR}${LIBDIR_BASE}/libusb.a
159LIBUSBHID?=	${LIBDESTDIR}${LIBDIR_BASE}/libusbhid.a
160LIBUTIL?=	${LIBDESTDIR}${LIBDIR_BASE}/libutil.a
161LIBUUTIL?=	${LIBDESTDIR}${LIBDIR_BASE}/libuutil.a
162LIBVGL?=	${LIBDESTDIR}${LIBDIR_BASE}/libvgl.a
163LIBVMMAPI?=	${LIBDESTDIR}${LIBDIR_BASE}/libvmmapi.a
164LIBWIND?=	${LIBDESTDIR}${LIBDIR_BASE}/libwind.a
165LIBWRAP?=	${LIBDESTDIR}${LIBDIR_BASE}/libwrap.a
166LIBXO?=		${LIBDESTDIR}${LIBDIR_BASE}/libxo.a
167LIBXPG4?=	${LIBDESTDIR}${LIBDIR_BASE}/libxpg4.a
168LIBY?=		${LIBDESTDIR}${LIBDIR_BASE}/liby.a
169LIBYPCLNT?=	${LIBDESTDIR}${LIBDIR_BASE}/libypclnt.a
170LIBZ?=		${LIBDESTDIR}${LIBDIR_BASE}/libz.a
171LIBZFS?=	${LIBDESTDIR}${LIBDIR_BASE}/libzfs.a
172LIBZFS_CORE?=	${LIBDESTDIR}${LIBDIR_BASE}/libzfs_core.a
173LIBZPOOL?=	${LIBDESTDIR}${LIBDIR_BASE}/libzpool.a
174
175# enforce the 2 -lpthread and -lc to always be the last in that exact order
176.if defined(LDADD)
177.if ${LDADD:M-lpthread}
178LDADD:=	${LDADD:N-lpthread} -lpthread
179.endif
180.if ${LDADD:M-lc}
181LDADD:=	${LDADD:N-lc} -lc
182.endif
183.endif
184
185# Only do this for src builds.
186.if defined(SRCTOP)
187.if defined(_LIBRARIES) && defined(LIB) && \
188    ${_LIBRARIES:M${LIB}} != ""
189.if !defined(LIB${LIB:tu})
190.error ${.CURDIR}: Missing value for LIB${LIB:tu} in ${_this:T}.  Likely should be: LIB${LIB:tu}?= $${LIBDESTDIR}$${LIBDIR_BASE}/lib${LIB}.a
191.endif
192.endif
193
194# Derive LIB*SRCDIR from LIB*DIR
195.for lib in ${_LIBRARIES}
196LIB${lib:tu}SRCDIR?=	${SRCTOP}/${LIB${lib:tu}DIR:S,^${OBJTOP}/,,}
197.endfor
198.else
199
200# Out of tree builds
201
202# There are LIBADD defined in an out-of-tree build.  Are they *all*
203# in-tree libraries?  If so convert them to LDADD to support
204# partial checkouts.
205.if !empty(LIBADD)
206_convert_libadd=	1
207.for l in ${LIBADD}
208.if empty(LIB${l:tu})
209_convert_libadd=	0
210.endif
211.endfor
212.if ${_convert_libadd} == 1
213.warning Converting out-of-tree build LIBADDs into LDADD.  This is not fully supported.
214.for l in ${LIBADD}
215LDADD+=	-l${l}
216.endfor
217.endif
218.endif
219
220.endif	# defined(SRCTOP)
221