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
27 # Copyright 2014 Garrett D'Amore <garrett@damore.org>
28 # Copyright (c) 2015 Gary Mills
30 include ..
/Makefile.master
32 # Note that libcurses installs commands along with its library.
33 # This is a minor bug which probably should be fixed.
34 # Note also that a few extra libraries are kept in cmd source.
36 # Certain libraries are linked with, hence depend on, other libraries.
38 # Although we have historically used .WAIT to express dependencies, it
39 # reduces the amount of parallelism and thus lengthens the time it
40 # takes to build the libraries. Thus, we now require that any new
41 # libraries explicitly call out their dependencies. Eventually, all
42 # the library dependencies will be called out explicitly. See
43 # "Library interdependencies" near the end of this file.
45 # Aside from explicit dependencies (and legacy .WAITs), all libraries
46 # are built in parallel.
53 ..
/cmd
/sgs
/libdl .WAIT
57 ..
/cmd
/sgs
/libelf .WAIT \
74 ..
/cmd
/sgs
/librtld_db \
145 gss_mechs
/mech_krb5 .WAIT \
211 gss_mechs
/mech_spnego \
212 gss_mechs
/mech_dummy \
233 ..
/cmd
/sendmail
/libmilter \
275 sparc_SUBDIRS
= .WAIT \
288 FM_sparc_DEPLIBS
= libpri
295 $(FM_
$(MACH
)_DEPLIBS
)
298 # Create a special version of $(SUBDIRS) with no .WAIT's, for use with the
299 # clean and clobber targets (for more information, see those targets, below).
301 NOWAIT_SUBDIRS
= $(SUBDIRS
:.WAIT
=)
312 gss_mechs
/mech_krb5 \
369 $($(MACH
)_MSGSUBDIRS
)
375 i386_MSGSUBDIRS
= libfdisk
488 ..
/cmd
/sendmail
/libmilter \
507 $($(MACH
)_HDRSUBDIRS
)
521 check := TARGET
= check
522 clean := TARGET
= clean
523 clobber := TARGET
= clobber
524 install := TARGET
= install
525 install_h
:= TARGET
= install_h
533 # For the all and install targets, we clearly must respect library
534 # dependencies so that the libraries link correctly. However, for
535 # the remaining targets (check, clean, clobber, install_h, lint, _dc
536 # and _msg), libraries do not have any dependencies on one another
537 # and thus respecting dependencies just slows down the build.
538 # As such, for these rules, we use pattern replacement to explicitly
539 # avoid triggering the dependency information. Note that for clean,
540 # clobber and lint, we must use $(NOWAIT_SUBDIRS) rather than
541 # $(SUBDIRS), to prevent `.WAIT' from expanding to `.WAIT-nodepend'.
546 install: $(SUBDIRS
) .WAIT install_extra
548 # extra libraries kept in other source areas
550 @cd ..
/cmd
/sgs
; pwd
; $(MAKE
) install_lib
553 clean clobber lint
: $(NOWAIT_SUBDIRS
:%=%-nodepend
)
555 install_h
check: $(HDRSUBDIRS
:%=%-nodepend
)
557 _msg
: $(MSGSUBDIRS
:%=%-nodepend
) .WAIT _dc
559 _dc
: $(DCSUBDIRS
:%=%-nodepend
)
562 # Library interdependencies are called out explicitly here
564 auditd_plugins
: libbsm libnsl libsecdb
565 krb5
: gss_mechs
/mech_krb5
566 gss_mechs
/mech_krb5
: libgss libnsl libsocket libresolv pkcs11
567 gss_mechs
/mech_spnego
: gss_mechs
/mech_krb5
569 libast
: libsocket libm
570 libadutils
: libldap5 libresolv libsocket libnsl
571 nsswitch
: libadutils libidmap
574 libcmd
: libsum libast libsocket libnsl
575 libcmdutils
: libavl libnvpair
576 libcontract
: libnvpair
579 libdevinfo
: libnvpair libsec
580 libdhcpagent
: libsocket libdhcputil libuuid libdlpi libcontract
581 libdhcputil
: libnsl libgen libinetutil libdlpi
582 libdladm
: libdevinfo libinetutil libsocket libscf librcm libnvpair \
583 libexacct libnsl libkstat libcurses
586 libdlpi
: libinetutil libdladm
588 libdscfg
: libnsctl libunistat libsocket libnsl
589 libdtrace
: libproc libgen libctf libmapmalloc
590 libdtrace_jni
: libuutil libdtrace
594 libelfsign
: libcryptoutil libkmf
595 libidmap
: libadutils libldap5 libavl libsldap libuutil
596 libipadm
: libnsl libinetutil libsocket libdlpi libnvpair libdhcpagent \
598 libiscsit
: libc libnvpair libstmf libuuid libnsl
599 libkmf
: libcryptoutil pkcs11
605 libnisdb
: libnsl libldap5
607 librdc
: libsocket libnsl libnsctl libunistat libdscfg
609 libinetutil
: libsocket
610 libipsecutil
: libtecla libsocket
611 libinstzones
: libzonecfg libcontract
612 libpkg
: libwanboot libscf libadm
613 libnwam
: libscf libbsm libdladm
615 libsasl
: libgss libsocket pkcs11 libmd
616 sasl_plugins
: pkcs11 libgss libsocket libsasl
618 libshell
: libast libcmd libdll libsocket libsecdb libm
620 libsmbfs
: libcmdutils libsocket libnsl libkrb5 libsec libidmap
622 libstmfproxy
: libstmf libsocket libnsl libpthread
624 libsysevent
: libsecdb libnvpair
625 libldap5
: libsasl libsocket libnsl libmd
626 libsldap
: libldap5 libtsol libnsl libc libscf libresolv
627 libpool
: libnvpair libexacct
629 libzonecfg
: libc libsocket libnsl libuuid libnvpair libsysevent libsec \
630 libbrand libpool libscf
631 libproc
: ..
/cmd
/sgs
/librtld_db ..
/cmd
/sgs
/libelf libctf libsaveargs
632 libproject
: libpool libproc libsecdb
633 libtermcap
: libcurses
634 libtsnet
: libnsl libtsol libsecdb
635 libwrap
: libnsl libsocket
636 libwanboot
: libnvpair libresolv libnsl libsocket libdevinfo libinetutil \
638 libwanbootutil
: libnsl
639 pam_modules
: libproject passwdutil smbsrv libtsnet
640 libscf
: libuutil libmd libgen libsmbios libnsl libnvpair
642 librestart
: libuutil libscf libpool libproject libsecdb libnvpair
643 libsaveargs
: libdisasm
644 ..
/cmd
/sgs
/libdl
: ..
/cmd
/sgs
/libconv
645 ..
/cmd
/sgs
/libelf
: ..
/cmd
/sgs
/libconv
647 pkcs11
: libcryptoutil libmd
648 # Adding libuuid or libdladm results in a circular dependancy
650 udapl
/udapl_tavor
: udapl
/libdat
651 libzfs
: libdevid libgen libnvpair libuutil \
652 libadm libavl libefi libidmap libmd libzfs_core libm
653 libzfs_core
: libnvpair
654 libzfs_jni
: libdiskmgt libnvpair libzfs
655 libzpool
: libavl libumem libnvpair libcmdutils
656 libsec
: libavl libidmap
657 brand
: libc libsocket
658 libshare
: libscf libzfs libuuid libfsmgt libsecdb libumem libsmbfs
659 libexacct
/demo
: libexacct libproject libsocket libnsl
661 smbsrv
: libsocket libnsl libmd libxnet libpthread librt \
662 libshare libidmap pkcs11 libsqlite libcryptoutil \
663 libreparse libcmdutils libfakekernel
664 libv12n
: libds libuuid
665 libvrrpadm
: libsocket libdladm libscf
668 scsi
: libnvpair libfru
669 mpapi
: libpthread libdevinfo libsysevent libnvpair
670 sun_fc
: libdevinfo libsysevent libnvpair
671 libsun_ima
: libdevinfo libsysevent libnsl
672 sun_sas
: libdevinfo libsysevent libnvpair libkstat libdevid
673 libgrubmgmt
: libdevinfo libzfs libfstyp
674 pylibbe
: libbe libzfs
675 pyzfs
: libnvpair libzfs
676 pysolaris
: libsec libidmap
677 libreparse
: libnvpair
678 libhotplug
: libnvpair
679 cfgadm_plugins
: libhotplug
688 $(INTEL_BUILD
)libdiskmgt
:libfdisk
691 # The reason this rule checks for the existence of the
692 # Makefile is that some of the directories do not exist
693 # in certain situations (e.g., exportable source builds,
697 @if
[ -f
$@
/Makefile
]; then \
698 cd
$@
; pwd
; $(MAKE
) $(TARGET
); \
703 $(SUBDIRS
:%=%-nodepend
):
704 @if
[ -f
$(@
:%-nodepend
=%)/Makefile
]; then \
705 cd
$(@
:%-nodepend
=%); pwd
; $(MAKE
) $(TARGET
); \