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 \
248 # Create a special version of $(SUBDIRS) with no .WAIT's, for use with the
249 # clean and clobber targets (for more information, see those targets, below).
251 NOWAIT_SUBDIRS
= $(SUBDIRS
:.WAIT
=)
261 gss_mechs
/mech_krb5 \
304 $($(MACH
)_MSGSUBDIRS
)
306 i386_MSGSUBDIRS
= libfdisk
417 $($(MACH
)_HDRSUBDIRS
)
424 check := TARGET
= check
425 clean := TARGET
= clean
426 clobber := TARGET
= clobber
427 install := TARGET
= install
428 install_h
:= TARGET
= install_h
435 # For the all and install targets, we clearly must respect library
436 # dependencies so that the libraries link correctly. However, for
437 # the remaining targets (check, clean, clobber, install_h, _dc, and
438 # _msg), libraries do not have any dependencies on one another and
439 # thus respecting dependencies just slows down the build. As such,
440 # for these rules, we use pattern replacement to explicitly avoid
441 # triggering the dependency information. Note that for clean and
442 # clobber, we must use $(NOWAIT_SUBDIRS) rather than $(SUBDIRS),
443 # to prevent `.WAIT' from expanding to `.WAIT-nodepend'.
448 install: $(SUBDIRS
) .WAIT install_extra
450 # extra libraries kept in other source areas
452 @cd ..
/cmd
/sgs
; pwd
; $(MAKE
) install_lib
455 clean clobber: $(NOWAIT_SUBDIRS
:%=%-nodepend
)
457 install_h
check: $(HDRSUBDIRS
:%=%-nodepend
)
459 _msg
: $(MSGSUBDIRS
:%=%-nodepend
) .WAIT _dc
461 _dc
: $(DCSUBDIRS
:%=%-nodepend
)
463 # Library interdependencies are called out explicitly here.
464 ..
/cmd
/sgs
/libconv
: crt
465 ..
/cmd
/sgs
/libdl
: crt
466 libc
: ..
/cmd
/sgs
/libconv ..
/cmd
/sgs
/libdl
471 libnsl
: libc libmd libmp
472 libnvpair
: libc libnsl
474 basedeps
: libc libm libmd libmp libnsl libnvpair
475 basedeps
:= TARGET
=install
477 # The following dependencies are currently required by libdbus-1 and should
478 # be used for anything linking against it.
479 dbusdeps
: libsecdb libinetutil libscf libgen libsmbios
481 # The following dependencies don't need to be listed below as they are built
482 # before everything else:
483 # libc libm libmd libmp libnsl libnvpair
484 abi
: libctf libmapmalloc libproc
485 auditd_plugins
: libbsm libsecdb libgss libmtmalloc
486 brand
: libzonecfg libmapmalloc
487 cfgadm_plugins
: libdevice libdevinfo libhotplug librcm hbaapi libkstat libscf
488 fm
: libexacct libipmi libzfs scsi libdevinfo libdevid libcfgadm \
489 libcontract libsysevent ..
/cmd
/sgs
/libelf libdladm libsff \
492 gss_mechs
/mech_dh
: libgss
493 gss_mechs
/mech_dummy
: libgss
494 gss_mechs
/mech_krb5
: libgss libresolv2 pkcs11 libkstat
495 gss_mechs
/mech_spnego
: gss_mechs
/mech_krb5
497 krb5
: gss_mechs
/mech_krb5 libtecla libldap5
498 libadutils
: libldap5 libresolv2
499 libbe
: libzfs libzonecfg libuuid libgen libdevinfo libefi libficl
500 libbsm
: libinetutil libscf libsecdb
501 libcfgadm
: libdevinfo
502 libcmd
: libsum libast
508 libdevinfo
: libsec libgen
509 libdhcpagent
: libdhcputil libuuid libdlpi libcontract
510 libdhcputil
: libgen libinetutil libdlpi
511 libdiskmgt
: libdevid libdevinfo libadm libefi libkstat libsysevent
512 $(INTEL_BLD
)libdiskmgt
: libfdisk
513 libdladm
: libdevinfo libinetutil libscf librcm libexacct libkstat \
516 libdlpi
: libinetutil libdladm
517 libdtrace
: libproc libgen libctf libmapmalloc
518 libefi
: libuuid libsmbios
519 libelfsign
: libcryptoutil libkmf ..
/cmd
/sgs
/libelf
520 libexacct
/demo
: libexacct libproject
522 libficl
: libuuid libumem
527 libipadm
: libinetutil libdlpi libdhcpagent libdladm libsecdb libdhcputil
529 libipsecutil
: libtecla
530 libiscsit
: libstmf libuuid
531 libkmf
: libcryptoutil pkcs11
532 libkvm
: ..
/cmd
/sgs
/libelf
534 libmapid
: libresolv2 libscf
535 libmlrpc
: libsmbfs libuuid
538 libnwam
: libscf libbsm libdladm libipadm
540 libpool
: libscf libexacct
542 libproc
: ..
/cmd
/sgs
/librtld_db ..
/cmd
/sgs
/libelf libctf
543 $(INTEL_BLD
)libproc
: libsaveargs
544 libproject
: libpool libproc libsecdb
545 libraidcfg
: libdevinfo
546 librestart
: libscf libpool libproject libsecdb libsysevent
547 libsasl
: libgss pkcs11
548 libsaveargs
: libdisasm
549 libscf
: libgen libsmbios
550 libsec
: libavl libidmap
552 libshare
: libscf libzfs libuuid libfsmgt libsecdb libumem libsmbfs
553 libshell
: libast libcmd libdll libsecdb
555 libsldap
: libldap5 libscf
556 libsmbfs
: libkrb5 libsec libidmap pkcs11
557 libsmbios
: libdevinfo
561 libsun_ima
: libdevinfo libsysevent
562 libsysevent
: libsecdb
565 libvrrpadm
: libdladm libscf
566 libvscan
: libscf libsecdb
567 libzfs
: libdevid libgen libadm libavl libefi libidmap \
569 libzonecfg
: libuuid libsysevent libsec libbrand libpool libscf libproc \
571 libzonestat
: libcmdutils libumem
572 libzpool
: libavl libumem libcmdutils libsysevent
574 mpapi
: libpthread libdevinfo libsysevent
576 nsswitch
: libadutils libidmap libdns_sd libscf libldap5 libsldap
577 pam_modules
: libproject passwdutil smbsrv libpam libbsm libsecdb
579 pkcs11
: libcryptoutil libgen libuuid
581 pylibbe
: libbe libzfs
582 raidcfg_plugins
: libraidcfg librcm libcfgadm libpicl libpicltree
584 sasl_plugins
: pkcs11 libgss libsasl
585 scsi
: libfru libumem libdevid libdevinfo
586 smbsrv
: libpthread librt libshare libidmap pkcs11 libsqlite \
587 libcryptoutil libreparse libcmdutils libresolv2 libsmbfs \
588 libuuid libads libgss libldap5 krb5 libmlrpc
589 sun_fc
: libdevinfo libsysevent
590 sun_sas
: libdevinfo libsysevent libkstat libdevid
591 udapl
: libdevinfo libdladm
594 # The reason this rule checks for the existence of the
595 # Makefile is that some of the directories do not exist
596 # in certain situations (e.g., exportable source builds,
600 @if
[ -f
$@
/Makefile
]; then \
601 cd
$@
; pwd
; $(MAKE
) $(TARGET
); \
606 $(SUBDIRS
:%=%-nodepend
):
607 @if
[ -f
$(@
:%-nodepend
=%)/Makefile
]; then \
608 cd
$(@
:%-nodepend
=%); pwd
; $(MAKE
) $(TARGET
); \