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 2015 Nexenta Systems, Inc. All rights reserved.
30 # Copyright 2016 Toomas Soome <tsoome@me.com>
33 include ..
/Makefile.master
35 # Note that libcurses installs commands along with its library.
36 # This is a minor bug which probably should be fixed.
37 # Note also that a few extra libraries are kept in cmd source.
39 # Certain libraries are linked with, hence depend on, other libraries.
40 # Library dependencies are called out explicitly, see "Library
41 # interdependencies" below.
44 # Build libc and its dependencies
52 # Build libraries with lots of dependents
62 # Build everything else. Aside from explicit dependencies, all libraries
63 # are built in parallel.
65 ..
/cmd
/sendmail
/libmilter \
67 ..
/cmd
/sgs
/librtld_db \
78 gss_mechs
/mech_dummy \
80 gss_mechs
/mech_spnego \
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).
293 NOWAIT_SUBDIRS
= $(SUBDIRS
:.WAIT
=)
304 gss_mechs
/mech_krb5 \
359 $($(MACH
)_MSGSUBDIRS
)
365 i386_MSGSUBDIRS
= libfdisk
368 ..
/cmd
/sendmail
/libmilter \
498 $($(MACH
)_HDRSUBDIRS
)
512 check := TARGET
= check
513 clean := TARGET
= clean
514 clobber := TARGET
= clobber
515 install := TARGET
= install
516 install_h
:= TARGET
= install_h
523 # For the all and install targets, we clearly must respect library
524 # dependencies so that the libraries link correctly. However, for
525 # the remaining targets (check, clean, clobber, install_h, _dc, and
526 # _msg), libraries do not have any dependencies on one another and
527 # thus respecting dependencies just slows down the build. As such,
528 # for these rules, we use pattern replacement to explicitly avoid
529 # triggering the dependency information. Note that for clean and
530 # clobber, we must use $(NOWAIT_SUBDIRS) rather than $(SUBDIRS),
531 # to prevent `.WAIT' from expanding to `.WAIT-nodepend'.
536 install: $(SUBDIRS
) .WAIT install_extra
538 # extra libraries kept in other source areas
540 @cd ..
/cmd
/sgs
; pwd
; $(MAKE
) install_lib
543 clean clobber: $(NOWAIT_SUBDIRS
:%=%-nodepend
)
545 install_h
check: $(HDRSUBDIRS
:%=%-nodepend
)
547 _msg
: $(MSGSUBDIRS
:%=%-nodepend
) .WAIT _dc
549 _dc
: $(DCSUBDIRS
:%=%-nodepend
)
551 # Library interdependencies are called out explicitly here.
552 ..
/cmd
/sgs
/libconv
: common
553 ..
/cmd
/sgs
/libdl
: common
554 libc
: ..
/cmd
/sgs
/libconv ..
/cmd
/sgs
/libdl
559 libnsl
: libc libmd libmp
560 libnvpair
: libc libnsl
561 libsocket
: libc libnsl
563 basedeps
: libc libm libmd libmp libnsl libnvpair libsocket
564 basedeps
:= TARGET
=install
566 # The following dependencies don't need to be listed below as they are built
567 # before everything else:
568 # libc libm libmd libmp libnsl libnvpair libsocket
569 abi
: libctf libmapmalloc libproc
570 auditd_plugins
: libbsm libsecdb libgss libmtmalloc
571 brand
: libzonecfg libmapmalloc
572 cfgadm_plugins
: libdevice libdevinfo libhotplug librcm hbaapi libkstat libscf
573 fm
: libexacct libipmi libzfs scsi libdevinfo libdevid libcfgadm \
574 libcontract libsysevent ..
/cmd
/sgs
/libelf
575 $(SPARC_BLD
)fm
: libpri
576 gss_mechs
/mech_dh
: libgss
577 gss_mechs
/mech_dummy
: libgss
578 gss_mechs
/mech_krb5
: libgss libresolv2 pkcs11 libkstat
579 gss_mechs
/mech_spnego
: gss_mechs
/mech_krb5
580 krb5
: gss_mechs
/mech_krb5 libtecla libldap5
582 libadutils
: libldap5 libresolv2
583 libbe
: libzfs libinstzones libuuid libgen libdevinfo libefi libficl
584 libbsm
: libinetutil libscf libsecdb libtsol
585 libcfgadm
: libdevinfo
586 libcmd
: libsum libast
591 libdevinfo
: libsec libgen
592 libdhcpagent
: libdhcputil libuuid libdlpi libcontract
593 libdhcputil
: libgen libinetutil libdlpi
594 libdiskmgt
: libdevid libdevinfo libadm libefi libkstat libsysevent
595 $(INTEL_BLD
)libdiskmgt
: libfdisk
596 libdladm
: libdevinfo libinetutil libscf librcm libexacct libkstat \
599 libdlpi
: libinetutil libdladm
601 libdscfg
: libnsctl libunistat libadm
602 libdtrace
: libproc libgen libctf libmapmalloc
603 libdtrace_jni
: libuutil libdtrace
605 libelfsign
: libcryptoutil libkmf ..
/cmd
/sgs
/libelf
607 libexacct
/demo
: libexacct libproject
608 libfakekernel
: libumem libcryptoutil
613 libgrubmgmt
: libdevinfo libzfs libfstyp libefi
614 $(INTEL_BLD
)libgrubmgmt
: libfdisk
615 libidmap
: libavl libuutil
617 libinstzones
: libzonecfg libcontract
618 libipadm
: libinetutil libdlpi libdhcpagent libdladm libsecdb
620 libipsecutil
: libtecla libtsol
621 libiscsit
: libstmf libuuid
622 libkmf
: libcryptoutil pkcs11
623 libkvm
: ..
/cmd
/sgs
/libelf
625 libmapid
: libresolv2 libscf
628 libnwam
: libscf libbsm libdladm
629 libpcp
: libumem libdevinfo
631 libpkg
: libwanboot libscf libadm
632 libpool
: libscf libexacct
634 libproc
: ..
/cmd
/sgs
/librtld_db ..
/cmd
/sgs
/libelf libctf
635 $(INTEL_BLD
)libproc
: libsaveargs
636 libproject
: libpool libproc libsecdb
638 libprtdiag_psr
: libprtdiag
639 libraidcfg
: libdevinfo
640 librdc
: libnsctl libunistat libdscfg
641 librestart
: libuutil libscf libpool libproject libsecdb libsysevent
642 libsasl
: libgss pkcs11
643 libsaveargs
: libdisasm
644 libscf
: libuutil libgen libsmbios
645 libsec
: libavl libidmap
646 libshare
: libscf libzfs libuuid libfsmgt libsecdb libumem libsmbfs
647 libshell
: libast libcmd libdll libsecdb
649 libsldap
: libldap5 libscf
650 libsmbfs
: libkrb5 libsec libidmap pkcs11
653 libstmfproxy
: libstmf libpthread
655 libsun_ima
: libdevinfo libsysevent
656 libsysevent
: libsecdb
658 libtermcap
: libcurses
659 libtnfctl
: ..
/cmd
/sgs
/libelf
661 libtsnet
: libtsol libsecdb
664 libv12n
: libds libuuid
666 libvrrpadm
: libdladm libscf
667 libvscan
: libscf libsecdb
668 libwanboot
: libresolv2 libdevinfo libinetutil libdhcputil
669 libzfs
: libdevid libgen libuutil libadm libavl libefi libidmap \
670 libumem libtsol libzfs_core
671 libzfs_jni
: libdiskmgt libzfs
672 libzonecfg
: libuuid libsysevent libsec libbrand libpool libscf libproc \
673 libuutil libbsm libsecdb
674 libzonestat
: libcmdutils libumem
675 libzpool
: libavl libumem libcmdutils libsysevent
676 lvm
: libadm libdevid libdevinfo libefi libgen libscf
678 mpapi
: libpthread libdevinfo libsysevent
680 nsswitch
: libadutils libidmap libdns_sd libscf libldap5 libsldap
681 pam_modules
: libproject passwdutil smbsrv libtsnet libpam libbsm libsecdb
683 pkcs11
: libcryptoutil libgen libuuid
685 print: libldap5 libmd5 libsendfile
686 pylibbe
: libbe libzfs
687 pysolaris
: libsec libidmap
689 raidcfg_plugins
: libraidcfg librcm libcfgadm libpicl libpicltree
691 sasl_plugins
: pkcs11 libgss libsasl
692 scsi
: libfru libumem libdevid libdevinfo
693 smbsrv
: libxnet libpthread librt libshare libidmap pkcs11 libsqlite \
694 libcryptoutil libreparse libcmdutils libresolv2 libsmbfs \
695 libuuid libfakekernel libads libgss libldap5 krb5
696 storage
: libdevice libdevinfo libdevid
697 sun_fc
: libdevinfo libsysevent
698 sun_sas
: libdevinfo libsysevent libkstat libdevid
699 udapl
: libdevinfo libdladm
702 # The reason this rule checks for the existence of the
703 # Makefile is that some of the directories do not exist
704 # in certain situations (e.g., exportable source builds,
708 @if
[ -f
$@
/Makefile
]; then \
709 cd
$@
; pwd
; $(MAKE
) $(TARGET
); \
714 $(SUBDIRS
:%=%-nodepend
):
715 @if
[ -f
$(@
:%-nodepend
=%)/Makefile
]; then \
716 cd
$(@
:%-nodepend
=%); pwd
; $(MAKE
) $(TARGET
); \