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.
32 include ..
/Makefile.master
34 # Note that libcurses installs commands along with its library.
35 # This is a minor bug which probably should be fixed.
36 # Note also that a few extra libraries are kept in cmd source.
38 # Certain libraries are linked with, hence depend on, other libraries.
39 # Library dependencies are called out explicitly, see "Library
40 # interdependencies" below.
43 # Build libc and its dependencies
51 # Build libraries with lots of dependents
61 # Build everything else. Aside from explicit dependencies, all libraries
62 # are built in parallel.
64 ..
/cmd
/sendmail
/libmilter \
66 ..
/cmd
/sgs
/librtld_db \
77 gss_mechs
/mech_dummy \
79 gss_mechs
/mech_spnego \
288 # Create a special version of $(SUBDIRS) with no .WAIT's, for use with the
289 # clean and clobber targets (for more information, see those targets, below).
291 NOWAIT_SUBDIRS
= $(SUBDIRS
:.WAIT
=)
302 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
: common
552 ..
/cmd
/sgs
/libdl
: common
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 don't need to be listed below as they are built
566 # before everything else:
567 # libc libm libmd libmp libnsl libnvpair libsocket
568 abi
: libctf libmapmalloc libproc
569 auditd_plugins
: libbsm libsecdb libgss libmtmalloc
570 brand
: libzonecfg libmapmalloc
571 cfgadm_plugins
: libdevice libdevinfo libhotplug librcm hbaapi libkstat libscf
572 fm
: libexacct libipmi libzfs scsi libdevinfo libdevid libcfgadm \
573 libcontract libsysevent ..
/cmd
/sgs
/libelf
574 $(SPARC_BLD
)fm
: libpri
575 gss_mechs
/mech_dh
: libgss
576 gss_mechs
/mech_dummy
: libgss
577 gss_mechs
/mech_krb5
: libgss libresolv2 pkcs11 libkstat
578 gss_mechs
/mech_spnego
: gss_mechs
/mech_krb5
579 krb5
: gss_mechs
/mech_krb5 libtecla libldap5
581 libadutils
: libldap5 libresolv2
582 libbe
: libzfs libinstzones libuuid libgen libdevinfo libefi
583 libbsm
: libinetutil libscf libsecdb libtsol
584 libcfgadm
: libdevinfo
585 libcmd
: libsum libast
590 libdevinfo
: libsec libgen
591 libdhcpagent
: libdhcputil libuuid libdlpi libcontract
592 libdhcputil
: libgen libinetutil libdlpi
593 libdiskmgt
: libdevid libdevinfo libadm libefi libkstat libsysevent
594 $(INTEL_BLD
)libdiskmgt
: libfdisk
595 libdladm
: libdevinfo libinetutil libscf librcm libexacct libkstat \
598 libdlpi
: libinetutil libdladm
600 libdscfg
: libnsctl libunistat libadm
601 libdtrace
: libproc libgen libctf libmapmalloc
602 libdtrace_jni
: libuutil libdtrace
604 libelfsign
: libcryptoutil libkmf ..
/cmd
/sgs
/libelf
606 libexacct
/demo
: libexacct libproject
607 libfakekernel
: libumem libcryptoutil
611 libgrubmgmt
: libdevinfo libzfs libfstyp libefi
612 $(INTEL_BLD
)libgrubmgmt
: libfdisk
613 libidmap
: libavl libuutil
615 libinstzones
: libzonecfg libcontract
616 libipadm
: libinetutil libdlpi libdhcpagent libdladm libsecdb
618 libipsecutil
: libtecla libtsol
619 libiscsit
: libstmf libuuid
620 libkmf
: libcryptoutil pkcs11
621 libkvm
: ..
/cmd
/sgs
/libelf
623 libmapid
: libresolv2 libscf
626 libnwam
: libscf libbsm libdladm
627 libpcp
: libumem libdevinfo
629 libpkg
: libwanboot libscf libadm
630 libpool
: libscf libexacct
632 libproc
: ..
/cmd
/sgs
/librtld_db ..
/cmd
/sgs
/libelf libctf
633 $(INTEL_BLD
)libproc
: libsaveargs
634 libproject
: libpool libproc libsecdb
636 libprtdiag_psr
: libprtdiag
637 libraidcfg
: libdevinfo
638 librdc
: libnsctl libunistat libdscfg
639 librestart
: libuutil libscf libpool libproject libsecdb libsysevent
640 libsasl
: libgss pkcs11
641 libsaveargs
: libdisasm
642 libscf
: libuutil libgen libsmbios
643 libsec
: libavl libidmap
644 libshare
: libscf libzfs libuuid libfsmgt libsecdb libumem libsmbfs
645 libshell
: libast libcmd libdll libsecdb
647 libsldap
: libldap5 libscf
648 libsmbfs
: libkrb5 libsec libidmap pkcs11
651 libstmfproxy
: libstmf libpthread
653 libsun_ima
: libdevinfo libsysevent
654 libsysevent
: libsecdb
656 libtermcap
: libcurses
657 libtnfctl
: ..
/cmd
/sgs
/libelf
659 libtsnet
: libtsol libsecdb
662 libv12n
: libds libuuid
664 libvrrpadm
: libdladm libscf
665 libvscan
: libscf libsecdb
666 libwanboot
: libresolv2 libdevinfo libinetutil libdhcputil
667 libzfs
: libdevid libgen libuutil libadm libavl libefi libidmap \
668 libumem libtsol libzfs_core
669 libzfs_jni
: libdiskmgt libzfs
670 libzonecfg
: libuuid libsysevent libsec libbrand libpool libscf libproc \
671 libuutil libbsm libsecdb
672 libzonestat
: libcmdutils libumem
673 libzpool
: libavl libumem libcmdutils libsysevent
674 lvm
: libadm libdevid libdevinfo libefi libgen libscf
676 mpapi
: libpthread libdevinfo libsysevent
678 nsswitch
: libadutils libidmap libdns_sd libscf libldap5 libsldap
679 pam_modules
: libproject passwdutil smbsrv libtsnet libpam libbsm libsecdb
681 pkcs11
: libcryptoutil libgen libuuid
683 print: libldap5 libmd5 libsendfile
684 pylibbe
: libbe libzfs
685 pysolaris
: libsec libidmap
687 raidcfg_plugins
: libraidcfg librcm libcfgadm libpicl libpicltree
689 sasl_plugins
: pkcs11 libgss libsasl
690 scsi
: libfru libumem libdevid libdevinfo
691 smbsrv
: libxnet libpthread librt libshare libidmap pkcs11 libsqlite \
692 libcryptoutil libreparse libcmdutils libresolv2 libsmbfs \
693 libuuid libfakekernel libads libgss libldap5 krb5
694 storage
: libdevice libdevinfo libdevid
695 sun_fc
: libdevinfo libsysevent
696 sun_sas
: libdevinfo libsysevent libkstat libdevid
697 udapl
: libdevinfo libdladm
700 # The reason this rule checks for the existence of the
701 # Makefile is that some of the directories do not exist
702 # in certain situations (e.g., exportable source builds,
706 @if
[ -f
$@
/Makefile
]; then \
707 cd
$@
; pwd
; $(MAKE
) $(TARGET
); \
712 $(SUBDIRS
:%=%-nodepend
):
713 @if
[ -f
$(@
:%-nodepend
=%)/Makefile
]; then \
714 cd
$(@
:%-nodepend
=%); pwd
; $(MAKE
) $(TARGET
); \