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 \
161 $(CLOSED_BUILD
)SUBDIRS
+= \
162 $(CLOSED
)/lib
/smartcard
184 $(CLOSED_BUILD
)SUBDIRS
+= \
213 gss_mechs
/mech_spnego \
214 gss_mechs
/mech_dummy \
235 ..
/cmd
/sendmail
/libmilter \
266 sparc_SUBDIRS
= .WAIT \
281 FM_sparc_DEPLIBS
= libpri
288 $(FM_
$(MACH
)_DEPLIBS
)
291 # Create a special version of $(SUBDIRS) with no .WAIT's, for use with the
292 # clean and clobber targets (for more information, see those targets, below).
294 NOWAIT_SUBDIRS
= $(SUBDIRS
:.WAIT
=)
305 gss_mechs
/mech_krb5 \
356 $(CLOSED_BUILD
)MSGSUBDIRS
+= \
357 $(CLOSED
)/lib
/smartcard
359 $($(MACH
)_MSGSUBDIRS
)
467 ..
/cmd
/sendmail
/libmilter \
483 $($(MACH
)_HDRSUBDIRS
)
485 $(CLOSED_BUILD
)HDRSUBDIRS
+= \
486 $(CLOSED
)/lib
/libc_i18n \
487 $(CLOSED
)/lib
/libike \
488 $(CLOSED
)/lib
/smartcard
497 check := TARGET
= check
498 clean := TARGET
= clean
499 clobber := TARGET
= clobber
500 install := TARGET
= install
501 install_h
:= TARGET
= install_h
509 # For the all and install targets, we clearly must respect library
510 # dependencies so that the libraries link correctly. However, for
511 # the remaining targets (check, clean, clobber, install_h, lint, _dc
512 # and _msg), libraries do not have any dependencies on one another
513 # and thus respecting dependencies just slows down the build.
514 # As such, for these rules, we use pattern replacement to explicitly
515 # avoid triggering the dependency information. Note that for clean,
516 # clobber and lint, we must use $(NOWAIT_SUBDIRS) rather than
517 # $(SUBDIRS), to prevent `.WAIT' from expanding to `.WAIT-nodepend'.
522 install: $(SUBDIRS
) .WAIT install_extra
524 # extra libraries kept in other source areas
526 @cd ..
/cmd
/sgs
; pwd
; $(MAKE
) install_lib
529 clean clobber lint
: $(NOWAIT_SUBDIRS
:%=%-nodepend
)
531 install_h
check: $(HDRSUBDIRS
:%=%-nodepend
)
533 _msg
: $(MSGSUBDIRS
:%=%-nodepend
) .WAIT _dc
535 _dc
: $(DCSUBDIRS
:%=%-nodepend
)
537 # dependencies for pam_modules (see below)
538 $(CLOSED_BUILD
)SMARTCARD
= $(CLOSED
)/lib
/smartcard
541 # Library interdependencies are called out explicitly here
543 auditd_plugins
: libbsm libnsl libsecdb
544 gss_mechs
/mech_krb5
: libgss libnsl libsocket libresolv pkcs11
546 $(CLOSED_BUILD
)libc
: $(CLOSED
)/lib
/libc_i18n
548 libadutils
: libldap5 libresolv libsocket libnsl
549 nsswitch
: libadutils libidmap
551 libcmd
: libsum libast libsocket libnsl
553 libcontract
: libnvpair
555 libdevinfo
: libnvpair libsec
556 libdhcpagent
: libsocket libdhcputil libuuid libdlpi libcontract
557 libdhcpsvc
: libinetutil
558 libdhcputil
: libnsl libgen libinetutil libdlpi
559 libdladm
: libdevinfo libinetutil libsocket libscf librcm libnvpair \
560 libexacct libnsl libkstat libcurses
562 libdlpi
: libinetutil libdladm
563 libdscfg
: libnsctl libunistat libsocket libnsl
564 libdtrace
: libproc libgen libctf
565 libdtrace_jni
: libuutil libdtrace
568 libelfsign
: libcryptoutil libkmf
569 libidmap
: libadutils libldap5 libavl libsldap
570 libinetcfg
: libnsl libsocket libdlpi
571 libiscsit
: libc libnvpair libstmf libuuid libnsl
572 libkmf
: libcryptoutil pkcs11 openssl
573 libnsl
: libmd5 libscf
576 librdc
: libsocket libnsl libnsctl libunistat libdscfg
578 libinetutil
: libsocket
580 libsasl
: libgss libsocket pkcs11 libmd
581 sasl_plugins
: pkcs11 libgss libsocket libsasl
583 libshell
: libast libcmd libdll libsocket libsecdb
585 libsmbfs
: libsocket libnsl libkrb5
588 libldap5
: libsasl libsocket libnsl libmd
589 libsldap
: libldap5 libtsol libnsl libc libscf libresolv
590 libpool
: libnvpair libexacct
592 libzonecfg
: libc libsocket libnsl libuuid libnvpair libsysevent libsec \
593 libbrand libpool libscf
594 libproc
: ..
/cmd
/sgs
/librtld_db ..
/cmd
/sgs
/libelf libctf
595 libproject
: libpool libproc libsecdb
596 libtsnet
: libnsl libtsol libsecdb
597 libwrap
: libnsl libsocket
598 libwanboot
: libnvpair libresolv libnsl libsocket libdevinfo libinetutil \
600 libwanbootutil
: libnsl
601 pam_modules
: libproject passwdutil
$(SMARTCARD
) smbsrv
602 libscf
: libuutil libmd libgen libsmbios
604 librestart
: libuutil libscf
605 ..
/cmd
/sgs
/libdl
: ..
/cmd
/sgs
/libconv
606 ..
/cmd
/sgs
/libelf
: ..
/cmd
/sgs
/libconv
607 pkcs11
: libcryptoutil openssl
609 udapl
/udapl_tavor
: udapl
/libdat
610 libzfs
: libdevinfo libdevid libgen libnvpair libuutil libiscsitgt \
611 libavl libefi libidmap libsec
612 libzfs_jni
: libdiskmgt libnvpair libzfs
613 libzpool
: libavl libumem libnvpair
614 libsec
: libavl libidmap
615 brand
: libc libsocket
616 libshare
: libscf libzfs libuuid libfsmgt libsecdb libumem libsmbfs
617 libexacct
/demo
: libexacct libproject libsocket libnsl
619 smbsrv
: libsocket libnsl libmd libxnet libpthread librt \
620 libshare libidmap pkcs11 libsqlite
623 mpapi
: libpthread libdevinfo libsysevent libnvpair
624 libgrubmgmt
: libdevinfo libzfs libfstyp
625 pyzfs
: libnvpair libsec libidmap libzfs
628 # The reason this rule checks for the existence of the
629 # Makefile is that some of the directories do not exist
630 # in certain situations (e.g., exportable source builds,
634 @if
[ -f
$@
/Makefile
]; then \
635 cd
$@
; pwd
; $(MAKE
) $(TARGET
); \
640 $(SUBDIRS
:%=%-nodepend
):
641 @if
[ -f
$(@
:%-nodepend
=%)/Makefile
]; then \
642 cd
$(@
:%-nodepend
=%); pwd
; $(MAKE
) $(TARGET
); \