Makefile revision b5254d6ec12a0443b3a431a7e656f38e4ac98b2e
0N/A#
2362N/A# CDDL HEADER START
0N/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.
2362N/A#
0N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2362N/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#
2362N/A
2362N/A#
2362N/A# Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
0N/A# Copyright (c) 2012 by Delphix. All rights reserved.
0N/A# Copyright (c) 2012, Joyent, Inc. All rights reserved.
0N/A# Copyright (c) 2013 Gary Mills
0N/A# Copyright 2014 Garrett D'Amore <garrett@damore.org>
0N/A# Copyright (c) 2015 Gary Mills
0N/A# Copyright 2015 Nexenta Systems, Inc. All rights reserved.
0N/A#
0N/A
0N/Ainclude ../Makefile.master
0N/A
0N/A# Note that libcurses installs commands along with its library.
0N/A# This is a minor bug which probably should be fixed.
0N/A# Note also that a few extra libraries are kept in cmd source.
0N/A#
0N/A# Certain libraries are linked with, hence depend on, other libraries.
0N/A# Library dependencies are called out explicitly, see "Library
0N/A# interdependencies" below.
0N/A.PARALLEL:
0N/A
0N/A# Build libc and its dependencies
0N/ASUBDIRS= \
0N/A common \
0N/A ../cmd/sgs/libconv \
0N/A ../cmd/sgs/libdl \
0N/A libc \
0N/A .WAIT
0N/A
0N/A# Build libraries with lots of dependents
0N/ASUBDIRS += \
0N/A libm \
0N/A libmd \
0N/A libmp \
0N/A libnsl \
0N/A libnvpair \
0N/A libsocket \
0N/A .WAIT
0N/A
0N/A# Build everything else. Aside from explicit dependencies, all libraries
0N/A# are built in parallel.
0N/ASUBDIRS += \
0N/A ../cmd/sendmail/libmilter \
0N/A ../cmd/sgs/libelf \
0N/A ../cmd/sgs/librtld_db \
0N/A abi \
0N/A auditd_plugins \
0N/A brand \
0N/A c_synonyms \
0N/A cfgadm_plugins \
0N/A crypt_modules \
0N/A extendedFILE \
0N/A fm \
0N/A getloginx \
0N/A gss_mechs/mech_dh \
2027N/A gss_mechs/mech_dummy \
0N/A gss_mechs/mech_krb5 \
0N/A gss_mechs/mech_spnego \
0N/A hal \
0N/A hbaapi \
0N/A krb5 \
0N/A libadm \
0N/A libads \
0N/A libadt_jni \
0N/A libadutils \
0N/A libaio \
0N/A libast \
0N/A libavl \
0N/A libbe \
0N/A libbrand \
0N/A libbsdmalloc \
0N/A libbsm \
0N/A libc_db \
0N/A libcfgadm \
0N/A libcmd \
0N/A libcmdutils \
0N/A libcommputil \
0N/A libcontract \
0N/A libcpc \
0N/A libcrypt \
0N/A libcryptoutil \
0N/A libctf \
0N/A libcurses \
0N/A libdevice \
0N/A libdevid \
0N/A libdevinfo \
0N/A libdhcpagent \
0N/A libdhcputil \
0N/A libdisasm \
0N/A libdiskmgt \
0N/A libdladm \
0N/A libdll \
0N/A libdlpi \
0N/A libdns_sd \
0N/A libdoor \
0N/A libdscfg \
0N/A libdtrace \
0N/A libdtrace_jni \
0N/A libefi \
0N/A libelfsign \
0N/A libeti \
0N/A libexacct \
0N/A libexacct/demo \
0N/A libfakekernel \
0N/A libfcoe \
0N/A libfru \
0N/A libfruutils \
0N/A libfsmgt \
0N/A libfstyp \
0N/A libgen \
0N/A libgrubmgmt \
0N/A libgss \
0N/A libhotplug \
0N/A libidmap \
0N/A libilb \
0N/A libima \
0N/A libinetsvc \
0N/A libinetutil \
0N/A libinstzones \
0N/A libintl \
0N/A libipadm \
0N/A libipd \
0N/A libipmi \
0N/A libipmp \
0N/A libipp \
0N/A libipsecutil \
0N/A libiscsit \
0N/A libkmf \
0N/A libkrb5 \
0N/A libkstat \
0N/A libkvm \
0N/A libldap5 \
0N/A liblgrp \
0N/A liblm \
0N/A libm1 \
0N/A libmail \
0N/A libmalloc \
0N/A libmapid \
0N/A libmapmalloc \
0N/A libmd5 \
0N/A libmtmalloc \
0N/A libmvec \
0N/A libndmp \
0N/A libnisdb \
0N/A libnls \
0N/A libnsctl \
0N/A libnwam \
0N/A libpam \
0N/A libpcidb \
0N/A libpctx \
0N/A libpicl \
0N/A libpicltree \
0N/A libpkg \
0N/A libpool \
0N/A libpp \
0N/A libproc \
0N/A libproject \
0N/A libpthread \
0N/A libraidcfg \
0N/A librcm \
0N/A librdc \
0N/A libreparse \
0N/A libresolv \
0N/A libresolv2 \
0N/A librestart \
0N/A librpcsvc \
0N/A librsm \
0N/A librstp \
0N/A librt \
0N/A libsasl \
0N/A libscf \
0N/A libsched \
0N/A libsctp \
0N/A libsec \
0N/A libsecdb \
0N/A libsendfile \
0N/A libshare \
0N/A libshell \
0N/A libsip \
0N/A libsldap \
0N/A libslp \
0N/A libsmbfs \
0N/A libsmbios \
0N/A libsmedia \
0N/A libsqlite \
0N/A libsrpt \
0N/A libstmf \
0N/A libstmfproxy \
0N/A libsum \
0N/A libsun_ima \
0N/A libsys \
0N/A libsysevent \
0N/A libtecla \
0N/A libtermcap \
0N/A libthread \
0N/A libtnf \
0N/A libtnfctl \
0N/A libtnfprobe \
0N/A libtsnet \
0N/A libtsol \
0N/A libumem \
0N/A libunistat \
0N/A libuuid \
0N/A libuutil \
0N/A libvolmgt \
0N/A libvrrpadm \
0N/A libvscan \
0N/A libw \
0N/A libwanboot \
0N/A libwanbootutil \
0N/A libwrap \
0N/A libxcurses \
0N/A libxcurses2 \
0N/A libxnet \
0N/A libzfs \
0N/A libzfs_core \
0N/A libzfs_jni \
0N/A libzonecfg \
0N/A libzoneinfo \
0N/A libzonestat \
2157N/A libzpool \
2157N/A lvm \
2157N/A madv \
2157N/A mpapi \
2157N/A mpss \
2157N/A nametoaddr \
0N/A ncad_addr \
0N/A nsswitch \
0N/A pam_modules \
0N/A passwdutil \
0N/A pkcs11 \
0N/A policykit \
0N/A print \
0N/A pylibbe \
0N/A pysolaris \
0N/A pyzfs \
0N/A raidcfg_plugins \
0N/A rpcsec_gss \
0N/A sasl_plugins \
0N/A scsi \
0N/A smbsrv \
0N/A smhba \
0N/A sun_fc \
2027N/A sun_sas \
0N/A udapl \
0N/A watchmalloc \
0N/A $($(MACH)_SUBDIRS)
0N/A
0N/Ai386_SUBDIRS= \
0N/A libfdisk \
0N/A libsaveargs
0N/A
0N/Asparc_SUBDIRS= \
0N/A efcode \
0N/A libds \
0N/A libdscp \
0N/A libprtdiag \
0N/A libprtdiag_psr \
0N/A libpri \
0N/A librsc \
0N/A storage \
0N/A libpcp \
0N/A libtsalarm \
0N/A libv12n
0N/A
0N/A#
0N/A# Create a special version of $(SUBDIRS) with no .WAIT's, for use with the
0N/A# clean and clobber targets (for more information, see those targets, below).
0N/A#
0N/ANOWAIT_SUBDIRS= $(SUBDIRS:.WAIT=)
0N/A
0N/ADCSUBDIRS = \
0N/A lvm
0N/A
0N/AMSGSUBDIRS= \
0N/A abi \
0N/A auditd_plugins \
0N/A brand \
0N/A cfgadm_plugins \
0N/A gss_mechs/mech_dh \
0N/A gss_mechs/mech_krb5 \
0N/A krb5 \
0N/A libast \
0N/A libbsm \
0N/A libc \
0N/A libcfgadm \
0N/A libcmd \
0N/A libcontract \
0N/A libcurses \
0N/A libdhcputil \
0N/A libdiskmgt \
0N/A libdladm \
0N/A libdll \
0N/A libgrubmgmt \
0N/A libgss \
0N/A libidmap \
0N/A libilb \
0N/A libinetutil \
0N/A libinstzones \
0N/A libipadm \
0N/A libipmp \
972N/A libipsecutil \
972N/A libldap5 \
972N/A libnsl \
972N/A libnwam \
972N/A libpam \
2812N/A libpicl \
0N/A libpkg \
2812N/A libpool \
2812N/A libpp \
2812N/A libreparse \
2812N/A libsasl \
2812N/A libscf \
2812N/A libsecdb \
2812N/A libshare \
2812N/A libshell \
2812N/A libsldap \
2812N/A libslp \
2812N/A libsmbfs \
2812N/A libsmedia \
2812N/A libsum \
0N/A libtsol \
2812N/A libuutil \
2812N/A libvrrpadm \
2812N/A libvscan \
2812N/A libwanboot \
2812N/A libwanbootutil \
2812N/A libzfs \
2812N/A libzonecfg \
2812N/A lvm \
2812N/A madv \
2812N/A mpss \
2812N/A pam_modules \
2812N/A pysolaris \
2812N/A pyzfs \
2812N/A rpcsec_gss \
2812N/A $($(MACH)_MSGSUBDIRS)
2812N/A
2812N/Asparc_MSGSUBDIRS= \
2812N/A libprtdiag \
2812N/A libprtdiag_psr
2812N/A
2812N/Ai386_MSGSUBDIRS= libfdisk
2812N/A
2812N/AHDRSUBDIRS= \
2812N/A ../cmd/sendmail/libmilter \
2812N/A auditd_plugins \
2812N/A fm \
2812N/A hal \
2812N/A hbaapi \
2812N/A libads \
2812N/A libast \
2812N/A libbrand \
2812N/A libbsm \
2812N/A libc \
2812N/A libcmd \
2812N/A libcmdutils \
2812N/A libcommputil \
2812N/A libcontract \
2812N/A libcpc \
2812N/A libcryptoutil \
0N/A libctf \
2812N/A libcurses \
2812N/A libdevice \
0N/A libdevid \
0N/A libdevinfo \
0N/A libdhcpagent \
0N/A libdhcputil \
0N/A libdisasm \
0N/A libdiskmgt \
2812N/A libdladm \
2812N/A libdll \
0N/A libdlpi \
libdns_sd \
libdscfg \
libdtrace \
libdtrace_jni \
libelfsign \
libeti \
libfakekernel \
libfcoe \
libfru \
libfstyp \
libgen \
libgrubmgmt \
libidmap \
libilb \
libima \
libinetsvc \
libinetutil \
libinstzones \
libipadm \
libipd \
libipmi \
libipmp \
libipp \
libipsecutil \
libiscsit \
libkrb5 \
libkstat \
libkvm \
libmail \
libmapid \
libmd \
libmtmalloc \
libndmp \
libnsctl \
libnsl \
libnvpair \
libnwam \
libpam \
libpcidb \
libpctx \
libpicl \
libpicltree \
libpool \
libpp \
libproc \
libraidcfg \
librcm \
librdc \
libreparse \
librestart \
librpcsvc \
librsm \
librstp \
libsasl \
libscf \
libsec \
libshare \
libshell \
libsip \
libslp \
libsmbfs \
libsmbios \
libsmedia \
libsocket \
libsqlite \
libsrpt \
libstmf \
libstmfproxy \
libsum \
libsun_ima \
libsysevent \
libtecla \
libtermcap \
libtnf \
libtnfctl \
libtnfprobe \
libtsnet \
libtsol \
libumem \
libunistat \
libuutil \
libvolmgt \
libvrrpadm \
libvscan \
libwanboot \
libwanbootutil \
libwrap \
libxcurses2 \
libzfs \
libzfs_core \
libzfs_jni \
libzoneinfo \
libzonestat \
lvm \
mpapi \
passwdutil \
pkcs11 \
policykit \
scsi \
smbsrv \
smhba \
udapl \
$($(MACH)_HDRSUBDIRS)
i386_HDRSUBDIRS= \
libfdisk \
libsaveargs
sparc_HDRSUBDIRS= \
libds \
libdscp \
libpri \
libv12n \
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)
# Library interdependencies are called out explicitly here.
../cmd/sgs/libconv: common
../cmd/sgs/libdl: common
libc: ../cmd/sgs/libconv ../cmd/sgs/libdl
libm: libc
libmd: libc
libmp: libc
libnsl: libc libmd libmp
libnvpair: libc libnsl
libsocket: libc libnsl
basedeps: libc libm libmd libmp libnsl libnvpair libsocket
basedeps := TARGET=install
# The following dependencies don't need to be listed below as they are built
# before everything else:
# libc libm libmd libmp libnsl libnvpair libsocket
abi: libctf libmapmalloc libproc
auditd_plugins: libbsm libsecdb libgss libmtmalloc
brand: libzonecfg libmapmalloc
cfgadm_plugins: libdevice libdevinfo libhotplug librcm hbaapi libkstat libscf
fm: libexacct libipmi libzfs scsi libdevinfo libdevid libcfgadm \
libcontract libsysevent ../cmd/sgs/libelf
$(SPARC_BLD)fm: libpri
gss_mechs/mech_dh: libgss
gss_mechs/mech_dummy: libgss
gss_mechs/mech_krb5: libgss libresolv2 pkcs11 libkstat
gss_mechs/mech_spnego: gss_mechs/mech_krb5
krb5: gss_mechs/mech_krb5 libtecla libldap5
libadt_jni: libbsm
libadutils: libldap5 libresolv2
libbe: libzfs libinstzones libuuid libgen libdevinfo libefi
libbsm: libinetutil libscf libsecdb libtsol
libcfgadm: libdevinfo
libcmd: libsum libast
libcmdutils: libavl
libcpc: libpctx
libcrypt: libgen
libdevid: libdevinfo
libdevinfo: libsec libgen
libdhcpagent: libdhcputil libuuid libdlpi libcontract
libdhcputil: libgen libinetutil libdlpi
libdiskmgt: libdevid libdevinfo libadm libefi libkstat libsysevent
$(INTEL_BLD)libdiskmgt: libfdisk
libdladm: libdevinfo libinetutil libscf librcm libexacct libkstat \
libpool
libdll: libast
libdlpi: libinetutil libdladm
libds: libsysevent
libdscfg: libnsctl libunistat libadm
libdtrace: libproc libgen libctf libmapmalloc
libdtrace_jni: libuutil libdtrace
libefi: libuuid
libelfsign: libcryptoutil libkmf ../cmd/sgs/libelf
libeti: libcurses
libexacct/demo: libexacct libproject
libfakekernel: libumem libcryptoutil
libfcoe: libdladm
libfru: libfruutils
libfsmgt: libkstat
libgrubmgmt: libdevinfo libzfs libfstyp libefi
$(INTEL_BLD)libgrubmgmt: libfdisk
libidmap: libavl libuutil
libinetsvc: libscf
libinstzones: libzonecfg libcontract
libipadm: libinetutil libdlpi libdhcpagent libdladm libsecdb
libipmp: libinetutil
libipsecutil: libtecla libtsol
libiscsit: libstmf libuuid
libkmf: libcryptoutil pkcs11
libkvm: ../cmd/sgs/libelf
libldap5: libsasl
libmapid: libresolv2 libscf
libndmp: libscf
libnisdb: libldap5
libnwam: libscf libbsm libdladm
libpcp: libumem libdevinfo
libpctx: libproc
libpkg: libwanboot libscf libadm
libpool: libscf libexacct
libpp: libast
libproc: ../cmd/sgs/librtld_db ../cmd/sgs/libelf libctf
$(INTEL_BLD)libproc: libsaveargs
libproject: libpool libproc libsecdb
libprtdiag: libkstat
libprtdiag_psr: libprtdiag
libraidcfg: libdevinfo
librdc: libnsctl libunistat libdscfg
librestart: libuutil libscf libpool libproject libsecdb libsysevent
libsasl: libgss pkcs11
libsaveargs: libdisasm
libscf: libuutil libgen libsmbios
libsec: libavl libidmap
libshare: libscf libzfs libuuid libfsmgt libsecdb libumem libsmbfs
libshell: libast libcmd libdll libsecdb
libsip: libmd5
libsldap: libldap5 libscf
libsmbfs: libkrb5 libsec libidmap pkcs11
libsrpt: libstmf
libstmf: libscf
libstmfproxy: libstmf libpthread
libsum: libast
libsun_ima: libdevinfo libsysevent
libsysevent: libsecdb
libtecla: libcurses
libtermcap: libcurses
libtnfctl: ../cmd/sgs/libelf
libtsalarm: libpcp
libtsnet: libtsol libsecdb
libtsol: libsecdb
libuuid: libdlpi
libv12n: libds libuuid
libvolmgt: libadm
libvrrpadm: libdladm libscf
libvscan: libscf libsecdb
libwanboot: libresolv2 libdevinfo libinetutil libdhcputil
libzfs: libdevid libgen libuutil libadm libavl libefi libidmap \
libumem libtsol libzfs_core
libzfs_jni: libdiskmgt libzfs
libzonecfg: libuuid libsysevent libsec libbrand libpool libscf libproc \
libuutil libbsm libsecdb
libzonestat: libcmdutils libumem
libzpool: libavl libumem libcmdutils libsysevent
lvm: libadm libdevid libdevinfo libefi libgen libscf
madv: libgen
mpapi: libpthread libdevinfo libsysevent
mpss: libgen
nsswitch: libadutils libidmap libdns_sd libscf libldap5 libsldap
pam_modules: libproject passwdutil smbsrv libtsnet libpam libbsm libsecdb
passwdutil: libsldap
pkcs11: libcryptoutil libgen libuuid
policykit: libsecdb
print: libldap5 libmd5 libsendfile
pylibbe: libbe libzfs
pysolaris: libsec libidmap
pyzfs: libzfs
raidcfg_plugins: libraidcfg librcm libcfgadm libpicl libpicltree
rpcsec_gss: libgss
sasl_plugins: pkcs11 libgss libsasl
scsi: libfru libumem libdevid libdevinfo
smbsrv: libxnet libpthread librt libshare libidmap pkcs11 libsqlite \
libcryptoutil libreparse libcmdutils libresolv2 libsmbfs \
libuuid libfakekernel libads libgss libldap5 krb5
storage: libdevice libdevinfo libdevid
sun_fc: libdevinfo libsysevent
sun_sas: libdevinfo libsysevent libkstat libdevid
udapl: libdevinfo libdladm
#
# 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: