blob: dcef7eab876de5fa9e0b2cca4d326017df4cf66b [file] [log] [blame]
Paul Cheng74b5a352010-04-24 08:01:59 -07001#
2# CDDL HEADER START
3#
4# The contents of this file are subject to the terms of the
5# Common Development and Distribution License (the "License").
6# You may not use this file except in compliance with the License.
7#
8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9# or http://www.opensolaris.org/os/licensing.
10# See the License for the specific language governing permissions
11# and limitations under the License.
12#
13# When distributing Covered Code, include this CDDL HEADER in each
14# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15# If applicable, add the following below this CDDL HEADER, with the
16# fields enclosed by brackets "[]" replaced with your own identifying
17# information: Portions Copyright [yyyy] [name of copyright owner]
18#
19# CDDL HEADER END
20#
21
Yuri Pankovba9ca912015-11-29 04:48:44 +030022#
Sue Gleesonc3a558e2010-04-05 15:20:40 -040023# Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
Matthew Ahrens4445fff2012-06-30 13:00:47 -070024# Copyright (c) 2012 by Delphix. All rights reserved.
Robert Mustacchiabc79d92013-04-02 17:25:01 -070025# Copyright (c) 2012, Joyent, Inc. All rights reserved.
Gary Mills0a1278f2013-10-08 08:27:49 -070026# Copyright (c) 2013 Gary Mills
Bart Coddens786d1ee2014-11-04 14:39:24 -050027# Copyright 2014 Garrett D'Amore <garrett@damore.org>
Gary Millsfca42682015-09-06 19:00:17 -050028# Copyright (c) 2015 Gary Mills
Toomas Soomeafc2ba12015-08-30 15:37:04 +030029# Copyright 2016 Toomas Soome <tsoome@me.com>
Yuri Pankov986347b2018-02-05 04:11:44 +030030# Copyright 2018 Nexenta Systems, Inc.
Chris Fraireb31320a2016-11-18 11:29:24 -070031# Copyright (c) 2016, Chris Fraire <cfraire@me.com>.
Andrew Stormontf06dce22017-11-13 01:52:27 +000032# Copyright 2017 RackTop Systems.
Jason King4226f632017-05-27 18:46:17 -050033# Copyirght 2018 Jason King
Yuri Pankovba9ca912015-11-29 04:48:44 +030034#
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -070035
36include ../Makefile.master
37
38# Note that libcurses installs commands along with its library.
39# This is a minor bug which probably should be fixed.
40# Note also that a few extra libraries are kept in cmd source.
41#
42# Certain libraries are linked with, hence depend on, other libraries.
Yuri Pankovba9ca912015-11-29 04:48:44 +030043# Library dependencies are called out explicitly, see "Library
44# interdependencies" below.
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -070045.PARALLEL:
46
Yuri Pankovba9ca912015-11-29 04:48:44 +030047# Build libc and its dependencies
48SUBDIRS= \
Richard Lowe3e76f9d2014-04-16 20:03:15 +010049 crt \
Yuri Pankovba9ca912015-11-29 04:48:44 +030050 ../cmd/sgs/libconv \
51 ../cmd/sgs/libdl \
52 libc \
53 .WAIT
kupferfb9f9b92005-12-21 19:47:57 -080054
Yuri Pankovba9ca912015-11-29 04:48:44 +030055# Build libraries with lots of dependents
56SUBDIRS += \
57 libm \
58 libmd \
59 libmp \
60 libnsl \
61 libnvpair \
62 libsocket \
63 .WAIT
64
65# Build everything else. Aside from explicit dependencies, all libraries
66# are built in parallel.
67SUBDIRS += \
68 ../cmd/sendmail/libmilter \
69 ../cmd/sgs/libelf \
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -070070 ../cmd/sgs/librtld_db \
Yuri Pankovba9ca912015-11-29 04:48:44 +030071 abi \
72 auditd_plugins \
73 brand \
74 c_synonyms \
75 cfgadm_plugins \
76 crypt_modules \
77 extendedFILE \
78 fm \
79 getloginx \
80 gss_mechs/mech_dh \
81 gss_mechs/mech_dummy \
82 gss_mechs/mech_krb5 \
83 gss_mechs/mech_spnego \
Yuri Pankovba9ca912015-11-29 04:48:44 +030084 hbaapi \
Alexander Pyhalov16d86562018-11-21 12:34:20 +030085 iconv_modules \
Yuri Pankovba9ca912015-11-29 04:48:44 +030086 krb5 \
87 libadm \
88 libads \
89 libadt_jni \
90 libadutils \
91 libaio \
92 libast \
93 libavl \
94 libbe \
95 libbrand \
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -070096 libbsdmalloc \
Yuri Pankovba9ca912015-11-29 04:48:44 +030097 libbsm \
98 libc_db \
99 libcfgadm \
100 libcmd \
101 libcmdutils \
102 libcommputil \
103 libcontract \
104 libcpc \
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700105 libcrypt \
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700106 libcryptoutil \
Yuri Pankovba9ca912015-11-29 04:48:44 +0300107 libctf \
108 libcurses \
Jason King500cf852018-02-16 16:21:53 +0000109 libcustr \
Jason King4226f632017-05-27 18:46:17 -0500110 libdemangle \
Yuri Pankovba9ca912015-11-29 04:48:44 +0300111 libdevice \
112 libdevid \
113 libdevinfo \
114 libdhcpagent \
115 libdhcputil \
116 libdisasm \
117 libdiskmgt \
118 libdladm \
119 libdll \
120 libdlpi \
121 libdns_sd \
122 libdoor \
Yuri Pankovba9ca912015-11-29 04:48:44 +0300123 libdtrace \
124 libdtrace_jni \
125 libefi \
126 libelfsign \
127 libeti \
128 libexacct \
129 libexacct/demo \
130 libfakekernel \
131 libfcoe \
Toomas Soomeafc2ba12015-08-30 15:37:04 +0300132 libficl \
Yuri Pankovba9ca912015-11-29 04:48:44 +0300133 libfru \
134 libfruutils \
135 libfsmgt \
136 libfstyp \
137 libgen \
138 libgrubmgmt \
139 libgss \
140 libhotplug \
141 libidmap \
142 libilb \
143 libima \
144 libinetsvc \
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700145 libinetutil \
Yuri Pankovba9ca912015-11-29 04:48:44 +0300146 libinstzones \
147 libintl \
Girish Moodalbail6e91bba2010-03-26 17:53:11 -0400148 libipadm \
Robert Mustacchife77cc02013-09-29 14:27:52 -0700149 libipd \
Yuri Pankovba9ca912015-11-29 04:48:44 +0300150 libipmi \
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700151 libipmp \
Yuri Pankovba9ca912015-11-29 04:48:44 +0300152 libipp \
153 libipsecutil \
Peter Dunlapa6d42e72008-10-30 15:49:07 -0600154 libiscsit \
wyllys99ebb4c2006-11-10 15:34:56 -0800155 libkmf \
Yuri Pankovba9ca912015-11-29 04:48:44 +0300156 libkrb5 \
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700157 libkstat \
158 libkvm \
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700159 libldap5 \
Yuri Pankovba9ca912015-11-29 04:48:44 +0300160 liblgrp \
161 liblm \
162 libm1 \
163 libmail \
164 libmalloc \
165 libmapid \
166 libmapmalloc \
167 libmd5 \
Gordon Ross3299f392013-01-05 10:21:33 -0500168 libmlrpc \
Yuri Pankovba9ca912015-11-29 04:48:44 +0300169 libmtmalloc \
170 libmvec \
171 libndmp \
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700172 libnisdb \
Yuri Pankovba9ca912015-11-29 04:48:44 +0300173 libnls \
Yuri Pankovba9ca912015-11-29 04:48:44 +0300174 libnwam \
Yuri Pankove96f8412017-05-31 04:42:39 +0300175 libofmt \
Yuri Pankovba9ca912015-11-29 04:48:44 +0300176 libpam \
177 libpcidb \
178 libpctx \
179 libpicl \
180 libpicltree \
181 libpkg \
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700182 libpool \
chinda2e3eb2007-08-17 12:01:52 -0700183 libpp \
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700184 libproc \
185 libproject \
Yuri Pankovba9ca912015-11-29 04:48:44 +0300186 libpthread \
187 libraidcfg \
188 librcm \
Yuri Pankovba9ca912015-11-29 04:48:44 +0300189 libreparse \
190 libresolv \
191 libresolv2 \
192 librestart \
193 librpcsvc \
194 librsm \
195 librstp \
196 librt \
197 libsasl \
198 libscf \
199 libsched \
200 libsctp \
201 libsec \
202 libsecdb \
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700203 libsendfile \
Robert Mustacchi45d3dd92017-09-21 17:35:16 +0000204 libsff \
Yuri Pankovba9ca912015-11-29 04:48:44 +0300205 libshare \
206 libshell \
207 libsip \
208 libsldap \
209 libslp \
John Fortefcf3ce42008-10-14 15:09:13 -0700210 libsmbfs \
Yuri Pankovba9ca912015-11-29 04:48:44 +0300211 libsmbios \
212 libsmedia \
213 libsqlite \
Sue Gleesonc3a558e2010-04-05 15:20:40 -0400214 libsrpt \
John Fortefcf3ce42008-10-14 15:09:13 -0700215 libstmf \
John Forte45039662009-10-06 19:56:15 -0700216 libstmfproxy \
Yuri Pankovba9ca912015-11-29 04:48:44 +0300217 libsum \
218 libsun_ima \
219 libsys \
220 libsysevent \
221 libtecla \
222 libtermcap \
223 libthread \
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700224 libtnf \
225 libtnfctl \
Yuri Pankovba9ca912015-11-29 04:48:44 +0300226 libtnfprobe \
227 libtsnet \
228 libtsol \
229 libumem \
Yuri Pankovba9ca912015-11-29 04:48:44 +0300230 libuuid \
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700231 libuutil \
Yuri Pankovba9ca912015-11-29 04:48:44 +0300232 libvolmgt \
233 libvrrpadm \
234 libvscan \
235 libw \
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700236 libwrap \
237 libxcurses \
238 libxcurses2 \
Yuri Pankovba9ca912015-11-29 04:48:44 +0300239 libxnet \
240 libzfs \
241 libzfs_core \
242 libzfs_jni \
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700243 libzonecfg \
244 libzoneinfo \
Steve Lawrenceefd4c9b2010-08-16 15:11:00 -0700245 libzonestat \
ahrensfa9e4062005-10-31 11:33:35 -0800246 libzpool \
Yuri Pankovba9ca912015-11-29 04:48:44 +0300247 madv \
John Fortefcf3ce42008-10-14 15:09:13 -0700248 mpapi \
Yuri Pankovba9ca912015-11-29 04:48:44 +0300249 mpss \
250 nametoaddr \
251 ncad_addr \
252 nsswitch \
253 pam_modules \
254 passwdutil \
255 pkcs11 \
Yuri Pankovba9ca912015-11-29 04:48:44 +0300256 print \
257 pylibbe \
258 pysolaris \
259 pyzfs \
260 raidcfg_plugins \
261 rpcsec_gss \
262 sasl_plugins \
263 scsi \
264 smbsrv \
265 smhba \
266 sun_fc \
267 sun_sas \
268 udapl \
269 watchmalloc \
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700270 $($(MACH)_SUBDIRS)
271
Mark Logan7e7bd3d2009-05-19 18:34:13 -0700272i386_SUBDIRS= \
Richard Lowe702941c2013-02-09 17:21:16 -0500273 libfdisk \
274 libsaveargs
Mark Logan7e7bd3d2009-05-19 18:34:13 -0700275
Yuri Pankovba9ca912015-11-29 04:48:44 +0300276sparc_SUBDIRS= \
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700277 efcode \
Mike Christensen30588212008-09-25 17:36:37 -0700278 libds \
jl13909025cf1a32006-04-08 10:25:15 -0700279 libdscp \
Yuri Pankovba9ca912015-11-29 04:48:44 +0300280 libprtdiag \
stevel03831d32006-03-29 15:44:11 -0800281 libprtdiag_psr \
rb144127ef884682007-01-31 21:19:07 -0800282 libpri \
stevel03831d32006-03-29 15:44:11 -0800283 librsc \
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700284 storage \
willard4a6822d2007-08-31 16:18:41 -0700285 libpcp \
Mike Christensen82629e32010-03-01 18:02:46 -0800286 libtsalarm \
287 libv12n
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700288
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700289#
290# Create a special version of $(SUBDIRS) with no .WAIT's, for use with the
291# clean and clobber targets (for more information, see those targets, below).
292#
293NOWAIT_SUBDIRS= $(SUBDIRS:.WAIT=)
294
Yuri Pankov5f10ef62016-10-07 19:54:32 +0300295DCSUBDIRS=
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700296
297MSGSUBDIRS= \
298 abi \
299 auditd_plugins \
nn352489acbbea2006-09-11 22:51:59 -0700300 brand \
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700301 cfgadm_plugins \
302 gss_mechs/mech_dh \
303 gss_mechs/mech_krb5 \
304 krb5 \
chinda2e3eb2007-08-17 12:01:52 -0700305 libast \
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700306 libbsm \
307 libc \
308 libcfgadm \
chinda2e3eb2007-08-17 12:01:52 -0700309 libcmd \
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700310 libcontract \
311 libcurses \
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700312 libdhcputil \
mmusante181c2f42007-04-20 17:46:13 -0700313 libdiskmgt \
meem33343a92006-11-27 19:14:01 -0800314 libdladm \
chinda2e3eb2007-08-17 12:01:52 -0700315 libdll \
Sherry Moore753a6d42009-03-24 14:38:50 -0700316 libgrubmgmt \
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700317 libgss \
nw141292c5c41132007-06-21 19:11:00 -0700318 libidmap \
Sangeeta Misradbed73c2009-11-03 23:15:19 -0800319 libilb \
Moriah Waterland5c51f122009-06-03 20:16:25 -0600320 libinstzones \
Girish Moodalbail6e91bba2010-03-26 17:53:11 -0400321 libipadm \
Yuri Pankovba9ca912015-11-29 04:48:44 +0300322 libipmp \
323 libipsecutil \
324 libldap5 \
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700325 libnsl \
Anurag S. Maskey6ba597c2010-02-25 22:05:58 -0500326 libnwam \
Yuri Pankove96f8412017-05-31 04:42:39 +0300327 libofmt \
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700328 libpam \
329 libpicl \
Moriah Waterland5c51f122009-06-03 20:16:25 -0600330 libpkg \
Yuri Pankovba9ca912015-11-29 04:48:44 +0300331 libpool \
chinda2e3eb2007-08-17 12:01:52 -0700332 libpp \
Yuri Pankovba9ca912015-11-29 04:48:44 +0300333 libreparse \
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700334 libsasl \
Yuri Pankovba9ca912015-11-29 04:48:44 +0300335 libscf \
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700336 libsecdb \
dougm6185db82006-11-01 16:37:33 -0800337 libshare \
chinda2e3eb2007-08-17 12:01:52 -0700338 libshell \
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700339 libsldap \
340 libslp \
thurlow4bff34e2008-02-13 19:51:22 -0800341 libsmbfs \
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700342 libsmedia \
April Chin7c2fbfb2008-12-27 14:59:38 -0800343 libsum \
jpk45916cd2006-03-24 12:29:20 -0800344 libtsol \
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700345 libuutil \
Cathy Zhou1cb875a2009-11-17 09:17:48 -0800346 libvrrpadm \
jm199354911106d2007-11-08 16:09:20 -0800347 libvscan \
ck153898c3aa2a32007-02-01 11:16:06 -0800348 libzfs \
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700349 libzonecfg \
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700350 madv \
351 mpss \
352 pam_modules \
Yuri Pankovba9ca912015-11-29 04:48:44 +0300353 pyzfs \
Dai Ngo7a286c42009-10-14 11:15:07 -0500354 rpcsec_gss \
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700355 $($(MACH)_MSGSUBDIRS)
356
stevel03831d32006-03-29 15:44:11 -0800357sparc_MSGSUBDIRS= \
358 libprtdiag \
359 libprtdiag_psr
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700360
Sheshadri Vasudevanaa1b14e2009-07-02 08:59:40 +0530361i386_MSGSUBDIRS= libfdisk
362
Yuri Pankovba9ca912015-11-29 04:48:44 +0300363HDRSUBDIRS= \
364 ../cmd/sendmail/libmilter \
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700365 auditd_plugins \
Yuri Pankovba9ca912015-11-29 04:48:44 +0300366 fm \
Yuri Pankovba9ca912015-11-29 04:48:44 +0300367 hbaapi \
Gordon Rossb3700b02014-06-05 14:30:31 -0400368 libads \
chinda2e3eb2007-08-17 12:01:52 -0700369 libast \
nn352489acbbea2006-09-11 22:51:59 -0700370 libbrand \
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700371 libbsm \
372 libc \
chinda2e3eb2007-08-17 12:01:52 -0700373 libcmd \
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700374 libcmdutils \
Girish Moodalbail6e91bba2010-03-26 17:53:11 -0400375 libcommputil \
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700376 libcontract \
377 libcpc \
Yuri Pankovba9ca912015-11-29 04:48:44 +0300378 libcryptoutil \
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700379 libctf \
380 libcurses \
Jason King500cf852018-02-16 16:21:53 +0000381 libcustr \
Jason King4226f632017-05-27 18:46:17 -0500382 libdemangle \
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700383 libdevice \
384 libdevid \
385 libdevinfo \
Yuri Pankovba9ca912015-11-29 04:48:44 +0300386 libdhcpagent \
387 libdhcputil \
388 libdisasm \
sjelinek3e1bd7a2005-10-27 09:01:18 -0700389 libdiskmgt \
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700390 libdladm \
chinda2e3eb2007-08-17 12:01:52 -0700391 libdll \
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700392 libdlpi \
rs2002174b22b932007-08-20 11:44:22 -0700393 libdns_sd \
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700394 libdtrace \
tomeefb3fb4f2006-02-16 12:15:27 -0800395 libdtrace_jni \
johnzdf8bdeb2007-10-05 14:39:44 -0700396 libelfsign \
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700397 libeti \
Gordon Rossb819cea2013-06-17 10:34:00 -0400398 libfakekernel \
Yuri Pankovba9ca912015-11-29 04:48:44 +0300399 libfcoe \
Sundeep Panickerc69f5802009-11-18 13:06:09 -0800400 libfru \
artem0e42dee2006-06-16 11:47:43 -0700401 libfstyp \
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700402 libgen \
Yuri Pankovba9ca912015-11-29 04:48:44 +0300403 libgrubmgmt \
404 libidmap \
405 libilb \
406 libima \
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700407 libinetsvc \
408 libinetutil \
Moriah Waterland22fb2ee2009-09-04 10:51:44 -0600409 libinstzones \
Yuri Pankovba9ca912015-11-29 04:48:44 +0300410 libipadm \
411 libipd \
eschrock9113a792007-03-10 17:17:25 -0800412 libipmi \
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700413 libipmp \
414 libipp \
Yuri Pankovba9ca912015-11-29 04:48:44 +0300415 libipsecutil \
Peter Dunlapa6d42e72008-10-30 15:49:07 -0600416 libiscsit \
Yuri Pankovba9ca912015-11-29 04:48:44 +0300417 libkrb5 \
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700418 libkstat \
419 libkvm \
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700420 libmail \
Yuri Pankovba9ca912015-11-29 04:48:44 +0300421 libmapid \
darrenm734b6a92006-03-28 08:45:30 -0800422 libmd \
Gordon Ross3299f392013-01-05 10:21:33 -0500423 libmlrpc \
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700424 libmtmalloc \
Reza Sabdar26540122008-10-23 11:42:48 -0700425 libndmp \
jpk45916cd2006-03-24 12:29:20 -0800426 libnsl \
Yuri Pankovba9ca912015-11-29 04:48:44 +0300427 libnvpair \
James Carlsonb00044a2008-09-19 16:27:53 -0400428 libnwam \
Yuri Pankove96f8412017-05-31 04:42:39 +0300429 libofmt \
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700430 libpam \
Robert Mustacchiabc79d92013-04-02 17:25:01 -0700431 libpcidb \
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700432 libpctx \
433 libpicl \
434 libpicltree \
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700435 libpool \
chinda2e3eb2007-08-17 12:01:52 -0700436 libpp \
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700437 libproc \
jc1565603e4f2892007-02-08 18:32:09 -0800438 libraidcfg \
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700439 librcm \
Yuri Pankovba9ca912015-11-29 04:48:44 +0300440 libreparse \
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700441 librestart \
442 librpcsvc \
443 librsm \
Rishi Srivatsavai4eaa4712009-09-10 15:11:49 -0400444 librstp \
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700445 libsasl \
Yuri Pankovba9ca912015-11-29 04:48:44 +0300446 libscf \
ahrensfa9e4062005-10-31 11:33:35 -0800447 libsec \
Robert Mustacchi45d3dd92017-09-21 17:35:16 +0000448 libsff \
Yuri Pankovba9ca912015-11-29 04:48:44 +0300449 libshare \
chinda2e3eb2007-08-17 12:01:52 -0700450 libshell \
Yuri Pankovba9ca912015-11-29 04:48:44 +0300451 libsip \
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700452 libslp \
Yuri Pankovba9ca912015-11-29 04:48:44 +0300453 libsmbfs \
454 libsmbios \
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700455 libsmedia \
Girish Moodalbail6e91bba2010-03-26 17:53:11 -0400456 libsocket \
nw141292c5c41132007-06-21 19:11:00 -0700457 libsqlite \
Sue Gleesonc3a558e2010-04-05 15:20:40 -0400458 libsrpt \
John Fortefcf3ce42008-10-14 15:09:13 -0700459 libstmf \
John Forte45039662009-10-06 19:56:15 -0700460 libstmfproxy \
April Chin7c2fbfb2008-12-27 14:59:38 -0800461 libsum \
Yuri Pankovba9ca912015-11-29 04:48:44 +0300462 libsun_ima \
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700463 libsysevent \
464 libtecla \
Yuri Pankovba9ca912015-11-29 04:48:44 +0300465 libtermcap \
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700466 libtnf \
467 libtnfctl \
468 libtnfprobe \
jpk45916cd2006-03-24 12:29:20 -0800469 libtsnet \
470 libtsol \
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700471 libumem \
472 libuutil \
Yuri Pankovba9ca912015-11-29 04:48:44 +0300473 libvolmgt \
474 libvrrpadm \
475 libvscan \
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700476 libwrap \
477 libxcurses2 \
ahrensfa9e4062005-10-31 11:33:35 -0800478 libzfs \
Matthew Ahrens4445fff2012-06-30 13:00:47 -0700479 libzfs_core \
eschrock088e9d42005-11-18 22:47:38 -0800480 libzfs_jni \
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700481 libzoneinfo \
Steve Lawrenceefd4c9b2010-08-16 15:11:00 -0700482 libzonestat \
John Fortefcf3ce42008-10-14 15:09:13 -0700483 mpapi \
Yuri Pankovba9ca912015-11-29 04:48:44 +0300484 passwdutil \
485 pkcs11 \
Yuri Pankovba9ca912015-11-29 04:48:44 +0300486 scsi \
487 smbsrv \
488 smhba \
489 udapl \
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700490 $($(MACH)_HDRSUBDIRS)
491
Mark Logan964db342009-06-19 08:50:26 -0700492i386_HDRSUBDIRS= \
Richard Lowe702941c2013-02-09 17:21:16 -0500493 libfdisk \
494 libsaveargs
Mark Logan964db342009-06-19 08:50:26 -0700495
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700496sparc_HDRSUBDIRS= \
Mike Christensen30588212008-09-25 17:36:37 -0700497 libds \
jl13909025cf1a32006-04-08 10:25:15 -0700498 libdscp \
John Fortefcf3ce42008-10-14 15:09:13 -0700499 libpri \
Mike Christensen82629e32010-03-01 18:02:46 -0800500 libv12n \
John Fortefcf3ce42008-10-14 15:09:13 -0700501 storage
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700502
503all := TARGET= all
504check := TARGET= check
505clean := TARGET= clean
506clobber := TARGET= clobber
507install := TARGET= install
508install_h := TARGET= install_h
509lint := TARGET= lint
510_dc := TARGET= _dc
511_msg := TARGET= _msg
512
513.KEEP_STATE:
514
515#
516# For the all and install targets, we clearly must respect library
517# dependencies so that the libraries link correctly. However, for
518# the remaining targets (check, clean, clobber, install_h, lint, _dc
519# and _msg), libraries do not have any dependencies on one another
520# and thus respecting dependencies just slows down the build.
521# As such, for these rules, we use pattern replacement to explicitly
522# avoid triggering the dependency information. Note that for clean,
523# clobber and lint, we must use $(NOWAIT_SUBDIRS) rather than
524# $(SUBDIRS), to prevent `.WAIT' from expanding to `.WAIT-nodepend'.
525#
526
527all: $(SUBDIRS)
528
529install: $(SUBDIRS) .WAIT install_extra
530
531# extra libraries kept in other source areas
532install_extra:
533 @cd ../cmd/sgs; pwd; $(MAKE) install_lib
534 @pwd
535
536clean clobber lint: $(NOWAIT_SUBDIRS:%=%-nodepend)
537
538install_h check: $(HDRSUBDIRS:%=%-nodepend)
539
540_msg: $(MSGSUBDIRS:%=%-nodepend) .WAIT _dc
541
542_dc: $(DCSUBDIRS:%=%-nodepend)
543
Yuri Pankovba9ca912015-11-29 04:48:44 +0300544# Library interdependencies are called out explicitly here.
Richard Lowe3e76f9d2014-04-16 20:03:15 +0100545../cmd/sgs/libconv: crt
546../cmd/sgs/libdl: crt
Yuri Pankovba9ca912015-11-29 04:48:44 +0300547libc: ../cmd/sgs/libconv ../cmd/sgs/libdl
548
549libm: libc
550libmd: libc
551libmp: libc
552libnsl: libc libmd libmp
553libnvpair: libc libnsl
554libsocket: libc libnsl
555
556basedeps: libc libm libmd libmp libnsl libnvpair libsocket
557basedeps := TARGET=install
558
Yuri Pankov8a154f42017-01-13 14:23:45 +0300559# The following dependencies are currently required by libdbus-1 and should
560# be used for anything linking against it.
561dbusdeps: libsecdb libtsol libinetutil libscf libuutil libgen libsmbios
562
Yuri Pankovba9ca912015-11-29 04:48:44 +0300563# The following dependencies don't need to be listed below as they are built
564# before everything else:
565# libc libm libmd libmp libnsl libnvpair libsocket
566abi: libctf libmapmalloc libproc
567auditd_plugins: libbsm libsecdb libgss libmtmalloc
568brand: libzonecfg libmapmalloc
569cfgadm_plugins: libdevice libdevinfo libhotplug librcm hbaapi libkstat libscf
570fm: libexacct libipmi libzfs scsi libdevinfo libdevid libcfgadm \
Jason King6578fdf2018-04-14 12:31:45 -0500571 libcontract libsysevent ../cmd/sgs/libelf libdladm libsff \
572 libpcidb
Yuri Pankovba9ca912015-11-29 04:48:44 +0300573$(SPARC_BLD)fm: libpri
574gss_mechs/mech_dh: libgss
575gss_mechs/mech_dummy: libgss
576gss_mechs/mech_krb5: libgss libresolv2 pkcs11 libkstat
577gss_mechs/mech_spnego: gss_mechs/mech_krb5
578krb5: gss_mechs/mech_krb5 libtecla libldap5
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700579libadt_jni: libbsm
Toomas Soomef5e5a2c2015-06-11 10:46:16 +0300580libadutils: libldap5 libresolv2
581libbe: libzfs libinstzones libuuid libgen libdevinfo libefi libficl
Yuri Pankovba9ca912015-11-29 04:48:44 +0300582libbsm: libinetutil libscf libsecdb libtsol
583libcfgadm: libdevinfo
Toomas Soomef5e5a2c2015-06-11 10:46:16 +0300584libcmd: libsum libast
Yuri Pankovba9ca912015-11-29 04:48:44 +0300585libcmdutils: libavl
586libcpc: libpctx
587libcrypt: libgen
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700588libdevid: libdevinfo
Yuri Pankovba9ca912015-11-29 04:48:44 +0300589libdevinfo: libsec libgen
590libdhcpagent: libdhcputil libuuid libdlpi libcontract
591libdhcputil: libgen libinetutil libdlpi
592libdiskmgt: libdevid libdevinfo libadm libefi libkstat libsysevent
593$(INTEL_BLD)libdiskmgt: libfdisk
594libdladm: libdevinfo libinetutil libscf librcm libexacct libkstat \
595 libpool
Sebastien Roy591e0e12017-01-12 13:27:24 -0500596libdll: libast
yz147064d62bc4b2008-01-23 18:09:15 -0800597libdlpi: libinetutil libdladm
Mike Christensen82629e32010-03-01 18:02:46 -0800598libds: libsysevent
Gary Millsfca42682015-09-06 19:00:17 -0500599libdtrace: libproc libgen libctf libmapmalloc
tomeefb3fb4f2006-02-16 12:15:27 -0800600libdtrace_jni: libuutil libdtrace
Andy Fiddaman4540c8e2018-04-26 08:23:48 +0000601libefi: libuuid libsmbios
Yuri Pankovba9ca912015-11-29 04:48:44 +0300602libelfsign: libcryptoutil libkmf ../cmd/sgs/libelf
603libeti: libcurses
604libexacct/demo: libexacct libproject
605libfakekernel: libumem libcryptoutil
Gary Millsfca42682015-09-06 19:00:17 -0500606libfcoe: libdladm
Toomas Soomefdff6ce2016-12-06 21:49:24 +0200607libficl: libuuid libumem
Hyon Kimac885672010-04-11 11:20:12 -0700608libfru: libfruutils
Yuri Pankovba9ca912015-11-29 04:48:44 +0300609libfsmgt: libkstat
610libgrubmgmt: libdevinfo libzfs libfstyp libefi
611$(INTEL_BLD)libgrubmgmt: libfdisk
612libidmap: libavl libuutil
613libinetsvc: libscf
614libinstzones: libzonecfg libcontract
Chris Fraireb31320a2016-11-18 11:29:24 -0700615libipadm: libinetutil libdlpi libdhcpagent libdladm libsecdb libdhcputil
Yuri Pankovba9ca912015-11-29 04:48:44 +0300616libipmp: libinetutil
Jason Kingbdc560a2018-02-27 00:07:42 -0600617libipsecutil: libtecla libtsol libkmf
Yuri Pankovba9ca912015-11-29 04:48:44 +0300618libiscsit: libstmf libuuid
Jason Kingbdc560a2018-02-27 00:07:42 -0600619libkmf: libcryptoutil pkcs11 libcustr
Yuri Pankovba9ca912015-11-29 04:48:44 +0300620libkvm: ../cmd/sgs/libelf
621libldap5: libsasl
622libmapid: libresolv2 libscf
Gordon Ross3299f392013-01-05 10:21:33 -0500623libmlrpc: libsmbfs libuuid
Yuri Pankovba9ca912015-11-29 04:48:44 +0300624libndmp: libscf
625libnisdb: libldap5
Chris Fraireb31320a2016-11-18 11:29:24 -0700626libnwam: libscf libbsm libdladm libipadm
Yuri Pankovba9ca912015-11-29 04:48:44 +0300627libpcp: libumem libdevinfo
628libpctx: libproc
Andy Fiddamanbf5d9f12018-02-07 15:01:24 +0000629libpkg: libscf libadm
Yuri Pankovba9ca912015-11-29 04:48:44 +0300630libpool: libscf libexacct
631libpp: libast
632libproc: ../cmd/sgs/librtld_db ../cmd/sgs/libelf libctf
633$(INTEL_BLD)libproc: libsaveargs
634libproject: libpool libproc libsecdb
635libprtdiag: libkstat
636libprtdiag_psr: libprtdiag
637libraidcfg: libdevinfo
Yuri Pankovba9ca912015-11-29 04:48:44 +0300638librestart: libuutil libscf libpool libproject libsecdb libsysevent
639libsasl: libgss pkcs11
640libsaveargs: libdisasm
641libscf: libuutil libgen libsmbios
642libsec: libavl libidmap
Robert Mustacchi45d3dd92017-09-21 17:35:16 +0000643libsff: libnvpair
Yuri Pankovba9ca912015-11-29 04:48:44 +0300644libshare: libscf libzfs libuuid libfsmgt libsecdb libumem libsmbfs
645libshell: libast libcmd libdll libsecdb
646libsip: libmd5
647libsldap: libldap5 libscf
648libsmbfs: libkrb5 libsec libidmap pkcs11
Toomas Soome1951a932016-12-10 01:03:02 +0200649libsmbios: libdevinfo
Yuri Pankovba9ca912015-11-29 04:48:44 +0300650libsrpt: libstmf
651libstmf: libscf
Sebastien Roy591e0e12017-01-12 13:27:24 -0500652libstmfproxy: libstmf libpthread
653libsum: libast
Yuri Pankovba9ca912015-11-29 04:48:44 +0300654libsun_ima: libdevinfo libsysevent
655libsysevent: libsecdb
656libtecla: libcurses
657libtermcap: libcurses
658libtnfctl: ../cmd/sgs/libelf
659libtsalarm: libpcp
660libtsnet: libtsol libsecdb
661libtsol: libsecdb
662libuuid: libdlpi
663libv12n: libds libuuid
664libvolmgt: libadm
665libvrrpadm: libdladm libscf
666libvscan: libscf libsecdb
Yuri Pankovba9ca912015-11-29 04:48:44 +0300667libzfs: libdevid libgen libuutil libadm libavl libefi libidmap \
Sebastien Roy591e0e12017-01-12 13:27:24 -0500668 libumem libtsol libzfs_core
Yuri Pankovba9ca912015-11-29 04:48:44 +0300669libzfs_jni: libdiskmgt libzfs
670libzonecfg: libuuid libsysevent libsec libbrand libpool libscf libproc \
671 libuutil libbsm libsecdb
672libzonestat: libcmdutils libumem
Andrew Stormontf06dce22017-11-13 01:52:27 +0000673libzpool: libavl libumem libcmdutils libsysevent libfakekernel
Yuri Pankovba9ca912015-11-29 04:48:44 +0300674madv: libgen
675mpapi: libpthread libdevinfo libsysevent
676mpss: libgen
677nsswitch: libadutils libidmap libdns_sd libscf libldap5 libsldap
678pam_modules: libproject passwdutil smbsrv libtsnet libpam libbsm libsecdb
679passwdutil: libsldap
680pkcs11: libcryptoutil libgen libuuid
Yuri Pankovba9ca912015-11-29 04:48:44 +0300681print: libldap5 libmd5 libsendfile
Sebastien Roy591e0e12017-01-12 13:27:24 -0500682pylibbe: libbe libzfs
Sam Falknere4d060f2010-02-25 11:47:05 -0700683pysolaris: libsec libidmap
Yuri Pankovba9ca912015-11-29 04:48:44 +0300684pyzfs: libzfs
685raidcfg_plugins: libraidcfg librcm libcfgadm libpicl libpicltree
686rpcsec_gss: libgss
687sasl_plugins: pkcs11 libgss libsasl
Yuri Pankovb5254d62015-12-14 17:04:05 -0500688scsi: libfru libumem libdevid libdevinfo
Yuri Pankovba9ca912015-11-29 04:48:44 +0300689smbsrv: libxnet libpthread librt libshare libidmap pkcs11 libsqlite \
690 libcryptoutil libreparse libcmdutils libresolv2 libsmbfs \
Gordon Ross3299f392013-01-05 10:21:33 -0500691 libuuid libfakekernel libads libgss libldap5 krb5 libmlrpc
Yuri Pankovba9ca912015-11-29 04:48:44 +0300692storage: libdevice libdevinfo libdevid
693sun_fc: libdevinfo libsysevent
694sun_sas: libdevinfo libsysevent libkstat libdevid
695udapl: libdevinfo libdladm
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700696
697#
698# The reason this rule checks for the existence of the
699# Makefile is that some of the directories do not exist
kupferfb9f9b92005-12-21 19:47:57 -0800700# in certain situations (e.g., exportable source builds,
701# OpenSolaris).
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700702#
raff808c852006-08-08 23:21:36 -0700703$(SUBDIRS): FRC
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700704 @if [ -f $@/Makefile ]; then \
705 cd $@; pwd; $(MAKE) $(TARGET); \
706 else \
707 true; \
708 fi
709
raff808c852006-08-08 23:21:36 -0700710$(SUBDIRS:%=%-nodepend):
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700711 @if [ -f $(@:%-nodepend=%)/Makefile ]; then \
712 cd $(@:%-nodepend=%); pwd; $(MAKE) $(TARGET); \
713 else \
714 true; \
715 fi
716
717FRC: