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