aboutsummaryrefslogtreecommitdiff
path: root/share/mk/bsd.libnames.mk
blob: e53e129281c7313f0b24a9accbfc5d5385e12609 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
# $FreeBSD$

# The include file <bsd.libnames.mk> define library names.
# Other include files (e.g. bsd.prog.mk, bsd.lib.mk) include this
# file where necessary.

.if !target(__<bsd.init.mk>__)
.error bsd.libnames.mk cannot be included directly.
.endif

LIBDESTDIR?=	${SYSROOT:U${DESTDIR}}

.sinclude <src.libnames.mk>

# Src directory locations are also defined in src.libnames.mk.

LIBCRT0?=	${LIBDESTDIR}${LIBDIR_BASE}/crt0.o

LIB80211?=	${LIBDESTDIR}${LIBDIR_BASE}/lib80211.a
LIB9P?=		${LIBDESTDIR}${LIBDIR_BASE}/lib9p.a
LIBALIAS?=	${LIBDESTDIR}${LIBDIR_BASE}/libalias.a
LIBARCHIVE?=	${LIBDESTDIR}${LIBDIR_BASE}/libarchive.a
LIBASN1?=	${LIBDESTDIR}${LIBDIR_BASE}/libasn1.a
LIBATM?=	${LIBDESTDIR}${LIBDIR_BASE}/libatm.a
LIBAUDITD?=	${LIBDESTDIR}${LIBDIR_BASE}/libauditd.a
LIBAVL?=	${LIBDESTDIR}${LIBDIR_BASE}/libavl.a
LIBBE?=		${LIBDESTDIR}${LIBDIR_BASE}/libbe.a
LIBBEGEMOT?=	${LIBDESTDIR}${LIBDIR_BASE}/libbegemot.a
LIBBLACKLIST?=	${LIBDESTDIR}${LIBDIR_BASE}/libblacklist.a
LIBBLUETOOTH?=	${LIBDESTDIR}${LIBDIR_BASE}/libbluetooth.a
LIBBSDXML?=	${LIBDESTDIR}${LIBDIR_BASE}/libbsdxml.a
LIBBSM?=	${LIBDESTDIR}${LIBDIR_BASE}/libbsm.a
LIBBSNMP?=	${LIBDESTDIR}${LIBDIR_BASE}/libbsnmp.a
LIBBZ2?=	${LIBDESTDIR}${LIBDIR_BASE}/libbz2.a
LIBC?=		${LIBDESTDIR}${LIBDIR_BASE}/libc.a
LIBCALENDAR?=	${LIBDESTDIR}${LIBDIR_BASE}/libcalendar.a
LIBCAM?=	${LIBDESTDIR}${LIBDIR_BASE}/libcam.a
LIBCOMPAT?=	${LIBDESTDIR}${LIBDIR_BASE}/libcompat.a
LIBCOMPILER_RT?=${LIBDESTDIR}${LIBDIR_BASE}/libcompiler_rt.a
LIBCOM_ERR?=	${LIBDESTDIR}${LIBDIR_BASE}/libcom_err.a
LIBCPLUSPLUS?=	${LIBDESTDIR}${LIBDIR_BASE}/libc++.a
LIBCRYPT?=	${LIBDESTDIR}${LIBDIR_BASE}/libcrypt.a
LIBCRYPTO?=	${LIBDESTDIR}${LIBDIR_BASE}/libcrypto.a
LIBCTF?=	${LIBDESTDIR}${LIBDIR_BASE}/libctf.a
LIBCURSES?=	${LIBDESTDIR}${LIBDIR_BASE}/libcurses.a
LIBCUSE?=	${LIBDESTDIR}${LIBDIR_BASE}/libcuse.a
LIBCXGB4?=	${LIBDESTDIR}${LIBDIR_BASE}/libcxgb4.a
LIBCXXRT?=	${LIBDESTDIR}${LIBDIR_BASE}/libcxxrt.a
LIBC_PIC?=	${LIBDESTDIR}${LIBDIR_BASE}/libc_pic.a
LIBDEVCTL?=	${LIBDESTDIR}${LIBDIR_BASE}/libdevctl.a
LIBDEVDCTL?=	${LIBDESTDIR}${LIBDIR_BASE}/libdevdctl.a
LIBDEVINFO?=	${LIBDESTDIR}${LIBDIR_BASE}/libdevinfo.a
LIBDEVSTAT?=	${LIBDESTDIR}${LIBDIR_BASE}/libdevstat.a
LIBDIALOG?=	${LIBDESTDIR}${LIBDIR_BASE}/libdialog.a
LIBDL?=		${LIBDESTDIR}${LIBDIR_BASE}/libdl.a
LIBDNS?=	${LIBDESTDIR}${LIBDIR_BASE}/libdns.a
LIBDPV?=	${LIBDESTDIR}${LIBDIR_BASE}/libdpv.a
LIBDTRACE?=	${LIBDESTDIR}${LIBDIR_BASE}/libdtrace.a
LIBDWARF?=	${LIBDESTDIR}${LIBDIR_BASE}/libdwarf.a
LIBEDIT?=	${LIBDESTDIR}${LIBDIR_BASE}/libedit.a
LIBEFIVAR?=	${LIBDESTDIR}${LIBDIR_BASE}/libefivar.a
LIBELF?=	${LIBDESTDIR}${LIBDIR_BASE}/libelf.a
LIBEXECINFO?=	${LIBDESTDIR}${LIBDIR_BASE}/libexecinfo.a
LIBFETCH?=	${LIBDESTDIR}${LIBDIR_BASE}/libfetch.a
LIBFIGPAR?=	${LIBDESTDIR}${LIBDIR_BASE}/libfigpar.a
LIBFL?=		"don't use LIBFL, use LIBL"
LIBFORMW?=	${LIBDESTDIR}${LIBDIR_BASE}/libformw.a
LIBG2C?=	${LIBDESTDIR}${LIBDIR_BASE}/libg2c.a
LIBGEOM?=	${LIBDESTDIR}${LIBDIR_BASE}/libgeom.a
LIBGPIO?=	${LIBDESTDIR}${LIBDIR_BASE}/libgpio.a
LIBGSSAPI?=	${LIBDESTDIR}${LIBDIR_BASE}/libgssapi.a
LIBGSSAPI_KRB5?= ${LIBDESTDIR}${LIBDIR_BASE}/libgssapi_krb5.a
LIBHDB?=	${LIBDESTDIR}${LIBDIR_BASE}/libhdb.a
LIBHEIMBASE?=	${LIBDESTDIR}${LIBDIR_BASE}/libheimbase.a
LIBHEIMNTLM?=	${LIBDESTDIR}${LIBDIR_BASE}/libheimntlm.a
LIBHEIMSQLITE?=	${LIBDESTDIR}${LIBDIR_BASE}/libheimsqlite.a
LIBHX509?=	${LIBDESTDIR}${LIBDIR_BASE}/libhx509.a
LIBIBCM?=	${LIBDESTDIR}${LIBDIR_BASE}/libibcm.a
LIBIBMAD?=	${LIBDESTDIR}${LIBDIR_BASE}/libibmad.a
LIBIBNETDISC?=	${LIBDESTDIR}${LIBDIR_BASE}/libibnetdisc.a
LIBIBUMAD?=	${LIBDESTDIR}${LIBDIR_BASE}/libibumad.a
LIBIBVERBS?=	${LIBDESTDIR}${LIBDIR_BASE}/libibverbs.a
LIBICP?=	${LIBDESTDIR}${LIBDIR_BASE}/libicp.a
LIBIPSEC?=	${LIBDESTDIR}${LIBDIR_BASE}/libipsec.a
LIBIPT?=	${LIBDESTDIR}${LIBDIR_BASE}/libipt.a
LIBIRDMA?=	${LIBDESTDIR}${LIBDIR_BASE}/libirdma.a
LIBISCSIUTIL?=	${LIBDESTDIR}${LIBDIR_BASE}/libiscsiutil.a
LIBJAIL?=	${LIBDESTDIR}${LIBDIR_BASE}/libjail.a
LIBKADM5CLNT?=	${LIBDESTDIR}${LIBDIR_BASE}/libkadm5clnt.a
LIBKADM5SRV?=	${LIBDESTDIR}${LIBDIR_BASE}/libkadm5srv.a
LIBKAFS5?=	${LIBDESTDIR}${LIBDIR_BASE}/libkafs5.a
LIBKDC?=	${LIBDESTDIR}${LIBDIR_BASE}/libkdc.a
LIBKEYCAP?=	${LIBDESTDIR}${LIBDIR_BASE}/libkeycap.a
LIBKICONV?=	${LIBDESTDIR}${LIBDIR_BASE}/libkiconv.a
LIBKRB5?=	${LIBDESTDIR}${LIBDIR_BASE}/libkrb5.a
LIBKVM?=	${LIBDESTDIR}${LIBDIR_BASE}/libkvm.a
LIBL?=		${LIBDESTDIR}${LIBDIR_BASE}/libl.a
LIBLN?=		"don't use LIBLN, use LIBL"
LIBLZMA?=	${LIBDESTDIR}${LIBDIR_BASE}/liblzma.a
LIBM?=		${LIBDESTDIR}${LIBDIR_BASE}/libm.a
LIBMAGIC?=	${LIBDESTDIR}${LIBDIR_BASE}/libmagic.a
LIBMD?=		${LIBDESTDIR}${LIBDIR_BASE}/libmd.a
LIBMEMSTAT?=	${LIBDESTDIR}${LIBDIR_BASE}/libmemstat.a
LIBMENU?=	${LIBDESTDIR}${LIBDIR_BASE}/libmenu.a
LIBMILTER?=	${LIBDESTDIR}${LIBDIR_BASE}/libmilter.a
LIBMLX4?=	${LIBDESTDIR}${LIBDIR_BASE}/libmlx4.a
LIBMLX5?=	${LIBDESTDIR}${LIBDIR_BASE}/libmlx5.a
LIBMP?=		${LIBDESTDIR}${LIBDIR_BASE}/libmp.a
LIBMT?=		${LIBDESTDIR}${LIBDIR_BASE}/libmt.a
LIBNCURSES?=	${LIBDESTDIR}${LIBDIR_BASE}/libncurses.a
LIBNCURSESW?=	${LIBDESTDIR}${LIBDIR_BASE}/libncursesw.a
LIBNETGRAPH?=	${LIBDESTDIR}${LIBDIR_BASE}/libnetgraph.a
LIBNETMAP?=	${LIBDESTDIR}${LIBDIR_BASE}/libnetmap.a
LIBNGATM?=	${LIBDESTDIR}${LIBDIR_BASE}/libngatm.a
LIBNV?=		${LIBDESTDIR}${LIBDIR_BASE}/libnv.a
LIBNVPAIR?=	${LIBDESTDIR}${LIBDIR_BASE}/libnvpair.a
LIBOPENCSD?=	${LIBDESTDIR}${LIBDIR_BASE}/libopencsd.a
LIBOPENSM?=	${LIBDESTDIR}${LIBDIR_BASE}/libopensm.a
LIBOPIE?=	${LIBDESTDIR}${LIBDIR_BASE}/libopie.a
LIBOSMCOMP?=	${LIBDESTDIR}${LIBDIR_BASE}/libosmcomp.a
LIBOSMVENDOR?=	${LIBDESTDIR}${LIBDIR_BASE}/libosmvendor.a
LIBPAM?=	${LIBDESTDIR}${LIBDIR_BASE}/libpam.a
LIBPANEL?=	${LIBDESTDIR}${LIBDIR_BASE}/libpanel.a
LIBPANELW?=	${LIBDESTDIR}${LIBDIR_BASE}/libpanelw.a
LIBPCAP?=	${LIBDESTDIR}${LIBDIR_BASE}/libpcap.a
LIBPJDLOG?=	${LIBDESTDIR}${LIBDIR_BASE}/libpjdlog.a
LIBPMC?=	${LIBDESTDIR}${LIBDIR_BASE}/libpmc.a
LIBPROC?=	${LIBDESTDIR}${LIBDIR_BASE}/libproc.a
LIBPROCSTAT?=	${LIBDESTDIR}${LIBDIR_BASE}/libprocstat.a
LIBPTHREAD?=	${LIBDESTDIR}${LIBDIR_BASE}/libpthread.a
LIBRADIUS?=	${LIBDESTDIR}${LIBDIR_BASE}/libradius.a
LIBRDMACM?=	${LIBDESTDIR}${LIBDIR_BASE}/librdmacm.a
LIBREGEX?=	${LIBDESTDIR}${LIBDIR_BASE}/libregex.a
LIBROKEN?=	${LIBDESTDIR}${LIBDIR_BASE}/libroken.a
LIBRPCSEC_GSS?=	${LIBDESTDIR}${LIBDIR_BASE}/librpcsec_gss.a
LIBRPCSVC?=	${LIBDESTDIR}${LIBDIR_BASE}/librpcsvc.a
LIBRT?=		${LIBDESTDIR}${LIBDIR_BASE}/librt.a
LIBRTLD_DB?=	${LIBDESTDIR}${LIBDIR_BASE}/librtld_db.a
LIBSBUF?=	${LIBDESTDIR}${LIBDIR_BASE}/libsbuf.a
LIBSDP?=	${LIBDESTDIR}${LIBDIR_BASE}/libsdp.a
LIBSMB?=	${LIBDESTDIR}${LIBDIR_BASE}/libsmb.a
LIBSPL?=	${LIBDESTDIR}${LIBDIR_BASE}/libspl.a
LIBSSL?=	${LIBDESTDIR}${LIBDIR_BASE}/libssl.a
LIBSSP_NONSHARED?=	${LIBDESTDIR}${LIBDIR_BASE}/libssp_nonshared.a
LIBSTATS?=	${LIBDESTDIR}${LIBDIR_BASE}/libstats.a
LIBSTDTHREADS?=	${LIBDESTDIR}${LIBDIR_BASE}/libstdthreads.a
LIBSYSDECODE?=	${LIBDESTDIR}${LIBDIR_BASE}/libsysdecode.a
LIBTACPLUS?=	${LIBDESTDIR}${LIBDIR_BASE}/libtacplus.a
LIBTERMCAP?=	${LIBDESTDIR}${LIBDIR_BASE}/libtermcap.a
LIBTERMCAPW?=	${LIBDESTDIR}${LIBDIR_BASE}/libtermcapw.a
LIBTERMLIB?=	"don't use LIBTERMLIB, use LIBTERMCAP"
LIBTINFOW=	${LIBDESTDIR}${LIBDIR_BASE}/libtinfow.a
LIBTPOOL?=	${LIBDESTDIR}${LIBDIR_BASE}/libtpool.a
LIBUFS?=	${LIBDESTDIR}${LIBDIR_BASE}/libufs.a
LIBUGIDFW?=	${LIBDESTDIR}${LIBDIR_BASE}/libugidfw.a
LIBULOG?=	${LIBDESTDIR}${LIBDIR_BASE}/libulog.a
LIBUMEM?=	${LIBDESTDIR}${LIBDIR_BASE}/libumem.a
LIBUSB?=	${LIBDESTDIR}${LIBDIR_BASE}/libusb.a
LIBUSBHID?=	${LIBDESTDIR}${LIBDIR_BASE}/libusbhid.a
LIBUTIL?=	${LIBDESTDIR}${LIBDIR_BASE}/libutil.a
LIBUUTIL?=	${LIBDESTDIR}${LIBDIR_BASE}/libuutil.a
LIBVGL?=	${LIBDESTDIR}${LIBDIR_BASE}/libvgl.a
LIBVMMAPI?=	${LIBDESTDIR}${LIBDIR_BASE}/libvmmapi.a
LIBWIND?=	${LIBDESTDIR}${LIBDIR_BASE}/libwind.a
LIBWRAP?=	${LIBDESTDIR}${LIBDIR_BASE}/libwrap.a
LIBXO?=		${LIBDESTDIR}${LIBDIR_BASE}/libxo.a
LIBXPG4?=	${LIBDESTDIR}${LIBDIR_BASE}/libxpg4.a
LIBY?=		${LIBDESTDIR}${LIBDIR_BASE}/liby.a
LIBYPCLNT?=	${LIBDESTDIR}${LIBDIR_BASE}/libypclnt.a
LIBZ?=		${LIBDESTDIR}${LIBDIR_BASE}/libz.a
LIBZFS?=	${LIBDESTDIR}${LIBDIR_BASE}/libzfs.a
LIBZFS_CORE?=	${LIBDESTDIR}${LIBDIR_BASE}/libzfs_core.a
LIBZFSBOOTENV?=	${LIBDESTDIR}${LIBDIR_BASE}/libzfsbootenv.a
LIBZPOOL?=	${LIBDESTDIR}${LIBDIR_BASE}/libzpool.a
LIBZUTIL?=	${LIBDESTDIR}${LIBDIR_BASE}/libzutil.a

# enforce the 2 -lpthread and -lc to always be the last in that exact order
.if defined(LDADD)
.if ${LDADD:M-lpthread}
LDADD:=	${LDADD:N-lpthread} -lpthread
.endif
.if ${LDADD:M-lc}
LDADD:=	${LDADD:N-lc} -lc
.endif
.endif

# Only do this for src builds.
.if defined(SRCTOP)
.if defined(_LIBRARIES) && defined(LIB) && \
    ${_LIBRARIES:M${LIB}} != ""
.if !defined(LIB${LIB:tu})
.error ${.CURDIR}: Missing value for LIB${LIB:tu} in ${_this:T}.  Likely should be: LIB${LIB:tu}?= $${LIBDESTDIR}$${LIBDIR_BASE}/lib${LIB}.a
.endif
.endif

# Derive LIB*SRCDIR from LIB*DIR
.for lib in ${_LIBRARIES}
LIB${lib:tu}SRCDIR?=	${SRCTOP}/${LIB${lib:tu}DIR:S,^${OBJTOP}/,,}
.endfor
.else

# Out of tree builds

# There are LIBADD defined in an out-of-tree build.  Are they *all*
# in-tree libraries?  If so convert them to LDADD to support
# partial checkouts.
.if !empty(LIBADD)
_convert_libadd=	1
.for l in ${LIBADD}
.if empty(LIB${l:tu})
_convert_libadd=	0
.endif
.endfor
.if ${_convert_libadd} == 1
.warning Converting out-of-tree build LIBADDs into LDADD.  This is not fully supported.
.for l in ${LIBADD}
LDADD+=	-l${l}
.endfor
.endif
.endif

.endif	# defined(SRCTOP)