xref: /titanic_51/usr/src/lib/Makefile (revision fa9e4066f08beec538e775443c5be79dd423fcab)
17c478bd9Sstevel@tonic-gate#
27c478bd9Sstevel@tonic-gate# CDDL HEADER START
37c478bd9Sstevel@tonic-gate#
47c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the
57c478bd9Sstevel@tonic-gate# Common Development and Distribution License, Version 1.0 only
67c478bd9Sstevel@tonic-gate# (the "License").  You may not use this file except in compliance
77c478bd9Sstevel@tonic-gate# with the License.
87c478bd9Sstevel@tonic-gate#
97c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
107c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
117c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions
127c478bd9Sstevel@tonic-gate# and limitations under the License.
137c478bd9Sstevel@tonic-gate#
147c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
157c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
167c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
177c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
187c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
197c478bd9Sstevel@tonic-gate#
207c478bd9Sstevel@tonic-gate# CDDL HEADER END
217c478bd9Sstevel@tonic-gate#
227c478bd9Sstevel@tonic-gate#
237c478bd9Sstevel@tonic-gate# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
247c478bd9Sstevel@tonic-gate# Use is subject to license terms.
257c478bd9Sstevel@tonic-gate#
267c478bd9Sstevel@tonic-gate# ident	"%Z%%M%	%I%	%E% SMI"
277c478bd9Sstevel@tonic-gate
287c478bd9Sstevel@tonic-gateinclude ../Makefile.master
297c478bd9Sstevel@tonic-gate
307c478bd9Sstevel@tonic-gate#	Note that libcurses installs commands along with its library.
317c478bd9Sstevel@tonic-gate#	This is a minor bug which probably should be fixed.
327c478bd9Sstevel@tonic-gate#	Note also that a few extra libraries are kept in cmd source.
337c478bd9Sstevel@tonic-gate#
347c478bd9Sstevel@tonic-gate# Certain libraries are linked with, hence depend on, other libraries.
357c478bd9Sstevel@tonic-gate#
367c478bd9Sstevel@tonic-gate# Although we have historically used .WAIT to express dependencies, it
377c478bd9Sstevel@tonic-gate# reduces the amount of parallelism and thus lengthens the time it
387c478bd9Sstevel@tonic-gate# takes to build the libraries.  Thus, we now require that any new
397c478bd9Sstevel@tonic-gate# libraries explicitly call out their dependencies.  Eventually, all
407c478bd9Sstevel@tonic-gate# the library dependencies will be called out explicitly.  See
417c478bd9Sstevel@tonic-gate# "Library interdependencies" near the end of this file.
427c478bd9Sstevel@tonic-gate#
437c478bd9Sstevel@tonic-gate# Aside from explicit dependencies (and legacy .WAITs), all libraries
447c478bd9Sstevel@tonic-gate# are built in parallel.
457c478bd9Sstevel@tonic-gate#
467c478bd9Sstevel@tonic-gate.PARALLEL:
477c478bd9Sstevel@tonic-gate
487c478bd9Sstevel@tonic-gateSUBDIRS= \
497c478bd9Sstevel@tonic-gate	common			.WAIT	\
507c478bd9Sstevel@tonic-gate	abi/apptrace		.WAIT	\
517c478bd9Sstevel@tonic-gate	../cmd/abi/spectrans	.WAIT	\
527c478bd9Sstevel@tonic-gate	../cmd/sgs/libconv		\
537c478bd9Sstevel@tonic-gate	../cmd/sgs/libdl	.WAIT	\
547c478bd9Sstevel@tonic-gate	libc_i18n		\
557c478bd9Sstevel@tonic-gate	libc			.WAIT	\
567c478bd9Sstevel@tonic-gate	libmapmalloc		.WAIT	\
577c478bd9Sstevel@tonic-gate	../cmd/sgs/libelf	.WAIT	\
587c478bd9Sstevel@tonic-gate	libmd5				\
597c478bd9Sstevel@tonic-gate	librsm				\
607c478bd9Sstevel@tonic-gate	libmp			.WAIT	\
617c478bd9Sstevel@tonic-gate	libcmd			\
627c478bd9Sstevel@tonic-gate	libnsl			\
637c478bd9Sstevel@tonic-gate	libsecdb		.WAIT	\
647c478bd9Sstevel@tonic-gate	librpcsvc			\
657c478bd9Sstevel@tonic-gate	libsocket		.WAIT	\
667c478bd9Sstevel@tonic-gate	libsctp			\
677c478bd9Sstevel@tonic-gate	libresolv			\
687c478bd9Sstevel@tonic-gate	libresolv2		.WAIT	\
697c478bd9Sstevel@tonic-gate	libw			.WAIT	\
707c478bd9Sstevel@tonic-gate	libintl			.WAIT	\
717c478bd9Sstevel@tonic-gate	../cmd/sgs/librtld_db	\
727c478bd9Sstevel@tonic-gate	libaio			\
737c478bd9Sstevel@tonic-gate	librt			\
747c478bd9Sstevel@tonic-gate	libadm			\
757c478bd9Sstevel@tonic-gate	libctf			\
767c478bd9Sstevel@tonic-gate	libdtrace		\
777c478bd9Sstevel@tonic-gate	libcurses		\
787c478bd9Sstevel@tonic-gate	libgen			\
797c478bd9Sstevel@tonic-gate	libgss			\
807c478bd9Sstevel@tonic-gate	libpam			\
817c478bd9Sstevel@tonic-gate	libuuid			\
827c478bd9Sstevel@tonic-gate	libthread		\
837c478bd9Sstevel@tonic-gate	libpthread	.WAIT	\
847c478bd9Sstevel@tonic-gate	libslp		\
857c478bd9Sstevel@tonic-gate	libbsdmalloc	\
867c478bd9Sstevel@tonic-gate	libdoor		\
877c478bd9Sstevel@tonic-gate	libdevinfo	\
887c478bd9Sstevel@tonic-gate	libdladm	\
897c478bd9Sstevel@tonic-gate	libdlpi		\
907c478bd9Sstevel@tonic-gate	libeti		\
917c478bd9Sstevel@tonic-gate	libcrypt	\
927c478bd9Sstevel@tonic-gate	libefi		\
937c478bd9Sstevel@tonic-gate	libwanboot	\
947c478bd9Sstevel@tonic-gate	libwanbootutil	\
957c478bd9Sstevel@tonic-gate	libcryptoutil	\
967c478bd9Sstevel@tonic-gate	libinetcfg	\
977c478bd9Sstevel@tonic-gate	libinetutil	\
987c478bd9Sstevel@tonic-gate	libipmp		\
997c478bd9Sstevel@tonic-gate	libkstat	\
1007c478bd9Sstevel@tonic-gate	libkvm		\
1017c478bd9Sstevel@tonic-gate        liblaadm        \
1027c478bd9Sstevel@tonic-gate	liblm		\
1037c478bd9Sstevel@tonic-gate	libmacadm	\
1047c478bd9Sstevel@tonic-gate	libmalloc	\
1057c478bd9Sstevel@tonic-gate	libmtmalloc	\
1067c478bd9Sstevel@tonic-gate	libnls		\
10784ab085aSmws	libsmbios	\
1087c478bd9Sstevel@tonic-gate	libtecla	\
1097c478bd9Sstevel@tonic-gate	libumem		\
1107c478bd9Sstevel@tonic-gate	libnvpair	.WAIT	\
1117c478bd9Sstevel@tonic-gate	libexacct	\
1127c478bd9Sstevel@tonic-gate	libplot		\
1137c478bd9Sstevel@tonic-gate	libldap4	\
1147c478bd9Sstevel@tonic-gate	libsasl		\
1157c478bd9Sstevel@tonic-gate	libldap5	\
1167c478bd9Sstevel@tonic-gate	libsldap	.WAIT	\
1177c478bd9Sstevel@tonic-gate	libbsm		\
1187c478bd9Sstevel@tonic-gate	libsys		\
1197c478bd9Sstevel@tonic-gate	libsysevent	\
1207c478bd9Sstevel@tonic-gate	libnisdb	\
1217c478bd9Sstevel@tonic-gate	libpool		\
1227c478bd9Sstevel@tonic-gate	libproc		\
1237c478bd9Sstevel@tonic-gate	libproject	\
1247c478bd9Sstevel@tonic-gate	libsendfile	\
1257c478bd9Sstevel@tonic-gate	nametoaddr	\
1267c478bd9Sstevel@tonic-gate	ncad_addr	\
1277c478bd9Sstevel@tonic-gate	gss_mechs/mech_krb5	.WAIT	\
1287c478bd9Sstevel@tonic-gate	krb5	.WAIT	\
1297c478bd9Sstevel@tonic-gate	smartcard	\
1307c478bd9Sstevel@tonic-gate	passwdutil	\
1317c478bd9Sstevel@tonic-gate	pam_modules	\
1327c478bd9Sstevel@tonic-gate	crypt_modules	\
1337c478bd9Sstevel@tonic-gate	libadt_jni	\
1347c478bd9Sstevel@tonic-gate	auditd_plugins	\
1357c478bd9Sstevel@tonic-gate	libvolmgt	\
1367c478bd9Sstevel@tonic-gate	libdevice	\
1377c478bd9Sstevel@tonic-gate	libdevid	\
1387c478bd9Sstevel@tonic-gate	libdhcpsvc	\
1397c478bd9Sstevel@tonic-gate	libc_db		\
1407c478bd9Sstevel@tonic-gate	libsec		\
1417c478bd9Sstevel@tonic-gate	libtnfprobe	\
1427c478bd9Sstevel@tonic-gate	libtnf		\
1437c478bd9Sstevel@tonic-gate	libtnfctl	\
1447c478bd9Sstevel@tonic-gate	libdhcpagent	\
1457c478bd9Sstevel@tonic-gate	libdhcpdu	\
1467c478bd9Sstevel@tonic-gate	libdhcputil	\
1477c478bd9Sstevel@tonic-gate	libipsecutil	\
1487c478bd9Sstevel@tonic-gate	libike		\
1497c478bd9Sstevel@tonic-gate	nsswitch	\
1507c478bd9Sstevel@tonic-gate	print		\
1517c478bd9Sstevel@tonic-gate	libuutil	\
1527c478bd9Sstevel@tonic-gate	libscf		\
1537c478bd9Sstevel@tonic-gate	libinetsvc	\
1547c478bd9Sstevel@tonic-gate	librestart	\
1557c478bd9Sstevel@tonic-gate	libsched	\
1567c478bd9Sstevel@tonic-gate	libelfsign	\
1577c478bd9Sstevel@tonic-gate	pkcs11		.WAIT	\
1587c478bd9Sstevel@tonic-gate	libpctx		.WAIT	\
1597c478bd9Sstevel@tonic-gate	libcpc		\
1607c478bd9Sstevel@tonic-gate	watchmalloc	\
1617c478bd9Sstevel@tonic-gate	madv		\
1627c478bd9Sstevel@tonic-gate	mpss		\
1637c478bd9Sstevel@tonic-gate	libwrap		\
1647c478bd9Sstevel@tonic-gate	libxcurses	\
1657c478bd9Sstevel@tonic-gate	libxcurses2	\
1667c478bd9Sstevel@tonic-gate	libxnet		\
1677c478bd9Sstevel@tonic-gate	libzonecfg	\
1687c478bd9Sstevel@tonic-gate	libzoneinfo	\
1697c478bd9Sstevel@tonic-gate	gss_mechs/mech_spnego	\
1707c478bd9Sstevel@tonic-gate	gss_mechs/mech_dummy	\
1717c478bd9Sstevel@tonic-gate	gss_mechs/mech_dh	\
1727c478bd9Sstevel@tonic-gate	rpcsec_gss	\
1737c478bd9Sstevel@tonic-gate	librcm		.WAIT	\
1747c478bd9Sstevel@tonic-gate	libcfgadm	.WAIT	\
1757c478bd9Sstevel@tonic-gate	libpicl		.WAIT	\
1767c478bd9Sstevel@tonic-gate	libpicltree	.WAIT \
1777c478bd9Sstevel@tonic-gate	cfgadm_plugins	\
1787c478bd9Sstevel@tonic-gate	libmail		\
1797c478bd9Sstevel@tonic-gate	lvm		\
1807c478bd9Sstevel@tonic-gate	libsmedia	\
1817c478bd9Sstevel@tonic-gate	libipp		\
1827c478bd9Sstevel@tonic-gate	openssl		\
1837c478bd9Sstevel@tonic-gate	libdiskmgt	\
1847c478bd9Sstevel@tonic-gate	liblgrp		\
1857c478bd9Sstevel@tonic-gate	libfsmgt	\
1867c478bd9Sstevel@tonic-gate	fm		\
1877c478bd9Sstevel@tonic-gate	libavl		\
1887c478bd9Sstevel@tonic-gate	libcmdutils	\
1897c478bd9Sstevel@tonic-gate	libcontract	\
1907c478bd9Sstevel@tonic-gate	../cmd/sendmail/libmilter	\
1917c478bd9Sstevel@tonic-gate	sasl_plugins	\
1927c478bd9Sstevel@tonic-gate	udapl		\
193*fa9e4066Sahrens	libzpool	\
194*fa9e4066Sahrens	libzfs		\
195*fa9e4066Sahrens	libzfs_jni	\
1967c478bd9Sstevel@tonic-gate	$($(MACH)_SUBDIRS)
1977c478bd9Sstevel@tonic-gate
1987c478bd9Sstevel@tonic-gatesparc_SUBDIRS= .WAIT	\
1997c478bd9Sstevel@tonic-gate	efcode		\
2007c478bd9Sstevel@tonic-gate	libc_psr	.WAIT	\
2017c478bd9Sstevel@tonic-gate	libmd5_psr	.WAIT	\
2027c478bd9Sstevel@tonic-gate	libprtdiag	.WAIT	\
2037c478bd9Sstevel@tonic-gate	libprtdiag_psr	\
2047c478bd9Sstevel@tonic-gate	librsc		\
2057c478bd9Sstevel@tonic-gate	libfruutils	.WAIT	\
2067c478bd9Sstevel@tonic-gate	libfru		\
2077c478bd9Sstevel@tonic-gate	libwrsmconf	\
2087c478bd9Sstevel@tonic-gate	storage		\
2097c478bd9Sstevel@tonic-gate	wrsm		\
2107c478bd9Sstevel@tonic-gate	libpcp
2117c478bd9Sstevel@tonic-gate
2127c478bd9Sstevel@tonic-gatefm: libexacct
2137c478bd9Sstevel@tonic-gate
2147c478bd9Sstevel@tonic-gate#
2157c478bd9Sstevel@tonic-gate# Create a special version of $(SUBDIRS) with no .WAIT's, for use with the
2167c478bd9Sstevel@tonic-gate# clean and clobber targets (for more information, see those targets, below).
2177c478bd9Sstevel@tonic-gate#
2187c478bd9Sstevel@tonic-gateNOWAIT_SUBDIRS= $(SUBDIRS:.WAIT=)
2197c478bd9Sstevel@tonic-gate
2207c478bd9Sstevel@tonic-gateDCSUBDIRS =		\
2217c478bd9Sstevel@tonic-gate	lvm
2227c478bd9Sstevel@tonic-gate
2237c478bd9Sstevel@tonic-gateMSGSUBDIRS=		\
2247c478bd9Sstevel@tonic-gate	abi		\
2257c478bd9Sstevel@tonic-gate	auditd_plugins	\
2267c478bd9Sstevel@tonic-gate	cfgadm_plugins	\
2277c478bd9Sstevel@tonic-gate	gss_mechs/mech_dh	\
2287c478bd9Sstevel@tonic-gate	gss_mechs/mech_krb5	\
2297c478bd9Sstevel@tonic-gate	krb5		\
2307c478bd9Sstevel@tonic-gate	libbsm		\
2317c478bd9Sstevel@tonic-gate	libc		\
2327c478bd9Sstevel@tonic-gate	libcfgadm	\
2337c478bd9Sstevel@tonic-gate	libcontract	\
2347c478bd9Sstevel@tonic-gate	libcurses	\
2357c478bd9Sstevel@tonic-gate	libdhcpsvc 	\
2367c478bd9Sstevel@tonic-gate	libdhcputil	\
2377c478bd9Sstevel@tonic-gate	libgss		\
2387c478bd9Sstevel@tonic-gate	libinetcfg	\
2397c478bd9Sstevel@tonic-gate	libipmp		\
2407c478bd9Sstevel@tonic-gate	libnsl		\
2417c478bd9Sstevel@tonic-gate	libpam		\
2427c478bd9Sstevel@tonic-gate	libpicl		\
2437c478bd9Sstevel@tonic-gate	libpool		\
2447c478bd9Sstevel@tonic-gate	libscf		\
2457c478bd9Sstevel@tonic-gate	libsasl		\
2467c478bd9Sstevel@tonic-gate	libldap5	\
2477c478bd9Sstevel@tonic-gate	libsecdb	\
2487c478bd9Sstevel@tonic-gate	libsldap	\
2497c478bd9Sstevel@tonic-gate	libslp		\
2507c478bd9Sstevel@tonic-gate	libsmedia	\
2517c478bd9Sstevel@tonic-gate	libuutil	\
2527c478bd9Sstevel@tonic-gate	libwanboot	\
2537c478bd9Sstevel@tonic-gate	libwanbootutil	\
2547c478bd9Sstevel@tonic-gate	libzonecfg	\
2557c478bd9Sstevel@tonic-gate	lvm		\
2567c478bd9Sstevel@tonic-gate	madv		\
2577c478bd9Sstevel@tonic-gate	mpss		\
2587c478bd9Sstevel@tonic-gate	pam_modules	\
2597c478bd9Sstevel@tonic-gate	rpcsec_gss	\
2607c478bd9Sstevel@tonic-gate	smartcard	\
2617c478bd9Sstevel@tonic-gate	$($(MACH)_MSGSUBDIRS)
2627c478bd9Sstevel@tonic-gate
2637c478bd9Sstevel@tonic-gatesparc_MSGSUBDIRS=	\
2647c478bd9Sstevel@tonic-gate	libprtdiag	\
2657c478bd9Sstevel@tonic-gate	libprtdiag_psr
2667c478bd9Sstevel@tonic-gate
2677c478bd9Sstevel@tonic-gateHDRSUBDIRS= libaio	\
2687c478bd9Sstevel@tonic-gate	auditd_plugins	\
2697c478bd9Sstevel@tonic-gate	libbsm		\
2707c478bd9Sstevel@tonic-gate	libc		\
2717c478bd9Sstevel@tonic-gate	libc_i18n	\
2727c478bd9Sstevel@tonic-gate	libcmdutils	\
2737c478bd9Sstevel@tonic-gate	libcontract	\
2747c478bd9Sstevel@tonic-gate	libcpc		\
2757c478bd9Sstevel@tonic-gate	libctf		\
2767c478bd9Sstevel@tonic-gate	libcurses	\
2777c478bd9Sstevel@tonic-gate	libcryptoutil	\
2787c478bd9Sstevel@tonic-gate	libdevice	\
2797c478bd9Sstevel@tonic-gate	libdevid	\
2807c478bd9Sstevel@tonic-gate	libdevinfo	\
2813e1bd7a2Ssjelinek	libdiskmgt	\
2827c478bd9Sstevel@tonic-gate	libdladm	\
2837c478bd9Sstevel@tonic-gate	libdlpi		\
2847c478bd9Sstevel@tonic-gate	libdhcpagent	\
2857c478bd9Sstevel@tonic-gate	libdhcpsvc	\
2867c478bd9Sstevel@tonic-gate	libdhcputil	\
2877c478bd9Sstevel@tonic-gate	libdtrace	\
2887c478bd9Sstevel@tonic-gate	libeti		\
2897c478bd9Sstevel@tonic-gate	libgen		\
2907c478bd9Sstevel@tonic-gate	libwanboot	\
2917c478bd9Sstevel@tonic-gate	libwanbootutil	\
2927c478bd9Sstevel@tonic-gate	libipsecutil	\
2937c478bd9Sstevel@tonic-gate	libike		\
2947c478bd9Sstevel@tonic-gate	libinetcfg	\
2957c478bd9Sstevel@tonic-gate	libinetsvc	\
2967c478bd9Sstevel@tonic-gate	libinetutil	\
2977c478bd9Sstevel@tonic-gate	libipmp		\
2987c478bd9Sstevel@tonic-gate	libipp		\
2997c478bd9Sstevel@tonic-gate	libkstat	\
3007c478bd9Sstevel@tonic-gate	libkvm		\
3017c478bd9Sstevel@tonic-gate        liblaadm        \
3027c478bd9Sstevel@tonic-gate	libmacadm	\
3037c478bd9Sstevel@tonic-gate	libmail		\
3047c478bd9Sstevel@tonic-gate	libmtmalloc	\
3057c478bd9Sstevel@tonic-gate	libnvpair	\
3067c478bd9Sstevel@tonic-gate	libpam		\
3077c478bd9Sstevel@tonic-gate	libpctx		\
3087c478bd9Sstevel@tonic-gate	libpicl		\
3097c478bd9Sstevel@tonic-gate	libpicltree	\
3107c478bd9Sstevel@tonic-gate	libplot		\
3117c478bd9Sstevel@tonic-gate	libpool		\
3127c478bd9Sstevel@tonic-gate	libproc		\
3137c478bd9Sstevel@tonic-gate	librcm		\
3147c478bd9Sstevel@tonic-gate	libscf		\
31584ab085aSmws	libsmbios	\
3167c478bd9Sstevel@tonic-gate	librestart	\
3177c478bd9Sstevel@tonic-gate	librpcsvc	\
3187c478bd9Sstevel@tonic-gate	librsm		\
3197c478bd9Sstevel@tonic-gate	libsasl		\
320*fa9e4066Sahrens	libsec		\
3217c478bd9Sstevel@tonic-gate	libslp		\
3227c478bd9Sstevel@tonic-gate	libsmedia	\
3237c478bd9Sstevel@tonic-gate	libsysevent	\
3247c478bd9Sstevel@tonic-gate	libtecla	\
3257c478bd9Sstevel@tonic-gate	libtnf		\
3267c478bd9Sstevel@tonic-gate	libtnfctl	\
3277c478bd9Sstevel@tonic-gate	libtnfprobe	\
3287c478bd9Sstevel@tonic-gate	libvolmgt	\
3297c478bd9Sstevel@tonic-gate	libumem		\
3307c478bd9Sstevel@tonic-gate	libuutil	\
3317c478bd9Sstevel@tonic-gate	libwrap		\
3327c478bd9Sstevel@tonic-gate	libxcurses2	\
333*fa9e4066Sahrens	libzfs		\
3347c478bd9Sstevel@tonic-gate	libzoneinfo	\
3357c478bd9Sstevel@tonic-gate	lvm		\
3367c478bd9Sstevel@tonic-gate	openssl		\
3377c478bd9Sstevel@tonic-gate	pkcs11		\
3387c478bd9Sstevel@tonic-gate	smartcard	\
3397c478bd9Sstevel@tonic-gate	passwdutil	\
3407c478bd9Sstevel@tonic-gate	../cmd/sendmail/libmilter	\
3417c478bd9Sstevel@tonic-gate	fm		\
3427c478bd9Sstevel@tonic-gate	udapl		\
3437c478bd9Sstevel@tonic-gate	$($(MACH)_HDRSUBDIRS)
3447c478bd9Sstevel@tonic-gate
3457c478bd9Sstevel@tonic-gatesparc_HDRSUBDIRS=	\
3467c478bd9Sstevel@tonic-gate	libwrsmconf
3477c478bd9Sstevel@tonic-gate
3487c478bd9Sstevel@tonic-gateall :=		TARGET= all
3497c478bd9Sstevel@tonic-gatecheck :=	TARGET= check
3507c478bd9Sstevel@tonic-gateclean :=	TARGET= clean
3517c478bd9Sstevel@tonic-gateclobber :=	TARGET= clobber
3527c478bd9Sstevel@tonic-gateinstall :=	TARGET= install
3537c478bd9Sstevel@tonic-gateinstall_h :=	TARGET= install_h
3547c478bd9Sstevel@tonic-gatelint :=		TARGET= lint
3557c478bd9Sstevel@tonic-gate_dc :=		TARGET= _dc
3567c478bd9Sstevel@tonic-gate_msg :=		TARGET= _msg
3577c478bd9Sstevel@tonic-gate
3587c478bd9Sstevel@tonic-gate.KEEP_STATE:
3597c478bd9Sstevel@tonic-gate
3607c478bd9Sstevel@tonic-gate#
3617c478bd9Sstevel@tonic-gate# For the all and install targets, we clearly must respect library
3627c478bd9Sstevel@tonic-gate# dependencies so that the libraries link correctly.  However, for
3637c478bd9Sstevel@tonic-gate# the remaining targets (check, clean, clobber, install_h, lint, _dc
3647c478bd9Sstevel@tonic-gate# and _msg), libraries do not have any dependencies on one another
3657c478bd9Sstevel@tonic-gate# and thus respecting dependencies just slows down the build.
3667c478bd9Sstevel@tonic-gate# As such, for these rules, we use pattern replacement to explicitly
3677c478bd9Sstevel@tonic-gate# avoid triggering the dependency information.  Note that for clean,
3687c478bd9Sstevel@tonic-gate# clobber and lint, we must use $(NOWAIT_SUBDIRS) rather than
3697c478bd9Sstevel@tonic-gate# $(SUBDIRS), to prevent `.WAIT' from expanding to `.WAIT-nodepend'.
3707c478bd9Sstevel@tonic-gate#
3717c478bd9Sstevel@tonic-gate
3727c478bd9Sstevel@tonic-gateall:			$(SUBDIRS)
3737c478bd9Sstevel@tonic-gate
3747c478bd9Sstevel@tonic-gateinstall:		$(SUBDIRS) .WAIT install_extra
3757c478bd9Sstevel@tonic-gate
3767c478bd9Sstevel@tonic-gate# extra libraries kept in other source areas
3777c478bd9Sstevel@tonic-gateinstall_extra:
3787c478bd9Sstevel@tonic-gate	@cd ../cmd/sgs; pwd; $(MAKE) install_lib
3797c478bd9Sstevel@tonic-gate	@pwd
3807c478bd9Sstevel@tonic-gate
3817c478bd9Sstevel@tonic-gateclean clobber lint:	$(NOWAIT_SUBDIRS:%=%-nodepend)
3827c478bd9Sstevel@tonic-gate
3837c478bd9Sstevel@tonic-gateinstall_h check:	$(HDRSUBDIRS:%=%-nodepend)
3847c478bd9Sstevel@tonic-gate
3857c478bd9Sstevel@tonic-gate_msg:			$(MSGSUBDIRS:%=%-nodepend) .WAIT _dc
3867c478bd9Sstevel@tonic-gate
3877c478bd9Sstevel@tonic-gate_dc:			$(DCSUBDIRS:%=%-nodepend)
3887c478bd9Sstevel@tonic-gate
3897c478bd9Sstevel@tonic-gate#
3907c478bd9Sstevel@tonic-gate# Library interdependencies are called out explicitly here
3917c478bd9Sstevel@tonic-gate#
3927c478bd9Sstevel@tonic-gateauditd_plugins: libbsm libnsl libsecdb
3937c478bd9Sstevel@tonic-gategss_mechs/mech_krb5:	libgss libnsl libsocket libresolv pkcs11
3947c478bd9Sstevel@tonic-gatelibadt_jni:	libbsm
3957c478bd9Sstevel@tonic-gatelibc:		libc_i18n
3967c478bd9Sstevel@tonic-gatelibcmdutils:	libavl
3977c478bd9Sstevel@tonic-gatelibcontract:	libnvpair
3987c478bd9Sstevel@tonic-gatelibdevid:	libdevinfo
399*fa9e4066Sahrenslibdevinfo:	libnvpair libsec
4007c478bd9Sstevel@tonic-gatelibdhcpagent:	libdhcputil libnsl libsocket
4017c478bd9Sstevel@tonic-gatelibdhcpsvc:	libinetutil
4027c478bd9Sstevel@tonic-gatelibdhcputil:	libinetutil
4037c478bd9Sstevel@tonic-gatelibdladm:	libdlpi libdevinfo
4047c478bd9Sstevel@tonic-gatelibdtrace:	libproc libgen libctf
4057c478bd9Sstevel@tonic-gatelibefi:		libuuid
4067c478bd9Sstevel@tonic-gatelibelfsign:	libike libcryptoutil pkcs11
4077c478bd9Sstevel@tonic-gatelibinetcfg:	libnsl libsocket libdevinfo
4087c478bd9Sstevel@tonic-gatelibnsl:		libmd5 libscf
409cd93090eSerichenglibmacadm:	libdevinfo
4107c478bd9Sstevel@tonic-gatelibuuid:	libsocket
4117c478bd9Sstevel@tonic-gatelibinetutil:	libsocket
4127c478bd9Sstevel@tonic-gatelibsecdb:	libcmd libnsl
4137c478bd9Sstevel@tonic-gatelibrt:		libaio libmd5
4147c478bd9Sstevel@tonic-gatelibsasl:	libgss libsocket pkcs11 libmd5
4157c478bd9Sstevel@tonic-gatesasl_plugins:	pkcs11 libgss libsocket libsasl
4167c478bd9Sstevel@tonic-gatelibsctp:	libsocket
4177c478bd9Sstevel@tonic-gatelibsocket:	libnsl
4187c478bd9Sstevel@tonic-gatelibldap5:	libsasl libsocket libnsl libmd5
4197c478bd9Sstevel@tonic-gatelibsldap:	libldap5
4207c478bd9Sstevel@tonic-gatelibpool:	libnvpair libexacct
4217c478bd9Sstevel@tonic-gatelibproject:	libpool libproc libsecdb
4227c478bd9Sstevel@tonic-gatelibwrap:	libnsl libsocket
4237c478bd9Sstevel@tonic-gatelibwanboot:	libnvpair libresolv libnsl libsocket libdevinfo libinetutil \
4247c478bd9Sstevel@tonic-gate		libdhcputil openssl
4257c478bd9Sstevel@tonic-gatelibwanbootutil:	libnsl
4267c478bd9Sstevel@tonic-gatepam_modules:	libproject smartcard
4277c478bd9Sstevel@tonic-gatelibscf:		libuutil
4287c478bd9Sstevel@tonic-gatelibinetsvc:	libscf
4297c478bd9Sstevel@tonic-gatelibrestart:	libuutil libscf
4307c478bd9Sstevel@tonic-gate../cmd/sgs/libdl:	../cmd/sgs/libconv
4317c478bd9Sstevel@tonic-gate../cmd/sgs/libelf:	../cmd/sgs/libconv
4327c478bd9Sstevel@tonic-gatepkcs11:		libcryptoutil
4337c478bd9Sstevel@tonic-gateprint:		libldap5
4347c478bd9Sstevel@tonic-gateudapl/udapl_tavor:	udapl/libdat
435*fa9e4066Sahrenslibzfs:		libdevinfo libdevid libgen libnvpair libuutil
436*fa9e4066Sahrenslibzfs_jni:	libdiskmgt libnvpair libzfs
437*fa9e4066Sahrenslibzpool:	libavl libumem libnvpair
4387c478bd9Sstevel@tonic-gate
4397c478bd9Sstevel@tonic-gate#
4407c478bd9Sstevel@tonic-gate# The reason this rule checks for the existence of the
4417c478bd9Sstevel@tonic-gate# Makefile is that some of the directories do not exist
4427c478bd9Sstevel@tonic-gate# in our exportable source builds.
4437c478bd9Sstevel@tonic-gate#
4447c478bd9Sstevel@tonic-gate$(SUBDIRS) abi: FRC
4457c478bd9Sstevel@tonic-gate	@if [ -f $@/Makefile  ]; then \
4467c478bd9Sstevel@tonic-gate		cd $@; pwd; $(MAKE) $(TARGET); \
4477c478bd9Sstevel@tonic-gate	else \
4487c478bd9Sstevel@tonic-gate		true; \
4497c478bd9Sstevel@tonic-gate	fi
4507c478bd9Sstevel@tonic-gate
4517c478bd9Sstevel@tonic-gate$(SUBDIRS:%=%-nodepend) abi-nodepend:
4527c478bd9Sstevel@tonic-gate	@if [ -f $(@:%-nodepend=%)/Makefile  ]; then \
4537c478bd9Sstevel@tonic-gate		cd $(@:%-nodepend=%); pwd; $(MAKE) $(TARGET); \
4547c478bd9Sstevel@tonic-gate	else \
4557c478bd9Sstevel@tonic-gate		true; \
4567c478bd9Sstevel@tonic-gate	fi
4577c478bd9Sstevel@tonic-gate
4587c478bd9Sstevel@tonic-gateFRC:
459