xref: /onnv-gate/usr/src/lib/Makefile (revision 13122:61fe7fb74c94)
112239SPaul.Cheng@Sun.COM#
212239SPaul.Cheng@Sun.COM# CDDL HEADER START
312239SPaul.Cheng@Sun.COM#
412239SPaul.Cheng@Sun.COM# The contents of this file are subject to the terms of the
512239SPaul.Cheng@Sun.COM# Common Development and Distribution License (the "License").
612239SPaul.Cheng@Sun.COM# You may not use this file except in compliance with the License.
712239SPaul.Cheng@Sun.COM#
812239SPaul.Cheng@Sun.COM# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
912239SPaul.Cheng@Sun.COM# or http://www.opensolaris.org/os/licensing.
1012239SPaul.Cheng@Sun.COM# See the License for the specific language governing permissions
1112239SPaul.Cheng@Sun.COM# and limitations under the License.
1212239SPaul.Cheng@Sun.COM#
1312239SPaul.Cheng@Sun.COM# When distributing Covered Code, include this CDDL HEADER in each
1412239SPaul.Cheng@Sun.COM# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1512239SPaul.Cheng@Sun.COM# If applicable, add the following below this CDDL HEADER, with the
1612239SPaul.Cheng@Sun.COM# fields enclosed by brackets "[]" replaced with your own identifying
1712239SPaul.Cheng@Sun.COM# information: Portions Copyright [yyyy] [name of copyright owner]
1812239SPaul.Cheng@Sun.COM#
1912239SPaul.Cheng@Sun.COM# CDDL HEADER END
2012239SPaul.Cheng@Sun.COM#
2112239SPaul.Cheng@Sun.COM
2212075SSusan.Gleeson@Sun.COM# Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
230Sstevel@tonic-gate
240Sstevel@tonic-gateinclude ../Makefile.master
250Sstevel@tonic-gate
260Sstevel@tonic-gate#	Note that libcurses installs commands along with its library.
270Sstevel@tonic-gate#	This is a minor bug which probably should be fixed.
280Sstevel@tonic-gate#	Note also that a few extra libraries are kept in cmd source.
290Sstevel@tonic-gate#
300Sstevel@tonic-gate# Certain libraries are linked with, hence depend on, other libraries.
310Sstevel@tonic-gate#
320Sstevel@tonic-gate# Although we have historically used .WAIT to express dependencies, it
330Sstevel@tonic-gate# reduces the amount of parallelism and thus lengthens the time it
340Sstevel@tonic-gate# takes to build the libraries.  Thus, we now require that any new
350Sstevel@tonic-gate# libraries explicitly call out their dependencies.  Eventually, all
360Sstevel@tonic-gate# the library dependencies will be called out explicitly.  See
370Sstevel@tonic-gate# "Library interdependencies" near the end of this file.
380Sstevel@tonic-gate#
390Sstevel@tonic-gate# Aside from explicit dependencies (and legacy .WAITs), all libraries
400Sstevel@tonic-gate# are built in parallel.
410Sstevel@tonic-gate#
420Sstevel@tonic-gate.PARALLEL:
430Sstevel@tonic-gate
441167Skupfer#
451167Skupfer# The $(CLOSED_BUILD) additions to SUBDIRS & MSGSUBDIRS are unfortunate,
461167Skupfer# but required due to the "dependencies" of using .WAIT to barrier the
471167Skupfer# parallel dmake builds.  once 4631488 has been fixed, they can be
481167Skupfer# consolidated into one $(CLOSED_BUILD)SUBDIRS += (all closed libs) as
491167Skupfer# shown in HDRSUBDIRS
501167Skupfer#
510Sstevel@tonic-gateSUBDIRS= \
520Sstevel@tonic-gate	common			.WAIT	\
530Sstevel@tonic-gate	../cmd/sgs/libconv		\
541167Skupfer	../cmd/sgs/libdl	.WAIT
551167Skupfer
561167Skupfer$(CLOSED_BUILD)SUBDIRS += \
571167Skupfer	$(CLOSED)/lib/libc_i18n
581167Skupfer
591167SkupferSUBDIRS += \
600Sstevel@tonic-gate	libc			.WAIT	\
610Sstevel@tonic-gate	../cmd/sgs/libelf	.WAIT	\
626812Sraf	c_synonyms			\
631694Sdarrenm	libmd				\
640Sstevel@tonic-gate	libmd5				\
650Sstevel@tonic-gate	librsm				\
660Sstevel@tonic-gate	libmp			.WAIT	\
670Sstevel@tonic-gate	libnsl			\
680Sstevel@tonic-gate	libsecdb		.WAIT	\
690Sstevel@tonic-gate	librpcsvc			\
700Sstevel@tonic-gate	libsocket		.WAIT	\
710Sstevel@tonic-gate	libsctp			\
722882Svi117747	libsip			\
735306Sgm209912	libcommputil		\
740Sstevel@tonic-gate	libresolv			\
750Sstevel@tonic-gate	libresolv2		.WAIT	\
760Sstevel@tonic-gate	libw			.WAIT	\
770Sstevel@tonic-gate	libintl			.WAIT	\
780Sstevel@tonic-gate	../cmd/sgs/librtld_db	\
790Sstevel@tonic-gate	libaio			\
804887Schin	libast			\
814887Schin	libdll			\
824887Schin	libcmd			\
834887Schin	libshell		\
848462SApril.Chin@Sun.COM	libsum			\
850Sstevel@tonic-gate	librt			\
860Sstevel@tonic-gate	libadm			\
870Sstevel@tonic-gate	libctf			\
880Sstevel@tonic-gate	libdtrace		\
891449Stomee	libdtrace_jni		\
900Sstevel@tonic-gate	libcurses		\
910Sstevel@tonic-gate	libgen			\
920Sstevel@tonic-gate	libgss			\
930Sstevel@tonic-gate	libpam			\
940Sstevel@tonic-gate	libuuid			\
950Sstevel@tonic-gate	libthread		\
960Sstevel@tonic-gate	libpthread	.WAIT	\
970Sstevel@tonic-gate	libslp		\
980Sstevel@tonic-gate	libbsdmalloc	\
990Sstevel@tonic-gate	libdoor		\
1000Sstevel@tonic-gate	libdevinfo	\
1010Sstevel@tonic-gate	libdladm	\
1020Sstevel@tonic-gate	libdlpi		\
1030Sstevel@tonic-gate	libeti		\
1040Sstevel@tonic-gate	libcrypt	\
1054904Srs200217	libdns_sd	\
1060Sstevel@tonic-gate	libefi		\
1072212Sartem	libfstyp	\
1080Sstevel@tonic-gate	libwanboot	\
1090Sstevel@tonic-gate	libwanbootutil	\
1100Sstevel@tonic-gate	libcryptoutil	\
1110Sstevel@tonic-gate	libinetutil	\
11212016SGirish.Moodalbail@Sun.COM	libipadm	\
1130Sstevel@tonic-gate	libipmp		\
1147978SPeter.Dunlap@Sun.COM	libiscsit	\
1153089Swyllys	libkmf		\
11612720SWyllys.Ingersoll@Sun.COM	libkmsagent	\
1170Sstevel@tonic-gate	libkstat	\
1180Sstevel@tonic-gate	libkvm		\
1190Sstevel@tonic-gate	liblm		\
1200Sstevel@tonic-gate	libmalloc	\
1212522Sraf	libmapmalloc	\
1220Sstevel@tonic-gate	libmtmalloc	\
1230Sstevel@tonic-gate	libnls		\
1247645Sjames.d.carlson@sun.com	libnwam		\
125437Smws	libsmbios	\
1260Sstevel@tonic-gate	libtecla	\
1270Sstevel@tonic-gate	libumem		\
1280Sstevel@tonic-gate	libnvpair	.WAIT	\
1290Sstevel@tonic-gate	libexacct	\
1300Sstevel@tonic-gate	libplot		\
1310Sstevel@tonic-gate	libldap4	\
1320Sstevel@tonic-gate	libsasl		\
1330Sstevel@tonic-gate	libldap5	\
1340Sstevel@tonic-gate	libsldap	.WAIT	\
1350Sstevel@tonic-gate	libbsm		\
1360Sstevel@tonic-gate	libsys		\
1370Sstevel@tonic-gate	libsysevent	\
1380Sstevel@tonic-gate	libnisdb	\
1390Sstevel@tonic-gate	libpool		\
1404887Schin	libpp		\
1410Sstevel@tonic-gate	libproc		\
1420Sstevel@tonic-gate	libproject	\
1430Sstevel@tonic-gate	libsendfile	\
1440Sstevel@tonic-gate	nametoaddr	\
1450Sstevel@tonic-gate	ncad_addr	\
1467836SJohn.Forte@Sun.COM	hbaapi		\
14710652SHyon.Kim@Sun.COM	smhba		\
1487836SJohn.Forte@Sun.COM	sun_fc		\
14910652SHyon.Kim@Sun.COM	sun_sas		\
1500Sstevel@tonic-gate	gss_mechs/mech_krb5	.WAIT	\
1511770Sgtb	libkrb5	.WAIT	\
1526007Sthurlow	krb5	.WAIT	\
1537836SJohn.Forte@Sun.COM	libsmbfs	\
1549087SZhong.Wang@Sun.COM	libfcoe		\
15512075SSusan.Gleeson@Sun.COM	libsrpt		\
1567836SJohn.Forte@Sun.COM	libstmf		\
15710725SJohn.Forte@Sun.COM	libstmfproxy	\
1587836SJohn.Forte@Sun.COM	libnsctl	\
1597836SJohn.Forte@Sun.COM	libunistat	\
1607836SJohn.Forte@Sun.COM	libdscfg	\
1619781SMoriah.Waterland@Sun.COM	librdc		\
1629781SMoriah.Waterland@Sun.COM	libinstzones	\
1639781SMoriah.Waterland@Sun.COM	libpkg
1649781SMoriah.Waterland@Sun.COM
1651167SkupferSUBDIRS += \
1660Sstevel@tonic-gate	passwdutil	\
1670Sstevel@tonic-gate	pam_modules	\
1680Sstevel@tonic-gate	crypt_modules	\
1690Sstevel@tonic-gate	libadt_jni	\
1702522Sraf	abi		\
1710Sstevel@tonic-gate	auditd_plugins	\
1720Sstevel@tonic-gate	libvolmgt	\
1730Sstevel@tonic-gate	libdevice	\
1740Sstevel@tonic-gate	libdevid	\
1750Sstevel@tonic-gate	libdhcpsvc	\
1760Sstevel@tonic-gate	libc_db		\
1777917SReza.Sabdar@Sun.COM	libndmp		\
1780Sstevel@tonic-gate	libsec		\
1790Sstevel@tonic-gate	libtnfprobe	\
1800Sstevel@tonic-gate	libtnf		\
1810Sstevel@tonic-gate	libtnfctl	\
1820Sstevel@tonic-gate	libdhcpagent	\
1830Sstevel@tonic-gate	libdhcpdu	\
1840Sstevel@tonic-gate	libdhcputil	\
18511114Sdanmcd@sun.com	libxnet		\
1861167Skupfer	libipsecutil
1871167Skupfer$(CLOSED_BUILD)SUBDIRS += \
1887917SReza.Sabdar@Sun.COM	$(CLOSED)/lib/libike
1891167SkupferSUBDIRS += \
1900Sstevel@tonic-gate	nsswitch	\
1910Sstevel@tonic-gate	print		\
1920Sstevel@tonic-gate	libuutil	\
1930Sstevel@tonic-gate	libscf		\
1940Sstevel@tonic-gate	libinetsvc	\
1950Sstevel@tonic-gate	librestart	\
1965194Sjohnz	libsched	\
1975194Sjohnz	libelfsign	\
1980Sstevel@tonic-gate	pkcs11		.WAIT	\
1990Sstevel@tonic-gate	libpctx		.WAIT	\
2000Sstevel@tonic-gate	libcpc		\
2010Sstevel@tonic-gate	watchmalloc	\
2021846Scraigm	extendedFILE	\
2030Sstevel@tonic-gate	madv		\
2040Sstevel@tonic-gate	mpss		\
2051545Seschrock	libdisasm	\
2060Sstevel@tonic-gate	libwrap		\
2070Sstevel@tonic-gate	libxcurses	\
2080Sstevel@tonic-gate	libxcurses2	\
2092712Snn35248	libbrand	.WAIT   \
2100Sstevel@tonic-gate	libzonecfg	\
2110Sstevel@tonic-gate	libzoneinfo	\
212*13122SStephen.Lawrence@oracle.COM	libzonestat	\
2131676Sjpk	libtsnet	\
2141676Sjpk	libtsol		\
2150Sstevel@tonic-gate	gss_mechs/mech_spnego	\
2160Sstevel@tonic-gate	gss_mechs/mech_dummy	\
2170Sstevel@tonic-gate	gss_mechs/mech_dh	\
2180Sstevel@tonic-gate	rpcsec_gss	\
2193457Sjc156560	libraidcfg	.WAIT	\
2200Sstevel@tonic-gate	librcm		.WAIT	\
2210Sstevel@tonic-gate	libcfgadm	.WAIT	\
2220Sstevel@tonic-gate	libpicl		.WAIT	\
2230Sstevel@tonic-gate	libpicltree	.WAIT \
2243457Sjc156560	raidcfg_plugins	\
2250Sstevel@tonic-gate	cfgadm_plugins	\
2260Sstevel@tonic-gate	libmail		\
2270Sstevel@tonic-gate	lvm		\
2280Sstevel@tonic-gate	libsmedia	\
2290Sstevel@tonic-gate	libipp		\
2300Sstevel@tonic-gate	libdiskmgt	\
2310Sstevel@tonic-gate	liblgrp		\
2320Sstevel@tonic-gate	libfsmgt	\
2330Sstevel@tonic-gate	fm		\
2340Sstevel@tonic-gate	libavl		\
2350Sstevel@tonic-gate	libcmdutils	\
2360Sstevel@tonic-gate	libcontract	\
2370Sstevel@tonic-gate	../cmd/sendmail/libmilter	\
2380Sstevel@tonic-gate	sasl_plugins	\
2390Sstevel@tonic-gate	udapl		\
240789Sahrens	libzpool	\
241789Sahrens	libzfs		\
24213013Sglenn.lagasse@oracle.com	libbe 		\
24313013Sglenn.lagasse@oracle.com	pylibbe 	\
244789Sahrens	libzfs_jni	\
2459396SMatthew.Ahrens@Sun.COM	pyzfs		\
24611821SSam.Falkner@Sun.COM	pysolaris	\
2471741Srmesta	libmapid	\
2482712Snn35248	brand		\
2492912Sartem	policykit	\
2502912Sartem	hal		\
2513034Sdougm	libshare	\
2524520Snw141292	libsqlite	\
2534520Snw141292	libidmap	\
2548040SBaban.Kenkre@Sun.COM	libadutils	\
2553798Seschrock	libipmi		\
2564458Sdh155122	libexacct/demo	\
25711076SCathy.Zhou@Sun.COM	libvrrpadm	\
2585440Sjm199354	libvscan	\
2599160SSherry.Moore@Sun.COM	libgrubmgmt	\
2605331Samw	smbsrv		\
26110946SSangeeta.Misra@Sun.COM	libilb		\
2626316Seschrock	scsi		\
2637836SJohn.Forte@Sun.COM	libima		\
2647836SJohn.Forte@Sun.COM	libsun_ima	\
2657836SJohn.Forte@Sun.COM	mpapi		\
26610491SRishi.Srivatsavai@Sun.COM	librstp		\
26710793Sdai.ngo@sun.com	libreparse	\
26810923SEvan.Yan@Sun.COM	libhotplug	\
26911015SSundeep.Panicker@Sun.COM	libfruutils	.WAIT	\
27011015SSundeep.Panicker@Sun.COM	libfru		\
2710Sstevel@tonic-gate	$($(MACH)_SUBDIRS)
2720Sstevel@tonic-gate
2739663SMark.Logan@Sun.COMi386_SUBDIRS=		\
2749663SMark.Logan@Sun.COM	libntfs		\
27510021SSheshadri.Vasudevan@Sun.COM	libparted	\
27610021SSheshadri.Vasudevan@Sun.COM	libfdisk
2779663SMark.Logan@Sun.COM
2780Sstevel@tonic-gatesparc_SUBDIRS= .WAIT	\
2790Sstevel@tonic-gate	efcode		\
2807697SMichael.Christensen@Sun.COM	libds		\
2811772Sjl139090	libdscp		\
2821708Sstevel	libprtdiag	.WAIT	\
2831708Sstevel	libprtdiag_psr	\
2843530Srb144127	libpri		\
2851708Sstevel	librsc		\
2860Sstevel@tonic-gate	storage		\
2874975Swillard	libpcp		\
28811833SMichael.Christensen@Sun.COM	libtsalarm	\
28911833SMichael.Christensen@Sun.COM	libv12n
2900Sstevel@tonic-gate
2913530Srb144127FM_sparc_DEPLIBS= libpri
2923530Srb144127
2936070Srobjfm:			\
2946070Srobj	libexacct	\
2956070Srobj	libipmi		\
2968235SStephen.Hanson@Sun.COM	libzfs		\
2976869Seschrock	scsi		\
2986070Srobj	$(FM_$(MACH)_DEPLIBS)
2990Sstevel@tonic-gate
3000Sstevel@tonic-gate#
3010Sstevel@tonic-gate# Create a special version of $(SUBDIRS) with no .WAIT's, for use with the
3020Sstevel@tonic-gate# clean and clobber targets (for more information, see those targets, below).
3030Sstevel@tonic-gate#
3040Sstevel@tonic-gateNOWAIT_SUBDIRS= $(SUBDIRS:.WAIT=)
3050Sstevel@tonic-gate
3060Sstevel@tonic-gateDCSUBDIRS =		\
3070Sstevel@tonic-gate	lvm
3080Sstevel@tonic-gate
3090Sstevel@tonic-gateMSGSUBDIRS=		\
3100Sstevel@tonic-gate	abi		\
3110Sstevel@tonic-gate	auditd_plugins	\
3122712Snn35248	brand		\
3130Sstevel@tonic-gate	cfgadm_plugins	\
3140Sstevel@tonic-gate	gss_mechs/mech_dh	\
3150Sstevel@tonic-gate	gss_mechs/mech_krb5	\
3160Sstevel@tonic-gate	krb5		\
3174887Schin	libast		\
3180Sstevel@tonic-gate	libbsm		\
3190Sstevel@tonic-gate	libc		\
3200Sstevel@tonic-gate	libcfgadm	\
3214887Schin	libcmd		\
3220Sstevel@tonic-gate	libcontract	\
3230Sstevel@tonic-gate	libcurses	\
3240Sstevel@tonic-gate	libdhcpsvc 	\
3250Sstevel@tonic-gate	libdhcputil	\
3264064Smarkfen	libipsecutil	\
3274082Smmusante	libdiskmgt	\
3283184Smeem	libdladm	\
3294887Schin	libdll		\
3309160SSherry.Moore@Sun.COM	libgrubmgmt	\
3310Sstevel@tonic-gate	libgss		\
3324520Snw141292	libidmap	\
3330Sstevel@tonic-gate	libipmp		\
33410946SSangeeta.Misra@Sun.COM	libilb		\
3359071SSowmini.Varadhan@Sun.COM	libinetutil	\
3369781SMoriah.Waterland@Sun.COM	libinstzones	\
33712016SGirish.Moodalbail@Sun.COM	libipadm	\
3380Sstevel@tonic-gate	libnsl		\
33911767SAnurag.Maskey@Sun.COM	libnwam		\
3400Sstevel@tonic-gate	libpam		\
3410Sstevel@tonic-gate	libpicl		\
3420Sstevel@tonic-gate	libpool		\
3439781SMoriah.Waterland@Sun.COM	libpkg		\
3444887Schin	libpp		\
3450Sstevel@tonic-gate	libscf		\
3460Sstevel@tonic-gate	libsasl		\
3470Sstevel@tonic-gate	libldap5	\
3480Sstevel@tonic-gate	libsecdb	\
3493034Sdougm	libshare	\
3504887Schin	libshell	\
3510Sstevel@tonic-gate	libsldap	\
3520Sstevel@tonic-gate	libslp		\
3536007Sthurlow	libsmbfs	\
3540Sstevel@tonic-gate	libsmedia	\
3558462SApril.Chin@Sun.COM	libsum		\
3561676Sjpk	libtsol		\
3570Sstevel@tonic-gate	libuutil	\
35811076SCathy.Zhou@Sun.COM	libvrrpadm	\
3595440Sjm199354	libvscan	\
3600Sstevel@tonic-gate	libwanboot	\
3610Sstevel@tonic-gate	libwanbootutil	\
3623535Sck153898	libzfs		\
3630Sstevel@tonic-gate	libzonecfg	\
3640Sstevel@tonic-gate	lvm		\
3650Sstevel@tonic-gate	madv		\
3660Sstevel@tonic-gate	mpss		\
3670Sstevel@tonic-gate	pam_modules	\
3689396SMatthew.Ahrens@Sun.COM	pyzfs		\
36911821SSam.Falkner@Sun.COM	pysolaris	\
37010793Sdai.ngo@sun.com	rpcsec_gss	\
37110793Sdai.ngo@sun.com	libreparse
3721167SkupferMSGSUBDIRS += \
3730Sstevel@tonic-gate	$($(MACH)_MSGSUBDIRS)
3740Sstevel@tonic-gate
3751708Sstevelsparc_MSGSUBDIRS=	\
3761708Sstevel	libprtdiag	\
3771708Sstevel	libprtdiag_psr
3780Sstevel@tonic-gate
37910021SSheshadri.Vasudevan@Sun.COMi386_MSGSUBDIRS= libfdisk
38010021SSheshadri.Vasudevan@Sun.COM
3812248SrafHDRSUBDIRS=		\
3820Sstevel@tonic-gate	auditd_plugins	\
3834887Schin	libast		\
3842712Snn35248	libbrand	\
3850Sstevel@tonic-gate	libbsm		\
3860Sstevel@tonic-gate	libc		\
3874887Schin	libcmd		\
3880Sstevel@tonic-gate	libcmdutils	\
38912016SGirish.Moodalbail@Sun.COM	libcommputil	\
3900Sstevel@tonic-gate	libcontract	\
3910Sstevel@tonic-gate	libcpc		\
3920Sstevel@tonic-gate	libctf		\
3930Sstevel@tonic-gate	libcurses	\
3940Sstevel@tonic-gate	libcryptoutil	\
3950Sstevel@tonic-gate	libdevice	\
3960Sstevel@tonic-gate	libdevid	\
3970Sstevel@tonic-gate	libdevinfo	\
398767Ssjelinek	libdiskmgt	\
3990Sstevel@tonic-gate	libdladm	\
4004887Schin	libdll		\
4010Sstevel@tonic-gate	libdlpi		\
4020Sstevel@tonic-gate	libdhcpagent	\
4030Sstevel@tonic-gate	libdhcpsvc	\
4040Sstevel@tonic-gate	libdhcputil	\
4051545Seschrock	libdisasm	\
4064904Srs200217	libdns_sd	\
4077836SJohn.Forte@Sun.COM	libdscfg	\
4080Sstevel@tonic-gate	libdtrace	\
4091449Stomee	libdtrace_jni	\
4105194Sjohnz	libelfsign	\
4110Sstevel@tonic-gate	libeti		\
41211094SSundeep.Panicker@Sun.COM	libfru		\
4132212Sartem	libfstyp	\
4140Sstevel@tonic-gate	libgen		\
41512016SGirish.Moodalbail@Sun.COM	libipadm	\
4160Sstevel@tonic-gate	libipsecutil	\
4170Sstevel@tonic-gate	libinetsvc	\
4180Sstevel@tonic-gate	libinetutil	\
41910455SMoriah.Waterland@Sun.COM	libinstzones	\
4203798Seschrock	libipmi		\
4210Sstevel@tonic-gate	libipmp		\
4220Sstevel@tonic-gate	libipp		\
4237978SPeter.Dunlap@Sun.COM	libiscsit	\
4240Sstevel@tonic-gate	libkstat	\
4250Sstevel@tonic-gate	libkvm		\
4260Sstevel@tonic-gate	libmail		\
4271694Sdarrenm	libmd		\
4280Sstevel@tonic-gate	libmtmalloc	\
4297917SReza.Sabdar@Sun.COM	libndmp		\
4300Sstevel@tonic-gate	libnvpair	\
4317836SJohn.Forte@Sun.COM	libnsctl	\
4321676Sjpk	libnsl		\
4337645Sjames.d.carlson@sun.com	libnwam		\
4340Sstevel@tonic-gate	libpam		\
4350Sstevel@tonic-gate	libpctx		\
4360Sstevel@tonic-gate	libpicl		\
4370Sstevel@tonic-gate	libpicltree	\
4380Sstevel@tonic-gate	libplot		\
4390Sstevel@tonic-gate	libpool		\
4404887Schin	libpp		\
4410Sstevel@tonic-gate	libproc		\
4423622Sjc156560	libraidcfg	\
4430Sstevel@tonic-gate	librcm		\
4447836SJohn.Forte@Sun.COM	librdc		\
4450Sstevel@tonic-gate	libscf		\
4462882Svi117747	libsip		\
447437Smws	libsmbios	\
4480Sstevel@tonic-gate	librestart	\
4490Sstevel@tonic-gate	librpcsvc	\
4500Sstevel@tonic-gate	librsm		\
45110491SRishi.Srivatsavai@Sun.COM	librstp		\
4520Sstevel@tonic-gate	libsasl		\
453789Sahrens	libsec		\
4544887Schin	libshell	\
4550Sstevel@tonic-gate	libslp		\
4560Sstevel@tonic-gate	libsmedia	\
45712016SGirish.Moodalbail@Sun.COM	libsocket	\
4584520Snw141292	libsqlite	\
4599087SZhong.Wang@Sun.COM	libfcoe		\
46012075SSusan.Gleeson@Sun.COM	libsrpt		\
4617836SJohn.Forte@Sun.COM	libstmf		\
46210725SJohn.Forte@Sun.COM	libstmfproxy	\
4638462SApril.Chin@Sun.COM	libsum		\
4640Sstevel@tonic-gate	libsysevent	\
4650Sstevel@tonic-gate	libtecla	\
4660Sstevel@tonic-gate	libtnf		\
4670Sstevel@tonic-gate	libtnfctl	\
4680Sstevel@tonic-gate	libtnfprobe	\
4691676Sjpk	libtsnet	\
4701676Sjpk	libtsol		\
47111076SCathy.Zhou@Sun.COM	libvrrpadm	\
4720Sstevel@tonic-gate	libvolmgt	\
4730Sstevel@tonic-gate	libumem		\
4747836SJohn.Forte@Sun.COM	libunistat	\
4750Sstevel@tonic-gate	libuutil	\
47612016SGirish.Moodalbail@Sun.COM	libwanboot	\
47712016SGirish.Moodalbail@Sun.COM	libwanbootutil	\
4780Sstevel@tonic-gate	libwrap		\
4790Sstevel@tonic-gate	libxcurses2	\
480789Sahrens	libzfs		\
481952Seschrock	libzfs_jni	\
4820Sstevel@tonic-gate	libzoneinfo	\
483*13122SStephen.Lawrence@oracle.COM	libzonestat	\
4842912Sartem	hal		\
4852912Sartem	policykit	\
4860Sstevel@tonic-gate	lvm		\
4870Sstevel@tonic-gate	pkcs11		\
4880Sstevel@tonic-gate	passwdutil	\
4890Sstevel@tonic-gate	../cmd/sendmail/libmilter	\
4900Sstevel@tonic-gate	fm		\
4910Sstevel@tonic-gate	udapl		\
4921741Srmesta	libmapid	\
4931770Sgtb	libkrb5		\
49410023SGordon.Ross@Sun.COM	libsmbfs	\
4953034Sdougm	libshare	\
4964520Snw141292	libidmap	\
4975440Sjm199354	libvscan	\
4989160SSherry.Moore@Sun.COM	libgrubmgmt	\
4995331Samw	smbsrv		\
50010946SSangeeta.Misra@Sun.COM	libilb		\
5016316Seschrock	scsi		\
5027836SJohn.Forte@Sun.COM	hbaapi		\
50310652SHyon.Kim@Sun.COM	smhba		\
5047836SJohn.Forte@Sun.COM	libima		\
5057836SJohn.Forte@Sun.COM	libsun_ima	\
5067836SJohn.Forte@Sun.COM	mpapi		\
50710793Sdai.ngo@sun.com	libreparse	\
5080Sstevel@tonic-gate	$($(MACH)_HDRSUBDIRS)
5090Sstevel@tonic-gate
5101167Skupfer$(CLOSED_BUILD)HDRSUBDIRS += \
5111167Skupfer	$(CLOSED)/lib/libc_i18n	\
51210702SDarren.Moffat@Sun.COM	$(CLOSED)/lib/libike
5131167Skupfer
5149911SMark.Logan@Sun.COMi386_HDRSUBDIRS=	\
51510021SSheshadri.Vasudevan@Sun.COM	libparted	\
51610021SSheshadri.Vasudevan@Sun.COM	libfdisk
5179911SMark.Logan@Sun.COM
5180Sstevel@tonic-gatesparc_HDRSUBDIRS=	\
5197697SMichael.Christensen@Sun.COM	libds		\
5201772Sjl139090	libdscp		\
5217836SJohn.Forte@Sun.COM	libpri		\
52211833SMichael.Christensen@Sun.COM	libv12n		\
5237836SJohn.Forte@Sun.COM	storage
5240Sstevel@tonic-gate
5250Sstevel@tonic-gateall :=		TARGET= all
5260Sstevel@tonic-gatecheck :=	TARGET= check
5270Sstevel@tonic-gateclean :=	TARGET= clean
5280Sstevel@tonic-gateclobber :=	TARGET= clobber
5290Sstevel@tonic-gateinstall :=	TARGET= install
5300Sstevel@tonic-gateinstall_h :=	TARGET= install_h
5310Sstevel@tonic-gatelint :=		TARGET= lint
5320Sstevel@tonic-gate_dc :=		TARGET= _dc
5330Sstevel@tonic-gate_msg :=		TARGET= _msg
5340Sstevel@tonic-gate
5350Sstevel@tonic-gate.KEEP_STATE:
5360Sstevel@tonic-gate
5370Sstevel@tonic-gate#
5380Sstevel@tonic-gate# For the all and install targets, we clearly must respect library
5390Sstevel@tonic-gate# dependencies so that the libraries link correctly.  However, for
5400Sstevel@tonic-gate# the remaining targets (check, clean, clobber, install_h, lint, _dc
5410Sstevel@tonic-gate# and _msg), libraries do not have any dependencies on one another
5420Sstevel@tonic-gate# and thus respecting dependencies just slows down the build.
5430Sstevel@tonic-gate# As such, for these rules, we use pattern replacement to explicitly
5440Sstevel@tonic-gate# avoid triggering the dependency information.  Note that for clean,
5450Sstevel@tonic-gate# clobber and lint, we must use $(NOWAIT_SUBDIRS) rather than
5460Sstevel@tonic-gate# $(SUBDIRS), to prevent `.WAIT' from expanding to `.WAIT-nodepend'.
5470Sstevel@tonic-gate#
5480Sstevel@tonic-gate
5490Sstevel@tonic-gateall:			$(SUBDIRS)
5500Sstevel@tonic-gate
5510Sstevel@tonic-gateinstall:		$(SUBDIRS) .WAIT install_extra
5520Sstevel@tonic-gate
5530Sstevel@tonic-gate# extra libraries kept in other source areas
5540Sstevel@tonic-gateinstall_extra:
5550Sstevel@tonic-gate	@cd ../cmd/sgs; pwd; $(MAKE) install_lib
5560Sstevel@tonic-gate	@pwd
5570Sstevel@tonic-gate
5580Sstevel@tonic-gateclean clobber lint:	$(NOWAIT_SUBDIRS:%=%-nodepend)
5590Sstevel@tonic-gate
5600Sstevel@tonic-gateinstall_h check:	$(HDRSUBDIRS:%=%-nodepend)
5610Sstevel@tonic-gate
5620Sstevel@tonic-gate_msg:			$(MSGSUBDIRS:%=%-nodepend) .WAIT _dc
5630Sstevel@tonic-gate
5640Sstevel@tonic-gate_dc:			$(DCSUBDIRS:%=%-nodepend)
5650Sstevel@tonic-gate
5660Sstevel@tonic-gate#
5670Sstevel@tonic-gate# Library interdependencies are called out explicitly here
5680Sstevel@tonic-gate#
5690Sstevel@tonic-gateauditd_plugins: libbsm libnsl libsecdb
5700Sstevel@tonic-gategss_mechs/mech_krb5:	libgss libnsl libsocket libresolv pkcs11
5710Sstevel@tonic-gatelibadt_jni:	libbsm
5721167Skupfer$(CLOSED_BUILD)libc:		$(CLOSED)/lib/libc_i18n
5734887Schinlibast: 	libsocket
5748671SJulian.Pullen@Sun.COMlibadutils: 	libldap5 libresolv libsocket libnsl
5758671SJulian.Pullen@Sun.COMnsswitch:	libadutils libidmap
57613013Sglenn.lagasse@oracle.comlibbe: 		libzfs
57711612SJan.Parcel@Sun.COMlibbsm:		libtsol
5788462SApril.Chin@Sun.COMlibcmd: 	libsum libast libsocket libnsl
5790Sstevel@tonic-gatelibcmdutils:	libavl
5800Sstevel@tonic-gatelibcontract:	libnvpair
5810Sstevel@tonic-gatelibdevid:	libdevinfo
582789Sahrenslibdevinfo:	libnvpair libsec
5839633Sjames.d.carlson@sun.comlibdhcpagent:	libsocket libdhcputil libuuid libdlpi libcontract
5840Sstevel@tonic-gatelibdhcpsvc:	libinetutil
5853476Scarlsonjlibdhcputil:	libnsl libgen libinetutil libdlpi
5869107Sjames.d.carlson@sun.comlibdladm:	libdevinfo libinetutil libsocket libscf librcm libnvpair \
5879107Sjames.d.carlson@sun.com		libexacct libnsl libkstat libcurses
5884887Schinlibdll: 	libast
5895895Syz147064libdlpi:	libinetutil libdladm
59011833SMichael.Christensen@Sun.COMlibds:		libsysevent
5917836SJohn.Forte@Sun.COMlibdscfg:	libnsctl libunistat libsocket libnsl
5920Sstevel@tonic-gatelibdtrace:	libproc libgen libctf
5931449Stomeelibdtrace_jni:	libuutil libdtrace
5940Sstevel@tonic-gatelibefi:		libuuid
5952212Sartemlibfstyp:	libnvpair
5965194Sjohnzlibelfsign:	libcryptoutil libkmf
59712890SJoyce.McIntosh@Sun.COMlibidmap:	libadutils libldap5 libavl libsldap libuutil
59812016SGirish.Moodalbail@Sun.COMlibipadm:	libnsl libinetutil libsocket libdlpi libnvpair libdhcpagent \
59912016SGirish.Moodalbail@Sun.COM		libdladm libsecdb
6007978SPeter.Dunlap@Sun.COMlibiscsit:	libc libnvpair libstmf libuuid libnsl
6019741SMark.Phalan@Sun.COMlibkmf:		libcryptoutil pkcs11
60212487SAntonello.Cruz@Sun.COMlibnsl:		libmd5
6032923Sraflibmapid:	libresolv
6047836SJohn.Forte@Sun.COMlibrdc:		libsocket libnsl libnsctl libunistat libdscfg
6055895Syz147064libuuid:	libdlpi
60611114Sdanmcd@sun.com$(CLOSED_BUILD)libike:	libipsecutil libxnet libcryptoutil
6070Sstevel@tonic-gatelibinetutil:	libsocket
60811114Sdanmcd@sun.comlibipsecutil:	libtecla libsocket
6099781SMoriah.Waterland@Sun.COMlibinstzones:	libzonecfg libcontract
6109781SMoriah.Waterland@Sun.COMlibpkg:		libwanboot libscf libadm
61111767SAnurag.Maskey@Sun.COMlibnwam:	libscf
6122923Sraflibsecdb:	libnsl
6131694Sdarrenmlibsasl:	libgss libsocket pkcs11 libmd
6140Sstevel@tonic-gatesasl_plugins:	pkcs11 libgss libsocket libsasl
6150Sstevel@tonic-gatelibsctp:	libsocket
6164887Schinlibshell:	libast libcmd libdll libsocket libsecdb
6172882Svi117747libsip:		libmd5
61812710SEric.Taylor@Sun.COMlibsmbfs:	libcmdutils libsocket libnsl libkrb5
6190Sstevel@tonic-gatelibsocket:	libnsl
62010725SJohn.Forte@Sun.COMlibstmfproxy: 	libstmf libsocket libnsl libpthread
6218462SApril.Chin@Sun.COMlibsum: 	libast
62211767SAnurag.Maskey@Sun.COMlibsysevent:	libsecdb
6231694Sdarrenmlibldap5:	libsasl libsocket libnsl libmd
6246842Sth160488libsldap:	libldap5 libtsol libnsl libc libscf libresolv
6250Sstevel@tonic-gatelibpool:	libnvpair libexacct
6264887Schinlibpp:		libast
6272712Snn35248libzonecfg:	libc libsocket libnsl libuuid libnvpair libsysevent libsec \
6283247Sgjelinek		libbrand libpool libscf
6292823Srablibproc:	../cmd/sgs/librtld_db ../cmd/sgs/libelf libctf
6300Sstevel@tonic-gatelibproject:	libpool libproc libsecdb
6311676Sjpklibtsnet:	libnsl libtsol libsecdb
6320Sstevel@tonic-gatelibwrap:	libnsl libsocket
6330Sstevel@tonic-gatelibwanboot:	libnvpair libresolv libnsl libsocket libdevinfo libinetutil \
6349741SMark.Phalan@Sun.COM		libdhcputil
6350Sstevel@tonic-gatelibwanbootutil:	libnsl
63610702SDarren.Moffat@Sun.COMpam_modules:	libproject passwdutil smbsrv
63712487SAntonello.Cruz@Sun.COMlibscf:		libuutil libmd libgen libsmbios libnsl
6380Sstevel@tonic-gatelibinetsvc:	libscf
6390Sstevel@tonic-gatelibrestart:	libuutil libscf
6400Sstevel@tonic-gate../cmd/sgs/libdl:	../cmd/sgs/libconv
6410Sstevel@tonic-gate../cmd/sgs/libelf:	../cmd/sgs/libconv
64212720SWyllys.Ingersoll@Sun.COMpkcs11:		libcryptoutil libkmsagent
6430Sstevel@tonic-gateprint:		libldap5
6440Sstevel@tonic-gateudapl/udapl_tavor:	udapl/libdat
64511876SJames.Dunham@Sun.COMlibzfs:		libdevid libgen libnvpair libuutil \
64611328SDarren.Moffat@Sun.COM		libadm libavl libefi libidmap libmd
647789Sahrenslibzfs_jni:	libdiskmgt libnvpair libzfs
64812710SEric.Taylor@Sun.COMlibzpool:	libavl libumem libnvpair libcmdutils
6498915SMark.Shellenbaum@Sun.COMlibsec:		libavl libidmap
6502712Snn35248brand:		libc libsocket
6516007Sthurlowlibshare:	libscf libzfs libuuid libfsmgt libsecdb libumem libsmbfs
6524458Sdh155122libexacct/demo:	libexacct libproject libsocket libnsl
6534975Swillardlibtsalarm:	libpcp
6545331Samwsmbsrv:		libsocket libnsl libmd libxnet libpthread librt \
65512710SEric.Taylor@Sun.COM		libshare libidmap pkcs11 libsqlite libcryptoutil \
65612710SEric.Taylor@Sun.COM		libreparse libcmdutils
65711833SMichael.Christensen@Sun.COMlibv12n:	libds libuuid
65811451SCathy.Zhou@Sun.COMlibvrrpadm:	libsocket libdladm libscf
6595440Sjm199354libvscan:	libscf
66012126SHyon.Kim@Sun.COMlibfru:		libfruutils
66112126SHyon.Kim@Sun.COMscsi:		libnvpair libfru
6627836SJohn.Forte@Sun.COMmpapi:		libpthread libdevinfo libsysevent libnvpair
66311243SHyon.Kim@Sun.COMsun_fc:		libdevinfo libsysevent libnvpair
66411243SHyon.Kim@Sun.COMlibsun_ima:	libdevinfo libsysevent libnsl
66511243SHyon.Kim@Sun.COMsun_sas:	libdevinfo libsysevent libnvpair libkstat libdevid
6669160SSherry.Moore@Sun.COMlibgrubmgmt:	libdevinfo libzfs libfstyp
66713013Sglenn.lagasse@oracle.compylibbe: 	libbe libzfs
66811821SSam.Falkner@Sun.COMpyzfs:		libnvpair libzfs
66911821SSam.Falkner@Sun.COMpysolaris:	libsec libidmap
67010793Sdai.ngo@sun.comlibreparse:	libnvpair
67110923SEvan.Yan@Sun.COMlibhotplug:	libnvpair
67210923SEvan.Yan@Sun.COMcfgadm_plugins:	libhotplug
67310946SSangeeta.Misra@Sun.COMlibilb:		libsocket
67411091SVirginia.Wray@Sun.COM$(INTEL_BUILD)libdiskmgt:libfdisk
6750Sstevel@tonic-gate
6760Sstevel@tonic-gate#
6770Sstevel@tonic-gate# The reason this rule checks for the existence of the
6780Sstevel@tonic-gate# Makefile is that some of the directories do not exist
6791167Skupfer# in certain situations (e.g., exportable source builds,
6801167Skupfer# OpenSolaris).
6810Sstevel@tonic-gate#
6822522Sraf$(SUBDIRS): FRC
6830Sstevel@tonic-gate	@if [ -f $@/Makefile  ]; then \
6840Sstevel@tonic-gate		cd $@; pwd; $(MAKE) $(TARGET); \
6850Sstevel@tonic-gate	else \
6860Sstevel@tonic-gate		true; \
6870Sstevel@tonic-gate	fi
6880Sstevel@tonic-gate
6892522Sraf$(SUBDIRS:%=%-nodepend):
6900Sstevel@tonic-gate	@if [ -f $(@:%-nodepend=%)/Makefile  ]; then \
6910Sstevel@tonic-gate		cd $(@:%-nodepend=%); pwd; $(MAKE) $(TARGET); \
6920Sstevel@tonic-gate	else \
6930Sstevel@tonic-gate		true; \
6940Sstevel@tonic-gate	fi
6950Sstevel@tonic-gate
6960Sstevel@tonic-gateFRC:
697