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