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 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
63 # Build everything else. Aside from explicit dependencies, all libraries
64 # are built in parallel.
66 ..
/cmd
/sendmail
/libmilter \
68 ..
/cmd
/sgs
/librtld_db \
79 gss_mechs
/mech_dummy \
81 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 \
359 $($(MACH
)_MSGSUBDIRS
)
365 i386_MSGSUBDIRS
= libfdisk
368 ..
/cmd
/sendmail
/libmilter \
499 $($(MACH
)_HDRSUBDIRS
)
513 check := TARGET
= check
514 clean := TARGET
= clean
515 clobber := TARGET
= clobber
516 install := TARGET
= install
517 install_h
:= TARGET
= install_h
525 # For the all and install targets, we clearly must respect library
526 # dependencies so that the libraries link correctly. However, for
527 # the remaining targets (check, clean, clobber, install_h, lint, _dc
528 # and _msg), libraries do not have any dependencies on one another
529 # and thus respecting dependencies just slows down the build.
530 # As such, for these rules, we use pattern replacement to explicitly
531 # avoid triggering the dependency information. Note that for clean,
532 # clobber and lint, we must use $(NOWAIT_SUBDIRS) rather than
533 # $(SUBDIRS), to prevent `.WAIT' from expanding to `.WAIT-nodepend'.
538 install: $(SUBDIRS
) .WAIT install_extra
540 # extra libraries kept in other source areas
542 @cd ..
/cmd
/sgs
; pwd
; $(MAKE
) install_lib
545 clean clobber lint
: $(NOWAIT_SUBDIRS
:%=%-nodepend
)
547 install_h
check: $(HDRSUBDIRS
:%=%-nodepend
)
549 _msg
: $(MSGSUBDIRS
:%=%-nodepend
) .WAIT _dc
551 _dc
: $(DCSUBDIRS
:%=%-nodepend
)
553 # Library interdependencies are called out explicitly here.
554 ..
/cmd
/sgs
/libconv
: crt
555 ..
/cmd
/sgs
/libdl
: crt
556 libc
: ..
/cmd
/sgs
/libconv ..
/cmd
/sgs
/libdl
561 libnsl
: libc libmd libmp
562 libnvpair
: libc libnsl
563 libsocket
: libc libnsl
565 basedeps
: libc libm libmd libmp libnsl libnvpair libsocket
566 basedeps
:= TARGET
=install
568 # The following dependencies are currently required by libdbus-1 and should
569 # be used for anything linking against it.
570 dbusdeps
: libsecdb libtsol libinetutil libscf libuutil libgen libsmbios
572 # The following dependencies don't need to be listed below as they are built
573 # before everything else:
574 # libc libm libmd libmp libnsl libnvpair libsocket
575 abi
: libctf libmapmalloc libproc
576 auditd_plugins
: libbsm libsecdb libgss libmtmalloc
577 brand
: libzonecfg libmapmalloc
578 cfgadm_plugins
: libdevice libdevinfo libhotplug librcm hbaapi libkstat libscf
579 fm
: libexacct libipmi libzfs scsi libdevinfo libdevid libcfgadm \
580 libcontract libsysevent ..
/cmd
/sgs
/libelf libdladm
581 $(SPARC_BLD
)fm
: libpri
582 gss_mechs
/mech_dh
: libgss
583 gss_mechs
/mech_dummy
: libgss
584 gss_mechs
/mech_krb5
: libgss libresolv2 pkcs11 libkstat
585 gss_mechs
/mech_spnego
: gss_mechs
/mech_krb5
587 krb5
: gss_mechs
/mech_krb5 libtecla libldap5
589 libadutils
: libldap5 libresolv2
590 libbe
: libzfs libinstzones libuuid libgen libdevinfo libefi libficl
591 libbsm
: libinetutil libscf libsecdb libtsol
592 libcfgadm
: libdevinfo
593 libcmd
: libsum libast
598 libdevinfo
: libsec libgen
599 libdhcpagent
: libdhcputil libuuid libdlpi libcontract
600 libdhcputil
: libgen libinetutil libdlpi
601 libdiskmgt
: libdevid libdevinfo libadm libefi libkstat libsysevent
602 $(INTEL_BLD
)libdiskmgt
: libfdisk
603 libdladm
: libdevinfo libinetutil libscf librcm libexacct libkstat \
606 libdlpi
: libinetutil libdladm
608 libdscfg
: libnsctl libunistat libadm
609 libdtrace
: libproc libgen libctf libmapmalloc
610 libdtrace_jni
: libuutil libdtrace
612 libelfsign
: libcryptoutil libkmf ..
/cmd
/sgs
/libelf
614 libexacct
/demo
: libexacct libproject
615 libfakekernel
: libumem libcryptoutil
617 libficl
: libuuid libumem
620 libgrubmgmt
: libdevinfo libzfs libfstyp libefi
621 $(INTEL_BLD
)libgrubmgmt
: libfdisk
622 libidmap
: libavl libuutil
624 libinstzones
: libzonecfg libcontract
625 libipadm
: libinetutil libdlpi libdhcpagent libdladm libsecdb libdhcputil
627 libipsecutil
: libtecla libtsol
628 libiscsit
: libstmf libuuid
629 libkmf
: libcryptoutil pkcs11
630 libkvm
: ..
/cmd
/sgs
/libelf
632 libmapid
: libresolv2 libscf
635 libnwam
: libscf libbsm libdladm libipadm
636 libpcp
: libumem libdevinfo
638 libpkg
: libwanboot libscf libadm
639 libpool
: libscf libexacct
641 libproc
: ..
/cmd
/sgs
/librtld_db ..
/cmd
/sgs
/libelf libctf
642 $(INTEL_BLD
)libproc
: libsaveargs
643 libproject
: libpool libproc libsecdb
645 libprtdiag_psr
: libprtdiag
646 libraidcfg
: libdevinfo
647 librdc
: libnsctl libunistat libdscfg
648 librestart
: libuutil libscf libpool libproject libsecdb libsysevent
649 libsasl
: libgss pkcs11
650 libsaveargs
: libdisasm
651 libscf
: libuutil libgen libsmbios
652 libsec
: libavl libidmap
654 libshare
: libscf libzfs libuuid libfsmgt libsecdb libumem libsmbfs
655 libshell
: libast libcmd libdll libsecdb
657 libsldap
: libldap5 libscf
658 libsmbfs
: libkrb5 libsec libidmap pkcs11
659 libsmbios
: libdevinfo
662 libstmfproxy
: libstmf libpthread
664 libsun_ima
: libdevinfo libsysevent
665 libsysevent
: libsecdb
667 libtermcap
: libcurses
668 libtnfctl
: ..
/cmd
/sgs
/libelf
670 libtsnet
: libtsol libsecdb
673 libv12n
: libds libuuid
675 libvrrpadm
: libdladm libscf
676 libvscan
: libscf libsecdb
677 libwanboot
: libresolv2 libdevinfo libinetutil libdhcputil
678 libzfs
: libdevid libgen libuutil libadm libavl libefi libidmap \
679 libumem libtsol libzfs_core
680 libzfs_jni
: libdiskmgt libzfs
681 libzonecfg
: libuuid libsysevent libsec libbrand libpool libscf libproc \
682 libuutil libbsm libsecdb
683 libzonestat
: libcmdutils libumem
684 libzpool
: libavl libumem libcmdutils libsysevent
686 mpapi
: libpthread libdevinfo libsysevent
688 nsswitch
: libadutils libidmap libdns_sd libscf libldap5 libsldap
689 pam_modules
: libproject passwdutil smbsrv libtsnet libpam libbsm libsecdb
691 pkcs11
: libcryptoutil libgen libuuid
693 print: libldap5 libmd5 libsendfile
694 pylibbe
: libbe libzfs
695 pysolaris
: libsec libidmap
697 raidcfg_plugins
: libraidcfg librcm libcfgadm libpicl libpicltree
699 sasl_plugins
: pkcs11 libgss libsasl
700 scsi
: libfru libumem libdevid libdevinfo
701 smbsrv
: libxnet libpthread librt libshare libidmap pkcs11 libsqlite \
702 libcryptoutil libreparse libcmdutils libresolv2 libsmbfs \
703 libuuid libfakekernel libads libgss libldap5 krb5
704 storage
: libdevice libdevinfo libdevid
705 sun_fc
: libdevinfo libsysevent
706 sun_sas
: libdevinfo libsysevent libkstat libdevid
707 udapl
: libdevinfo libdladm
710 # The reason this rule checks for the existence of the
711 # Makefile is that some of the directories do not exist
712 # in certain situations (e.g., exportable source builds,
716 @if
[ -f
$@
/Makefile
]; then \
717 cd
$@
; pwd
; $(MAKE
) $(TARGET
); \
722 $(SUBDIRS
:%=%-nodepend
):
723 @if
[ -f
$(@
:%-nodepend
=%)/Makefile
]; then \
724 cd
$(@
:%-nodepend
=%); pwd
; $(MAKE
) $(TARGET
); \