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>
29 include ..
/Makefile.master
31 # Note that libcurses installs commands along with its library.
32 # This is a minor bug which probably should be fixed.
33 # Note also that a few extra libraries are kept in cmd source.
35 # Certain libraries are linked with, hence depend on, other libraries.
37 # Although we have historically used .WAIT to express dependencies, it
38 # reduces the amount of parallelism and thus lengthens the time it
39 # takes to build the libraries. Thus, we now require that any new
40 # libraries explicitly call out their dependencies. Eventually, all
41 # the library dependencies will be called out explicitly. See
42 # "Library interdependencies" near the end of this file.
44 # Aside from explicit dependencies (and legacy .WAITs), all libraries
45 # are built in parallel.
52 ..
/cmd
/sgs
/libdl .WAIT
56 ..
/cmd
/sgs
/libelf .WAIT \
73 ..
/cmd
/sgs
/librtld_db \
144 gss_mechs
/mech_krb5 .WAIT \
210 gss_mechs
/mech_spnego \
211 gss_mechs
/mech_dummy \
232 ..
/cmd
/sendmail
/libmilter \
273 sparc_SUBDIRS
= .WAIT \
286 FM_sparc_DEPLIBS
= libpri
293 $(FM_
$(MACH
)_DEPLIBS
)
296 # Create a special version of $(SUBDIRS) with no .WAIT's, for use with the
297 # clean and clobber targets (for more information, see those targets, below).
299 NOWAIT_SUBDIRS
= $(SUBDIRS
:.WAIT
=)
310 gss_mechs
/mech_krb5 \
367 $($(MACH
)_MSGSUBDIRS
)
373 i386_MSGSUBDIRS
= libfdisk
485 ..
/cmd
/sendmail
/libmilter \
504 $($(MACH
)_HDRSUBDIRS
)
518 check := TARGET
= check
519 clean := TARGET
= clean
520 clobber := TARGET
= clobber
521 install := TARGET
= install
522 install_h
:= TARGET
= install_h
530 # For the all and install targets, we clearly must respect library
531 # dependencies so that the libraries link correctly. However, for
532 # the remaining targets (check, clean, clobber, install_h, lint, _dc
533 # and _msg), libraries do not have any dependencies on one another
534 # and thus respecting dependencies just slows down the build.
535 # As such, for these rules, we use pattern replacement to explicitly
536 # avoid triggering the dependency information. Note that for clean,
537 # clobber and lint, we must use $(NOWAIT_SUBDIRS) rather than
538 # $(SUBDIRS), to prevent `.WAIT' from expanding to `.WAIT-nodepend'.
543 install: $(SUBDIRS
) .WAIT install_extra
545 # extra libraries kept in other source areas
547 @cd ..
/cmd
/sgs
; pwd
; $(MAKE
) install_lib
550 clean clobber lint
: $(NOWAIT_SUBDIRS
:%=%-nodepend
)
552 install_h
check: $(HDRSUBDIRS
:%=%-nodepend
)
554 _msg
: $(MSGSUBDIRS
:%=%-nodepend
) .WAIT _dc
556 _dc
: $(DCSUBDIRS
:%=%-nodepend
)
559 # Library interdependencies are called out explicitly here
561 auditd_plugins
: libbsm libnsl libsecdb
562 gss_mechs
/mech_krb5
: libgss libnsl libsocket libresolv pkcs11
564 libast
: libsocket libm
565 libadutils
: libldap5 libresolv libsocket libnsl
566 nsswitch
: libadutils libidmap
569 libcmd
: libsum libast libsocket libnsl
571 libcontract
: libnvpair
573 libdevinfo
: libnvpair libsec
574 libdhcpagent
: libsocket libdhcputil libuuid libdlpi libcontract
575 libdhcputil
: libnsl libgen libinetutil libdlpi
576 libdladm
: libdevinfo libinetutil libsocket libscf librcm libnvpair \
577 libexacct libnsl libkstat libcurses
579 libdlpi
: libinetutil libdladm
581 libdscfg
: libnsctl libunistat libsocket libnsl
582 libdtrace
: libproc libgen libctf
583 libdtrace_jni
: libuutil libdtrace
586 libelfsign
: libcryptoutil libkmf
587 libidmap
: libadutils libldap5 libavl libsldap libuutil
588 libipadm
: libnsl libinetutil libsocket libdlpi libnvpair libdhcpagent \
590 libiscsit
: libc libnvpair libstmf libuuid libnsl
591 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 libm
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 libm
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
676 $(INTEL_BUILD
)libdiskmgt
:libfdisk
679 # The reason this rule checks for the existence of the
680 # Makefile is that some of the directories do not exist
681 # in certain situations (e.g., exportable source builds,
685 @if
[ -f
$@
/Makefile
]; then \
686 cd
$@
; pwd
; $(MAKE
) $(TARGET
); \
691 $(SUBDIRS
:%=%-nodepend
):
692 @if
[ -f
$(@
:%-nodepend
=%)/Makefile
]; then \
693 cd
$(@
:%-nodepend
=%); pwd
; $(MAKE
) $(TARGET
); \