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.
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.
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]
23 # Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
24 # Copyright (c) 2012 by Delphix. All rights reserved.
25 # Copyright 2015, Joyent, Inc.
26 # Copyright (c) 2013 Gary Mills
27 # Copyright 2014 Garrett D'Amore <garrett@damore.org>
28 # Copyright (c) 2015 Gary Mills
29 # Copyright 2016 Toomas Soome <tsoome@me.com>
30 # Copyright 2017 Nexenta Systems, Inc.
31 # Copyright (c) 2016, Chris Fraire <cfraire@me.com>.
34 include ..
/Makefile.master
36 # Note that libcurses installs commands along with its library.
37 # This is a minor bug which probably should be fixed.
38 # Note also that a few extra libraries are kept in cmd source.
40 # Certain libraries are linked with, hence depend on, other libraries.
41 # Library dependencies are called out explicitly, see "Library
42 # interdependencies" below.
45 # Build libc and its dependencies
53 # Build libraries with lots of dependents
62 # Build everything else. Aside from explicit dependencies, all libraries
63 # are built in parallel.
66 ..
/cmd
/sgs
/librtld_db \
76 gss_mechs
/mech_dummy \
78 gss_mechs
/mech_spnego \
263 # Create a special version of $(SUBDIRS) with no .WAIT's, for use with the
264 # clean and clobber targets (for more information, see those targets, below).
266 NOWAIT_SUBDIRS
= $(SUBDIRS
:.WAIT
=)
276 gss_mechs
/mech_krb5 \
320 $($(MACH
)_MSGSUBDIRS
)
326 i386_MSGSUBDIRS
= libfdisk
436 $($(MACH
)_HDRSUBDIRS
)
450 check := TARGET
= check
451 clean := TARGET
= clean
452 clobber := TARGET
= clobber
453 install := TARGET
= install
454 install_h
:= TARGET
= install_h
461 # For the all and install targets, we clearly must respect library
462 # dependencies so that the libraries link correctly. However, for
463 # the remaining targets (check, clean, clobber, install_h, _dc, and
464 # _msg), libraries do not have any dependencies on one another and
465 # thus respecting dependencies just slows down the build. As such,
466 # for these rules, we use pattern replacement to explicitly avoid
467 # triggering the dependency information. Note that for clean and
468 # clobber, we must use $(NOWAIT_SUBDIRS) rather than $(SUBDIRS),
469 # to prevent `.WAIT' from expanding to `.WAIT-nodepend'.
474 install: $(SUBDIRS
) .WAIT install_extra
476 # extra libraries kept in other source areas
478 @cd ..
/cmd
/sgs
; pwd
; $(MAKE
) install_lib
481 clean clobber: $(NOWAIT_SUBDIRS
:%=%-nodepend
)
483 install_h
check: $(HDRSUBDIRS
:%=%-nodepend
)
485 _msg
: $(MSGSUBDIRS
:%=%-nodepend
) .WAIT _dc
487 _dc
: $(DCSUBDIRS
:%=%-nodepend
)
489 # Library interdependencies are called out explicitly here.
490 ..
/cmd
/sgs
/libconv
: crt
491 ..
/cmd
/sgs
/libdl
: crt
492 libc
: ..
/cmd
/sgs
/libconv ..
/cmd
/sgs
/libdl
497 libnsl
: libc libmd libmp
498 libnvpair
: libc libnsl
500 basedeps
: libc libm libmd libmp libnsl libnvpair
501 basedeps
:= TARGET
=install
503 # The following dependencies are currently required by libdbus-1 and should
504 # be used for anything linking against it.
505 dbusdeps
: libsecdb libinetutil libscf libuutil libgen libsmbios
507 # The following dependencies don't need to be listed below as they are built
508 # before everything else:
509 # libc libm libmd libmp libnsl libnvpair
510 abi
: libctf libmapmalloc libproc
511 auditd_plugins
: libbsm libsecdb libgss libmtmalloc
512 brand
: libzonecfg libmapmalloc
513 cfgadm_plugins
: libdevice libdevinfo libhotplug librcm hbaapi libkstat libscf
514 fm
: libexacct libipmi libzfs scsi libdevinfo libdevid libcfgadm \
515 libcontract libsysevent ..
/cmd
/sgs
/libelf
517 $(SPARC_BLD
)fm
: libpri
518 gss_mechs
/mech_dh
: libgss
519 gss_mechs
/mech_dummy
: libgss
520 gss_mechs
/mech_krb5
: libgss libresolv2 pkcs11 libkstat
521 gss_mechs
/mech_spnego
: gss_mechs
/mech_krb5
523 krb5
: gss_mechs
/mech_krb5 libtecla libldap5
524 libadutils
: libldap5 libresolv2
525 libbe
: libzfs libzonecfg libuuid libgen libdevinfo libefi libficl
526 libbsm
: libinetutil libscf libsecdb
527 libcfgadm
: libdevinfo
528 libcmd
: libsum libast
534 libdevinfo
: libsec libgen
535 libdhcpagent
: libdhcputil libuuid libdlpi libcontract
536 libdhcputil
: libgen libinetutil libdlpi
537 libdiskmgt
: libdevid libdevinfo libadm libefi libkstat libsysevent
538 $(INTEL_BLD
)libdiskmgt
: libfdisk
539 libdladm
: libdevinfo libinetutil libscf librcm libexacct libkstat \
542 libdlpi
: libinetutil libdladm
544 libdtrace
: libproc libgen libctf libmapmalloc
546 libelfsign
: libcryptoutil libkmf ..
/cmd
/sgs
/libelf
547 libexacct
/demo
: libexacct libproject
549 libficl
: libuuid libumem
552 libidmap
: libavl libuutil
554 libipadm
: libinetutil libdlpi libdhcpagent libdladm libsecdb libdhcputil
556 libipsecutil
: libtecla
557 libiscsit
: libstmf libuuid
558 libkmf
: libcryptoutil pkcs11
559 libkvm
: ..
/cmd
/sgs
/libelf
561 libmapid
: libresolv2 libscf
564 libnwam
: libscf libbsm libdladm libipadm
565 libpcp
: libumem libdevinfo
567 libpool
: libscf libexacct
569 libproc
: ..
/cmd
/sgs
/librtld_db ..
/cmd
/sgs
/libelf libctf
570 $(INTEL_BLD
)libproc
: libsaveargs
571 libproject
: libpool libproc libsecdb
573 libprtdiag_psr
: libprtdiag
574 libraidcfg
: libdevinfo
575 librestart
: libuutil libscf libpool libproject libsecdb libsysevent
576 libsasl
: libgss pkcs11
577 libsaveargs
: libdisasm
578 libscf
: libuutil libgen libsmbios
579 libsec
: libavl libidmap
580 libshare
: libscf libzfs libuuid libfsmgt libsecdb libumem libsmbfs
581 libshell
: libast libcmd libdll libsecdb
583 libsldap
: libldap5 libscf
584 libsmbfs
: libkrb5 libsec libidmap pkcs11
585 libsmbios
: libdevinfo
589 libsun_ima
: libdevinfo libsysevent
590 libsysevent
: libsecdb
593 libv12n
: libds libuuid
595 libvrrpadm
: libdladm libscf
596 libvscan
: libscf libsecdb
597 libzfs
: libdevid libgen libuutil libadm libavl libefi libidmap \
599 libzonecfg
: libuuid libsysevent libsec libbrand libpool libscf libproc \
600 libuutil libbsm libsecdb
601 libzonestat
: libcmdutils libumem
602 libzpool
: libavl libumem libcmdutils libsysevent
604 mpapi
: libpthread libdevinfo libsysevent
606 nsswitch
: libadutils libidmap libdns_sd libscf libldap5 libsldap
607 pam_modules
: libproject passwdutil smbsrv libpam libbsm libsecdb
609 pkcs11
: libcryptoutil libgen libuuid
611 pylibbe
: libbe libzfs
612 pysolaris
: libsec libidmap
614 raidcfg_plugins
: libraidcfg librcm libcfgadm libpicl libpicltree
616 sasl_plugins
: pkcs11 libgss libsasl
617 scsi
: libfru libumem libdevid libdevinfo
618 smbsrv
: libpthread librt libshare libidmap pkcs11 libsqlite \
619 libcryptoutil libreparse libcmdutils libresolv2 libsmbfs \
620 libuuid libads libgss libldap5 krb5
621 storage
: libdevice libdevinfo libdevid
622 sun_fc
: libdevinfo libsysevent
623 sun_sas
: libdevinfo libsysevent libkstat libdevid
624 udapl
: libdevinfo libdladm
627 # The reason this rule checks for the existence of the
628 # Makefile is that some of the directories do not exist
629 # in certain situations (e.g., exportable source builds,
633 @if
[ -f
$@
/Makefile
]; then \
634 cd
$@
; pwd
; $(MAKE
) $(TARGET
); \
639 $(SUBDIRS
:%=%-nodepend
):
640 @if
[ -f
$(@
:%-nodepend
=%)/Makefile
]; then \
641 cd
$(@
:%-nodepend
=%); pwd
; $(MAKE
) $(TARGET
); \