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 2009 Sun Microsystems, Inc. All rights reserved.
23 # Use is subject to license terms.
27 include ..
/Makefile.master
29 # Note that libcurses installs commands along with its library.
30 # This is a minor bug which probably should be fixed.
31 # Note also that a few extra libraries are kept in cmd source.
33 # Certain libraries are linked with, hence depend on, other libraries.
35 # Although we have historically used .WAIT to express dependencies, it
36 # reduces the amount of parallelism and thus lengthens the time it
37 # takes to build the libraries. Thus, we now require that any new
38 # libraries explicitly call out their dependencies. Eventually, all
39 # the library dependencies will be called out explicitly. See
40 # "Library interdependencies" near the end of this file.
42 # Aside from explicit dependencies (and legacy .WAITs), all libraries
43 # are built in parallel.
48 # The $(CLOSED_BUILD) additions to SUBDIRS & MSGSUBDIRS are unfortunate,
49 # but required due to the "dependencies" of using .WAIT to barrier the
50 # parallel dmake builds. once 4631488 has been fixed, they can be
51 # consolidated into one $(CLOSED_BUILD)SUBDIRS += (all closed libs) as
57 ..
/cmd
/sgs
/libdl .WAIT
59 $(CLOSED_BUILD
)SUBDIRS
+= \
60 $(CLOSED
)/lib
/libc_i18n
64 ..
/cmd
/sgs
/libelf .WAIT \
81 ..
/cmd
/sgs
/librtld_db \
151 gss_mechs
/mech_krb5 .WAIT \
160 $(CLOSED_BUILD
)SUBDIRS
+= \
161 $(CLOSED
)/lib
/smartcard
183 $(CLOSED_BUILD
)SUBDIRS
+= \
211 gss_mechs
/mech_spnego \
212 gss_mechs
/mech_dummy \
234 ..
/cmd
/sendmail
/libmilter \
259 sparc_SUBDIRS
= .WAIT \
274 FM_sparc_DEPLIBS
= libpri
281 $(FM_
$(MACH
)_DEPLIBS
)
284 # Create a special version of $(SUBDIRS) with no .WAIT's, for use with the
285 # clean and clobber targets (for more information, see those targets, below).
287 NOWAIT_SUBDIRS
= $(SUBDIRS
:.WAIT
=)
298 gss_mechs
/mech_krb5 \
346 $(CLOSED_BUILD
)MSGSUBDIRS
+= \
347 $(CLOSED
)/lib
/smartcard
349 $($(MACH
)_MSGSUBDIRS
)
456 ..
/cmd
/sendmail
/libmilter \
471 $($(MACH
)_HDRSUBDIRS
)
473 $(CLOSED_BUILD
)HDRSUBDIRS
+= \
474 $(CLOSED
)/lib
/libc_i18n \
475 $(CLOSED
)/lib
/libike \
476 $(CLOSED
)/lib
/smartcard
485 check := TARGET
= check
486 clean := TARGET
= clean
487 clobber := TARGET
= clobber
488 install := TARGET
= install
489 install_h
:= TARGET
= install_h
497 # For the all and install targets, we clearly must respect library
498 # dependencies so that the libraries link correctly. However, for
499 # the remaining targets (check, clean, clobber, install_h, lint, _dc
500 # and _msg), libraries do not have any dependencies on one another
501 # and thus respecting dependencies just slows down the build.
502 # As such, for these rules, we use pattern replacement to explicitly
503 # avoid triggering the dependency information. Note that for clean,
504 # clobber and lint, we must use $(NOWAIT_SUBDIRS) rather than
505 # $(SUBDIRS), to prevent `.WAIT' from expanding to `.WAIT-nodepend'.
510 install: $(SUBDIRS
) .WAIT install_extra
512 # extra libraries kept in other source areas
514 @cd ..
/cmd
/sgs
; pwd
; $(MAKE
) install_lib
517 clean clobber lint
: $(NOWAIT_SUBDIRS
:%=%-nodepend
)
519 install_h
check: $(HDRSUBDIRS
:%=%-nodepend
)
521 _msg
: $(MSGSUBDIRS
:%=%-nodepend
) .WAIT _dc
523 _dc
: $(DCSUBDIRS
:%=%-nodepend
)
525 # dependencies for pam_modules (see below)
526 $(CLOSED_BUILD
)SMARTCARD
= $(CLOSED
)/lib
/smartcard
529 # Library interdependencies are called out explicitly here
531 auditd_plugins
: libbsm libnsl libsecdb
532 gss_mechs
/mech_krb5
: libgss libnsl libsocket libresolv pkcs11
534 $(CLOSED_BUILD
)libc
: $(CLOSED
)/lib
/libc_i18n
536 libadutils
: libldap5 libresolv libsocket libnsl
537 nsswitch
: libadutils libidmap
539 libcmd
: libsum libast libsocket libnsl
541 libcontract
: libnvpair
543 libdevinfo
: libnvpair libsec
544 libdhcpagent
: libsocket libdhcputil libuuid libdlpi
545 libdhcpsvc
: libinetutil
546 libdhcputil
: libnsl libgen libinetutil libdlpi
547 libdladm
: libdevinfo libinetutil libsocket libnsl libexacct libscf
549 libdlpi
: libinetutil libdladm
550 libdscfg
: libnsctl libunistat libsocket libnsl
551 libdtrace
: libproc libgen libctf
552 libdtrace_jni
: libuutil libdtrace
555 libelfsign
: libcryptoutil libkmf
556 libidmap
: libadutils libldap5 libavl libsldap
557 libinetcfg
: libnsl libsocket libdlpi
558 libiscsit
: libc libnvpair libstmf libuuid libnsl
559 libkmf
: libcryptoutil pkcs11 openssl
560 libnsl
: libmd5 libscf
563 librdc
: libsocket libnsl libnsctl libunistat libdscfg
565 libinetutil
: libsocket
567 libsasl
: libgss libsocket pkcs11 libmd
568 sasl_plugins
: pkcs11 libgss libsocket libsasl
570 libshell
: libast libcmd libdll libsocket libsecdb
572 libsmbfs
: libsocket libnsl libkrb5
575 libldap5
: libsasl libsocket libnsl libmd
576 libsldap
: libldap5 libtsol libnsl libc libscf libresolv
577 libpool
: libnvpair libexacct
579 libzonecfg
: libc libsocket libnsl libuuid libnvpair libsysevent libsec \
580 libbrand libpool libscf
581 libproc
: ..
/cmd
/sgs
/librtld_db ..
/cmd
/sgs
/libelf libctf
582 libproject
: libpool libproc libsecdb
583 libtsnet
: libnsl libtsol libsecdb
584 libwrap
: libnsl libsocket
585 libwanboot
: libnvpair libresolv libnsl libsocket libdevinfo libinetutil \
587 libwanbootutil
: libnsl
588 pam_modules
: libproject passwdutil
$(SMARTCARD
) smbsrv
589 libscf
: libuutil libmd libgen
591 librestart
: libuutil libscf
592 ..
/cmd
/sgs
/libdl
: ..
/cmd
/sgs
/libconv
593 ..
/cmd
/sgs
/libelf
: ..
/cmd
/sgs
/libconv
594 pkcs11
: libcryptoutil
596 udapl
/udapl_tavor
: udapl
/libdat
597 libzfs
: libdevinfo libdevid libgen libnvpair libuutil libiscsitgt
598 libzfs_jni
: libdiskmgt libnvpair libzfs
599 libzpool
: libavl libumem libnvpair
600 libsec
: libavl libidmap
601 brand
: libc libsocket
602 libshare
: libscf libzfs libuuid libfsmgt libsecdb libumem libsmbfs
603 libexacct
/demo
: libexacct libproject libsocket libnsl
605 smbsrv
: libsocket libnsl libmd libxnet libpthread librt \
606 libshare libidmap pkcs11 libsqlite
609 mpapi
: libpthread libdevinfo libsysevent libnvpair
612 # The reason this rule checks for the existence of the
613 # Makefile is that some of the directories do not exist
614 # in certain situations (e.g., exportable source builds,
618 @if
[ -f
$@
/Makefile
]; then \
619 cd
$@
; pwd
; $(MAKE
) $(TARGET
); \
624 $(SUBDIRS
:%=%-nodepend
):
625 @if
[ -f
$(@
:%-nodepend
=%)/Makefile
]; then \
626 cd
$(@
:%-nodepend
=%); pwd
; $(MAKE
) $(TARGET
); \