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 \
246 # Create a special version of $(SUBDIRS) with no .WAIT's, for use with the
247 # clean and clobber targets (for more information, see those targets, below).
249 NOWAIT_SUBDIRS
= $(SUBDIRS
:.WAIT
=)
259 gss_mechs
/mech_krb5 \
302 $($(MACH
)_MSGSUBDIRS
)
304 i386_MSGSUBDIRS
= libfdisk
414 $($(MACH
)_HDRSUBDIRS
)
421 check := TARGET
= check
422 clean := TARGET
= clean
423 clobber := TARGET
= clobber
424 install := TARGET
= install
425 install_h
:= TARGET
= install_h
432 # For the all and install targets, we clearly must respect library
433 # dependencies so that the libraries link correctly. However, for
434 # the remaining targets (check, clean, clobber, install_h, _dc, and
435 # _msg), libraries do not have any dependencies on one another and
436 # thus respecting dependencies just slows down the build. As such,
437 # for these rules, we use pattern replacement to explicitly avoid
438 # triggering the dependency information. Note that for clean and
439 # clobber, we must use $(NOWAIT_SUBDIRS) rather than $(SUBDIRS),
440 # to prevent `.WAIT' from expanding to `.WAIT-nodepend'.
445 install: $(SUBDIRS
) .WAIT install_extra
447 # extra libraries kept in other source areas
449 @cd ..
/cmd
/sgs
; pwd
; $(MAKE
) install_lib
452 clean clobber: $(NOWAIT_SUBDIRS
:%=%-nodepend
)
454 install_h
check: $(HDRSUBDIRS
:%=%-nodepend
)
456 _msg
: $(MSGSUBDIRS
:%=%-nodepend
) .WAIT _dc
458 _dc
: $(DCSUBDIRS
:%=%-nodepend
)
460 # Library interdependencies are called out explicitly here.
461 ..
/cmd
/sgs
/libconv
: crt
462 ..
/cmd
/sgs
/libdl
: crt
463 libc
: ..
/cmd
/sgs
/libconv ..
/cmd
/sgs
/libdl
468 libnsl
: libc libmd libmp
469 libnvpair
: libc libnsl
471 basedeps
: libc libm libmd libmp libnsl libnvpair
472 basedeps
:= TARGET
=install
474 # The following dependencies are currently required by libdbus-1 and should
475 # be used for anything linking against it.
476 dbusdeps
: libsecdb libinetutil libscf libgen libsmbios
478 # The following dependencies don't need to be listed below as they are built
479 # before everything else:
480 # libc libm libmd libmp libnsl libnvpair
481 abi
: libctf libmapmalloc libproc
482 auditd_plugins
: libbsm libsecdb libgss libmtmalloc
483 brand
: libzonecfg libmapmalloc
484 cfgadm_plugins
: libdevice libdevinfo libhotplug librcm hbaapi libkstat libscf
485 fm
: libexacct libipmi libzfs scsi libdevinfo libdevid libcfgadm \
486 libcontract libsysevent ..
/cmd
/sgs
/libelf libdladm libsff \
489 gss_mechs
/mech_dh
: libgss
490 gss_mechs
/mech_dummy
: libgss
491 gss_mechs
/mech_krb5
: libgss libresolv2 pkcs11 libkstat
492 gss_mechs
/mech_spnego
: gss_mechs
/mech_krb5
494 krb5
: gss_mechs
/mech_krb5 libtecla libldap5
495 libadutils
: libldap5 libresolv2
496 libbe
: libzfs libzonecfg libuuid libgen libdevinfo libefi libficl
497 libbsm
: libinetutil libscf libsecdb
498 libcfgadm
: libdevinfo
499 libcmd
: libsum libast
505 libdevinfo
: libsec libgen
506 libdhcpagent
: libdhcputil libuuid libdlpi libcontract
507 libdhcputil
: libgen libinetutil libdlpi
508 libdiskmgt
: libdevid libdevinfo libadm libefi libkstat libsysevent
509 $(INTEL_BLD
)libdiskmgt
: libfdisk
510 libdladm
: libdevinfo libinetutil libscf librcm libexacct libkstat \
513 libdlpi
: libinetutil libdladm
514 libdtrace
: libproc libgen libctf libmapmalloc
515 libefi
: libuuid libsmbios
516 libelfsign
: libcryptoutil libkmf ..
/cmd
/sgs
/libelf
517 libexacct
/demo
: libexacct libproject
519 libficl
: libuuid libumem
523 libipadm
: libinetutil libdlpi libdhcpagent libdladm libsecdb libdhcputil
525 libipsecutil
: libtecla libkmf
526 libiscsit
: libstmf libuuid
527 libkmf
: libcryptoutil pkcs11 libcustr
528 libkvm
: ..
/cmd
/sgs
/libelf
530 libmapid
: libresolv2 libscf
531 libmlrpc
: libsmbfs libuuid
534 libnwam
: libscf libbsm libdladm libipadm
536 libpool
: libscf libexacct
538 libproc
: ..
/cmd
/sgs
/librtld_db ..
/cmd
/sgs
/libelf libctf
539 $(INTEL_BLD
)libproc
: libsaveargs
540 libproject
: libpool libproc libsecdb
541 libraidcfg
: libdevinfo
542 librestart
: libscf libpool libproject libsecdb libsysevent
543 libsasl
: libgss pkcs11
544 libsaveargs
: libdisasm
545 libscf
: libgen libsmbios
546 libsec
: libavl libidmap
548 libshare
: libscf libzfs libuuid libfsmgt libsecdb libumem libsmbfs
549 libshell
: libast libcmd libdll libsecdb
551 libsldap
: libldap5 libscf
552 libsmbfs
: libkrb5 libsec libidmap pkcs11
553 libsmbios
: libdevinfo
557 libsun_ima
: libdevinfo libsysevent
558 libsysevent
: libsecdb
561 libvrrpadm
: libdladm libscf
562 libvscan
: libscf libsecdb
563 libzfs
: libdevid libgen libadm libavl libefi libidmap \
565 libzonecfg
: libuuid libsysevent libsec libbrand libpool libscf libproc \
567 libzonestat
: libcmdutils libumem
568 libzpool
: libavl libumem libcmdutils libsysevent
570 mpapi
: libpthread libdevinfo libsysevent
572 nsswitch
: libadutils libidmap libdns_sd libscf libldap5 libsldap
573 pam_modules
: libproject passwdutil smbsrv libpam libbsm libsecdb
575 pkcs11
: libcryptoutil libgen libuuid
577 pylibbe
: libbe libzfs
579 sasl_plugins
: pkcs11 libgss libsasl
580 scsi
: libumem libdevid libdevinfo
581 smbsrv
: libpthread librt libshare libidmap pkcs11 libsqlite \
582 libcryptoutil libreparse libcmdutils libresolv2 libsmbfs \
583 libuuid libads libgss libldap5 krb5 libmlrpc
584 sun_fc
: libdevinfo libsysevent
585 sun_sas
: libdevinfo libsysevent libkstat libdevid
586 udapl
: libdevinfo libdladm
589 # The reason this rule checks for the existence of the
590 # Makefile is that some of the directories do not exist
591 # in certain situations (e.g., exportable source builds,
595 @if
[ -f
$@
/Makefile
]; then \
596 cd
$@
; pwd
; $(MAKE
) $(TARGET
); \
601 $(SUBDIRS
:%=%-nodepend
):
602 @if
[ -f
$(@
:%-nodepend
=%)/Makefile
]; then \
603 cd
$(@
:%-nodepend
=%); pwd
; $(MAKE
) $(TARGET
); \