Makefile revision bda1f129971950880940a17bab0bf096d5744b0c
4737N/A#
4737N/A# CDDL HEADER START
4737N/A#
4737N/A# The contents of this file are subject to the terms of the
4737N/A# Common Development and Distribution License (the "License").
4737N/A# You may not use this file except in compliance with the License.
4737N/A#
4737N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4737N/A# or http://www.opensolaris.org/os/licensing.
4737N/A# See the License for the specific language governing permissions
4737N/A# and limitations under the License.
4737N/A#
4737N/A# When distributing Covered Code, include this CDDL HEADER in each
4737N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4737N/A# If applicable, add the following below this CDDL HEADER, with the
4737N/A# fields enclosed by brackets "[]" replaced with your own identifying
4737N/A# information: Portions Copyright [yyyy] [name of copyright owner]
4737N/A#
4737N/A# CDDL HEADER END
4737N/A#
4737N/A#
4737N/A# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
5336N/A# Use is subject to license terms.
4737N/A#
5716N/A#
5716N/A
5680N/Ainclude ../Makefile.master
4737N/A
4737N/A# Note that libcurses installs commands along with its library.
4737N/A# This is a minor bug which probably should be fixed.
6015N/A# Note also that a few extra libraries are kept in cmd source.
4737N/A#
4737N/A# Certain libraries are linked with, hence depend on, other libraries.
6015N/A#
4737N/A# Although we have historically used .WAIT to express dependencies, it
4737N/A# reduces the amount of parallelism and thus lengthens the time it
4737N/A# takes to build the libraries. Thus, we now require that any new
6015N/A# libraries explicitly call out their dependencies. Eventually, all
4737N/A# the library dependencies will be called out explicitly. See
6011N/A# "Library interdependencies" near the end of this file.
6011N/A#
6011N/A# Aside from explicit dependencies (and legacy .WAITs), all libraries
6011N/A# are built in parallel.
6011N/A#
6011N/A.PARALLEL:
6011N/A
6011N/A#
5680N/A# The $(CLOSED_BUILD) additions to SUBDIRS & MSGSUBDIRS are unfortunate,
5680N/A# but required due to the "dependencies" of using .WAIT to barrier the
5680N/A# parallel dmake builds. once 4631488 has been fixed, they can be
4737N/A# consolidated into one $(CLOSED_BUILD)SUBDIRS += (all closed libs) as
4737N/A# shown in HDRSUBDIRS
4737N/A#
4737N/ASUBDIRS= \
5680N/A common .WAIT \
5690N/A ../cmd/sgs/libconv \
5690N/A ../cmd/sgs/libdl .WAIT
5690N/A
5690N/A$(CLOSED_BUILD)SUBDIRS += \
5690N/A $(CLOSED)/lib/libc_i18n
4737N/A
4737N/ASUBDIRS += \
5851N/A libc .WAIT \
4737N/A ../cmd/sgs/libelf .WAIT \
4737N/A c_synonyms \
5851N/A libmd \
4737N/A libmd5 \
5851N/A librsm \
5487N/A libmp .WAIT \
5487N/A libnsl \
5851N/A libsecdb .WAIT \
5851N/A librpcsvc \
5851N/A libsocket .WAIT \
5851N/A libsctp \
5851N/A libsip \
5672N/A libcommputil \
5680N/A libresolv \
5672N/A libresolv2 .WAIT \
5672N/A libw .WAIT \
5851N/A libintl .WAIT \
5851N/A ../cmd/sgs/librtld_db \
5851N/A libaio \
5851N/A libast \
5851N/A libdll \
5851N/A libcmd \
4737N/A libshell \
5851N/A libsum \
5851N/A librt \
5851N/A libadm \
5851N/A libctf \
5851N/A libdtrace \
5851N/A libdtrace_jni \
5851N/A libcurses \
5851N/A libgen \
5594N/A libgss \
5851N/A libpam \
5851N/A libuuid \
5851N/A libthread \
5680N/A libpthread .WAIT \
5851N/A libslp \
5851N/A libbsdmalloc \
5851N/A libdoor \
5851N/A libdevinfo \
5851N/A libdladm \
5851N/A libdlpi \
5851N/A libeti \
5851N/A libcrypt \
5851N/A libdns_sd \
5851N/A libefi \
4737N/A libfstyp \
5851N/A libwanboot \
5851N/A libwanbootutil \
5851N/A libcryptoutil \
4737N/A libinetcfg \
4737N/A libinetutil \
4737N/A libipmp \
4737N/A libiscsit \
4737N/A libiscsitgt \
4737N/A libkmf \
4737N/A libkstat \
4737N/A libkvm \
4737N/A liblm \
5680N/A libmalloc \
4737N/A libmapmalloc \
4737N/A libmtmalloc \
4737N/A libnls \
4737N/A libnwam \
4737N/A libsmbios \
4737N/A libtecla \
4737N/A libumem \
4737N/A libnvpair .WAIT \
4737N/A libexacct \
4737N/A libplot \
4737N/A libldap4 \
4737N/A libsasl \
4897N/A libldap5 \
4897N/A libsldap .WAIT \
4897N/A libbsm \
4737N/A libsys \
4737N/A libsysevent \
4897N/A libnisdb \
4737N/A libpool \
5336N/A libpp \
4737N/A libproc \
4737N/A libproject \
4737N/A libsendfile \
4737N/A nametoaddr \
4737N/A ncad_addr \
5336N/A hbaapi \
5336N/A sun_fc \
5336N/A gss_mechs/mech_krb5 .WAIT \
5336N/A libkrb5 .WAIT \
4737N/A krb5 .WAIT \
4897N/A libsmbfs \
4897N/A libfcoe \
5680N/A libstmf \
5680N/A libnsctl \
5680N/A libunistat \
5680N/A libdscfg \
5680N/A librdc
4897N/A$(CLOSED_BUILD)SUBDIRS += \
4897N/A $(CLOSED)/lib/smartcard
4897N/ASUBDIRS += \
4737N/A passwdutil \
4737N/A pam_modules \
4737N/A crypt_modules \
4737N/A libadt_jni \
4737N/A abi \
4737N/A auditd_plugins \
4737N/A libvolmgt \
4896N/A libdevice \
4737N/A libdevid \
4739N/A libdhcpsvc \
4737N/A libc_db \
4737N/A libndmp \
5851N/A libsec \
4898N/A libtnfprobe \
4737N/A libtnf \
4737N/A libtnfctl \
4737N/A libdhcpagent \
4737N/A libdhcpdu \
4737N/A libdhcputil \
4737N/A libipsecutil
$(CLOSED_BUILD)SUBDIRS += \
$(CLOSED)/lib/libike
SUBDIRS += \
nsswitch \
print \
libuutil \
libscf \
libinetsvc \
librestart \
libsched \
libelfsign \
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 \
libdiskmgt \
liblgrp \
libfsmgt \
fm \
libavl \
libcmdutils \
libcontract \
../cmd/sendmail/libmilter \
sasl_plugins \
udapl \
libzpool \
libzfs \
libzfs_jni \
pyzfs \
libmapid \
brand \
policykit \
hal \
libshare \
libsqlite \
libidmap \
libadutils \
libipmi \
libexacct/demo \
libvscan \
libgrubmgmt \
smbsrv \
scsi \
mms \
libima \
libsun_ima \
mpapi \
$($(MACH)_SUBDIRS)
i386_SUBDIRS= \
libntfs \
libparted
sparc_SUBDIRS= .WAIT \
efcode \
libc_psr .WAIT \
libds \
libdscp \
libprtdiag .WAIT \
libprtdiag_psr \
libpri \
librsc \
libfruutils .WAIT \
libfru \
storage \
libpcp \
libtsalarm
FM_sparc_DEPLIBS= libpri
fm: \
libexacct \
libipmi \
libzfs \
scsi \
$(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 \
libgrubmgmt \
libgss \
libidmap \
libinetcfg \
libipmp \
libinetutil \
libnsl \
libpam \
libpicl \
libpool \
libpp \
libscf \
libsasl \
libldap5 \
libsecdb \
libshare \
libshell \
libsldap \
libslp \
libsmbfs \
libsmedia \
libsum \
libtsol \
libuutil \
libvscan \
libwanboot \
libwanbootutil \
libzfs \
libzonecfg \
lvm \
madv \
mms \
mpss \
pam_modules \
pyzfs \
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 \
libdscfg \
libdtrace \
libdtrace_jni \
libelfsign \
libeti \
libfstyp \
libgen \
libwanboot \
libwanbootutil \
libipsecutil \
libinetcfg \
libinetsvc \
libinetutil \
libipmi \
libipmp \
libipp \
libiscsit \
libiscsitgt \
libkstat \
libkvm \
libmail \
libmd \
libmtmalloc \
libndmp \
libnvpair \
libnsctl \
libnsl \
libnwam \
libpam \
libpctx \
libpicl \
libpicltree \
libplot \
libpool \
libpp \
libproc \
libraidcfg \
librcm \
librdc \
libscf \
libsip \
libcommputil \
libsmbios \
librestart \
librpcsvc \
librsm \
libsasl \
libsec \
libshell \
libslp \
libsmedia \
libsqlite \
libfcoe \
libstmf \
libsum \
libsysevent \
libtecla \
libtnf \
libtnfctl \
libtnfprobe \
libtsnet \
libtsol \
libvolmgt \
libumem \
libunistat \
libuutil \
libwrap \
libxcurses2 \
libzfs \
libzfs_jni \
libzoneinfo \
hal \
policykit \
lvm \
pkcs11 \
passwdutil \
../cmd/sendmail/libmilter \
fm \
udapl \
libmapid \
libkrb5 \
libshare \
libidmap \
libvscan \
libgrubmgmt \
smbsrv \
scsi \
hbaapi \
libima \
libsun_ima \
mpapi \
mms \
$($(MACH)_HDRSUBDIRS)
$(CLOSED_BUILD)HDRSUBDIRS += \
$(CLOSED)/lib/libc_i18n \
$(CLOSED)/lib/libike \
$(CLOSED)/lib/smartcard
sparc_HDRSUBDIRS= \
libds \
libdscp \
libpri \
storage
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
libadutils: libldap5 libresolv libsocket libnsl
nsswitch: libadutils libidmap
libbsm: libtsol
libcmd: libsum libast libsocket libnsl
libcmdutils: libavl
libcontract: libnvpair
libdevid: libdevinfo
libdevinfo: libnvpair libsec
libdhcpagent: libsocket libdhcputil libuuid libdlpi libcontract
libdhcpsvc: libinetutil
libdhcputil: libnsl libgen libinetutil libdlpi
libdladm: libdevinfo libinetutil libsocket libscf librcm libnvpair \
libexacct libnsl libkstat libcurses
libdll: libast
libdlpi: libinetutil libdladm
libdscfg: libnsctl libunistat libsocket libnsl
libdtrace: libproc libgen libctf
libdtrace_jni: libuutil libdtrace
libefi: libuuid
libfstyp: libnvpair
libelfsign: libcryptoutil libkmf
libidmap: libadutils libldap5 libavl libsldap
libinetcfg: libnsl libsocket libdlpi
libiscsit: libc libnvpair libstmf libuuid libnsl
libkmf: libcryptoutil pkcs11
libnsl: libmd5 libscf
libmapid: libresolv
libnwam: libdoor
librdc: libsocket libnsl libnsctl libunistat libdscfg
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
libsum: libast
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
libwanbootutil: libnsl
pam_modules: libproject passwdutil $(SMARTCARD) smbsrv
libscf: libuutil libmd libgen libsmbios
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 \
libavl libefi libidmap libsec
libzfs_jni: libdiskmgt libnvpair libzfs
libzpool: libavl libumem libnvpair
libsec: libavl libidmap
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
mpapi: libpthread libdevinfo libsysevent libnvpair
libgrubmgmt: libdevinfo libzfs libfstyp
pyzfs: libnvpair libsec libidmap libzfs
#
# 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: