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 \
261 # Create a special version of $(SUBDIRS) with no .WAIT's, for use with the
262 # clean and clobber targets (for more information, see those targets, below).
264 NOWAIT_SUBDIRS
= $(SUBDIRS
:.WAIT
=)
274 gss_mechs
/mech_krb5 \
317 $($(MACH
)_MSGSUBDIRS
)
323 i386_MSGSUBDIRS
= libfdisk
433 $($(MACH
)_HDRSUBDIRS
)
447 check := TARGET
= check
448 clean := TARGET
= clean
449 clobber := TARGET
= clobber
450 install := TARGET
= install
451 install_h
:= TARGET
= install_h
458 # For the all and install targets, we clearly must respect library
459 # dependencies so that the libraries link correctly. However, for
460 # the remaining targets (check, clean, clobber, install_h, _dc, and
461 # _msg), libraries do not have any dependencies on one another and
462 # thus respecting dependencies just slows down the build. As such,
463 # for these rules, we use pattern replacement to explicitly avoid
464 # triggering the dependency information. Note that for clean and
465 # clobber, we must use $(NOWAIT_SUBDIRS) rather than $(SUBDIRS),
466 # to prevent `.WAIT' from expanding to `.WAIT-nodepend'.
471 install: $(SUBDIRS
) .WAIT install_extra
473 # extra libraries kept in other source areas
475 @cd ..
/cmd
/sgs
; pwd
; $(MAKE
) install_lib
478 clean clobber: $(NOWAIT_SUBDIRS
:%=%-nodepend
)
480 install_h
check: $(HDRSUBDIRS
:%=%-nodepend
)
482 _msg
: $(MSGSUBDIRS
:%=%-nodepend
) .WAIT _dc
484 _dc
: $(DCSUBDIRS
:%=%-nodepend
)
486 # Library interdependencies are called out explicitly here.
487 ..
/cmd
/sgs
/libconv
: crt
488 ..
/cmd
/sgs
/libdl
: crt
489 libc
: ..
/cmd
/sgs
/libconv ..
/cmd
/sgs
/libdl
494 libnsl
: libc libmd libmp
495 libnvpair
: libc libnsl
497 basedeps
: libc libm libmd libmp libnsl libnvpair
498 basedeps
:= TARGET
=install
500 # The following dependencies are currently required by libdbus-1 and should
501 # be used for anything linking against it.
502 dbusdeps
: libsecdb libinetutil libscf libgen libsmbios
504 # The following dependencies don't need to be listed below as they are built
505 # before everything else:
506 # libc libm libmd libmp libnsl libnvpair
507 abi
: libctf libmapmalloc libproc
508 auditd_plugins
: libbsm libsecdb libgss libmtmalloc
509 brand
: libzonecfg libmapmalloc
510 cfgadm_plugins
: libdevice libdevinfo libhotplug librcm hbaapi libkstat libscf
511 fm
: libexacct libipmi libzfs scsi libdevinfo libdevid libcfgadm \
512 libcontract libsysevent ..
/cmd
/sgs
/libelf libdladm libsff \
515 $(SPARC_BLD
)fm
: libpri
516 gss_mechs
/mech_dh
: libgss
517 gss_mechs
/mech_dummy
: libgss
518 gss_mechs
/mech_krb5
: libgss libresolv2 pkcs11 libkstat
519 gss_mechs
/mech_spnego
: gss_mechs
/mech_krb5
521 krb5
: gss_mechs
/mech_krb5 libtecla libldap5
522 libadutils
: libldap5 libresolv2
523 libbe
: libzfs libzonecfg libuuid libgen libdevinfo libefi libficl
524 libbsm
: libinetutil libscf libsecdb
525 libcfgadm
: libdevinfo
526 libcmd
: libsum libast
532 libdevinfo
: libsec libgen
533 libdhcpagent
: libdhcputil libuuid libdlpi libcontract
534 libdhcputil
: libgen libinetutil libdlpi
535 libdiskmgt
: libdevid libdevinfo libadm libefi libkstat libsysevent
536 $(INTEL_BLD
)libdiskmgt
: libfdisk
537 libdladm
: libdevinfo libinetutil libscf librcm libexacct libkstat \
540 libdlpi
: libinetutil libdladm
542 libdtrace
: libproc libgen libctf libmapmalloc
543 libefi
: libuuid libsmbios
544 libelfsign
: libcryptoutil libkmf ..
/cmd
/sgs
/libelf
545 libexacct
/demo
: libexacct libproject
547 libficl
: libuuid libumem
552 libipadm
: libinetutil libdlpi libdhcpagent libdladm libsecdb libdhcputil
554 libipsecutil
: libtecla
555 libiscsit
: libstmf libuuid
556 libkmf
: libcryptoutil pkcs11
557 libkvm
: ..
/cmd
/sgs
/libelf
559 libmapid
: libresolv2 libscf
560 libmlrpc
: libsmbfs libuuid
563 libnwam
: libscf libbsm libdladm libipadm
564 libpcp
: libumem libdevinfo
566 libpool
: libscf libexacct
568 libproc
: ..
/cmd
/sgs
/librtld_db ..
/cmd
/sgs
/libelf libctf
569 $(INTEL_BLD
)libproc
: libsaveargs
570 libproject
: libpool libproc libsecdb
572 libprtdiag_psr
: libprtdiag
573 libraidcfg
: libdevinfo
574 librestart
: libscf libpool libproject libsecdb libsysevent
575 libsasl
: libgss pkcs11
576 libsaveargs
: libdisasm
577 libscf
: libgen libsmbios
578 libsec
: libavl libidmap
580 libshare
: libscf libzfs libuuid libfsmgt libsecdb libumem libsmbfs
581 libshell
: libast libcmd libdll libsecdb
583 libsldap
: libldap5 libscf
584 libsmbfs
: libkrb5 libsec libidmap pkcs11
585 libsmbios
: libdevinfo
589 libsun_ima
: libdevinfo libsysevent
590 libsysevent
: libsecdb
593 libv12n
: libds libuuid
595 libvrrpadm
: libdladm libscf
596 libvscan
: libscf libsecdb
597 libzfs
: libdevid libgen libadm libavl libefi libidmap \
599 libzonecfg
: libuuid libsysevent libsec libbrand libpool libscf libproc \
601 libzonestat
: libcmdutils libumem
602 libzpool
: libavl libumem libcmdutils libsysevent
604 mpapi
: libpthread libdevinfo libsysevent
606 nsswitch
: libadutils libidmap libdns_sd libscf libldap5 libsldap
607 pam_modules
: libproject passwdutil smbsrv libpam libbsm libsecdb
609 pkcs11
: libcryptoutil libgen libuuid
611 pylibbe
: libbe libzfs
612 pysolaris
: libsec libidmap
613 raidcfg_plugins
: libraidcfg librcm libcfgadm libpicl libpicltree
615 sasl_plugins
: pkcs11 libgss libsasl
616 scsi
: libfru libumem libdevid libdevinfo
617 smbsrv
: libpthread librt libshare libidmap pkcs11 libsqlite \
618 libcryptoutil libreparse libcmdutils libresolv2 libsmbfs \
619 libuuid libads libgss libldap5 krb5 libmlrpc
620 storage
: libdevice libdevinfo libdevid
621 sun_fc
: libdevinfo libsysevent
622 sun_sas
: libdevinfo libsysevent libkstat libdevid
623 udapl
: libdevinfo libdladm
626 # The reason this rule checks for the existence of the
627 # Makefile is that some of the directories do not exist
628 # in certain situations (e.g., exportable source builds,
632 @if
[ -f
$@
/Makefile
]; then \
633 cd
$@
; pwd
; $(MAKE
) $(TARGET
); \
638 $(SUBDIRS
:%=%-nodepend
):
639 @if
[ -f
$(@
:%-nodepend
=%)/Makefile
]; then \
640 cd
$(@
:%-nodepend
=%); pwd
; $(MAKE
) $(TARGET
); \