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 (c) 2012, Joyent, Inc. All rights reserved.
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 2018 Nexenta Systems, Inc.
31 # Copyright (c) 2016, Chris Fraire <cfraire@me.com>.
32 # Copyright 2017 RackTop Systems.
35 include ..
/Makefile.master
37 # Note that libcurses installs commands along with its library.
38 # This is a minor bug which probably should be fixed.
39 # Note also that a few extra libraries are kept in cmd source.
41 # Certain libraries are linked with, hence depend on, other libraries.
42 # Library dependencies are called out explicitly, see "Library
43 # interdependencies" below.
46 # Build libc and its dependencies
54 # Build libraries with lots of dependents
64 # Build everything else. Aside from explicit dependencies, all libraries
65 # are built in parallel.
67 ..
/cmd
/sendmail
/libmilter \
69 ..
/cmd
/sgs
/librtld_db \
80 gss_mechs
/mech_dummy \
82 gss_mechs
/mech_spnego \
292 # Create a special version of $(SUBDIRS) with no .WAIT's, for use with the
293 # clean and clobber targets (for more information, see those targets, below).
295 NOWAIT_SUBDIRS
= $(SUBDIRS
:.WAIT
=)
305 gss_mechs
/mech_krb5 \
357 $($(MACH
)_MSGSUBDIRS
)
363 i386_MSGSUBDIRS
= libfdisk
366 ..
/cmd
/sendmail
/libmilter \
496 $($(MACH
)_HDRSUBDIRS
)
510 check := TARGET
= check
511 clean := TARGET
= clean
512 clobber := TARGET
= clobber
513 install := TARGET
= install
514 install_h
:= TARGET
= install_h
522 # For the all and install targets, we clearly must respect library
523 # dependencies so that the libraries link correctly. However, for
524 # the remaining targets (check, clean, clobber, install_h, lint, _dc
525 # and _msg), libraries do not have any dependencies on one another
526 # and thus respecting dependencies just slows down the build.
527 # As such, for these rules, we use pattern replacement to explicitly
528 # avoid triggering the dependency information. Note that for clean,
529 # clobber and lint, we must use $(NOWAIT_SUBDIRS) rather than
530 # $(SUBDIRS), to prevent `.WAIT' from expanding to `.WAIT-nodepend'.
535 install: $(SUBDIRS
) .WAIT install_extra
537 # extra libraries kept in other source areas
539 @cd ..
/cmd
/sgs
; pwd
; $(MAKE
) install_lib
542 clean clobber lint
: $(NOWAIT_SUBDIRS
:%=%-nodepend
)
544 install_h
check: $(HDRSUBDIRS
:%=%-nodepend
)
546 _msg
: $(MSGSUBDIRS
:%=%-nodepend
) .WAIT _dc
548 _dc
: $(DCSUBDIRS
:%=%-nodepend
)
550 # Library interdependencies are called out explicitly here.
551 ..
/cmd
/sgs
/libconv
: crt
552 ..
/cmd
/sgs
/libdl
: crt
553 libc
: ..
/cmd
/sgs
/libconv ..
/cmd
/sgs
/libdl
558 libnsl
: libc libmd libmp
559 libnvpair
: libc libnsl
560 libsocket
: libc libnsl
562 basedeps
: libc libm libmd libmp libnsl libnvpair libsocket
563 basedeps
:= TARGET
=install
565 # The following dependencies are currently required by libdbus-1 and should
566 # be used for anything linking against it.
567 dbusdeps
: libsecdb libtsol libinetutil libscf libuutil libgen libsmbios
569 # The following dependencies don't need to be listed below as they are built
570 # before everything else:
571 # libc libm libmd libmp libnsl libnvpair libsocket
572 abi
: libctf libmapmalloc libproc
573 auditd_plugins
: libbsm libsecdb libgss libmtmalloc
574 brand
: libzonecfg libmapmalloc
575 cfgadm_plugins
: libdevice libdevinfo libhotplug librcm hbaapi libkstat libscf
576 fm
: libexacct libipmi libzfs scsi libdevinfo libdevid libcfgadm \
577 libcontract libsysevent ..
/cmd
/sgs
/libelf libdladm libsff \
579 $(SPARC_BLD
)fm
: libpri
580 gss_mechs
/mech_dh
: libgss
581 gss_mechs
/mech_dummy
: libgss
582 gss_mechs
/mech_krb5
: libgss libresolv2 pkcs11 libkstat
583 gss_mechs
/mech_spnego
: gss_mechs
/mech_krb5
585 krb5
: gss_mechs
/mech_krb5 libtecla libldap5
587 libadutils
: libldap5 libresolv2
588 libbe
: libzfs libinstzones libuuid libgen libdevinfo libefi libficl
589 libbsm
: libinetutil libscf libsecdb libtsol
590 libcfgadm
: libdevinfo
591 libcmd
: libsum libast
596 libdevinfo
: libsec libgen
597 libdhcpagent
: libdhcputil libuuid libdlpi libcontract
598 libdhcputil
: libgen libinetutil libdlpi
599 libdiskmgt
: libdevid libdevinfo libadm libefi libkstat libsysevent
600 $(INTEL_BLD
)libdiskmgt
: libfdisk
601 libdladm
: libdevinfo libinetutil libscf librcm libexacct libkstat \
604 libdlpi
: libinetutil libdladm
606 libdscfg
: libnsctl libunistat libadm
607 libdtrace
: libproc libgen libctf libmapmalloc
608 libdtrace_jni
: libuutil libdtrace
609 libefi
: libuuid libsmbios
610 libelfsign
: libcryptoutil libkmf ..
/cmd
/sgs
/libelf
612 libexacct
/demo
: libexacct libproject
613 libfakekernel
: libumem libcryptoutil
615 libficl
: libuuid libumem
618 libgrubmgmt
: libdevinfo libzfs libfstyp libefi
619 $(INTEL_BLD
)libgrubmgmt
: libfdisk
620 libidmap
: libavl libuutil
622 libinstzones
: libzonecfg libcontract
623 libipadm
: libinetutil libdlpi libdhcpagent libdladm libsecdb libdhcputil
625 libipsecutil
: libtecla libtsol
626 libiscsit
: libstmf libuuid
627 libkmf
: libcryptoutil pkcs11
628 libkvm
: ..
/cmd
/sgs
/libelf
630 libmapid
: libresolv2 libscf
631 libmlrpc
: libsmbfs libuuid
634 libnwam
: libscf libbsm libdladm libipadm
635 libpcp
: libumem libdevinfo
637 libpkg
: libscf libadm
638 libpool
: libscf libexacct
640 libproc
: ..
/cmd
/sgs
/librtld_db ..
/cmd
/sgs
/libelf libctf
641 $(INTEL_BLD
)libproc
: libsaveargs
642 libproject
: libpool libproc libsecdb
644 libprtdiag_psr
: libprtdiag
645 libraidcfg
: libdevinfo
646 librdc
: libnsctl libunistat libdscfg
647 librestart
: libuutil libscf libpool libproject libsecdb libsysevent
648 libsasl
: libgss pkcs11
649 libsaveargs
: libdisasm
650 libscf
: libuutil libgen libsmbios
651 libsec
: libavl libidmap
653 libshare
: libscf libzfs libuuid libfsmgt libsecdb libumem libsmbfs
654 libshell
: libast libcmd libdll libsecdb
656 libsldap
: libldap5 libscf
657 libsmbfs
: libkrb5 libsec libidmap pkcs11
658 libsmbios
: libdevinfo
661 libstmfproxy
: libstmf libpthread
663 libsun_ima
: libdevinfo libsysevent
664 libsysevent
: libsecdb
666 libtermcap
: libcurses
667 libtnfctl
: ..
/cmd
/sgs
/libelf
669 libtsnet
: libtsol libsecdb
672 libv12n
: libds libuuid
674 libvrrpadm
: libdladm libscf
675 libvscan
: libscf libsecdb
676 libzfs
: libdevid libgen libuutil libadm libavl libefi libidmap \
677 libumem libtsol libzfs_core
678 libzfs_jni
: libdiskmgt libzfs
679 libzonecfg
: libuuid libsysevent libsec libbrand libpool libscf libproc \
680 libuutil libbsm libsecdb
681 libzonestat
: libcmdutils libumem
682 libzpool
: libavl libumem libcmdutils libsysevent libfakekernel
684 mpapi
: libpthread libdevinfo libsysevent
686 nsswitch
: libadutils libidmap libdns_sd libscf libldap5 libsldap
687 pam_modules
: libproject passwdutil smbsrv libtsnet libpam libbsm libsecdb
689 pkcs11
: libcryptoutil libgen libuuid
691 print: libldap5 libmd5 libsendfile
692 pylibbe
: libbe libzfs
693 pysolaris
: libsec libidmap
695 raidcfg_plugins
: libraidcfg librcm libcfgadm libpicl libpicltree
697 sasl_plugins
: pkcs11 libgss libsasl
698 scsi
: libfru libumem libdevid libdevinfo
699 smbsrv
: libxnet libpthread librt libshare libidmap pkcs11 libsqlite \
700 libcryptoutil libreparse libcmdutils libresolv2 libsmbfs \
701 libuuid libfakekernel libads libgss libldap5 krb5 libmlrpc
702 storage
: libdevice libdevinfo libdevid
703 sun_fc
: libdevinfo libsysevent
704 sun_sas
: libdevinfo libsysevent libkstat libdevid
705 udapl
: libdevinfo libdladm
708 # The reason this rule checks for the existence of the
709 # Makefile is that some of the directories do not exist
710 # in certain situations (e.g., exportable source builds,
714 @if
[ -f
$@
/Makefile
]; then \
715 cd
$@
; pwd
; $(MAKE
) $(TARGET
); \
720 $(SUBDIRS
:%=%-nodepend
):
721 @if
[ -f
$(@
:%-nodepend
=%)/Makefile
]; then \
722 cd
$(@
:%-nodepend
=%); pwd
; $(MAKE
) $(TARGET
); \