xref: /illumos-gate/usr/src/lib/Makefile (revision 4a6822d07d6d3f9ffe6907ef5f10d11dcadd75c6)
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
5fb3fb4f3Stomee# Common Development and Distribution License (the "License").
6fb3fb4f3Stomee# You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate#
87c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate# and limitations under the License.
127c478bd9Sstevel@tonic-gate#
137c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate#
197c478bd9Sstevel@tonic-gate# CDDL HEADER END
207c478bd9Sstevel@tonic-gate#
217c478bd9Sstevel@tonic-gate#
22711890bcSjc156560# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
237c478bd9Sstevel@tonic-gate# Use is subject to license terms.
247c478bd9Sstevel@tonic-gate#
257c478bd9Sstevel@tonic-gate# ident	"%Z%%M%	%I%	%E% SMI"
26f808c858Sraf#
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
48fb9f9b97Skupfer#
49fb9f9b97Skupfer# The $(CLOSED_BUILD) additions to SUBDIRS & MSGSUBDIRS are unfortunate,
50fb9f9b97Skupfer# but required due to the "dependencies" of using .WAIT to barrier the
51fb9f9b97Skupfer# parallel dmake builds.  once 4631488 has been fixed, they can be
52fb9f9b97Skupfer# consolidated into one $(CLOSED_BUILD)SUBDIRS += (all closed libs) as
53fb9f9b97Skupfer# shown in HDRSUBDIRS
54fb9f9b97Skupfer#
557c478bd9Sstevel@tonic-gateSUBDIRS= \
567c478bd9Sstevel@tonic-gate	common			.WAIT	\
577c478bd9Sstevel@tonic-gate	../cmd/sgs/libconv		\
58fb9f9b97Skupfer	../cmd/sgs/libdl	.WAIT
59fb9f9b97Skupfer
60fb9f9b97Skupfer$(CLOSED_BUILD)SUBDIRS += \
61fb9f9b97Skupfer	$(CLOSED)/lib/libc_i18n
62fb9f9b97Skupfer
63fb9f9b97SkupferSUBDIRS += \
647c478bd9Sstevel@tonic-gate	libc			.WAIT	\
657c478bd9Sstevel@tonic-gate	../cmd/sgs/libelf	.WAIT	\
66734b6a94Sdarrenm	libmd				\
677c478bd9Sstevel@tonic-gate	libmd5				\
687c478bd9Sstevel@tonic-gate	librsm				\
697c478bd9Sstevel@tonic-gate	libmp			.WAIT	\
707c478bd9Sstevel@tonic-gate	libnsl			\
717c478bd9Sstevel@tonic-gate	libsecdb		.WAIT	\
727c478bd9Sstevel@tonic-gate	librpcsvc			\
737c478bd9Sstevel@tonic-gate	libsocket		.WAIT	\
747c478bd9Sstevel@tonic-gate	libsctp			\
7540cb5e5dSvi117747	libsip			\
767c478bd9Sstevel@tonic-gate	libresolv			\
777c478bd9Sstevel@tonic-gate	libresolv2		.WAIT	\
787c478bd9Sstevel@tonic-gate	libw			.WAIT	\
797c478bd9Sstevel@tonic-gate	libintl			.WAIT	\
807c478bd9Sstevel@tonic-gate	../cmd/sgs/librtld_db	\
817c478bd9Sstevel@tonic-gate	libaio			\
82da2e3ebdSchin	libast			\
83da2e3ebdSchin	libdll			\
84da2e3ebdSchin	libcmd			\
85da2e3ebdSchin	libshell		\
867c478bd9Sstevel@tonic-gate	librt			\
877c478bd9Sstevel@tonic-gate	libadm			\
887c478bd9Sstevel@tonic-gate	libctf			\
897c478bd9Sstevel@tonic-gate	libdtrace		\
90fb3fb4f3Stomee	libdtrace_jni		\
917c478bd9Sstevel@tonic-gate	libcurses		\
927c478bd9Sstevel@tonic-gate	libgen			\
937c478bd9Sstevel@tonic-gate	libgss			\
947c478bd9Sstevel@tonic-gate	libpam			\
957c478bd9Sstevel@tonic-gate	libuuid			\
967c478bd9Sstevel@tonic-gate	libthread		\
977c478bd9Sstevel@tonic-gate	libpthread	.WAIT	\
987c478bd9Sstevel@tonic-gate	libslp		\
997c478bd9Sstevel@tonic-gate	libbsdmalloc	\
1007c478bd9Sstevel@tonic-gate	libdoor		\
1017c478bd9Sstevel@tonic-gate	libdevinfo	\
1027c478bd9Sstevel@tonic-gate	libdladm	\
1037c478bd9Sstevel@tonic-gate	libdlpi		\
1047c478bd9Sstevel@tonic-gate	libeti		\
1057c478bd9Sstevel@tonic-gate	libcrypt	\
1064b22b933Srs200217	libdns_sd	\
1077c478bd9Sstevel@tonic-gate	libefi		\
1080e42dee6Sartem	libfstyp	\
1097c478bd9Sstevel@tonic-gate	libwanboot	\
1107c478bd9Sstevel@tonic-gate	libwanbootutil	\
1117c478bd9Sstevel@tonic-gate	libcryptoutil	\
1127c478bd9Sstevel@tonic-gate	libinetcfg	\
1137c478bd9Sstevel@tonic-gate	libinetutil	\
1147c478bd9Sstevel@tonic-gate	libipmp		\
115f3861e1aSahl	libiscsitgt	\
11699ebb4caSwyllys	libkmf		\
1177c478bd9Sstevel@tonic-gate	libkstat	\
1187c478bd9Sstevel@tonic-gate	libkvm		\
1197c478bd9Sstevel@tonic-gate	liblm		\
1207c478bd9Sstevel@tonic-gate	libmalloc	\
121f808c858Sraf	libmapmalloc	\
1227c478bd9Sstevel@tonic-gate	libmtmalloc	\
1237c478bd9Sstevel@tonic-gate	libnls		\
12484ab085aSmws	libsmbios	\
1257c478bd9Sstevel@tonic-gate	libtecla	\
1267c478bd9Sstevel@tonic-gate	libumem		\
1277c478bd9Sstevel@tonic-gate	libnvpair	.WAIT	\
1287c478bd9Sstevel@tonic-gate	libexacct	\
1297c478bd9Sstevel@tonic-gate	libplot		\
1307c478bd9Sstevel@tonic-gate	libldap4	\
1317c478bd9Sstevel@tonic-gate	libsasl		\
1327c478bd9Sstevel@tonic-gate	libldap5	\
1337c478bd9Sstevel@tonic-gate	libsldap	.WAIT	\
1347c478bd9Sstevel@tonic-gate	libbsm		\
1357c478bd9Sstevel@tonic-gate	libsys		\
1367c478bd9Sstevel@tonic-gate	libsysevent	\
1377c478bd9Sstevel@tonic-gate	libnisdb	\
1387c478bd9Sstevel@tonic-gate	libpool		\
139da2e3ebdSchin	libpp		\
1407c478bd9Sstevel@tonic-gate	libproc		\
1417c478bd9Sstevel@tonic-gate	libproject	\
1427c478bd9Sstevel@tonic-gate	libsendfile	\
1437c478bd9Sstevel@tonic-gate	nametoaddr	\
1447c478bd9Sstevel@tonic-gate	ncad_addr	\
1457c478bd9Sstevel@tonic-gate	gss_mechs/mech_krb5	.WAIT	\
14610db1377Sgtb	libkrb5	.WAIT	\
147fb9f9b97Skupfer	krb5	.WAIT
148fb9f9b97Skupfer$(CLOSED_BUILD)SUBDIRS += \
149fb9f9b97Skupfer	$(CLOSED)/lib/smartcard
150fb9f9b97SkupferSUBDIRS += \
1517c478bd9Sstevel@tonic-gate	passwdutil	\
1527c478bd9Sstevel@tonic-gate	pam_modules	\
1537c478bd9Sstevel@tonic-gate	crypt_modules	\
1547c478bd9Sstevel@tonic-gate	libadt_jni	\
155f808c858Sraf	abi		\
1567c478bd9Sstevel@tonic-gate	auditd_plugins	\
1577c478bd9Sstevel@tonic-gate	libvolmgt	\
1587c478bd9Sstevel@tonic-gate	libdevice	\
1597c478bd9Sstevel@tonic-gate	libdevid	\
1607c478bd9Sstevel@tonic-gate	libdhcpsvc	\
1617c478bd9Sstevel@tonic-gate	libc_db		\
1627c478bd9Sstevel@tonic-gate	libsec		\
1637c478bd9Sstevel@tonic-gate	libtnfprobe	\
1647c478bd9Sstevel@tonic-gate	libtnf		\
1657c478bd9Sstevel@tonic-gate	libtnfctl	\
1667c478bd9Sstevel@tonic-gate	libdhcpagent	\
1677c478bd9Sstevel@tonic-gate	libdhcpdu	\
1687c478bd9Sstevel@tonic-gate	libdhcputil	\
169fb9f9b97Skupfer	libipsecutil
170fb9f9b97Skupfer$(CLOSED_BUILD)SUBDIRS += \
171fb9f9b97Skupfer	$(CLOSED)/lib/libike
172fb9f9b97SkupferSUBDIRS += \
1737c478bd9Sstevel@tonic-gate	nsswitch	\
1747c478bd9Sstevel@tonic-gate	print		\
1757c478bd9Sstevel@tonic-gate	libuutil	\
1767c478bd9Sstevel@tonic-gate	libscf		\
1777c478bd9Sstevel@tonic-gate	libinetsvc	\
1787c478bd9Sstevel@tonic-gate	librestart	\
179fb9f9b97Skupfer	libsched
180fb9f9b97Skupfer$(CLOSED_BUILD)SUBDIRS += \
181fb9f9b97Skupfer	$(CLOSED)/lib/libelfsign
182fb9f9b97SkupferSUBDIRS += \
1837c478bd9Sstevel@tonic-gate	pkcs11		.WAIT	\
1847c478bd9Sstevel@tonic-gate	libpctx		.WAIT	\
1857c478bd9Sstevel@tonic-gate	libcpc		\
1867c478bd9Sstevel@tonic-gate	watchmalloc	\
187a5f69788Scraigm	extendedFILE	\
1887c478bd9Sstevel@tonic-gate	madv		\
1897c478bd9Sstevel@tonic-gate	mpss		\
190dc0093f4Seschrock	libdisasm	\
1917c478bd9Sstevel@tonic-gate	libwrap		\
1927c478bd9Sstevel@tonic-gate	libxcurses	\
1937c478bd9Sstevel@tonic-gate	libxcurses2	\
1947c478bd9Sstevel@tonic-gate	libxnet		\
1959acbbeafSnn35248	libbrand	.WAIT   \
1967c478bd9Sstevel@tonic-gate	libzonecfg	\
1977c478bd9Sstevel@tonic-gate	libzoneinfo	\
19845916cd2Sjpk	libtsnet	\
19945916cd2Sjpk	libtsol		\
2007c478bd9Sstevel@tonic-gate	gss_mechs/mech_spnego	\
2017c478bd9Sstevel@tonic-gate	gss_mechs/mech_dummy	\
2027c478bd9Sstevel@tonic-gate	gss_mechs/mech_dh	\
2037c478bd9Sstevel@tonic-gate	rpcsec_gss	\
204711890bcSjc156560	libraidcfg	.WAIT	\
2057c478bd9Sstevel@tonic-gate	librcm		.WAIT	\
2067c478bd9Sstevel@tonic-gate	libcfgadm	.WAIT	\
2077c478bd9Sstevel@tonic-gate	libpicl		.WAIT	\
2087c478bd9Sstevel@tonic-gate	libpicltree	.WAIT \
209711890bcSjc156560	raidcfg_plugins	\
2107c478bd9Sstevel@tonic-gate	cfgadm_plugins	\
2117c478bd9Sstevel@tonic-gate	libmail		\
2127c478bd9Sstevel@tonic-gate	lvm		\
2137c478bd9Sstevel@tonic-gate	libsmedia	\
2147c478bd9Sstevel@tonic-gate	libipp		\
2157c478bd9Sstevel@tonic-gate	openssl		\
2167c478bd9Sstevel@tonic-gate	libdiskmgt	\
2177c478bd9Sstevel@tonic-gate	liblgrp		\
2187c478bd9Sstevel@tonic-gate	libfsmgt	\
2197c478bd9Sstevel@tonic-gate	fm		\
2207c478bd9Sstevel@tonic-gate	libavl		\
2217c478bd9Sstevel@tonic-gate	libcmdutils	\
2227c478bd9Sstevel@tonic-gate	libcontract	\
2237c478bd9Sstevel@tonic-gate	../cmd/sendmail/libmilter	\
2247c478bd9Sstevel@tonic-gate	sasl_plugins	\
2257c478bd9Sstevel@tonic-gate	udapl		\
226fa9e4066Sahrens	libzpool	\
227fa9e4066Sahrens	libzfs		\
228fa9e4066Sahrens	libzfs_jni	\
2298200fe25Srmesta	libmapid	\
2309acbbeafSnn35248	brand		\
23118c2aff7Sartem	policykit	\
23218c2aff7Sartem	hal		\
2336185db85Sdougm	libshare	\
234c5c4113dSnw141292	libsqlite	\
235c5c4113dSnw141292	libidmap	\
2369113a79cSeschrock	libipmi		\
237853de45fSdh155122	libexacct/demo	\
2387c478bd9Sstevel@tonic-gate	$($(MACH)_SUBDIRS)
2397c478bd9Sstevel@tonic-gate
2407c478bd9Sstevel@tonic-gatesparc_SUBDIRS= .WAIT	\
2417c478bd9Sstevel@tonic-gate	efcode		\
24203831d35Sstevel	libc_psr	.WAIT	\
24325cf1a30Sjl139090	libdscp		\
24403831d35Sstevel	libprtdiag	.WAIT	\
24503831d35Sstevel	libprtdiag_psr	\
246ef884685Srb144127	libpri		\
24703831d35Sstevel	librsc		\
2487c478bd9Sstevel@tonic-gate	libfruutils	.WAIT	\
2497c478bd9Sstevel@tonic-gate	libfru		\
2507c478bd9Sstevel@tonic-gate	storage		\
251*4a6822d0Swillard	libpcp		\
252*4a6822d0Swillard	libtsalarm
2537c478bd9Sstevel@tonic-gate
254ef884685Srb144127FM_sparc_DEPLIBS= libpri
255ef884685Srb144127
256ef884685Srb144127fm: libexacct $(FM_$(MACH)_DEPLIBS)
2577c478bd9Sstevel@tonic-gate
2587c478bd9Sstevel@tonic-gate#
2597c478bd9Sstevel@tonic-gate# Create a special version of $(SUBDIRS) with no .WAIT's, for use with the
2607c478bd9Sstevel@tonic-gate# clean and clobber targets (for more information, see those targets, below).
2617c478bd9Sstevel@tonic-gate#
2627c478bd9Sstevel@tonic-gateNOWAIT_SUBDIRS= $(SUBDIRS:.WAIT=)
2637c478bd9Sstevel@tonic-gate
2647c478bd9Sstevel@tonic-gateDCSUBDIRS =		\
2657c478bd9Sstevel@tonic-gate	lvm
2667c478bd9Sstevel@tonic-gate
2677c478bd9Sstevel@tonic-gateMSGSUBDIRS=		\
2687c478bd9Sstevel@tonic-gate	abi		\
2697c478bd9Sstevel@tonic-gate	auditd_plugins	\
2709acbbeafSnn35248	brand		\
2717c478bd9Sstevel@tonic-gate	cfgadm_plugins	\
2727c478bd9Sstevel@tonic-gate	gss_mechs/mech_dh	\
2737c478bd9Sstevel@tonic-gate	gss_mechs/mech_krb5	\
2747c478bd9Sstevel@tonic-gate	krb5		\
275da2e3ebdSchin	libast		\
2767c478bd9Sstevel@tonic-gate	libbsm		\
2777c478bd9Sstevel@tonic-gate	libc		\
2787c478bd9Sstevel@tonic-gate	libcfgadm	\
279da2e3ebdSchin	libcmd		\
2807c478bd9Sstevel@tonic-gate	libcontract	\
2817c478bd9Sstevel@tonic-gate	libcurses	\
2827c478bd9Sstevel@tonic-gate	libdhcpsvc 	\
2837c478bd9Sstevel@tonic-gate	libdhcputil	\
284a7485808Smarkfen	libipsecutil	\
285181c2f42Smmusante	libdiskmgt	\
28633343a97Smeem	libdladm	\
287da2e3ebdSchin	libdll		\
2887c478bd9Sstevel@tonic-gate	libgss		\
289c5c4113dSnw141292	libidmap	\
2907c478bd9Sstevel@tonic-gate	libinetcfg	\
2917c478bd9Sstevel@tonic-gate	libipmp		\
2927c478bd9Sstevel@tonic-gate	libnsl		\
2937c478bd9Sstevel@tonic-gate	libpam		\
2947c478bd9Sstevel@tonic-gate	libpicl		\
2957c478bd9Sstevel@tonic-gate	libpool		\
296da2e3ebdSchin	libpp		\
2977c478bd9Sstevel@tonic-gate	libscf		\
2987c478bd9Sstevel@tonic-gate	libsasl		\
2997c478bd9Sstevel@tonic-gate	libldap5	\
3007c478bd9Sstevel@tonic-gate	libsecdb	\
3016185db85Sdougm	libshare	\
302da2e3ebdSchin	libshell	\
3037c478bd9Sstevel@tonic-gate	libsldap	\
3047c478bd9Sstevel@tonic-gate	libslp		\
3057c478bd9Sstevel@tonic-gate	libsmedia	\
30645916cd2Sjpk	libtsol		\
3077c478bd9Sstevel@tonic-gate	libuutil	\
3087c478bd9Sstevel@tonic-gate	libwanboot	\
3097c478bd9Sstevel@tonic-gate	libwanbootutil	\
310c3aa2a37Sck153898	libzfs		\
3117c478bd9Sstevel@tonic-gate	libzonecfg	\
3127c478bd9Sstevel@tonic-gate	lvm		\
3137c478bd9Sstevel@tonic-gate	madv		\
3147c478bd9Sstevel@tonic-gate	mpss		\
3157c478bd9Sstevel@tonic-gate	pam_modules	\
316fb9f9b97Skupfer	rpcsec_gss
317fb9f9b97Skupfer$(CLOSED_BUILD)MSGSUBDIRS += \
318fb9f9b97Skupfer	$(CLOSED)/lib/smartcard
319fb9f9b97SkupferMSGSUBDIRS += \
3207c478bd9Sstevel@tonic-gate	$($(MACH)_MSGSUBDIRS)
3217c478bd9Sstevel@tonic-gate
32203831d35Sstevelsparc_MSGSUBDIRS=	\
32303831d35Sstevel	libprtdiag	\
32403831d35Sstevel	libprtdiag_psr
3257c478bd9Sstevel@tonic-gate
326f841f6adSrafHDRSUBDIRS=		\
3277c478bd9Sstevel@tonic-gate	auditd_plugins	\
328da2e3ebdSchin	libast		\
3299acbbeafSnn35248	libbrand	\
3307c478bd9Sstevel@tonic-gate	libbsm		\
3317c478bd9Sstevel@tonic-gate	libc		\
332da2e3ebdSchin	libcmd		\
3337c478bd9Sstevel@tonic-gate	libcmdutils	\
3347c478bd9Sstevel@tonic-gate	libcontract	\
3357c478bd9Sstevel@tonic-gate	libcpc		\
3367c478bd9Sstevel@tonic-gate	libctf		\
3377c478bd9Sstevel@tonic-gate	libcurses	\
3387c478bd9Sstevel@tonic-gate	libcryptoutil	\
3397c478bd9Sstevel@tonic-gate	libdevice	\
3407c478bd9Sstevel@tonic-gate	libdevid	\
3417c478bd9Sstevel@tonic-gate	libdevinfo	\
3423e1bd7a2Ssjelinek	libdiskmgt	\
3437c478bd9Sstevel@tonic-gate	libdladm	\
344da2e3ebdSchin	libdll		\
3457c478bd9Sstevel@tonic-gate	libdlpi		\
3467c478bd9Sstevel@tonic-gate	libdhcpagent	\
3477c478bd9Sstevel@tonic-gate	libdhcpsvc	\
3487c478bd9Sstevel@tonic-gate	libdhcputil	\
349dc0093f4Seschrock	libdisasm	\
3504b22b933Srs200217	libdns_sd	\
3517c478bd9Sstevel@tonic-gate	libdtrace	\
352fb3fb4f3Stomee	libdtrace_jni	\
3537c478bd9Sstevel@tonic-gate	libeti		\
3540e42dee6Sartem	libfstyp	\
3557c478bd9Sstevel@tonic-gate	libgen		\
3567c478bd9Sstevel@tonic-gate	libwanboot	\
3577c478bd9Sstevel@tonic-gate	libwanbootutil	\
3587c478bd9Sstevel@tonic-gate	libipsecutil	\
3597c478bd9Sstevel@tonic-gate	libinetcfg	\
3607c478bd9Sstevel@tonic-gate	libinetsvc	\
3617c478bd9Sstevel@tonic-gate	libinetutil	\
3629113a79cSeschrock	libipmi		\
3637c478bd9Sstevel@tonic-gate	libipmp		\
3647c478bd9Sstevel@tonic-gate	libipp		\
365f3861e1aSahl	libiscsitgt	\
3667c478bd9Sstevel@tonic-gate	libkstat	\
3677c478bd9Sstevel@tonic-gate	libkvm		\
3687c478bd9Sstevel@tonic-gate	libmail		\
369734b6a94Sdarrenm	libmd		\
3707c478bd9Sstevel@tonic-gate	libmtmalloc	\
3717c478bd9Sstevel@tonic-gate	libnvpair	\
37245916cd2Sjpk	libnsl		\
3737c478bd9Sstevel@tonic-gate	libpam		\
3747c478bd9Sstevel@tonic-gate	libpctx		\
3757c478bd9Sstevel@tonic-gate	libpicl		\
3767c478bd9Sstevel@tonic-gate	libpicltree	\
3777c478bd9Sstevel@tonic-gate	libplot		\
3787c478bd9Sstevel@tonic-gate	libpool		\
379da2e3ebdSchin	libpp		\
3807c478bd9Sstevel@tonic-gate	libproc		\
3813e4f2897Sjc156560	libraidcfg	\
3827c478bd9Sstevel@tonic-gate	librcm		\
3837c478bd9Sstevel@tonic-gate	libscf		\
38440cb5e5dSvi117747	libsip		\
38584ab085aSmws	libsmbios	\
3867c478bd9Sstevel@tonic-gate	librestart	\
3877c478bd9Sstevel@tonic-gate	librpcsvc	\
3887c478bd9Sstevel@tonic-gate	librsm		\
3897c478bd9Sstevel@tonic-gate	libsasl		\
390fa9e4066Sahrens	libsec		\
391da2e3ebdSchin	libshell	\
3927c478bd9Sstevel@tonic-gate	libslp		\
3937c478bd9Sstevel@tonic-gate	libsmedia	\
394c5c4113dSnw141292	libsqlite	\
3957c478bd9Sstevel@tonic-gate	libsysevent	\
3967c478bd9Sstevel@tonic-gate	libtecla	\
3977c478bd9Sstevel@tonic-gate	libtnf		\
3987c478bd9Sstevel@tonic-gate	libtnfctl	\
3997c478bd9Sstevel@tonic-gate	libtnfprobe	\
40045916cd2Sjpk	libtsnet	\
40145916cd2Sjpk	libtsol		\
4027c478bd9Sstevel@tonic-gate	libvolmgt	\
4037c478bd9Sstevel@tonic-gate	libumem		\
4047c478bd9Sstevel@tonic-gate	libuutil	\
4057c478bd9Sstevel@tonic-gate	libwrap		\
4067c478bd9Sstevel@tonic-gate	libxcurses2	\
407fa9e4066Sahrens	libzfs		\
408088e9d47Seschrock	libzfs_jni	\
4097c478bd9Sstevel@tonic-gate	libzoneinfo	\
41018c2aff7Sartem	hal		\
41118c2aff7Sartem	policykit	\
4127c478bd9Sstevel@tonic-gate	lvm		\
4137c478bd9Sstevel@tonic-gate	openssl		\
4147c478bd9Sstevel@tonic-gate	pkcs11		\
4157c478bd9Sstevel@tonic-gate	passwdutil	\
4167c478bd9Sstevel@tonic-gate	../cmd/sendmail/libmilter	\
4177c478bd9Sstevel@tonic-gate	fm		\
4187c478bd9Sstevel@tonic-gate	udapl		\
4198200fe25Srmesta	libmapid	\
42010db1377Sgtb	libkrb5		\
4216185db85Sdougm	libshare	\
422c5c4113dSnw141292	libidmap	\
4237c478bd9Sstevel@tonic-gate	$($(MACH)_HDRSUBDIRS)
4247c478bd9Sstevel@tonic-gate
425fb9f9b97Skupfer$(CLOSED_BUILD)HDRSUBDIRS += \
426fb9f9b97Skupfer	$(CLOSED)/lib/libc_i18n	\
427fb9f9b97Skupfer	$(CLOSED)/lib/libike	\
428fb9f9b97Skupfer	$(CLOSED)/lib/smartcard
429fb9f9b97Skupfer
4307c478bd9Sstevel@tonic-gatesparc_HDRSUBDIRS=	\
43125cf1a30Sjl139090	libdscp		\
432a83cadceSkm84432	libpri
4337c478bd9Sstevel@tonic-gate
4347c478bd9Sstevel@tonic-gateall :=		TARGET= all
4357c478bd9Sstevel@tonic-gatecheck :=	TARGET= check
4367c478bd9Sstevel@tonic-gateclean :=	TARGET= clean
4377c478bd9Sstevel@tonic-gateclobber :=	TARGET= clobber
4387c478bd9Sstevel@tonic-gateinstall :=	TARGET= install
4397c478bd9Sstevel@tonic-gateinstall_h :=	TARGET= install_h
4407c478bd9Sstevel@tonic-gatelint :=		TARGET= lint
4417c478bd9Sstevel@tonic-gate_dc :=		TARGET= _dc
4427c478bd9Sstevel@tonic-gate_msg :=		TARGET= _msg
4437c478bd9Sstevel@tonic-gate
4447c478bd9Sstevel@tonic-gate.KEEP_STATE:
4457c478bd9Sstevel@tonic-gate
4467c478bd9Sstevel@tonic-gate#
4477c478bd9Sstevel@tonic-gate# For the all and install targets, we clearly must respect library
4487c478bd9Sstevel@tonic-gate# dependencies so that the libraries link correctly.  However, for
4497c478bd9Sstevel@tonic-gate# the remaining targets (check, clean, clobber, install_h, lint, _dc
4507c478bd9Sstevel@tonic-gate# and _msg), libraries do not have any dependencies on one another
4517c478bd9Sstevel@tonic-gate# and thus respecting dependencies just slows down the build.
4527c478bd9Sstevel@tonic-gate# As such, for these rules, we use pattern replacement to explicitly
4537c478bd9Sstevel@tonic-gate# avoid triggering the dependency information.  Note that for clean,
4547c478bd9Sstevel@tonic-gate# clobber and lint, we must use $(NOWAIT_SUBDIRS) rather than
4557c478bd9Sstevel@tonic-gate# $(SUBDIRS), to prevent `.WAIT' from expanding to `.WAIT-nodepend'.
4567c478bd9Sstevel@tonic-gate#
4577c478bd9Sstevel@tonic-gate
4587c478bd9Sstevel@tonic-gateall:			$(SUBDIRS)
4597c478bd9Sstevel@tonic-gate
4607c478bd9Sstevel@tonic-gateinstall:		$(SUBDIRS) .WAIT install_extra
4617c478bd9Sstevel@tonic-gate
4627c478bd9Sstevel@tonic-gate# extra libraries kept in other source areas
4637c478bd9Sstevel@tonic-gateinstall_extra:
4647c478bd9Sstevel@tonic-gate	@cd ../cmd/sgs; pwd; $(MAKE) install_lib
4657c478bd9Sstevel@tonic-gate	@pwd
4667c478bd9Sstevel@tonic-gate
4677c478bd9Sstevel@tonic-gateclean clobber lint:	$(NOWAIT_SUBDIRS:%=%-nodepend)
4687c478bd9Sstevel@tonic-gate
4697c478bd9Sstevel@tonic-gateinstall_h check:	$(HDRSUBDIRS:%=%-nodepend)
4707c478bd9Sstevel@tonic-gate
4717c478bd9Sstevel@tonic-gate_msg:			$(MSGSUBDIRS:%=%-nodepend) .WAIT _dc
4727c478bd9Sstevel@tonic-gate
4737c478bd9Sstevel@tonic-gate_dc:			$(DCSUBDIRS:%=%-nodepend)
4747c478bd9Sstevel@tonic-gate
475fb9f9b97Skupfer# dependencies for pam_modules (see below)
476fb9f9b97Skupfer$(CLOSED_BUILD)SMARTCARD=	$(CLOSED)/lib/smartcard
477fb9f9b97Skupfer
4787c478bd9Sstevel@tonic-gate#
4797c478bd9Sstevel@tonic-gate# Library interdependencies are called out explicitly here
4807c478bd9Sstevel@tonic-gate#
4817c478bd9Sstevel@tonic-gateauditd_plugins: libbsm libnsl libsecdb
4827c478bd9Sstevel@tonic-gategss_mechs/mech_krb5:	libgss libnsl libsocket libresolv pkcs11
4837c478bd9Sstevel@tonic-gatelibadt_jni:	libbsm
484fb9f9b97Skupfer$(CLOSED_BUILD)libc:		$(CLOSED)/lib/libc_i18n
485da2e3ebdSchinlibast: 	libsocket
48645916cd2Sjpklibbsm:		libtsol
487da2e3ebdSchinlibcmd: 	libast libsocket libnsl
4887c478bd9Sstevel@tonic-gatelibcmdutils:	libavl
4897c478bd9Sstevel@tonic-gatelibcontract:	libnvpair
4907c478bd9Sstevel@tonic-gatelibdevid:	libdevinfo
491fa9e4066Sahrenslibdevinfo:	libnvpair libsec
4924ee71a50Scarlsonjlibdhcpagent:	libsocket libdhcputil libuuid libdlpi
4937c478bd9Sstevel@tonic-gatelibdhcpsvc:	libinetutil
4944ee71a50Scarlsonjlibdhcputil:	libnsl libgen libinetutil libdlpi
495f595a68aSyz147064libdladm:	libdlpi libdevinfo libinetutil libsocket
496da2e3ebdSchinlibdll: 	libast
497c7e4935fSss150715libdlpi:	libinetutil
4987c478bd9Sstevel@tonic-gatelibdtrace:	libproc libgen libctf
499fb3fb4f3Stomeelibdtrace_jni:	libuutil libdtrace
5007c478bd9Sstevel@tonic-gatelibefi:		libuuid
5010e42dee6Sartemlibfstyp:	libnvpair
502fb9f9b97Skupfer$(CLOSED_BUILD)$(CLOSED)/lib/libelfsign: \
503fb9f9b97Skupfer			$(CLOSED)/lib/libike libcryptoutil pkcs11
504c5c4113dSnw141292libidmap:	libnsl
5057c478bd9Sstevel@tonic-gatelibinetcfg:	libnsl libsocket libdevinfo
50699ebb4caSwyllyslibkmf:		libcryptoutil pkcs11 openssl
5077c478bd9Sstevel@tonic-gatelibnsl:		libmd5 libscf
50806e1a714Sraflibmapid:	libresolv
509948f2876Sss150715libuuid:	libdlpi libdladm
5107c478bd9Sstevel@tonic-gatelibinetutil:	libsocket
51106e1a714Sraflibsecdb:	libnsl
512734b6a94Sdarrenmlibsasl:	libgss libsocket pkcs11 libmd
5137c478bd9Sstevel@tonic-gatesasl_plugins:	pkcs11 libgss libsocket libsasl
5147c478bd9Sstevel@tonic-gatelibsctp:	libsocket
515da2e3ebdSchinlibshell:	libast libcmd libdll libsocket libsecdb
51640cb5e5dSvi117747libsip:		libmd5
5177c478bd9Sstevel@tonic-gatelibsocket:	libnsl
518734b6a94Sdarrenmlibldap5:	libsasl libsocket libnsl libmd
51945916cd2Sjpklibsldap:	libldap5 libtsol
5207c478bd9Sstevel@tonic-gatelibpool:	libnvpair libexacct
521da2e3ebdSchinlibpp:		libast
5229acbbeafSnn35248libzonecfg:	libc libsocket libnsl libuuid libnvpair libsysevent libsec \
5230209230bSgjelinek		libbrand libpool libscf
524c6e80875Srablibproc:	../cmd/sgs/librtld_db ../cmd/sgs/libelf libctf
5257c478bd9Sstevel@tonic-gatelibproject:	libpool libproc libsecdb
52645916cd2Sjpklibtsnet:	libnsl libtsol libsecdb
5277c478bd9Sstevel@tonic-gatelibwrap:	libnsl libsocket
5287c478bd9Sstevel@tonic-gatelibwanboot:	libnvpair libresolv libnsl libsocket libdevinfo libinetutil \
5297c478bd9Sstevel@tonic-gate		libdhcputil openssl
5307c478bd9Sstevel@tonic-gatelibwanbootutil:	libnsl
531fb9f9b97Skupferpam_modules:	libproject passwdutil $(SMARTCARD)
532853de45fSdh155122libscf:		libuutil libmd libgen
5337c478bd9Sstevel@tonic-gatelibinetsvc:	libscf
5347c478bd9Sstevel@tonic-gatelibrestart:	libuutil libscf
5357c478bd9Sstevel@tonic-gate../cmd/sgs/libdl:	../cmd/sgs/libconv
5367c478bd9Sstevel@tonic-gate../cmd/sgs/libelf:	../cmd/sgs/libconv
5377c478bd9Sstevel@tonic-gatepkcs11:		libcryptoutil
5387c478bd9Sstevel@tonic-gateprint:		libldap5
5397c478bd9Sstevel@tonic-gateudapl/udapl_tavor:	udapl/libdat
540f3861e1aSahllibzfs:		libdevinfo libdevid libgen libnvpair libuutil libiscsitgt
541fa9e4066Sahrenslibzfs_jni:	libdiskmgt libnvpair libzfs
542fa9e4066Sahrenslibzpool:	libavl libumem libnvpair
5433eb3c573Smarkslibsec:		libavl
5449acbbeafSnn35248brand:		libc libsocket
5456185db85Sdougmlibshare:	libscf libzfs libuuid libfsmgt libsecdb
546853de45fSdh155122libexacct/demo:	libexacct libproject libsocket libnsl
547*4a6822d0Swillardlibtsalarm:	libpcp
5487c478bd9Sstevel@tonic-gate
5497c478bd9Sstevel@tonic-gate#
5507c478bd9Sstevel@tonic-gate# The reason this rule checks for the existence of the
5517c478bd9Sstevel@tonic-gate# Makefile is that some of the directories do not exist
552fb9f9b97Skupfer# in certain situations (e.g., exportable source builds,
553fb9f9b97Skupfer# OpenSolaris).
5547c478bd9Sstevel@tonic-gate#
555f808c858Sraf$(SUBDIRS): FRC
5567c478bd9Sstevel@tonic-gate	@if [ -f $@/Makefile  ]; then \
5577c478bd9Sstevel@tonic-gate		cd $@; pwd; $(MAKE) $(TARGET); \
5587c478bd9Sstevel@tonic-gate	else \
5597c478bd9Sstevel@tonic-gate		true; \
5607c478bd9Sstevel@tonic-gate	fi
5617c478bd9Sstevel@tonic-gate
562f808c858Sraf$(SUBDIRS:%=%-nodepend):
5637c478bd9Sstevel@tonic-gate	@if [ -f $(@:%-nodepend=%)/Makefile  ]; then \
5647c478bd9Sstevel@tonic-gate		cd $(@:%-nodepend=%); pwd; $(MAKE) $(TARGET); \
5657c478bd9Sstevel@tonic-gate	else \
5667c478bd9Sstevel@tonic-gate		true; \
5677c478bd9Sstevel@tonic-gate	fi
5687c478bd9Sstevel@tonic-gate
5697c478bd9Sstevel@tonic-gateFRC:
570