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.
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.
66 ..
/cmd
/sgs
/librtld_db \
77 gss_mechs
/mech_dummy \
79 gss_mechs
/mech_spnego \
271 # Create a special version of $(SUBDIRS) with no .WAIT's, for use with the
272 # clean and clobber targets (for more information, see those targets, below).
274 NOWAIT_SUBDIRS
= $(SUBDIRS
:.WAIT
=)
284 gss_mechs
/mech_krb5 \
331 $($(MACH
)_MSGSUBDIRS
)
337 i386_MSGSUBDIRS
= libfdisk
452 $($(MACH
)_HDRSUBDIRS
)
466 check := TARGET
= check
467 clean := TARGET
= clean
468 clobber := TARGET
= clobber
469 install := TARGET
= install
470 install_h
:= TARGET
= install_h
477 # For the all and install targets, we clearly must respect library
478 # dependencies so that the libraries link correctly. However, for
479 # the remaining targets (check, clean, clobber, install_h, _dc, and
480 # _msg), libraries do not have any dependencies on one another and
481 # thus respecting dependencies just slows down the build. As such,
482 # for these rules, we use pattern replacement to explicitly avoid
483 # triggering the dependency information. Note that for clean and
484 # clobber, we must use $(NOWAIT_SUBDIRS) rather than $(SUBDIRS),
485 # to prevent `.WAIT' from expanding to `.WAIT-nodepend'.
490 install: $(SUBDIRS
) .WAIT install_extra
492 # extra libraries kept in other source areas
494 @cd ..
/cmd
/sgs
; pwd
; $(MAKE
) install_lib
497 clean clobber: $(NOWAIT_SUBDIRS
:%=%-nodepend
)
499 install_h
check: $(HDRSUBDIRS
:%=%-nodepend
)
501 _msg
: $(MSGSUBDIRS
:%=%-nodepend
) .WAIT _dc
503 _dc
: $(DCSUBDIRS
:%=%-nodepend
)
505 # Library interdependencies are called out explicitly here.
506 ..
/cmd
/sgs
/libconv
: crt
507 ..
/cmd
/sgs
/libdl
: crt
508 libc
: ..
/cmd
/sgs
/libconv ..
/cmd
/sgs
/libdl
513 libnsl
: libc libmd libmp
514 libnvpair
: libc libnsl
515 libsocket
: libc libnsl
517 basedeps
: libc libm libmd libmp libnsl libnvpair libsocket
518 basedeps
:= TARGET
=install
520 # The following dependencies are currently required by libdbus-1 and should
521 # be used for anything linking against it.
522 dbusdeps
: libsecdb libinetutil libscf libuutil libgen libsmbios
524 # The following dependencies don't need to be listed below as they are built
525 # before everything else:
526 # libc libm libmd libmp libnsl libnvpair libsocket
527 abi
: libctf libmapmalloc libproc
528 auditd_plugins
: libbsm libsecdb libgss libmtmalloc
529 brand
: libzonecfg libmapmalloc
530 cfgadm_plugins
: libdevice libdevinfo libhotplug librcm hbaapi libkstat libscf
531 fm
: libexacct libipmi libzfs scsi libdevinfo libdevid libcfgadm \
532 libcontract libsysevent ..
/cmd
/sgs
/libelf
534 $(SPARC_BLD
)fm
: libpri
535 gss_mechs
/mech_dh
: libgss
536 gss_mechs
/mech_dummy
: libgss
537 gss_mechs
/mech_krb5
: libgss libresolv2 pkcs11 libkstat
538 gss_mechs
/mech_spnego
: gss_mechs
/mech_krb5
540 krb5
: gss_mechs
/mech_krb5 libtecla libldap5
541 libadutils
: libldap5 libresolv2
542 libbe
: libzfs libinstzones libuuid libgen libdevinfo libefi libficl
543 libbsm
: libinetutil libscf libsecdb
544 libcfgadm
: libdevinfo
545 libcmd
: libsum libast
551 libdevinfo
: libsec libgen
552 libdhcpagent
: libdhcputil libuuid libdlpi libcontract
553 libdhcputil
: libgen libinetutil libdlpi
554 libdiskmgt
: libdevid libdevinfo libadm libefi libkstat libsysevent
555 $(INTEL_BLD
)libdiskmgt
: libfdisk
556 libdladm
: libdevinfo libinetutil libscf librcm libexacct libkstat \
559 libdlpi
: libinetutil libdladm
561 libdtrace
: libproc libgen libctf libmapmalloc
563 libelfsign
: libcryptoutil libkmf ..
/cmd
/sgs
/libelf
565 libexacct
/demo
: libexacct libproject
567 libficl
: libuuid libumem
570 libidmap
: libavl libuutil
572 libinstzones
: libzonecfg libcontract
573 libipadm
: libinetutil libdlpi libdhcpagent libdladm libsecdb
575 libipsecutil
: libtecla
576 libiscsit
: libstmf libuuid
577 libkmf
: libcryptoutil pkcs11
578 libkvm
: ..
/cmd
/sgs
/libelf
580 libmapid
: libresolv2 libscf
583 libnwam
: libscf libbsm libdladm
584 libpcp
: libumem libdevinfo
586 libpool
: libscf libexacct
588 libproc
: ..
/cmd
/sgs
/librtld_db ..
/cmd
/sgs
/libelf libctf
589 $(INTEL_BLD
)libproc
: libsaveargs
590 libproject
: libpool libproc libsecdb
592 libprtdiag_psr
: libprtdiag
593 libraidcfg
: libdevinfo
594 librestart
: libuutil libscf libpool libproject libsecdb libsysevent
595 libsasl
: libgss pkcs11
596 libsaveargs
: libdisasm
597 libscf
: libuutil libgen libsmbios
598 libsec
: libavl libidmap
599 libshare
: libscf libzfs libuuid libfsmgt libsecdb libumem libsmbfs
600 libshell
: libast libcmd libdll libsecdb
602 libsldap
: libldap5 libscf
603 libsmbfs
: libkrb5 libsec libidmap pkcs11
606 libstmfproxy
: libstmf libpthread
608 libsun_ima
: libdevinfo libsysevent
609 libsysevent
: libsecdb
611 libtermcap
: libcurses
614 libv12n
: libds libuuid
616 libvrrpadm
: libdladm libscf
617 libvscan
: libscf libsecdb
618 libzfs
: libdevid libgen libuutil libadm libavl libefi libidmap \
620 libzonecfg
: libuuid libsysevent libsec libbrand libpool libscf libproc \
621 libuutil libbsm libsecdb
622 libzonestat
: libcmdutils libumem
623 libzpool
: libavl libumem libcmdutils libsysevent
625 mpapi
: libpthread libdevinfo libsysevent
627 nsswitch
: libadutils libidmap libdns_sd libscf libldap5 libsldap
628 pam_modules
: libproject passwdutil smbsrv libpam libbsm libsecdb
630 pkcs11
: libcryptoutil libgen libuuid
632 pylibbe
: libbe libzfs
633 pysolaris
: libsec libidmap
635 raidcfg_plugins
: libraidcfg librcm libcfgadm libpicl libpicltree
637 sasl_plugins
: pkcs11 libgss libsasl
638 scsi
: libfru libumem libdevid libdevinfo
639 smbsrv
: libxnet libpthread librt libshare libidmap pkcs11 libsqlite \
640 libcryptoutil libreparse libcmdutils libresolv2 libsmbfs \
641 libuuid libads libgss libldap5 krb5
642 storage
: libdevice libdevinfo libdevid
643 sun_fc
: libdevinfo libsysevent
644 sun_sas
: libdevinfo libsysevent libkstat libdevid
645 udapl
: libdevinfo libdladm
648 # The reason this rule checks for the existence of the
649 # Makefile is that some of the directories do not exist
650 # in certain situations (e.g., exportable source builds,
654 @if
[ -f
$@
/Makefile
]; then \
655 cd
$@
; pwd
; $(MAKE
) $(TARGET
); \
660 $(SUBDIRS
:%=%-nodepend
):
661 @if
[ -f
$(@
:%-nodepend
=%)/Makefile
]; then \
662 cd
$(@
:%-nodepend
=%); pwd
; $(MAKE
) $(TARGET
); \