Makefile revision e1dd0a2f3a26050d1f183c1cafae42c4e3a0b57e
0N/A#
3909N/A# CDDL HEADER START
0N/A#
0N/A# The contents of this file are subject to the terms of the
0N/A# Common Development and Distribution License (the "License").
0N/A# You may not use this file except in compliance with the License.
2362N/A#
0N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2362N/A# or http://www.opensolaris.org/os/licensing.
0N/A# See the License for the specific language governing permissions
0N/A# and limitations under the License.
0N/A#
0N/A# When distributing Covered Code, include this CDDL HEADER in each
0N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
0N/A# If applicable, add the following below this CDDL HEADER, with the
0N/A# fields enclosed by brackets "[]" replaced with your own identifying
0N/A# information: Portions Copyright [yyyy] [name of copyright owner]
0N/A#
0N/A# CDDL HEADER END
0N/A#
2362N/A#
2362N/A# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
2362N/A# Use is subject to license terms.
0N/A#
0N/A# ident "%Z%%M% %I% %E% SMI"
0N/A#
0N/A
0N/Ainclude ../Makefile.master
0N/A
0N/A# Note that libcurses installs commands along with its library.
0N/A# This is a minor bug which probably should be fixed.
0N/A# Note also that a few extra libraries are kept in cmd source.
0N/A#
0N/A# Certain libraries are linked with, hence depend on, other libraries.
0N/A#
0N/A# Although we have historically used .WAIT to express dependencies, it
0N/A# reduces the amount of parallelism and thus lengthens the time it
0N/A# takes to build the libraries. Thus, we now require that any new
3784N/A# libraries explicitly call out their dependencies. Eventually, all
3784N/A# the library dependencies will be called out explicitly. See
3784N/A# "Library interdependencies" near the end of this file.
0N/A#
0N/A# Aside from explicit dependencies (and legacy .WAITs), all libraries
0N/A# are built in parallel.
0N/A#
0N/A.PARALLEL:
0N/A
0N/A#
0N/A# The $(CLOSED_BUILD) additions to SUBDIRS & MSGSUBDIRS are unfortunate,
0N/A# but required due to the "dependencies" of using .WAIT to barrier the
0N/A# parallel dmake builds. once 4631488 has been fixed, they can be
0N/A# consolidated into one $(CLOSED_BUILD)SUBDIRS += (all closed libs) as
0N/A# shown in HDRSUBDIRS
0N/A#
0N/ASUBDIRS= \
0N/A common .WAIT \
0N/A ../cmd/sgs/libconv \
0N/A ../cmd/sgs/libdl .WAIT
0N/A
0N/A$(CLOSED_BUILD)SUBDIRS += \
0N/A $(CLOSED)/lib/libc_i18n
0N/A
0N/ASUBDIRS += \
0N/A libc .WAIT \
0N/A ../cmd/sgs/libelf .WAIT \
0N/A c_synonyms \
0N/A libmd \
0N/A libmd5 \
0N/A librsm \
0N/A libmp .WAIT \
0N/A libnsl \
0N/A libsecdb .WAIT \
0N/A librpcsvc \
0N/A libsocket .WAIT \
0N/A libsctp \
0N/A libsip \
0N/A libcommputil \
0N/A libresolv \
0N/A libresolv2 .WAIT \
0N/A libw .WAIT \
0N/A libintl .WAIT \
0N/A ../cmd/sgs/librtld_db \
0N/A libaio \
0N/A libast \
0N/A libdll \
0N/A libcmd \
0N/A libshell \
0N/A librt \
0N/A libadm \
0N/A libctf \
0N/A libdtrace \
0N/A libdtrace_jni \
0N/A libcurses \
0N/A libgen \
0N/A libgss \
0N/A libpam \
0N/A libuuid \
0N/A libthread \
0N/A libpthread .WAIT \
0N/A libslp \
0N/A libbsdmalloc \
0N/A libdoor \
0N/A libdevinfo \
0N/A libdladm \
0N/A libdlpi \
0N/A libeti \
0N/A libcrypt \
0N/A libdns_sd \
0N/A libefi \
0N/A libfstyp \
0N/A libwanboot \
0N/A libwanbootutil \
0N/A libcryptoutil \
0N/A libinetcfg \
0N/A libinetutil \
0N/A libipmp \
0N/A libiscsitgt \
0N/A libkmf \
1121N/A libkstat \
0N/A libkvm \
1121N/A liblm \
0N/A libmalloc \
0N/A libmapmalloc \
4632N/A libmtmalloc \
4632N/A libnls \
4632N/A libsmbios \
4632N/A libtecla \
4632N/A libumem \
4632N/A libnvpair .WAIT \
4632N/A libexacct \
0N/A libplot \
0N/A libldap4 \
0N/A libsasl \
0N/A libldap5 \
0N/A libsldap .WAIT \
0N/A libbsm \
0N/A libsys \
0N/A libsysevent \
0N/A libnisdb \
0N/A libpool \
0N/A libpp \
0N/A libproc \
0N/A libproject \
0N/A libsendfile \
0N/A nametoaddr \
0N/A ncad_addr \
0N/A gss_mechs/mech_krb5 .WAIT \
0N/A libkrb5 .WAIT \
0N/A krb5 .WAIT \
0N/A libsmbfs
0N/A$(CLOSED_BUILD)SUBDIRS += \
0N/A $(CLOSED)/lib/smartcard
0N/ASUBDIRS += \
0N/A passwdutil \
0N/A pam_modules \
0N/A crypt_modules \
0N/A libadt_jni \
0N/A abi \
1686N/A auditd_plugins \
1686N/A libvolmgt \
0N/A libdevice \
0N/A libdevid \
0N/A libdhcpsvc \
0N/A libc_db \
0N/A libsec \
0N/A libtnfprobe \
0N/A libtnf \
0N/A libtnfctl \
0N/A libdhcpagent \
0N/A libdhcpdu \
0N/A libdhcputil \
0N/A libipsecutil
0N/A$(CLOSED_BUILD)SUBDIRS += \
1686N/A $(CLOSED)/lib/libike \
0N/A $(CLOSED)/lib/libndmp
0N/ASUBDIRS += \
0N/A nsswitch \
0N/A print \
0N/A libuutil \
0N/A libscf \
1686N/A libinetsvc \
0N/A librestart \
0N/A libsched \
0N/A libelfsign \
0N/A pkcs11 .WAIT \
0N/A libpctx .WAIT \
0N/A libcpc \
0N/A watchmalloc \
0N/A extendedFILE \
1686N/A madv \
0N/A mpss \
0N/A libdisasm \
0N/A libwrap \
0N/A libxcurses \
0N/A libxcurses2 \
0N/A libxnet \
0N/A libbrand .WAIT \
0N/A libzonecfg \
1686N/A libzoneinfo \
0N/A libtsnet \
0N/A libtsol \
0N/A gss_mechs/mech_spnego \
0N/A gss_mechs/mech_dummy \
0N/A gss_mechs/mech_dh \
0N/A rpcsec_gss \
0N/A libraidcfg .WAIT \
0N/A librcm .WAIT \
1686N/A libcfgadm .WAIT \
0N/A libpicl .WAIT \
0N/A libpicltree .WAIT \
0N/A raidcfg_plugins \
0N/A cfgadm_plugins \
0N/A libmail \
0N/A lvm \
0N/A libsmedia \
0N/A libipp \
1686N/A openssl \
0N/A libdiskmgt \
0N/A liblgrp \
0N/A libfsmgt \
0N/A fm \
0N/A libavl \
0N/A libcmdutils \
0N/A libcontract \
0N/A ../cmd/sendmail/libmilter \
1686N/A sasl_plugins \
0N/A udapl \
0N/A libzpool \
0N/A libzfs \
0N/A libzfs_jni \
0N/A libmapid \
0N/A brand \
0N/A policykit \
0N/A hal \
1686N/A libshare \
0N/A libsqlite \
0N/A libidmap \
0N/A libipmi \
0N/A libexacct/demo \
0N/A libvscan \
0N/A smbsrv \
0N/A scsi \
0N/A $($(MACH)_SUBDIRS)
0N/A
0N/Asparc_SUBDIRS= .WAIT \
0N/A efcode \
0N/A libc_psr .WAIT \
1121N/A libdscp \
1121N/A libprtdiag .WAIT \
0N/A libprtdiag_psr \
0N/A libpri \
1121N/A librsc \
0N/A libfruutils .WAIT \
1121N/A libfru \
1121N/A storage \
0N/A libpcp \
1121N/A libtsalarm
0N/A
0N/AFM_sparc_DEPLIBS= libpri
0N/A
0N/Afm: \
0N/A libexacct \
0N/A libipmi \
0N/A $(FM_$(MACH)_DEPLIBS)
0N/A
1121N/A#
1121N/A# Create a special version of $(SUBDIRS) with no .WAIT's, for use with the
1121N/A# clean and clobber targets (for more information, see those targets, below).
0N/A#
0N/ANOWAIT_SUBDIRS= $(SUBDIRS:.WAIT=)
0N/A
0N/ADCSUBDIRS = \
0N/A lvm
0N/A
0N/AMSGSUBDIRS= \
0N/A abi \
1686N/A auditd_plugins \
1686N/A brand \
0N/A cfgadm_plugins \
0N/A gss_mechs/mech_dh \
0N/A gss_mechs/mech_krb5 \
0N/A krb5 \
0N/A libast \
0N/A libbsm \
0N/A libc \
0N/A libcfgadm \
3784N/A libcmd \
3784N/A libcontract \
3784N/A libcurses \
3784N/A libdhcpsvc \
3784N/A libdhcputil \
3784N/A libipsecutil \
3784N/A libdiskmgt \
3784N/A libdladm \
3784N/A libdll \
3784N/A libgss \
3784N/A libidmap \
3784N/A libinetcfg \
3784N/A libipmp \
3784N/A libnsl \
3784N/A libpam \
3784N/A libpicl \
3784N/A libpool \
3784N/A libpp \
3784N/A libscf \
3784N/A libsasl \
3784N/A libldap5 \
3784N/A libsecdb \
3784N/A libshare \
3784N/A libshell \
3784N/A libsldap \
3784N/A libslp \
3784N/A libsmbfs \
3784N/A libsmedia \
3784N/A libtsol \
3784N/A libuutil \
3784N/A libvscan \
3784N/A libwanboot \
3784N/A libwanbootutil \
3784N/A libzfs \
3784N/A libzonecfg \
3784N/A lvm \
3784N/A madv \
3784N/A mpss \
3784N/A pam_modules \
3784N/A rpcsec_gss
3784N/A$(CLOSED_BUILD)MSGSUBDIRS += \
3784N/A $(CLOSED)/lib/smartcard
3784N/AMSGSUBDIRS += \
3784N/A $($(MACH)_MSGSUBDIRS)
3784N/A
0N/Asparc_MSGSUBDIRS= \
libprtdiag \
libprtdiag_psr
HDRSUBDIRS= \
auditd_plugins \
libast \
libbrand \
libbsm \
libc \
libcmd \
libcmdutils \
libcontract \
libcpc \
libctf \
libcurses \
libcryptoutil \
libdevice \
libdevid \
libdevinfo \
libdiskmgt \
libdladm \
libdll \
libdlpi \
libdhcpagent \
libdhcpsvc \
libdhcputil \
libdisasm \
libdns_sd \
libdtrace \
libdtrace_jni \
libelfsign \
libeti \
libfstyp \
libgen \
libwanboot \
libwanbootutil \
libipsecutil \
libinetcfg \
libinetsvc \
libinetutil \
libipmi \
libipmp \
libipp \
libiscsitgt \
libkstat \
libkvm \
libmail \
libmd \
libmtmalloc \
libnvpair \
libnsl \
libpam \
libpctx \
libpicl \
libpicltree \
libplot \
libpool \
libpp \
libproc \
libraidcfg \
librcm \
libscf \
libsip \
libcommputil \
libsmbios \
librestart \
librpcsvc \
librsm \
libsasl \
libsec \
libshell \
libslp \
libsmedia \
libsqlite \
libsysevent \
libtecla \
libtnf \
libtnfctl \
libtnfprobe \
libtsnet \
libtsol \
libvolmgt \
libumem \
libuutil \
libwrap \
libxcurses2 \
libzfs \
libzfs_jni \
libzoneinfo \
hal \
policykit \
lvm \
openssl \
pkcs11 \
passwdutil \
../cmd/sendmail/libmilter \
fm \
udapl \
libmapid \
libkrb5 \
libshare \
libidmap \
libvscan \
smbsrv \
scsi \
$($(MACH)_HDRSUBDIRS)
$(CLOSED_BUILD)HDRSUBDIRS += \
$(CLOSED)/lib/libc_i18n \
$(CLOSED)/lib/libike \
$(CLOSED)/lib/libndmp \
$(CLOSED)/lib/smartcard
sparc_HDRSUBDIRS= \
libdscp \
libpri
all := TARGET= all
check := TARGET= check
clean := TARGET= clean
clobber := TARGET= clobber
install := TARGET= install
install_h := TARGET= install_h
lint := TARGET= lint
_dc := TARGET= _dc
_msg := TARGET= _msg
.KEEP_STATE:
#
# For the all and install targets, we clearly must respect library
# dependencies so that the libraries link correctly. However, for
# the remaining targets (check, clean, clobber, install_h, lint, _dc
# and _msg), libraries do not have any dependencies on one another
# and thus respecting dependencies just slows down the build.
# As such, for these rules, we use pattern replacement to explicitly
# avoid triggering the dependency information. Note that for clean,
# clobber and lint, we must use $(NOWAIT_SUBDIRS) rather than
# $(SUBDIRS), to prevent `.WAIT' from expanding to `.WAIT-nodepend'.
#
all: $(SUBDIRS)
install: $(SUBDIRS) .WAIT install_extra
# extra libraries kept in other source areas
install_extra:
@cd ../cmd/sgs; pwd; $(MAKE) install_lib
@pwd
clean clobber lint: $(NOWAIT_SUBDIRS:%=%-nodepend)
install_h check: $(HDRSUBDIRS:%=%-nodepend)
_msg: $(MSGSUBDIRS:%=%-nodepend) .WAIT _dc
_dc: $(DCSUBDIRS:%=%-nodepend)
# dependencies for pam_modules (see below)
$(CLOSED_BUILD)SMARTCARD= $(CLOSED)/lib/smartcard
#
# Library interdependencies are called out explicitly here
#
auditd_plugins: libbsm libnsl libsecdb
gss_mechs/mech_krb5: libgss libnsl libsocket libresolv pkcs11
libadt_jni: libbsm
$(CLOSED_BUILD)libc: $(CLOSED)/lib/libc_i18n
libast: libsocket
libbsm: libtsol
libcmd: libast libsocket libnsl
libcmdutils: libavl
libcontract: libnvpair
libdevid: libdevinfo
libdevinfo: libnvpair libsec
libdhcpagent: libsocket libdhcputil libuuid libdlpi
libdhcpsvc: libinetutil
libdhcputil: libnsl libgen libinetutil libdlpi
libdladm: libdevinfo libinetutil libsocket
libdll: libast
libdlpi: libinetutil libdladm
libdtrace: libproc libgen libctf
libdtrace_jni: libuutil libdtrace
libefi: libuuid
libfstyp: libnvpair
libelfsign: libcryptoutil libkmf
libidmap: libnsl
libinetcfg: libnsl libsocket libdlpi
libkmf: libcryptoutil pkcs11 openssl
libnsl: libmd5 libscf
libmapid: libresolv
libuuid: libdlpi
libinetutil: libsocket
libsecdb: libnsl
libsasl: libgss libsocket pkcs11 libmd
sasl_plugins: pkcs11 libgss libsocket libsasl
libsctp: libsocket
libshell: libast libcmd libdll libsocket libsecdb
libsip: libmd5
libsmbfs: libsocket libnsl libkrb5
libsocket: libnsl
libldap5: libsasl libsocket libnsl libmd
libsldap: libldap5 libtsol libnsl libc libscf libresolv
libpool: libnvpair libexacct
libpp: libast
libzonecfg: libc libsocket libnsl libuuid libnvpair libsysevent libsec \
libbrand libpool libscf
libproc: ../cmd/sgs/librtld_db ../cmd/sgs/libelf libctf
libproject: libpool libproc libsecdb
libtsnet: libnsl libtsol libsecdb
libwrap: libnsl libsocket
libwanboot: libnvpair libresolv libnsl libsocket libdevinfo libinetutil \
libdhcputil openssl
libwanbootutil: libnsl
pam_modules: libproject passwdutil $(SMARTCARD) smbsrv
libscf: libuutil libmd libgen
libinetsvc: libscf
librestart: libuutil libscf
../cmd/sgs/libdl: ../cmd/sgs/libconv
../cmd/sgs/libelf: ../cmd/sgs/libconv
pkcs11: libcryptoutil
print: libldap5
udapl/udapl_tavor: udapl/libdat
libzfs: libdevinfo libdevid libgen libnvpair libuutil libiscsitgt
libzfs_jni: libdiskmgt libnvpair libzfs
libzpool: libavl libumem libnvpair
libsec: libavl
brand: libc libsocket
libshare: libscf libzfs libuuid libfsmgt libsecdb libumem libsmbfs
libexacct/demo: libexacct libproject libsocket libnsl
libtsalarm: libpcp
smbsrv: libsocket libnsl libmd libxnet libpthread librt \
libshare libidmap pkcs11 libsqlite
libvscan: libscf
scsi: libnvpair
#
# The reason this rule checks for the existence of the
# Makefile is that some of the directories do not exist
# in certain situations (e.g., exportable source builds,
# OpenSolaris).
#
$(SUBDIRS): FRC
@if [ -f $@/Makefile ]; then \
cd $@; pwd; $(MAKE) $(TARGET); \
else \
true; \
fi
$(SUBDIRS:%=%-nodepend):
@if [ -f $(@:%-nodepend=%)/Makefile ]; then \
cd $(@:%-nodepend=%); pwd; $(MAKE) $(TARGET); \
else \
true; \
fi
FRC: