xref: /freebsd/share/mk/bsd.libnames.mk (revision acb1f1269c6f4ff89a0d28ba742f6687e9ef779d)
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
20LIB9P?=		${LIBDESTDIR}${LIBDIR_BASE}/lib9p.a
21LIBALIAS?=	${LIBDESTDIR}${LIBDIR_BASE}/libalias.a
22LIBARCHIVE?=	${LIBDESTDIR}${LIBDIR_BASE}/libarchive.a
23LIBASN1?=	${LIBDESTDIR}${LIBDIR_BASE}/libasn1.a
24LIBATM?=	${LIBDESTDIR}${LIBDIR_BASE}/libatm.a
25LIBAUDITD?=	${LIBDESTDIR}${LIBDIR_BASE}/libauditd.a
26LIBAVL?=	${LIBDESTDIR}${LIBDIR_BASE}/libavl.a
27LIBBE?=		${LIBDESTDIR}${LIBDIR_BASE}/libbe.a
28LIBBEGEMOT?=	${LIBDESTDIR}${LIBDIR_BASE}/libbegemot.a
29LIBBLACKLIST?=	${LIBDESTDIR}${LIBDIR_BASE}/libblacklist.a
30LIBBLUETOOTH?=	${LIBDESTDIR}${LIBDIR_BASE}/libbluetooth.a
31LIBBSDXML?=	${LIBDESTDIR}${LIBDIR_BASE}/libbsdxml.a
32LIBBSM?=	${LIBDESTDIR}${LIBDIR_BASE}/libbsm.a
33LIBBSNMP?=	${LIBDESTDIR}${LIBDIR_BASE}/libbsnmp.a
34LIBBZ2?=	${LIBDESTDIR}${LIBDIR_BASE}/libbz2.a
35LIBC?=		${LIBDESTDIR}${LIBDIR_BASE}/libc.a
36LIBCALENDAR?=	${LIBDESTDIR}${LIBDIR_BASE}/libcalendar.a
37LIBCAM?=	${LIBDESTDIR}${LIBDIR_BASE}/libcam.a
38LIBCOMPAT?=	${LIBDESTDIR}${LIBDIR_BASE}/libcompat.a
39LIBCOMPILER_RT?=${LIBDESTDIR}${LIBDIR_BASE}/libcompiler_rt.a
40LIBCOM_ERR?=	${LIBDESTDIR}${LIBDIR_BASE}/libcom_err.a
41LIBCPLUSPLUS?=	${LIBDESTDIR}${LIBDIR_BASE}/libc++.a
42LIBCRYPT?=	${LIBDESTDIR}${LIBDIR_BASE}/libcrypt.a
43LIBCRYPTO?=	${LIBDESTDIR}${LIBDIR_BASE}/libcrypto.a
44LIBCTF?=	${LIBDESTDIR}${LIBDIR_BASE}/libctf.a
45LIBCURSES?=	${LIBDESTDIR}${LIBDIR_BASE}/libcurses.a
46LIBCUSE?=	${LIBDESTDIR}${LIBDIR_BASE}/libcuse.a
47LIBCXGB4?=	${LIBDESTDIR}${LIBDIR_BASE}/libcxgb4.a
48LIBCXXRT?=	${LIBDESTDIR}${LIBDIR_BASE}/libcxxrt.a
49LIBC_PIC?=	${LIBDESTDIR}${LIBDIR_BASE}/libc_pic.a
50LIBDEVCTL?=	${LIBDESTDIR}${LIBDIR_BASE}/libdevctl.a
51LIBDEVDCTL?=	${LIBDESTDIR}${LIBDIR_BASE}/libdevdctl.a
52LIBDEVINFO?=	${LIBDESTDIR}${LIBDIR_BASE}/libdevinfo.a
53LIBDEVSTAT?=	${LIBDESTDIR}${LIBDIR_BASE}/libdevstat.a
54LIBDIALOG?=	${LIBDESTDIR}${LIBDIR_BASE}/libdialog.a
55LIBDL?=		${LIBDESTDIR}${LIBDIR_BASE}/libdl.a
56LIBDNS?=	${LIBDESTDIR}${LIBDIR_BASE}/libdns.a
57LIBDPV?=	${LIBDESTDIR}${LIBDIR_BASE}/libdpv.a
58LIBDTRACE?=	${LIBDESTDIR}${LIBDIR_BASE}/libdtrace.a
59LIBDWARF?=	${LIBDESTDIR}${LIBDIR_BASE}/libdwarf.a
60LIBEDIT?=	${LIBDESTDIR}${LIBDIR_BASE}/libedit.a
61LIBEFIVAR?=	${LIBDESTDIR}${LIBDIR_BASE}/libefivar.a
62LIBELF?=	${LIBDESTDIR}${LIBDIR_BASE}/libelf.a
63LIBEXECINFO?=	${LIBDESTDIR}${LIBDIR_BASE}/libexecinfo.a
64LIBFETCH?=	${LIBDESTDIR}${LIBDIR_BASE}/libfetch.a
65LIBFIGPAR?=	${LIBDESTDIR}${LIBDIR_BASE}/libfigpar.a
66LIBFL?=		"don't use LIBFL, use LIBL"
67LIBFORM?=	${LIBDESTDIR}${LIBDIR_BASE}/libform.a
68LIBG2C?=	${LIBDESTDIR}${LIBDIR_BASE}/libg2c.a
69LIBGEOM?=	${LIBDESTDIR}${LIBDIR_BASE}/libgeom.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
83LIBICP?=	${LIBDESTDIR}${LIBDIR_BASE}/libicp.a
84LIBIPSEC?=	${LIBDESTDIR}${LIBDIR_BASE}/libipsec.a
85LIBIPT?=	${LIBDESTDIR}${LIBDIR_BASE}/libipt.a
86LIBJAIL?=	${LIBDESTDIR}${LIBDIR_BASE}/libjail.a
87LIBKADM5CLNT?=	${LIBDESTDIR}${LIBDIR_BASE}/libkadm5clnt.a
88LIBKADM5SRV?=	${LIBDESTDIR}${LIBDIR_BASE}/libkadm5srv.a
89LIBKAFS5?=	${LIBDESTDIR}${LIBDIR_BASE}/libkafs5.a
90LIBKDC?=	${LIBDESTDIR}${LIBDIR_BASE}/libkdc.a
91LIBKEYCAP?=	${LIBDESTDIR}${LIBDIR_BASE}/libkeycap.a
92LIBKICONV?=	${LIBDESTDIR}${LIBDIR_BASE}/libkiconv.a
93LIBKRB5?=	${LIBDESTDIR}${LIBDIR_BASE}/libkrb5.a
94LIBKVM?=	${LIBDESTDIR}${LIBDIR_BASE}/libkvm.a
95LIBL?=		${LIBDESTDIR}${LIBDIR_BASE}/libl.a
96LIBLN?=		"don't use LIBLN, use LIBL"
97LIBLZMA?=	${LIBDESTDIR}${LIBDIR_BASE}/liblzma.a
98LIBM?=		${LIBDESTDIR}${LIBDIR_BASE}/libm.a
99LIBMAGIC?=	${LIBDESTDIR}${LIBDIR_BASE}/libmagic.a
100LIBMD?=		${LIBDESTDIR}${LIBDIR_BASE}/libmd.a
101LIBMEMSTAT?=	${LIBDESTDIR}${LIBDIR_BASE}/libmemstat.a
102LIBMENU?=	${LIBDESTDIR}${LIBDIR_BASE}/libmenu.a
103LIBMILTER?=	${LIBDESTDIR}${LIBDIR_BASE}/libmilter.a
104LIBMLX4?=	${LIBDESTDIR}${LIBDIR_BASE}/libmlx4.a
105LIBMLX5?=	${LIBDESTDIR}${LIBDIR_BASE}/libmlx5.a
106LIBMP?=		${LIBDESTDIR}${LIBDIR_BASE}/libmp.a
107LIBMT?=		${LIBDESTDIR}${LIBDIR_BASE}/libmt.a
108LIBNCURSES?=	${LIBDESTDIR}${LIBDIR_BASE}/libncurses.a
109LIBNCURSESW?=	${LIBDESTDIR}${LIBDIR_BASE}/libncursesw.a
110LIBNETGRAPH?=	${LIBDESTDIR}${LIBDIR_BASE}/libnetgraph.a
111LIBNETMAP?=	${LIBDESTDIR}${LIBDIR_BASE}/libnetmap.a
112LIBNGATM?=	${LIBDESTDIR}${LIBDIR_BASE}/libngatm.a
113LIBNV?=		${LIBDESTDIR}${LIBDIR_BASE}/libnv.a
114LIBNVPAIR?=	${LIBDESTDIR}${LIBDIR_BASE}/libnvpair.a
115LIBOPENCSD?=	${LIBDESTDIR}${LIBDIR_BASE}/libopencsd.a
116LIBOPENSM?=	${LIBDESTDIR}${LIBDIR_BASE}/libopensm.a
117LIBOPIE?=	${LIBDESTDIR}${LIBDIR_BASE}/libopie.a
118LIBOSMCOMP?=	${LIBDESTDIR}${LIBDIR_BASE}/libosmcomp.a
119LIBOSMVENDOR?=	${LIBDESTDIR}${LIBDIR_BASE}/libosmvendor.a
120LIBPAM?=	${LIBDESTDIR}${LIBDIR_BASE}/libpam.a
121LIBPANEL?=	${LIBDESTDIR}${LIBDIR_BASE}/libpanel.a
122LIBPANELW?=	${LIBDESTDIR}${LIBDIR_BASE}/libpanelw.a
123LIBPCAP?=	${LIBDESTDIR}${LIBDIR_BASE}/libpcap.a
124LIBPJDLOG?=	${LIBDESTDIR}${LIBDIR_BASE}/libpjdlog.a
125LIBPMC?=	${LIBDESTDIR}${LIBDIR_BASE}/libpmc.a
126LIBPROC?=	${LIBDESTDIR}${LIBDIR_BASE}/libproc.a
127LIBPROCSTAT?=	${LIBDESTDIR}${LIBDIR_BASE}/libprocstat.a
128LIBPTHREAD?=	${LIBDESTDIR}${LIBDIR_BASE}/libpthread.a
129LIBRADIUS?=	${LIBDESTDIR}${LIBDIR_BASE}/libradius.a
130LIBRDMACM?=	${LIBDESTDIR}${LIBDIR_BASE}/librdmacm.a
131LIBREGEX?=	${LIBDESTDIR}${LIBDIR_BASE}/libregex.a
132LIBROKEN?=	${LIBDESTDIR}${LIBDIR_BASE}/libroken.a
133LIBRPCSEC_GSS?=	${LIBDESTDIR}${LIBDIR_BASE}/librpcsec_gss.a
134LIBRPCSVC?=	${LIBDESTDIR}${LIBDIR_BASE}/librpcsvc.a
135LIBRT?=		${LIBDESTDIR}${LIBDIR_BASE}/librt.a
136LIBRTLD_DB?=	${LIBDESTDIR}${LIBDIR_BASE}/librtld_db.a
137LIBSBUF?=	${LIBDESTDIR}${LIBDIR_BASE}/libsbuf.a
138LIBSDP?=	${LIBDESTDIR}${LIBDIR_BASE}/libsdp.a
139LIBSMB?=	${LIBDESTDIR}${LIBDIR_BASE}/libsmb.a
140LIBSPL?=	${LIBDESTDIR}${LIBDIR_BASE}/libspl.a
141LIBSSL?=	${LIBDESTDIR}${LIBDIR_BASE}/libssl.a
142LIBSSP_NONSHARED?=	${LIBDESTDIR}${LIBDIR_BASE}/libssp_nonshared.a
143LIBSTATS?=	${LIBDESTDIR}${LIBDIR_BASE}/libstats.a
144LIBSTDTHREADS?=	${LIBDESTDIR}${LIBDIR_BASE}/libstdthreads.a
145LIBSYSDECODE?=	${LIBDESTDIR}${LIBDIR_BASE}/libsysdecode.a
146LIBTACPLUS?=	${LIBDESTDIR}${LIBDIR_BASE}/libtacplus.a
147LIBTERMCAP?=	${LIBDESTDIR}${LIBDIR_BASE}/libtermcap.a
148LIBTERMCAPW?=	${LIBDESTDIR}${LIBDIR_BASE}/libtermcapw.a
149LIBTERMLIB?=	"don't use LIBTERMLIB, use LIBTERMCAP"
150LIBTINFO?=	"don't use LIBTINFO, use LIBNCURSES"
151LIBTPOOL?=	${LIBDESTDIR}${LIBDIR_BASE}/libtpool.a
152LIBUFS?=	${LIBDESTDIR}${LIBDIR_BASE}/libufs.a
153LIBUGIDFW?=	${LIBDESTDIR}${LIBDIR_BASE}/libugidfw.a
154LIBULOG?=	${LIBDESTDIR}${LIBDIR_BASE}/libulog.a
155LIBUMEM?=	${LIBDESTDIR}${LIBDIR_BASE}/libumem.a
156LIBUSB?=	${LIBDESTDIR}${LIBDIR_BASE}/libusb.a
157LIBUSBHID?=	${LIBDESTDIR}${LIBDIR_BASE}/libusbhid.a
158LIBUTIL?=	${LIBDESTDIR}${LIBDIR_BASE}/libutil.a
159LIBUUTIL?=	${LIBDESTDIR}${LIBDIR_BASE}/libuutil.a
160LIBVGL?=	${LIBDESTDIR}${LIBDIR_BASE}/libvgl.a
161LIBVMMAPI?=	${LIBDESTDIR}${LIBDIR_BASE}/libvmmapi.a
162LIBWIND?=	${LIBDESTDIR}${LIBDIR_BASE}/libwind.a
163LIBWRAP?=	${LIBDESTDIR}${LIBDIR_BASE}/libwrap.a
164LIBXO?=		${LIBDESTDIR}${LIBDIR_BASE}/libxo.a
165LIBXPG4?=	${LIBDESTDIR}${LIBDIR_BASE}/libxpg4.a
166LIBY?=		${LIBDESTDIR}${LIBDIR_BASE}/liby.a
167LIBYPCLNT?=	${LIBDESTDIR}${LIBDIR_BASE}/libypclnt.a
168LIBZ?=		${LIBDESTDIR}${LIBDIR_BASE}/libz.a
169LIBZFS?=	${LIBDESTDIR}${LIBDIR_BASE}/libzfs.a
170LIBZFS_CORE?=	${LIBDESTDIR}${LIBDIR_BASE}/libzfs_core.a
171LIBZFSBOOTENV?=	${LIBDESTDIR}${LIBDIR_BASE}/libzfsbootenv.a
172LIBZPOOL?=	${LIBDESTDIR}${LIBDIR_BASE}/libzpool.a
173LIBZUTIL?=	${LIBDESTDIR}${LIBDIR_BASE}/libzutil.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