Makefile revision 25cf1a301a396c38e8adf52c15f537b80d2483f7
1281N/A#
1186N/A# CDDL HEADER START
1186N/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.
1281N/A#
0N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
0N/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#
1297N/A#
0N/A# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
1356N/A# Use is subject to license terms.
1186N/A#
1186N/A# ident "%Z%%M% %I% %E% SMI"
1466N/A
1186N/Ainclude ../Makefile.master
1186N/A
1186N/A# Note that libcurses installs commands along with its library.
1186N/A# This is a minor bug which probably should be fixed.
1186N/A# Note also that a few extra libraries are kept in cmd source.
0N/A#
1186N/A# Certain libraries are linked with, hence depend on, other libraries.
1186N/A#
1355N/A# Although we have historically used .WAIT to express dependencies, it
1186N/A# reduces the amount of parallelism and thus lengthens the time it
1186N/A# takes to build the libraries. Thus, we now require that any new
1186N/A# libraries explicitly call out their dependencies. Eventually, all
1186N/A# the library dependencies will be called out explicitly. See
962N/A# "Library interdependencies" near the end of this file.
1186N/A#
1186N/A# Aside from explicit dependencies (and legacy .WAITs), all libraries
1281N/A# are built in parallel.
1281N/A#
1281N/A.PARALLEL:
1281N/A
1281N/A#
1281N/A# The $(CLOSED_BUILD) additions to SUBDIRS & MSGSUBDIRS are unfortunate,
1281N/A# but required due to the "dependencies" of using .WAIT to barrier the
962N/A# parallel dmake builds. once 4631488 has been fixed, they can be
1281N/A# consolidated into one $(CLOSED_BUILD)SUBDIRS += (all closed libs) as
1281N/A# shown in HDRSUBDIRS
1281N/A#
1281N/ASUBDIRS= \
1281N/A common .WAIT \
1281N/A abi/apptrace .WAIT \
1281N/A ../cmd/abi/spectrans .WAIT \
1281N/A ../cmd/sgs/libconv \
1281N/A ../cmd/sgs/libdl .WAIT
1281N/A
1281N/A$(CLOSED_BUILD)SUBDIRS += \
1281N/A $(CLOSED)/lib/libc_i18n
1281N/A
1281N/ASUBDIRS += \
1281N/A libc .WAIT \
1281N/A libmapmalloc .WAIT \
1281N/A ../cmd/sgs/libelf .WAIT \
1281N/A libmd \
1281N/A libmd5 \
1281N/A librsm \
1281N/A libmp .WAIT \
1466N/A libcmd \
1281N/A libnsl \
1466N/A libsecdb .WAIT \
1466N/A librpcsvc \
1466N/A libsocket .WAIT \
1281N/A libsctp \
1281N/A libresolv \
1281N/A libresolv2 .WAIT \
1281N/A libw .WAIT \
1281N/A libintl .WAIT \
1186N/A ../cmd/sgs/librtld_db \
1355N/A libaio \
1354N/A librt \
1186N/A libadm \
1186N/A libctf \
1186N/A libdtrace \
1281N/A libdtrace_jni \
1466N/A libcurses \
1281N/A libgen \
1281N/A libgss \
1281N/A libpam \
1281N/A libuuid \
1281N/A libthread \
1390N/A libpthread .WAIT \
1281N/A libslp \
1281N/A libbsdmalloc \
1281N/A libdoor \
1281N/A libdevinfo \
1356N/A libdladm \
1281N/A libdlpi \
1281N/A libeti \
1281N/A libcrypt \
1281N/A libefi \
1281N/A libwanboot \
1355N/A libwanbootutil \
1355N/A libcryptoutil \
1355N/A libinetcfg \
1355N/A libinetutil \
1355N/A libipmp \
1355N/A libkstat \
1466N/A libkvm \
1281N/A liblaadm \
1281N/A liblm \
1355N/A libmacadm \
1281N/A libmalloc \
1281N/A libmtmalloc \
1355N/A libnls \
1355N/A libsmbios \
1355N/A libtecla \
1281N/A libumem \
1281N/A libnvpair .WAIT \
1281N/A libexacct \
1281N/A libplot \
1281N/A libldap4 \
1281N/A libsasl \
1355N/A libldap5 \
1281N/A libsldap .WAIT \
1281N/A libbsm \
1466N/A libsys \
1281N/A libsysevent \
1281N/A libnisdb \
1355N/A libpool \
1281N/A libproc \
1355N/A libproject \
1281N/A libsendfile \
1355N/A nametoaddr \
1466N/A ncad_addr \
1281N/A gss_mechs/mech_krb5 .WAIT \
1281N/A libkrb5 .WAIT \
1355N/A krb5 .WAIT
1281N/A$(CLOSED_BUILD)SUBDIRS += \
1355N/A $(CLOSED)/lib/smartcard
1466N/ASUBDIRS += \
1355N/A passwdutil \
1355N/A pam_modules \
1281N/A crypt_modules \
1281N/A libadt_jni \
1281N/A auditd_plugins \
1281N/A libvolmgt \
1281N/A libdevice \
1281N/A libdevid \
1281N/A libdhcpsvc \
1281N/A libc_db \
1281N/A libsec \
1281N/A libtnfprobe \
1281N/A libtnf \
1281N/A libtnfctl \
1281N/A libdhcpagent \
1281N/A libdhcpdu \
1281N/A libdhcputil \
1281N/A libipsecutil
1466N/A$(CLOSED_BUILD)SUBDIRS += \
1466N/A $(CLOSED)/lib/libike
1281N/ASUBDIRS += \
1281N/A nsswitch \
1466N/A print \
1281N/A libuutil \
1281N/A libscf \
1423N/A libinetsvc \
1281N/A librestart \
1281N/A libsched
1281N/A$(CLOSED_BUILD)SUBDIRS += \
1281N/A $(CLOSED)/lib/libelfsign
1281N/ASUBDIRS += \
1281N/A pkcs11 .WAIT \
1281N/A libpctx .WAIT \
1281N/A libcpc \
1281N/A watchmalloc \
1423N/A madv \
1281N/A mpss \
1281N/A libdisasm \
1423N/A libwrap \
1281N/A libxcurses \
1281N/A libxcurses2 \
1355N/A libxnet \
1355N/A libzonecfg \
1281N/A libzoneinfo \
1355N/A libtsnet \
1281N/A libtsol \
1355N/A gss_mechs/mech_spnego \
1466N/A gss_mechs/mech_dummy \
1466N/A gss_mechs/mech_dh \
1281N/A rpcsec_gss \
1423N/A librcm .WAIT \
1281N/A libcfgadm .WAIT \
1281N/A libpicl .WAIT \
1281N/A libpicltree .WAIT \
1281N/A cfgadm_plugins \
1281N/A libmail \
1281N/A lvm \
1281N/A libsmedia \
1186N/A libipp \
1186N/A openssl \
1281N/A libdiskmgt \
1281N/A liblgrp \
1186N/A libfsmgt \
1281N/A fm \
1186N/A libavl \
1186N/A libcmdutils \
1186N/A libcontract \
1281N/A ../cmd/sendmail/libmilter \
1281N/A sasl_plugins \
0N/A udapl \
1186N/A libzpool \
1186N/A libzfs \
0N/A libzfs_jni \
1186N/A libmapid \
1186N/A $($(MACH)_SUBDIRS)
1297N/A
sparc_SUBDIRS= .WAIT \
efcode \
libc_psr .WAIT \
libdscp \
libprtdiag .WAIT \
libprtdiag_psr \
librsc \
libfruutils .WAIT \
libfru \
libwrsmconf \
storage \
wrsm \
libpcp
fm: libexacct
#
# 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 \
cfgadm_plugins \
gss_mechs/mech_dh \
gss_mechs/mech_krb5 \
krb5 \
libbsm \
libc \
libcfgadm \
libcontract \
libcurses \
libdhcpsvc \
libdhcputil \
libgss \
libinetcfg \
libipmp \
libnsl \
libpam \
libpicl \
libpool \
libscf \
libsasl \
libldap5 \
libsecdb \
libsldap \
libslp \
libsmedia \
libtsol \
libuutil \
libwanboot \
libwanbootutil \
libzonecfg \
lvm \
madv \
mpss \
pam_modules \
rpcsec_gss
$(CLOSED_BUILD)MSGSUBDIRS += \
$(CLOSED)/lib/smartcard
MSGSUBDIRS += \
$($(MACH)_MSGSUBDIRS)
sparc_MSGSUBDIRS= \
libprtdiag \
libprtdiag_psr
HDRSUBDIRS= libaio \
auditd_plugins \
libbsm \
libc \
libcmdutils \
libcontract \
libcpc \
libctf \
libcurses \
libcryptoutil \
libdevice \
libdevid \
libdevinfo \
libdiskmgt \
libdladm \
libdlpi \
libdhcpagent \
libdhcpsvc \
libdhcputil \
libdisasm \
libdtrace \
libdtrace_jni \
libeti \
libgen \
libwanboot \
libwanbootutil \
libipsecutil \
libinetcfg \
libinetsvc \
libinetutil \
libipmp \
libipp \
libkstat \
libkvm \
liblaadm \
libmacadm \
libmail \
libmd \
libmtmalloc \
libnvpair \
libnsl \
libpam \
libpctx \
libpicl \
libpicltree \
libplot \
libpool \
libproc \
librcm \
libscf \
libsmbios \
librestart \
librpcsvc \
librsm \
libsasl \
libsec \
libslp \
libsmedia \
libsysevent \
libtecla \
libtnf \
libtnfctl \
libtnfprobe \
libtsnet \
libtsol \
libvolmgt \
libumem \
libuutil \
libwrap \
libxcurses2 \
libzfs \
libzfs_jni \
libzoneinfo \
lvm \
openssl \
pkcs11 \
passwdutil \
../cmd/sendmail/libmilter \
fm \
udapl \
libmapid \
libkrb5 \
$($(MACH)_HDRSUBDIRS)
$(CLOSED_BUILD)HDRSUBDIRS += \
$(CLOSED)/lib/libc_i18n \
$(CLOSED)/lib/libike \
$(CLOSED)/lib/smartcard
sparc_HDRSUBDIRS= \
libdscp \
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: libdhcputil libnsl libsocket
libdhcpsvc: libinetutil
libdhcputil: libinetutil
libdladm: libdlpi libdevinfo
libdtrace: libproc libgen libctf
libdtrace_jni: libuutil libdtrace
libefi: libuuid
$(CLOSED_BUILD)$(CLOSED)/lib/libelfsign: \
$(CLOSED)/lib/libike libcryptoutil pkcs11
libinetcfg: libnsl libsocket libdevinfo
libnsl: libmd5 libscf
libmapid: libresolv libcmd
libmacadm: libdevinfo
libuuid: libsocket
libinetutil: libsocket
libsecdb: libcmd libnsl
librt: libaio libmd
libsasl: libgss libsocket pkcs11 libmd
sasl_plugins: pkcs11 libgss libsocket libsasl
libsctp: libsocket
libsocket: libnsl
libldap5: libsasl libsocket libnsl libmd
libsldap: libldap5 libtsol
libpool: libnvpair libexacct
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
libzfs_jni: libdiskmgt libnvpair libzfs
libzpool: libavl libumem libnvpair
libsec: libavl
#
# 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) abi: FRC
@if [ -f $@/Makefile ]; then \
cd $@; pwd; $(MAKE) $(TARGET); \
else \
true; \
fi
$(SUBDIRS:%=%-nodepend) abi-nodepend:
@if [ -f $(@:%-nodepend=%)/Makefile ]; then \
cd $(@:%-nodepend=%); pwd; $(MAKE) $(TARGET); \
else \
true; \
fi
FRC: