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]
22 # Copyright 2011 Nexenta Systems, Inc. All rights reserved.
23 # Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
24 # Copyright (c) 2012 by Delphix. All rights reserved.
25 # Copyright (c) 2012, Joyent, Inc. All rights reserved.
26 # Copyright (c) 2013 Gary Mills
28 include ..
/Makefile.master
30 # Note that libcurses installs commands along with its library.
31 # This is a minor bug which probably should be fixed.
32 # Note also that a few extra libraries are kept in cmd source.
34 # Certain libraries are linked with, hence depend on, other libraries.
36 # Although we have historically used .WAIT to express dependencies, it
37 # reduces the amount of parallelism and thus lengthens the time it
38 # takes to build the libraries. Thus, we now require that any new
39 # libraries explicitly call out their dependencies. Eventually, all
40 # the library dependencies will be called out explicitly. See
41 # "Library interdependencies" near the end of this file.
43 # Aside from explicit dependencies (and legacy .WAITs), all libraries
44 # are built in parallel.
51 ..
/cmd
/sgs
/libdl .WAIT
55 ..
/cmd
/sgs
/libelf .WAIT \
72 ..
/cmd
/sgs
/librtld_db \
143 gss_mechs
/mech_krb5 .WAIT \
207 gss_mechs
/mech_spnego \
208 gss_mechs
/mech_dummy \
229 ..
/cmd
/sendmail
/libmilter \
272 sparc_SUBDIRS
= .WAIT \
285 FM_sparc_DEPLIBS
= libpri
292 $(FM_
$(MACH
)_DEPLIBS
)
295 # Create a special version of $(SUBDIRS) with no .WAIT's, for use with the
296 # clean and clobber targets (for more information, see those targets, below).
298 NOWAIT_SUBDIRS
= $(SUBDIRS
:.WAIT
=)
309 gss_mechs
/mech_krb5 \
367 $($(MACH
)_MSGSUBDIRS
)
373 i386_MSGSUBDIRS
= libfdisk
486 ..
/cmd
/sendmail
/libmilter \
505 $($(MACH
)_HDRSUBDIRS
)
520 check := TARGET
= check
521 clean := TARGET
= clean
522 clobber := TARGET
= clobber
523 install := TARGET
= install
524 install_h
:= TARGET
= install_h
532 # For the all and install targets, we clearly must respect library
533 # dependencies so that the libraries link correctly. However, for
534 # the remaining targets (check, clean, clobber, install_h, lint, _dc
535 # and _msg), libraries do not have any dependencies on one another
536 # and thus respecting dependencies just slows down the build.
537 # As such, for these rules, we use pattern replacement to explicitly
538 # avoid triggering the dependency information. Note that for clean,
539 # clobber and lint, we must use $(NOWAIT_SUBDIRS) rather than
540 # $(SUBDIRS), to prevent `.WAIT' from expanding to `.WAIT-nodepend'.
545 install: $(SUBDIRS
) .WAIT install_extra
547 # extra libraries kept in other source areas
549 @cd ..
/cmd
/sgs
; pwd
; $(MAKE
) install_lib
552 clean clobber lint
: $(NOWAIT_SUBDIRS
:%=%-nodepend
)
554 install_h
check: $(HDRSUBDIRS
:%=%-nodepend
)
556 _msg
: $(MSGSUBDIRS
:%=%-nodepend
) .WAIT _dc
558 _dc
: $(DCSUBDIRS
:%=%-nodepend
)
561 # Library interdependencies are called out explicitly here
563 auditd_plugins
: libbsm libnsl libsecdb
564 gss_mechs
/mech_krb5
: libgss libnsl libsocket libresolv pkcs11
567 libadutils
: libldap5 libresolv libsocket libnsl
568 nsswitch
: libadutils libidmap
571 libcmd
: libsum libast libsocket libnsl
573 libcontract
: libnvpair
575 libdevinfo
: libnvpair libsec
576 libdhcpagent
: libsocket libdhcputil libuuid libdlpi libcontract
577 libdhcpsvc
: libinetutil
578 libdhcputil
: libnsl libgen libinetutil libdlpi
579 libdladm
: libdevinfo libinetutil libsocket libscf librcm libnvpair \
580 libexacct libnsl libkstat libcurses
582 libdlpi
: libinetutil libdladm
584 libdscfg
: libnsctl libunistat libsocket libnsl
585 libdtrace
: libproc libgen libctf
586 libdtrace_jni
: libuutil libdtrace
589 libelfsign
: libcryptoutil libkmf
590 libidmap
: libadutils libldap5 libavl libsldap libuutil
591 libipadm
: libnsl libinetutil libsocket libdlpi libnvpair libdhcpagent \
593 libiscsit
: libc libnvpair libstmf libuuid libnsl
594 libkmf
: libcryptoutil pkcs11
597 librdc
: libsocket libnsl libnsctl libunistat libdscfg
599 libinetutil
: libsocket
600 libipsecutil
: libtecla libsocket
601 libinstzones
: libzonecfg libcontract
602 libpkg
: libwanboot libscf libadm
605 libsasl
: libgss libsocket pkcs11 libmd
606 sasl_plugins
: pkcs11 libgss libsocket libsasl
608 libshell
: libast libcmd libdll libsocket libsecdb
610 libsmbfs
: libcmdutils libsocket libnsl libkrb5
612 libstmfproxy
: libstmf libsocket libnsl libpthread
614 libsysevent
: libsecdb
615 libldap5
: libsasl libsocket libnsl libmd
616 libsldap
: libldap5 libtsol libnsl libc libscf libresolv
617 libpool
: libnvpair libexacct
619 libzonecfg
: libc libsocket libnsl libuuid libnvpair libsysevent libsec \
620 libbrand libpool libscf
621 libproc
: ..
/cmd
/sgs
/librtld_db ..
/cmd
/sgs
/libelf libctf libsaveargs
622 libproject
: libpool libproc libsecdb
623 libtermcap
: libcurses
624 libtsnet
: libnsl libtsol libsecdb
625 libwrap
: libnsl libsocket
626 libwanboot
: libnvpair libresolv libnsl libsocket libdevinfo libinetutil \
628 libwanbootutil
: libnsl
629 pam_modules
: libproject passwdutil smbsrv
630 libscf
: libuutil libmd libgen libsmbios libnsl
632 librestart
: libuutil libscf
633 libsaveargs
: libdisasm
634 ..
/cmd
/sgs
/libdl
: ..
/cmd
/sgs
/libconv
635 ..
/cmd
/sgs
/libelf
: ..
/cmd
/sgs
/libconv
636 pkcs11
: libcryptoutil
638 udapl
/udapl_tavor
: udapl
/libdat
639 libzfs
: libdevid libgen libnvpair libuutil \
640 libadm libavl libefi libidmap libmd libzfs_core
641 libzfs_core
: libnvpair
642 libzfs_jni
: libdiskmgt libnvpair libzfs
643 libzpool
: libavl libumem libnvpair libcmdutils
644 libsec
: libavl libidmap
645 brand
: libc libsocket
646 libshare
: libscf libzfs libuuid libfsmgt libsecdb libumem libsmbfs
647 libexacct
/demo
: libexacct libproject libsocket libnsl
649 smbsrv
: libsocket libnsl libmd libxnet libpthread librt \
650 libshare libidmap pkcs11 libsqlite libcryptoutil \
651 libreparse libcmdutils
652 libv12n
: libds libuuid
653 libvrrpadm
: libsocket libdladm libscf
656 scsi
: libnvpair libfru
657 mpapi
: libpthread libdevinfo libsysevent libnvpair
658 sun_fc
: libdevinfo libsysevent libnvpair
659 libsun_ima
: libdevinfo libsysevent libnsl
660 sun_sas
: libdevinfo libsysevent libnvpair libkstat libdevid
661 libgrubmgmt
: libdevinfo libzfs libfstyp
662 pylibbe
: libbe libzfs
663 pyzfs
: libnvpair libzfs
664 pysolaris
: libsec libidmap
665 libreparse
: libnvpair
666 libhotplug
: libnvpair
667 cfgadm_plugins
: libhotplug
669 $(INTEL_BUILD
)libdiskmgt
:libfdisk
672 # The reason this rule checks for the existence of the
673 # Makefile is that some of the directories do not exist
674 # in certain situations (e.g., exportable source builds,
678 @if
[ -f
$@
/Makefile
]; then \
679 cd
$@
; pwd
; $(MAKE
) $(TARGET
); \
684 $(SUBDIRS
:%=%-nodepend
):
685 @if
[ -f
$(@
:%-nodepend
=%)/Makefile
]; then \
686 cd
$(@
:%-nodepend
=%); pwd
; $(MAKE
) $(TARGET
); \