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
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
|
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
# Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2012 by Delphix. All rights reserved.
# Copyright 2020 Joyent, Inc.
# Copyright (c) 2013 Gary Mills
# Copyright 2014 Garrett D'Amore <garrett@damore.org>
# Copyright (c) 2015 Gary Mills
# Copyright 2016 Toomas Soome <tsoome@me.com>
# Copyright 2018 Nexenta Systems, Inc.
# Copyright (c) 2016, Chris Fraire <cfraire@me.com>.
# Copyright 2017 RackTop Systems.
# Copyright 2018 Jason King
# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
#
include ../Makefile.master
# Note that libcurses installs commands along with its library.
# This is a minor bug which probably should be fixed.
# Note also that a few extra libraries are kept in cmd source.
#
# Certain libraries are linked with, hence depend on, other libraries.
# Library dependencies are called out explicitly, see "Library
# interdependencies" below.
.PARALLEL:
# Build libc and its dependencies
SUBDIRS= \
ssp_ns \
crt \
../cmd/sgs/libconv \
../cmd/sgs/libdl \
libc \
.WAIT
# Build libraries with lots of dependents
SUBDIRS += \
libm \
libmd \
libmp \
libnsl \
libnvpair \
libsocket \
.WAIT
# Build everything else. Aside from explicit dependencies, all libraries
# are built in parallel.
SUBDIRS += \
../cmd/sendmail/libmilter \
../cmd/sgs/libelf \
../cmd/sgs/librtld_db \
abi \
auditd_plugins \
brand \
c_synonyms \
cfgadm_plugins \
crypt_modules \
extendedFILE \
fm \
getloginx \
gss_mechs/mech_dh \
gss_mechs/mech_dummy \
gss_mechs/mech_krb5 \
gss_mechs/mech_spnego \
hal \
hbaapi \
iconv_modules \
krb5 \
libadm \
libads \
libadt_jni \
libadutils \
libaio \
libavl \
libbe \
libbrand \
libbsdmalloc \
libbsm \
libbunyan \
libc_db \
libcfgadm \
libcmdutils \
libcommputil \
libcontract \
libcpc \
libcrypt \
libcryptoutil \
libctf \
libcurses \
libcustr \
libdemangle \
libdevice \
libdevid \
libdevinfo \
libdhcpagent \
libdhcputil \
libdisasm \
libdiskmgt \
libdladm \
libdlpi \
libdns_sd \
libdoor \
libdtrace \
libdtrace_jni \
libdwarf \
libefi \
libelfsign \
libeti \
libexacct \
libexacct/demo \
libfakekernel \
libfcoe \
libficl \
libfru \
libfruutils \
libfsmgt \
libfstyp \
libgen \
libgrubmgmt \
libgss \
libhotplug \
libidmap \
libidspace \
libilb \
libima \
libinetsvc \
libinetutil \
libinstzones \
libintl \
libipadm \
libipd \
libipmi \
libipmp \
libipp \
libipsecutil \
libiscsit \
libjedec \
libkmf \
libkrb5 \
libkstat \
libkvm \
libldap5 \
liblgrp \
liblm \
libm1 \
libmail \
libmalloc \
libmapid \
libmapmalloc \
libmd5 \
libmlrpc \
libmtmalloc \
libmvec \
libndmp \
libnisdb \
libnls \
libnwam \
libofmt \
libpam \
libpcidb \
libpcsc \
libpctx \
libpicl \
libpicltree \
libpkg \
libpool \
libproc \
libproject \
libpthread \
libraidcfg \
librcm \
librefhash \
librename \
libreparse \
libresolv \
libresolv2 \
libresolv2_joy \
librestart \
librpcsvc \
librsm \
librstp \
librt \
libsasl \
libscf \
libsched \
libsctp \
libsec \
libsecdb \
libsendfile \
libsff \
libshare \
libsip \
libsldap \
libslp \
libsmartsshd \
libsmbfs \
libsmbios \
libsmedia \
libsqlite \
libsrpt \
libstmf \
libstmfproxy \
libsun_ima \
libsysevent \
libtecla \
libtermcap \
libthread \
libtnf \
libtnfctl \
libtnfprobe \
libtsnet \
libtsol \
libumem \
libutempter \
libuuid \
libuutil \
libvnd \
libvolmgt \
libvrrpadm \
libvscan \
libw \
libwrap \
libxcurses \
libxcurses2 \
libxnet \
libzdoor \
libzfs \
libzfsbootenv \
libzfs_core \
libzfs_jni \
libzonecfg \
libzoneinfo \
libzonestat \
libzpool \
libzutil \
madv \
mpapi \
mpss \
nametoaddr \
ncad_addr \
nsswitch \
pam_modules \
passwdutil \
pkcs11 \
policykit \
print \
raidcfg_plugins \
rpcsec_gss \
sasl_plugins \
scsi \
smbclnt \
smbsrv \
smhba \
sun_fc \
sun_sas \
udapl \
varpd \
watchmalloc \
$($(MACH)_SUBDIRS)
i386_SUBDIRS= \
lib9p \
libfdisk \
libppt \
libsaveargs \
libvmm \
libvmmapi
sparc_SUBDIRS= \
efcode \
libds \
libdscp \
libprtdiag \
libprtdiag_psr \
libpri \
librsc \
storage \
libpcp \
libtsalarm \
libv12n
#
# Create a special version of $(SUBDIRS) with no .WAIT's, for use with the
# clean and clobber targets (for more information, see those targets, below).
#
NOWAIT_SUBDIRS= $(SUBDIRS:.WAIT=)
DCSUBDIRS=
MSGSUBDIRS= \
abi \
auditd_plugins \
brand \
cfgadm_plugins \
gss_mechs/mech_dh \
gss_mechs/mech_krb5 \
krb5 \
libbsm \
libc \
libcfgadm \
libcontract \
libcurses \
libdhcputil \
libdiskmgt \
libdladm \
libgrubmgmt \
libgss \
libidmap \
libilb \
libinstzones \
libipadm \
libipmp \
libipsecutil \
libldap5 \
libnsl \
libnwam \
libofmt \
libpam \
libpicl \
libpkg \
libpool \
libreparse \
libsasl \
libscf \
libsecdb \
libshare \
libsldap \
libslp \
libsmartsshd \
libsmbfs \
libsmedia \
libtsol \
libuutil \
libvrrpadm \
libvscan \
libzfs \
libzonecfg \
libzdoor \
madv \
mpss \
pam_modules \
rpcsec_gss \
$($(MACH)_MSGSUBDIRS)
sparc_MSGSUBDIRS= \
libprtdiag \
libprtdiag_psr
i386_MSGSUBDIRS= libfdisk
HDRSUBDIRS= \
../cmd/sendmail/libmilter \
auditd_plugins \
fm \
hal \
hbaapi \
libads \
libbrand \
libbsm \
libbunyan \
libc \
libcmdutils \
libcommputil \
libcontract \
libcpc \
libcryptoutil \
libctf \
libcurses \
libcustr \
libdemangle \
libdevice \
libdevid \
libdevinfo \
libdhcpagent \
libdhcputil \
libdisasm \
libdiskmgt \
libdladm \
libdlpi \
libdns_sd \
libdtrace \
libdtrace_jni \
libelfsign \
libeti \
libfakekernel \
libfcoe \
libfru \
libfstyp \
libgen \
libgrubmgmt \
libidmap \
libidspace \
libilb \
libima \
libinetsvc \
libinetutil \
libinstzones \
libipadm \
libipd \
libipmi \
libipmp \
libipp \
libipsecutil \
libiscsit \
libkrb5 \
libkstat \
libkvm \
libmail \
libmapid \
libmd \
libmlrpc \
libmtmalloc \
libndmp \
libnsl \
libnvpair \
libnwam \
libofmt \
libpam \
libpcidb \
libpcsc \
libpctx \
libpicl \
libpicltree \
libpool \
libproc \
libraidcfg \
librcm \
librename \
libreparse \
librestart \
librpcsvc \
librsm \
librstp \
libsasl \
libscf \
libsec \
libsff \
libshare \
libsip \
libslp \
libsmbfs \
libsmbios \
libsmedia \
libsocket \
libsqlite \
libsrpt \
libstmf \
libstmfproxy \
libsun_ima \
libsysevent \
libtecla \
libtermcap \
libtnf \
libtnfctl \
libtnfprobe \
libtsnet \
libtsol \
libumem \
libutempter \
libuutil \
libvnd \
libvolmgt \
libvrrpadm \
libvscan \
libwrap \
libxcurses2 \
libzfs \
libzfs_core \
libzfs_jni \
libzoneinfo \
libzonestat \
mpapi \
passwdutil \
pkcs11 \
policykit \
scsi \
smbsrv \
smhba \
udapl \
varpd \
$($(MACH)_HDRSUBDIRS)
i386_HDRSUBDIRS= \
lib9p \
libfdisk \
libppt \
libsaveargs \
libvmm \
libvmmapi
sparc_HDRSUBDIRS= \
libds \
libdscp \
libpri \
libv12n \
storage
all := TARGET= all
check := TARGET= check
clean := TARGET= clean
clobber := TARGET= clobber
install := TARGET= install
install_h := TARGET= install_h
_dc := TARGET= _dc
_msg := TARGET= _msg
.KEEP_STATE:
#
# For the all and install targets, we clearly must respect library
# dependencies so that the libraries link correctly. However, for
# the remaining targets (check, clean, clobber, install_h, _dc
# and _msg), libraries do not have any dependencies on one another
# and thus respecting dependencies just slows down the build.
# As such, for these rules, we use pattern replacement to explicitly
# avoid triggering the dependency information. Note that for clean and
# clobber, we must use $(NOWAIT_SUBDIRS) rather than
# $(SUBDIRS), to prevent `.WAIT' from expanding to `.WAIT-nodepend'.
#
all: $(SUBDIRS)
install: $(SUBDIRS) .WAIT install_extra
# extra libraries kept in other source areas
install_extra:
@cd ../cmd/sgs; pwd; $(MAKE) install_lib
@pwd
clean clobber: $(NOWAIT_SUBDIRS:%=%-nodepend)
install_h check: $(HDRSUBDIRS:%=%-nodepend)
_msg: $(MSGSUBDIRS:%=%-nodepend) .WAIT _dc
_dc: $(DCSUBDIRS:%=%-nodepend)
# Library interdependencies are called out explicitly here.
../cmd/sgs/libconv: crt
../cmd/sgs/libdl: crt
libc: ../cmd/sgs/libconv ../cmd/sgs/libdl
libm: libc
libmd: libc
libmp: libc
libnsl: libc libmd libmp
libnvpair: libc libnsl
libsocket: libc libnsl
basedeps: libc libm libmd libmp libnsl libnvpair libsocket
basedeps := TARGET=install
# The following dependencies are currently required by libdbus-1 and should
# be used for anything linking against it.
dbusdeps: libsecdb libtsol libinetutil libscf libuutil libgen libsmbios \
libbsm
# The following dependencies don't need to be listed below as they are built
# before everything else:
# libc libm libmd libmp libnsl libnvpair libsocket
../cmd/sendmail/libmilter: libsocket libnsl
abi: libctf libmapmalloc libproc
auditd_plugins: libbsm libsecdb libgss libmtmalloc
brand: libzonecfg libmapmalloc libipadm libcustr libproc librpcsvc
cfgadm_plugins: libdevice libdevinfo libhotplug librcm hbaapi libkstat libscf
fm: libexacct libipmi libzfs scsi libdevinfo libdevid libcfgadm \
libcontract libsysevent ../cmd/sgs/libelf libdladm libsff \
libpcidb libdiskmgt
$(SPARC_BLD)fm: libpri
gss_mechs/mech_dh: libgss
gss_mechs/mech_dummy: libgss
gss_mechs/mech_krb5: libgss libresolv2 pkcs11 libkstat
gss_mechs/mech_spnego: gss_mechs/mech_krb5
hal: dbusdeps
krb5: gss_mechs/mech_krb5 libtecla libldap5
lib9p: libsec libcustr
libads: libnsl
libadt_jni: libbsm
libadutils: libldap5 libresolv2
libbe: libzfs libinstzones libuuid libgen libdevinfo libefi libficl \
libzfsbootenv
libbsm: libinetutil libscf libsecdb libtsol
libbunyan: libumem
libcfgadm: libdevinfo
libcontract: libnvpair
libcmdutils: libavl libnvpair
libcpc: libpctx
libcrypt: libgen
libctf: libdwarf
libdemangle: libcustr
libdevice: libnvpair
libdevid: libdevinfo
libdevinfo: libsec libgen
libdhcpagent: libdhcputil libuuid libdlpi libcontract
libdhcputil: libgen libinetutil libdlpi
libdiskmgt: libdevid libdevinfo libadm libefi libkstat libsysevent
$(INTEL_BLD)libdiskmgt: libfdisk
libdladm: libdevinfo libinetutil libscf librcm libexacct libkstat \
libpool varpd
libdlpi: libinetutil libdladm
libds: libsysevent
libdtrace: libproc libgen libctf libmapmalloc libzonecfg ../cmd/sgs/libelf
libdtrace_jni: libuutil libdtrace
libdwarf: ../cmd/sgs/libelf
libefi: libuuid libsmbios
libelfsign: libcryptoutil libkmf ../cmd/sgs/libelf
libeti: libcurses
libexacct/demo: libexacct libproject
libfakekernel: libumem libcryptoutil
libfcoe: libdladm
libficl: libuuid libumem
libfru: libfruutils
libfsmgt: libkstat
libgrubmgmt: libdevinfo libzfs libfstyp libefi
$(INTEL_BLD)libgrubmgmt: libfdisk
libidmap: libavl libuutil
libidspace: libumem
libinetsvc: libscf
libinetutil: libsocket
libinstzones: libzonecfg libcontract
libipadm: libinetutil libdlpi libdhcpagent libdladm libsecdb libdhcputil \
libcmdutils libipmp
libipmi: libm libnvpair libsocket libnsl
libipmp: libinetutil
libipsecutil: libtecla libtsol libkmf
libiscsit: libstmf libuuid
libhotplug: libnvpair
libkmf: libcryptoutil pkcs11 libcustr
libkvm: ../cmd/sgs/libelf
libldap5: libsasl
libmapid: libresolv2 libscf
libmlrpc: libsmbfs libuuid
libndmp: libscf
libnisdb: libldap5
libnwam: libscf libbsm libdladm libipadm
libpcp: libumem libdevinfo
libpctx: libproc
libpkg: libscf libadm
libpool: libscf libexacct
libppt: libpcidb libdevinfo libcmdutils
libproc: ../cmd/sgs/librtld_db ../cmd/sgs/libelf libctf
$(INTEL_BLD)libproc: libsaveargs
libproject: libpool libproc libsecdb
libprtdiag: libkstat libdevinfo
libprtdiag_psr: libprtdiag
libraidcfg: libdevinfo
librcm: libnvpair
librefhash: libumem
librestart: libuutil libscf libpool libproject libsecdb libsysevent
libsasl: libgss pkcs11
libsaveargs: libdisasm
libscf: libuutil libgen libnsl libnvpair libsmbios
libsec: libavl libidmap
libsecdb: libnsl
libsff: libnvpair
libshare: libscf libzfs libuuid libfsmgt libsecdb libumem libsmbfs
libsip: libmd5
libsldap: libldap5 libscf
libsmartsshd: libc libcontract
libsmbfs: libkrb5 libsec libidmap pkcs11
libsmbios: libdevinfo
libsrpt: libstmf
libstmf: libscf
libstmfproxy: libstmf libpthread
libsun_ima: libdevinfo libsysevent
libsysevent: libsecdb
libtecla: libcurses
libtermcap: libcurses
libtnfctl: ../cmd/sgs/libelf
libtsalarm: libpcp
libtsnet: libtsol libsecdb
libtsol: libsecdb
libuuid: libdlpi
libv12n: libds libuuid
libvmm: libvmmapi
libvolmgt: libadm
libvrrpadm: libdladm libscf
libvscan: libscf libsecdb
libzdoor: libc libzonecfg libcontract
libzfs: libdevid libgen libuutil libavl libefi libidmap \
libumem libtsol libzfs_core libcryptoutil pkcs11 libmd libzutil
libzfsbootenv: libzfs libnvpair
libzfs_core: libnvpair
libzfs_jni: libdiskmgt libzfs libzutil
libzonecfg: libuuid libsysevent libsec libbrand libpool libscf libproc \
libuutil libbsm libsecdb
libzonestat: libcmdutils libumem
libzpool: libavl libumem libcmdutils libsysevent libfakekernel libzutil
libzutil: libadm libavl libdevid libefi
madv: libgen
mpapi: libpthread libdevinfo libsysevent
mpss: libgen
nsswitch: libadutils libidmap libdns_sd libscf libldap5 libsldap \
libresolv2_joy
pam_modules: libproject passwdutil smbsrv libtsnet libpam libbsm libsecdb
passwdutil: libsldap
pkcs11: libcryptoutil libgen libuuid
policykit: dbusdeps
print: libldap5 libmd5 libsendfile
pylibbe: libbe libzfs
pysolaris: libsec libidmap
pyzfs: libzfs
raidcfg_plugins: libraidcfg librcm libcfgadm libpicl libpicltree
rpcsec_gss: libgss
sasl_plugins: pkcs11 libgss libsasl
scsi: libfru libumem libdevid libdevinfo
smbclnt: libfakekernel pkcs11
smbsrv: libxnet libpthread librt libshare libidmap pkcs11 libsqlite \
libcryptoutil libreparse libcmdutils libresolv2 libsmbfs \
libuuid libfakekernel libads libgss libldap5 krb5 libmlrpc
storage: libdevice libdevinfo libdevid
sun_fc: libdevinfo libsysevent
sun_sas: libdevinfo libsysevent libkstat libdevid
udapl: libdevinfo libdladm
varpd: libavl libidspace libumem libnsl libnvpair libmd5 librename \
libbunyan libcustr
#
# The reason this rule checks for the existence of the
# Makefile is that some of the directories do not exist
# in certain situations (e.g., exportable source builds,
# OpenSolaris).
#
$(SUBDIRS): FRC
cd $@; pwd; $(MAKE) $(TARGET)
$(SUBDIRS:%=%-nodepend):
cd $(@:%-nodepend=%); pwd; $(MAKE) $(TARGET)
FRC:
|