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 \
247 # Create a special version of $(SUBDIRS) with no .WAIT's, for use with the
248 # clean and clobber targets (for more information, see those targets, below).
250 NOWAIT_SUBDIRS
= $(SUBDIRS
:.WAIT
=)
260 gss_mechs
/mech_krb5 \
303 $($(MACH
)_MSGSUBDIRS
)
305 i386_MSGSUBDIRS
= libfdisk
416 $($(MACH
)_HDRSUBDIRS
)
423 check := TARGET
= check
424 clean := TARGET
= clean
425 clobber := TARGET
= clobber
426 install := TARGET
= install
427 install_h
:= TARGET
= install_h
434 # For the all and install targets, we clearly must respect library
435 # dependencies so that the libraries link correctly. However, for
436 # the remaining targets (check, clean, clobber, install_h, _dc, and
437 # _msg), libraries do not have any dependencies on one another and
438 # thus respecting dependencies just slows down the build. As such,
439 # for these rules, we use pattern replacement to explicitly avoid
440 # triggering the dependency information. Note that for clean and
441 # clobber, we must use $(NOWAIT_SUBDIRS) rather than $(SUBDIRS),
442 # to prevent `.WAIT' from expanding to `.WAIT-nodepend'.
447 install: $(SUBDIRS
) .WAIT install_extra
449 # extra libraries kept in other source areas
451 @cd ..
/cmd
/sgs
; pwd
; $(MAKE
) install_lib
454 clean clobber: $(NOWAIT_SUBDIRS
:%=%-nodepend
)
456 install_h
check: $(HDRSUBDIRS
:%=%-nodepend
)
458 _msg
: $(MSGSUBDIRS
:%=%-nodepend
) .WAIT _dc
460 _dc
: $(DCSUBDIRS
:%=%-nodepend
)
462 # Library interdependencies are called out explicitly here.
463 ..
/cmd
/sgs
/libconv
: crt
464 ..
/cmd
/sgs
/libdl
: crt
465 libc
: ..
/cmd
/sgs
/libconv ..
/cmd
/sgs
/libdl
470 libnsl
: libc libmd libmp
471 libnvpair
: libc libnsl
473 basedeps
: libc libm libmd libmp libnsl libnvpair
474 basedeps
:= TARGET
=install
476 # The following dependencies are currently required by libdbus-1 and should
477 # be used for anything linking against it.
478 dbusdeps
: libsecdb libinetutil libscf libgen libsmbios
480 # The following dependencies don't need to be listed below as they are built
481 # before everything else:
482 # libc libm libmd libmp libnsl libnvpair
483 abi
: libctf libmapmalloc libproc
484 auditd_plugins
: libbsm libsecdb libgss libmtmalloc
485 brand
: libzonecfg libmapmalloc
486 cfgadm_plugins
: libdevice libdevinfo libhotplug librcm hbaapi libkstat libscf
487 fm
: libexacct libipmi libzfs scsi libdevinfo libdevid libcfgadm \
488 libcontract libsysevent ..
/cmd
/sgs
/libelf libdladm libsff \
491 gss_mechs
/mech_dh
: libgss
492 gss_mechs
/mech_dummy
: libgss
493 gss_mechs
/mech_krb5
: libgss libresolv2 pkcs11 libkstat
494 gss_mechs
/mech_spnego
: gss_mechs
/mech_krb5
496 krb5
: gss_mechs
/mech_krb5 libtecla libldap5
497 libadutils
: libldap5 libresolv2
498 libbe
: libzfs libzonecfg libuuid libgen libdevinfo libefi libficl
499 libbsm
: libinetutil libscf libsecdb
500 libcfgadm
: libdevinfo
501 libcmd
: libsum libast
507 libdevinfo
: libsec libgen
508 libdhcpagent
: libdhcputil libuuid libdlpi libcontract
509 libdhcputil
: libgen libinetutil libdlpi
510 libdiskmgt
: libdevid libdevinfo libadm libefi libkstat libsysevent
511 $(INTEL_BLD
)libdiskmgt
: libfdisk
512 libdladm
: libdevinfo libinetutil libscf librcm libexacct libkstat \
515 libdlpi
: libinetutil libdladm
516 libdtrace
: libproc libgen libctf libmapmalloc
517 libefi
: libuuid libsmbios
518 libelfsign
: libcryptoutil libkmf ..
/cmd
/sgs
/libelf
519 libexacct
/demo
: libexacct libproject
521 libficl
: libuuid libumem
526 libipadm
: libinetutil libdlpi libdhcpagent libdladm libsecdb libdhcputil
528 libipsecutil
: libtecla libkmf
529 libiscsit
: libstmf libuuid
530 libkmf
: libcryptoutil pkcs11 libcustr
531 libkvm
: ..
/cmd
/sgs
/libelf
533 libmapid
: libresolv2 libscf
534 libmlrpc
: libsmbfs libuuid
537 libnwam
: libscf libbsm libdladm libipadm
539 libpool
: libscf libexacct
541 libproc
: ..
/cmd
/sgs
/librtld_db ..
/cmd
/sgs
/libelf libctf
542 $(INTEL_BLD
)libproc
: libsaveargs
543 libproject
: libpool libproc libsecdb
544 libraidcfg
: libdevinfo
545 librestart
: libscf libpool libproject libsecdb libsysevent
546 libsasl
: libgss pkcs11
547 libsaveargs
: libdisasm
548 libscf
: libgen libsmbios
549 libsec
: libavl libidmap
551 libshare
: libscf libzfs libuuid libfsmgt libsecdb libumem libsmbfs
552 libshell
: libast libcmd libdll libsecdb
554 libsldap
: libldap5 libscf
555 libsmbfs
: libkrb5 libsec libidmap pkcs11
556 libsmbios
: libdevinfo
560 libsun_ima
: libdevinfo libsysevent
561 libsysevent
: libsecdb
564 libvrrpadm
: libdladm libscf
565 libvscan
: libscf libsecdb
566 libzfs
: libdevid libgen libadm libavl libefi libidmap \
568 libzonecfg
: libuuid libsysevent libsec libbrand libpool libscf libproc \
570 libzonestat
: libcmdutils libumem
571 libzpool
: libavl libumem libcmdutils libsysevent
573 mpapi
: libpthread libdevinfo libsysevent
575 nsswitch
: libadutils libidmap libdns_sd libscf libldap5 libsldap
576 pam_modules
: libproject passwdutil smbsrv libpam libbsm libsecdb
578 pkcs11
: libcryptoutil libgen libuuid
580 pylibbe
: libbe libzfs
582 sasl_plugins
: pkcs11 libgss libsasl
583 scsi
: libfru libumem libdevid libdevinfo
584 smbsrv
: libpthread librt libshare libidmap pkcs11 libsqlite \
585 libcryptoutil libreparse libcmdutils libresolv2 libsmbfs \
586 libuuid libads libgss libldap5 krb5 libmlrpc
587 sun_fc
: libdevinfo libsysevent
588 sun_sas
: libdevinfo libsysevent libkstat libdevid
589 udapl
: libdevinfo libdladm
592 # The reason this rule checks for the existence of the
593 # Makefile is that some of the directories do not exist
594 # in certain situations (e.g., exportable source builds,
598 @if
[ -f
$@
/Makefile
]; then \
599 cd
$@
; pwd
; $(MAKE
) $(TARGET
); \
604 $(SUBDIRS
:%=%-nodepend
):
605 @if
[ -f
$(@
:%-nodepend
=%)/Makefile
]; then \
606 cd
$(@
:%-nodepend
=%); pwd
; $(MAKE
) $(TARGET
); \