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