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 2017 Nexenta Systems, Inc.
33 include ..
/Makefile.master
35 # Note that libcurses installs commands along with its library.
36 # This is a minor bug which probably should be fixed.
37 # Note also that a few extra libraries are kept in cmd source.
39 # Certain libraries are linked with, hence depend on, other libraries.
40 # Library dependencies are called out explicitly, see "Library
41 # interdependencies" below.
44 # Build libc and its dependencies
52 # 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 \
77 gss_mechs
/mech_dummy \
79 gss_mechs
/mech_spnego \
265 # Create a special version of $(SUBDIRS) with no .WAIT's, for use with the
266 # clean and clobber targets (for more information, see those targets, below).
268 NOWAIT_SUBDIRS
= $(SUBDIRS
:.WAIT
=)
278 gss_mechs
/mech_krb5 \
322 $($(MACH
)_MSGSUBDIRS
)
328 i386_MSGSUBDIRS
= libfdisk
438 $($(MACH
)_HDRSUBDIRS
)
452 check := TARGET
= check
453 clean := TARGET
= clean
454 clobber := TARGET
= clobber
455 install := TARGET
= install
456 install_h
:= TARGET
= install_h
463 # For the all and install targets, we clearly must respect library
464 # dependencies so that the libraries link correctly. However, for
465 # the remaining targets (check, clean, clobber, install_h, _dc, and
466 # _msg), libraries do not have any dependencies on one another and
467 # thus respecting dependencies just slows down the build. As such,
468 # for these rules, we use pattern replacement to explicitly avoid
469 # triggering the dependency information. Note that for clean and
470 # clobber, we must use $(NOWAIT_SUBDIRS) rather than $(SUBDIRS),
471 # to prevent `.WAIT' from expanding to `.WAIT-nodepend'.
476 install: $(SUBDIRS
) .WAIT install_extra
478 # extra libraries kept in other source areas
480 @cd ..
/cmd
/sgs
; pwd
; $(MAKE
) install_lib
483 clean clobber: $(NOWAIT_SUBDIRS
:%=%-nodepend
)
485 install_h
check: $(HDRSUBDIRS
:%=%-nodepend
)
487 _msg
: $(MSGSUBDIRS
:%=%-nodepend
) .WAIT _dc
489 _dc
: $(DCSUBDIRS
:%=%-nodepend
)
491 # Library interdependencies are called out explicitly here.
492 ..
/cmd
/sgs
/libconv
: crt
493 ..
/cmd
/sgs
/libdl
: crt
494 libc
: ..
/cmd
/sgs
/libconv ..
/cmd
/sgs
/libdl
499 libnsl
: libc libmd libmp
500 libnvpair
: libc libnsl
501 libsocket
: libc libnsl
503 basedeps
: libc libm libmd libmp libnsl libnvpair libsocket
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 libsocket
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
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
559 libipsecutil
: libtecla
560 libiscsit
: libstmf libuuid
561 libkmf
: libcryptoutil pkcs11
562 libkvm
: ..
/cmd
/sgs
/libelf
564 libmapid
: libresolv2 libscf
567 libnwam
: libscf libbsm libdladm
568 libpcp
: libumem libdevinfo
570 libpool
: libscf libexacct
572 libproc
: ..
/cmd
/sgs
/librtld_db ..
/cmd
/sgs
/libelf libctf
573 $(INTEL_BLD
)libproc
: libsaveargs
574 libproject
: libpool libproc libsecdb
576 libprtdiag_psr
: libprtdiag
577 libraidcfg
: libdevinfo
578 librestart
: libuutil libscf libpool libproject libsecdb libsysevent
579 libsasl
: libgss pkcs11
580 libsaveargs
: libdisasm
581 libscf
: libuutil libgen libsmbios
582 libsec
: libavl libidmap
583 libshare
: libscf libzfs libuuid libfsmgt libsecdb libumem libsmbfs
584 libshell
: libast libcmd libdll libsecdb
586 libsldap
: libldap5 libscf
587 libsmbfs
: libkrb5 libsec libidmap pkcs11
588 libsmbios
: libdevinfo
592 libsun_ima
: libdevinfo libsysevent
593 libsysevent
: libsecdb
596 libv12n
: libds libuuid
598 libvrrpadm
: libdladm libscf
599 libvscan
: libscf libsecdb
600 libzfs
: libdevid libgen libuutil libadm libavl libefi libidmap \
602 libzonecfg
: libuuid libsysevent libsec libbrand libpool libscf libproc \
603 libuutil libbsm libsecdb
604 libzonestat
: libcmdutils libumem
605 libzpool
: libavl libumem libcmdutils libsysevent
607 mpapi
: libpthread libdevinfo libsysevent
609 nsswitch
: libadutils libidmap libdns_sd libscf libldap5 libsldap
610 pam_modules
: libproject passwdutil smbsrv libpam libbsm libsecdb
612 pkcs11
: libcryptoutil libgen libuuid
614 pylibbe
: libbe libzfs
615 pysolaris
: libsec libidmap
617 raidcfg_plugins
: libraidcfg librcm libcfgadm libpicl libpicltree
619 sasl_plugins
: pkcs11 libgss libsasl
620 scsi
: libfru libumem libdevid libdevinfo
621 smbsrv
: libxnet libpthread librt libshare libidmap pkcs11 libsqlite \
622 libcryptoutil libreparse libcmdutils libresolv2 libsmbfs \
623 libuuid libads libgss libldap5 krb5
624 storage
: libdevice libdevinfo libdevid
625 sun_fc
: libdevinfo libsysevent
626 sun_sas
: libdevinfo libsysevent libkstat libdevid
627 udapl
: libdevinfo libdladm
630 # The reason this rule checks for the existence of the
631 # Makefile is that some of the directories do not exist
632 # in certain situations (e.g., exportable source builds,
636 @if
[ -f
$@
/Makefile
]; then \
637 cd
$@
; pwd
; $(MAKE
) $(TARGET
); \
642 $(SUBDIRS
:%=%-nodepend
):
643 @if
[ -f
$(@
:%-nodepend
=%)/Makefile
]; then \
644 cd
$(@
:%-nodepend
=%); pwd
; $(MAKE
) $(TARGET
); \