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 2018 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
62 # Build everything else. Aside from explicit dependencies, all libraries
63 # are built in parallel.
66 ..
/cmd
/sgs
/librtld_db \
76 gss_mechs
/mech_dummy \
78 gss_mechs
/mech_spnego \
264 # Create a special version of $(SUBDIRS) with no .WAIT's, for use with the
265 # clean and clobber targets (for more information, see those targets, below).
267 NOWAIT_SUBDIRS
= $(SUBDIRS
:.WAIT
=)
277 gss_mechs
/mech_krb5 \
321 $($(MACH
)_MSGSUBDIRS
)
327 i386_MSGSUBDIRS
= libfdisk
439 $($(MACH
)_HDRSUBDIRS
)
453 check := TARGET
= check
454 clean := TARGET
= clean
455 clobber := TARGET
= clobber
456 install := TARGET
= install
457 install_h
:= TARGET
= install_h
464 # For the all and install targets, we clearly must respect library
465 # dependencies so that the libraries link correctly. However, for
466 # the remaining targets (check, clean, clobber, install_h, _dc, and
467 # _msg), libraries do not have any dependencies on one another and
468 # thus respecting dependencies just slows down the build. As such,
469 # for these rules, we use pattern replacement to explicitly avoid
470 # triggering the dependency information. Note that for clean and
471 # clobber, we must use $(NOWAIT_SUBDIRS) rather than $(SUBDIRS),
472 # to prevent `.WAIT' from expanding to `.WAIT-nodepend'.
477 install: $(SUBDIRS
) .WAIT install_extra
479 # extra libraries kept in other source areas
481 @cd ..
/cmd
/sgs
; pwd
; $(MAKE
) install_lib
484 clean clobber: $(NOWAIT_SUBDIRS
:%=%-nodepend
)
486 install_h
check: $(HDRSUBDIRS
:%=%-nodepend
)
488 _msg
: $(MSGSUBDIRS
:%=%-nodepend
) .WAIT _dc
490 _dc
: $(DCSUBDIRS
:%=%-nodepend
)
492 # Library interdependencies are called out explicitly here.
493 ..
/cmd
/sgs
/libconv
: crt
494 ..
/cmd
/sgs
/libdl
: crt
495 libc
: ..
/cmd
/sgs
/libconv ..
/cmd
/sgs
/libdl
500 libnsl
: libc libmd libmp
501 libnvpair
: libc libnsl
503 basedeps
: libc libm libmd libmp libnsl libnvpair
504 basedeps
:= TARGET
=install
506 # The following dependencies are currently required by libdbus-1 and should
507 # be used for anything linking against it.
508 dbusdeps
: libsecdb libinetutil libscf libuutil libgen libsmbios
510 # The following dependencies don't need to be listed below as they are built
511 # before everything else:
512 # libc libm libmd libmp libnsl libnvpair
513 abi
: libctf libmapmalloc libproc
514 auditd_plugins
: libbsm libsecdb libgss libmtmalloc
515 brand
: libzonecfg libmapmalloc
516 cfgadm_plugins
: libdevice libdevinfo libhotplug librcm hbaapi libkstat libscf
517 fm
: libexacct libipmi libzfs scsi libdevinfo libdevid libcfgadm \
518 libcontract libsysevent ..
/cmd
/sgs
/libelf libdladm libsff
520 $(SPARC_BLD
)fm
: libpri
521 gss_mechs
/mech_dh
: libgss
522 gss_mechs
/mech_dummy
: libgss
523 gss_mechs
/mech_krb5
: libgss libresolv2 pkcs11 libkstat
524 gss_mechs
/mech_spnego
: gss_mechs
/mech_krb5
526 krb5
: gss_mechs
/mech_krb5 libtecla libldap5
527 libadutils
: libldap5 libresolv2
528 libbe
: libzfs libzonecfg libuuid libgen libdevinfo libefi libficl
529 libbsm
: libinetutil libscf libsecdb
530 libcfgadm
: libdevinfo
531 libcmd
: libsum libast
537 libdevinfo
: libsec libgen
538 libdhcpagent
: libdhcputil libuuid libdlpi libcontract
539 libdhcputil
: libgen libinetutil libdlpi
540 libdiskmgt
: libdevid libdevinfo libadm libefi libkstat libsysevent
541 $(INTEL_BLD
)libdiskmgt
: libfdisk
542 libdladm
: libdevinfo libinetutil libscf librcm libexacct libkstat \
545 libdlpi
: libinetutil libdladm
547 libdtrace
: libproc libgen libctf libmapmalloc
549 libelfsign
: libcryptoutil libkmf ..
/cmd
/sgs
/libelf
550 libexacct
/demo
: libexacct libproject
552 libficl
: libuuid libumem
555 libidmap
: libavl libuutil
557 libipadm
: libinetutil libdlpi libdhcpagent libdladm libsecdb libdhcputil
559 libipsecutil
: libtecla
560 libiscsit
: libstmf libuuid
561 libkmf
: libcryptoutil pkcs11
562 libkvm
: ..
/cmd
/sgs
/libelf
564 libmapid
: libresolv2 libscf
565 libmlrpc
: libsmbfs libuuid
568 libnwam
: libscf libbsm libdladm libipadm
569 libpcp
: libumem libdevinfo
571 libpool
: libscf libexacct
573 libproc
: ..
/cmd
/sgs
/librtld_db ..
/cmd
/sgs
/libelf libctf
574 $(INTEL_BLD
)libproc
: libsaveargs
575 libproject
: libpool libproc libsecdb
577 libprtdiag_psr
: libprtdiag
578 libraidcfg
: libdevinfo
579 librestart
: libuutil libscf libpool libproject libsecdb libsysevent
580 libsasl
: libgss pkcs11
581 libsaveargs
: libdisasm
582 libscf
: libuutil libgen libsmbios
583 libsec
: libavl libidmap
585 libshare
: libscf libzfs libuuid libfsmgt libsecdb libumem libsmbfs
586 libshell
: libast libcmd libdll libsecdb
588 libsldap
: libldap5 libscf
589 libsmbfs
: libkrb5 libsec libidmap pkcs11
590 libsmbios
: libdevinfo
594 libsun_ima
: libdevinfo libsysevent
595 libsysevent
: libsecdb
598 libv12n
: libds libuuid
600 libvrrpadm
: libdladm libscf
601 libvscan
: libscf libsecdb
602 libzfs
: libdevid libgen libuutil libadm libavl libefi libidmap \
603 libumem libzfs_core libcmdutils
604 libzonecfg
: libuuid libsysevent libsec libbrand libpool libscf libproc \
605 libuutil libbsm libsecdb
606 libzonestat
: libcmdutils libumem
607 libzpool
: libavl libumem libcmdutils libsysevent
609 mpapi
: libpthread libdevinfo libsysevent
611 nsswitch
: libadutils libidmap libdns_sd libscf libldap5 libsldap
612 pam_modules
: libproject passwdutil smbsrv libpam libbsm libsecdb
614 pkcs11
: libcryptoutil libgen libuuid
616 pylibbe
: libbe libzfs
617 pysolaris
: libsec libidmap
619 raidcfg_plugins
: libraidcfg librcm libcfgadm libpicl libpicltree
621 sasl_plugins
: pkcs11 libgss libsasl
622 scsi
: libfru libumem libdevid libdevinfo
623 smbsrv
: libpthread librt libshare libidmap pkcs11 libsqlite \
624 libcryptoutil libreparse libcmdutils libresolv2 libsmbfs \
625 libuuid libads libgss libldap5 krb5 libmlrpc
626 storage
: libdevice libdevinfo libdevid
627 sun_fc
: libdevinfo libsysevent
628 sun_sas
: libdevinfo libsysevent libkstat libdevid
629 udapl
: libdevinfo libdladm
632 # The reason this rule checks for the existence of the
633 # Makefile is that some of the directories do not exist
634 # in certain situations (e.g., exportable source builds,
638 @if
[ -f
$@
/Makefile
]; then \
639 cd
$@
; pwd
; $(MAKE
) $(TARGET
); \
644 $(SUBDIRS
:%=%-nodepend
):
645 @if
[ -f
$(@
:%-nodepend
=%)/Makefile
]; then \
646 cd
$(@
:%-nodepend
=%); pwd
; $(MAKE
) $(TARGET
); \