Makefile revision c3a558e7c77127215b010652905be7916ec5a080
54925bf60766fbb4f1f2d7c843721406a7b7a3fbwillf# CDDL HEADER START
54925bf60766fbb4f1f2d7c843721406a7b7a3fbwillf# The contents of this file are subject to the terms of the
54925bf60766fbb4f1f2d7c843721406a7b7a3fbwillf# Common Development and Distribution License (the "License").
54925bf60766fbb4f1f2d7c843721406a7b7a3fbwillf# You may not use this file except in compliance with the License.
54925bf60766fbb4f1f2d7c843721406a7b7a3fbwillf# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
54925bf60766fbb4f1f2d7c843721406a7b7a3fbwillf# See the License for the specific language governing permissions
54925bf60766fbb4f1f2d7c843721406a7b7a3fbwillf# and limitations under the License.
54925bf60766fbb4f1f2d7c843721406a7b7a3fbwillf# When distributing Covered Code, include this CDDL HEADER in each
54925bf60766fbb4f1f2d7c843721406a7b7a3fbwillf# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
54925bf60766fbb4f1f2d7c843721406a7b7a3fbwillf# If applicable, add the following below this CDDL HEADER, with the
54925bf60766fbb4f1f2d7c843721406a7b7a3fbwillf# fields enclosed by brackets "[]" replaced with your own identifying
54925bf60766fbb4f1f2d7c843721406a7b7a3fbwillf# information: Portions Copyright [yyyy] [name of copyright owner]
54925bf60766fbb4f1f2d7c843721406a7b7a3fbwillf# CDDL HEADER END
54925bf60766fbb4f1f2d7c843721406a7b7a3fbwillf# Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
54925bf60766fbb4f1f2d7c843721406a7b7a3fbwillf# Note that libcurses installs commands along with its library.
54925bf60766fbb4f1f2d7c843721406a7b7a3fbwillf# This is a minor bug which probably should be fixed.
54925bf60766fbb4f1f2d7c843721406a7b7a3fbwillf# Note also that a few extra libraries are kept in cmd source.
54925bf60766fbb4f1f2d7c843721406a7b7a3fbwillf# Certain libraries are linked with, hence depend on, other libraries.
54925bf60766fbb4f1f2d7c843721406a7b7a3fbwillf# Although we have historically used .WAIT to express dependencies, it
54925bf60766fbb4f1f2d7c843721406a7b7a3fbwillf# reduces the amount of parallelism and thus lengthens the time it
54925bf60766fbb4f1f2d7c843721406a7b7a3fbwillf# takes to build the libraries. Thus, we now require that any new
54925bf60766fbb4f1f2d7c843721406a7b7a3fbwillf# libraries explicitly call out their dependencies. Eventually, all
54925bf60766fbb4f1f2d7c843721406a7b7a3fbwillf# the library dependencies will be called out explicitly. See
54925bf60766fbb4f1f2d7c843721406a7b7a3fbwillf# "Library interdependencies" near the end of this file.
54925bf60766fbb4f1f2d7c843721406a7b7a3fbwillf# Aside from explicit dependencies (and legacy .WAITs), all libraries
54925bf60766fbb4f1f2d7c843721406a7b7a3fbwillf# are built in parallel.
54925bf60766fbb4f1f2d7c843721406a7b7a3fbwillf# The $(CLOSED_BUILD) additions to SUBDIRS & MSGSUBDIRS are unfortunate,
54925bf60766fbb4f1f2d7c843721406a7b7a3fbwillf# but required due to the "dependencies" of using .WAIT to barrier the
54925bf60766fbb4f1f2d7c843721406a7b7a3fbwillf# parallel dmake builds. once 4631488 has been fixed, they can be
54925bf60766fbb4f1f2d7c843721406a7b7a3fbwillf# consolidated into one $(CLOSED_BUILD)SUBDIRS += (all closed libs) as
54925bf60766fbb4f1f2d7c843721406a7b7a3fbwillf# shown in HDRSUBDIRS
54925bf60766fbb4f1f2d7c843721406a7b7a3fbwillf# Create a special version of $(SUBDIRS) with no .WAIT's, for use with the
54925bf60766fbb4f1f2d7c843721406a7b7a3fbwillf# clean and clobber targets (for more information, see those targets, below).
54925bf60766fbb4f1f2d7c843721406a7b7a3fbwillf# For the all and install targets, we clearly must respect library
54925bf60766fbb4f1f2d7c843721406a7b7a3fbwillf# dependencies so that the libraries link correctly. However, for
54925bf60766fbb4f1f2d7c843721406a7b7a3fbwillf# the remaining targets (check, clean, clobber, install_h, lint, _dc
54925bf60766fbb4f1f2d7c843721406a7b7a3fbwillf# and _msg), libraries do not have any dependencies on one another
54925bf60766fbb4f1f2d7c843721406a7b7a3fbwillf# and thus respecting dependencies just slows down the build.
54925bf60766fbb4f1f2d7c843721406a7b7a3fbwillf# As such, for these rules, we use pattern replacement to explicitly
54925bf60766fbb4f1f2d7c843721406a7b7a3fbwillf# avoid triggering the dependency information. Note that for clean,
54925bf60766fbb4f1f2d7c843721406a7b7a3fbwillf# clobber and lint, we must use $(NOWAIT_SUBDIRS) rather than
54925bf60766fbb4f1f2d7c843721406a7b7a3fbwillf# $(SUBDIRS), to prevent `.WAIT' from expanding to `.WAIT-nodepend'.
54925bf60766fbb4f1f2d7c843721406a7b7a3fbwillf# extra libraries kept in other source areas
54925bf60766fbb4f1f2d7c843721406a7b7a3fbwillf# Library interdependencies are called out explicitly here
54925bf60766fbb4f1f2d7c843721406a7b7a3fbwillfgss_mechs/mech_krb5: libgss libnsl libsocket libresolv pkcs11
54925bf60766fbb4f1f2d7c843721406a7b7a3fbwillflibdhcpagent: libsocket libdhcputil libuuid libdlpi libcontract
54925bf60766fbb4f1f2d7c843721406a7b7a3fbwillflibdladm: libdevinfo libinetutil libsocket libscf librcm libnvpair \
54925bf60766fbb4f1f2d7c843721406a7b7a3fbwillflibipadm: libnsl libinetutil libsocket libdlpi libnvpair libdhcpagent \
54925bf60766fbb4f1f2d7c843721406a7b7a3fbwillf$(CLOSED_BUILD)libike: libipsecutil libxnet libcryptoutil
54925bf60766fbb4f1f2d7c843721406a7b7a3fbwillflibsldap: libldap5 libtsol libnsl libc libscf libresolv
54925bf60766fbb4f1f2d7c843721406a7b7a3fbwillflibzonecfg: libc libsocket libnsl libuuid libnvpair libsysevent libsec \
54925bf60766fbb4f1f2d7c843721406a7b7a3fbwillflibproc: ../cmd/sgs/librtld_db ../cmd/sgs/libelf libctf
54925bf60766fbb4f1f2d7c843721406a7b7a3fbwillflibwanboot: libnvpair libresolv libnsl libsocket libdevinfo libinetutil \
54925bf60766fbb4f1f2d7c843721406a7b7a3fbwillflibshare: libscf libzfs libuuid libfsmgt libsecdb libumem libsmbfs
54925bf60766fbb4f1f2d7c843721406a7b7a3fbwillfsmbsrv: libsocket libnsl libmd libxnet libpthread librt \
54925bf60766fbb4f1f2d7c843721406a7b7a3fbwillf libshare libidmap pkcs11 libsqlite libcryptoutil libreparse
# in certain situations (e.g., exportable source builds,
@if [ -f $@/Makefile ]; then \
FRC: