Makefile revision d62bc4badc1c1f1549c961cfb8b420e650e1272b
5253N/A#
5253N/A# CDDL HEADER START
5253N/A#
5253N/A# The contents of this file are subject to the terms of the
5253N/A# Common Development and Distribution License (the "License").
5253N/A# You may not use this file except in compliance with the License.
5253N/A#
5253N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5253N/A# or http://www.opensolaris.org/os/licensing.
5253N/A# See the License for the specific language governing permissions
5253N/A# and limitations under the License.
5253N/A#
5253N/A# When distributing Covered Code, include this CDDL HEADER in each
5253N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5253N/A# If applicable, add the following below this CDDL HEADER, with the
5253N/A# fields enclosed by brackets "[]" replaced with your own identifying
5253N/A# information: Portions Copyright [yyyy] [name of copyright owner]
5253N/A#
5253N/A# CDDL HEADER END
5253N/A#
5253N/A#
5253N/A# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
5343N/A# Use is subject to license terms.
5253N/A#
5253N/A# ident "%Z%%M% %I% %E% SMI"
5254N/A#
5254N/A
5254N/Ainclude ../Makefile.master
6917N/A
6917N/A# Note that libcurses installs commands along with its library.
5253N/A# This is a minor bug which probably should be fixed.
5253N/A# Note also that a few extra libraries are kept in cmd source.
6917N/A#
6917N/A# Certain libraries are linked with, hence depend on, other libraries.
5786N/A#
5253N/A# Although we have historically used .WAIT to express dependencies, it
6973N/A# reduces the amount of parallelism and thus lengthens the time it
5253N/A# takes to build the libraries. Thus, we now require that any new
5253N/A# libraries explicitly call out their dependencies. Eventually, all
6917N/A# the library dependencies will be called out explicitly. See
6917N/A# "Library interdependencies" near the end of this file.
5253N/A#
6973N/A# Aside from explicit dependencies (and legacy .WAITs), all libraries
5253N/A# are built in parallel.
5253N/A#
5253N/A.PARALLEL:
5253N/A
6973N/A#
5253N/A# The $(CLOSED_BUILD) additions to SUBDIRS & MSGSUBDIRS are unfortunate,
6973N/A# but required due to the "dependencies" of using .WAIT to barrier the
5253N/A# parallel dmake builds. once 4631488 has been fixed, they can be
5253N/A# consolidated into one $(CLOSED_BUILD)SUBDIRS += (all closed libs) as
5253N/A# shown in HDRSUBDIRS
5253N/A#
5256N/ASUBDIRS= \
5256N/A common .WAIT \
5256N/A ../cmd/sgs/libconv \
5256N/A ../cmd/sgs/libdl .WAIT
5525N/A
5256N/A$(CLOSED_BUILD)SUBDIRS += \
6973N/A $(CLOSED)/lib/libc_i18n
6973N/A
5253N/ASUBDIRS += \
5253N/A libc .WAIT \
5253N/A ../cmd/sgs/libelf .WAIT \
5253N/A libmd \
5253N/A libmd5 \
6917N/A librsm \
6917N/A libmp .WAIT \
5578N/A libnsl \
6917N/A libsecdb .WAIT \
5253N/A librpcsvc \
5253N/A libsocket .WAIT \
5253N/A libsctp \
5784N/A libsip \
5253N/A libcommputil \
5253N/A libresolv \
6917N/A libresolv2 .WAIT \
5253N/A libw .WAIT \
5305N/A libintl .WAIT \
5305N/A ../cmd/sgs/librtld_db \
5253N/A libaio \
5305N/A libast \
5305N/A libdll \
5305N/A libcmd \
5305N/A libshell \
5305N/A librt \
5305N/A libadm \
5305N/A libctf \
5305N/A libdtrace \
5305N/A libdtrace_jni \
5305N/A libcurses \
5305N/A libgen \
5305N/A libgss \
5305N/A libpam \
6917N/A libuuid \
5305N/A libthread \
5305N/A libpthread .WAIT \
5305N/A libslp \
5305N/A libbsdmalloc \
5305N/A libdoor \
5305N/A libdevinfo \
6917N/A libdladm \
5305N/A libdlpi \
6917N/A libeti \
5305N/A libcrypt \
5305N/A libdns_sd \
5305N/A libefi \
5525N/A libfstyp \
5525N/A libwanboot \
5253N/A libwanbootutil \
5525N/A libcryptoutil \
5525N/A libinetcfg \
5525N/A libinetutil \
5253N/A libipmp \
6917N/A libiscsitgt \
6917N/A libkmf \
6917N/A libkstat \
6917N/A libkvm \
6917N/A liblm \
5253N/A libmalloc \
5253N/A libmapmalloc \
5525N/A libmtmalloc \
5525N/A libnls \
6917N/A libsmbios \
5525N/A libtecla \
5253N/A libumem \
5305N/A libnvpair .WAIT \
5253N/A libexacct \
5253N/A libplot \
5253N/A libldap4 \
5253N/A libsasl \
5253N/A libldap5 \
5253N/A libsldap .WAIT \
5253N/A libbsm \
5253N/A libsys \
5253N/A libsysevent \
5253N/A libnisdb \
5253N/A libpool \
5253N/A libpp \
5253N/A libproc \
5253N/A libproject \
5253N/A libsendfile \
5253N/A nametoaddr \
5253N/A ncad_addr \
5253N/A gss_mechs/mech_krb5 .WAIT \
5253N/A libkrb5 .WAIT \
5253N/A krb5 .WAIT
5253N/A$(CLOSED_BUILD)SUBDIRS += \
5253N/A $(CLOSED)/lib/smartcard
5253N/ASUBDIRS += \
5256N/A passwdutil \
5256N/A pam_modules \
5253N/A crypt_modules \
5253N/A libadt_jni \
5253N/A abi \
5253N/A auditd_plugins \
5253N/A libvolmgt \
6917N/A libdevice \
6917N/A libdevid \
6917N/A libdhcpsvc \
6917N/A libc_db \
6917N/A libsec \
6917N/A libtnfprobe \
6917N/A libtnf \
6917N/A libtnfctl \
6917N/A libdhcpagent \
6917N/A libdhcpdu \
6917N/A libdhcputil \
6917N/A libipsecutil
6917N/A$(CLOSED_BUILD)SUBDIRS += \
6917N/A $(CLOSED)/lib/libike \
6917N/A $(CLOSED)/lib/libndmp
6917N/ASUBDIRS += \
6917N/A nsswitch \
6917N/A print \
5253N/A libuutil \
5253N/A libscf \
5253N/A libinetsvc \
5253N/A librestart \
5253N/A libsched \
5253N/A libelfsign \
5253N/A pkcs11 .WAIT \
5253N/A libpctx .WAIT \
5253N/A libcpc \
5253N/A watchmalloc \
6917N/A extendedFILE \
6917N/A madv \
5253N/A mpss \
5253N/A libdisasm \
6973N/A libwrap \
6973N/A libxcurses \
6973N/A libxcurses2 \
5253N/A libxnet \
6918N/A libbrand .WAIT \
6918N/A libzonecfg \
6918N/A libzoneinfo \
5253N/A libtsnet \
7011N/A libtsol \
5253N/A gss_mechs/mech_spnego \
5253N/A gss_mechs/mech_dummy \
5253N/A gss_mechs/mech_dh \
5253N/A rpcsec_gss \
5253N/A libraidcfg .WAIT \
5253N/A librcm .WAIT \
5305N/A libcfgadm .WAIT \
5253N/A libpicl .WAIT \
5253N/A libpicltree .WAIT \
5253N/A raidcfg_plugins \
5525N/A cfgadm_plugins \
5253N/A libmail \
5253N/A lvm \
5253N/A libsmedia \
5253N/A libipp \
5253N/A openssl \
5253N/A libdiskmgt \
5253N/A liblgrp \
5253N/A libfsmgt \
5253N/A fm \
5253N/A libavl \
5253N/A libcmdutils \
5253N/A libcontract \
6918N/A ../cmd/sendmail/libmilter \
sasl_plugins \
udapl \
libzpool \
libzfs \
libzfs_jni \
libmapid \
brand \
policykit \
hal \
libshare \
libsqlite \
libidmap \
libipmi \
libexacct/demo \
libvscan \
smbsrv \
$($(MACH)_SUBDIRS)
sparc_SUBDIRS= .WAIT \
efcode \
libc_psr .WAIT \
libdscp \
libprtdiag .WAIT \
libprtdiag_psr \
libpri \
librsc \
libfruutils .WAIT \
libfru \
storage \
libpcp \
libtsalarm
FM_sparc_DEPLIBS= libpri
fm: libexacct $(FM_$(MACH)_DEPLIBS)
#
# Create a special version of $(SUBDIRS) with no .WAIT's, for use with the
# clean and clobber targets (for more information, see those targets, below).
#
NOWAIT_SUBDIRS= $(SUBDIRS:.WAIT=)
DCSUBDIRS = \
lvm
MSGSUBDIRS= \
abi \
auditd_plugins \
brand \
cfgadm_plugins \
gss_mechs/mech_dh \
gss_mechs/mech_krb5 \
krb5 \
libast \
libbsm \
libc \
libcfgadm \
libcmd \
libcontract \
libcurses \
libdhcpsvc \
libdhcputil \
libipsecutil \
libdiskmgt \
libdladm \
libdll \
libgss \
libidmap \
libinetcfg \
libipmp \
libnsl \
libpam \
libpicl \
libpool \
libpp \
libscf \
libsasl \
libldap5 \
libsecdb \
libshare \
libshell \
libsldap \
libslp \
libsmedia \
libtsol \
libuutil \
libvscan \
libwanboot \
libwanbootutil \
libzfs \
libzonecfg \
lvm \
madv \
mpss \
pam_modules \
rpcsec_gss
$(CLOSED_BUILD)MSGSUBDIRS += \
$(CLOSED)/lib/smartcard
MSGSUBDIRS += \
$($(MACH)_MSGSUBDIRS)
sparc_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 \
$($(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
libsocket: libnsl
libldap5: libsasl libsocket libnsl libmd
libsldap: libldap5 libtsol
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
libexacct/demo: libexacct libproject libsocket libnsl
libtsalarm: libpcp
smbsrv: libsocket libnsl libmd libxnet libpthread librt \
libshare libidmap pkcs11 libsqlite
libvscan: libscf
#
# 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: