xref: /illumos-gate/usr/src/lib/Makefile (revision 7e7bd3dccbfe8f79e25e5c1554b5bc3a9aaca321)
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#
227a8a68f5SJulian Pullen# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
237c478bd9Sstevel@tonic-gate# Use is subject to license terms.
247c478bd9Sstevel@tonic-gate#
25f808c858Sraf#
267c478bd9Sstevel@tonic-gate
277c478bd9Sstevel@tonic-gateinclude ../Makefile.master
287c478bd9Sstevel@tonic-gate
297c478bd9Sstevel@tonic-gate#	Note that libcurses installs commands along with its library.
307c478bd9Sstevel@tonic-gate#	This is a minor bug which probably should be fixed.
317c478bd9Sstevel@tonic-gate#	Note also that a few extra libraries are kept in cmd source.
327c478bd9Sstevel@tonic-gate#
337c478bd9Sstevel@tonic-gate# Certain libraries are linked with, hence depend on, other libraries.
347c478bd9Sstevel@tonic-gate#
357c478bd9Sstevel@tonic-gate# Although we have historically used .WAIT to express dependencies, it
367c478bd9Sstevel@tonic-gate# reduces the amount of parallelism and thus lengthens the time it
377c478bd9Sstevel@tonic-gate# takes to build the libraries.  Thus, we now require that any new
387c478bd9Sstevel@tonic-gate# libraries explicitly call out their dependencies.  Eventually, all
397c478bd9Sstevel@tonic-gate# the library dependencies will be called out explicitly.  See
407c478bd9Sstevel@tonic-gate# "Library interdependencies" near the end of this file.
417c478bd9Sstevel@tonic-gate#
427c478bd9Sstevel@tonic-gate# Aside from explicit dependencies (and legacy .WAITs), all libraries
437c478bd9Sstevel@tonic-gate# are built in parallel.
447c478bd9Sstevel@tonic-gate#
457c478bd9Sstevel@tonic-gate.PARALLEL:
467c478bd9Sstevel@tonic-gate
47fb9f9b97Skupfer#
48fb9f9b97Skupfer# The $(CLOSED_BUILD) additions to SUBDIRS & MSGSUBDIRS are unfortunate,
49fb9f9b97Skupfer# but required due to the "dependencies" of using .WAIT to barrier the
50fb9f9b97Skupfer# parallel dmake builds.  once 4631488 has been fixed, they can be
51fb9f9b97Skupfer# consolidated into one $(CLOSED_BUILD)SUBDIRS += (all closed libs) as
52fb9f9b97Skupfer# shown in HDRSUBDIRS
53fb9f9b97Skupfer#
547c478bd9Sstevel@tonic-gateSUBDIRS= \
557c478bd9Sstevel@tonic-gate	common			.WAIT	\
567c478bd9Sstevel@tonic-gate	../cmd/sgs/libconv		\
57fb9f9b97Skupfer	../cmd/sgs/libdl	.WAIT
58fb9f9b97Skupfer
59fb9f9b97Skupfer$(CLOSED_BUILD)SUBDIRS += \
60fb9f9b97Skupfer	$(CLOSED)/lib/libc_i18n
61fb9f9b97Skupfer
62fb9f9b97SkupferSUBDIRS += \
637c478bd9Sstevel@tonic-gate	libc			.WAIT	\
647c478bd9Sstevel@tonic-gate	../cmd/sgs/libelf	.WAIT	\
657257d1b4Sraf	c_synonyms			\
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			\
76a93a1f58Sgm209912	libcommputil		\
777c478bd9Sstevel@tonic-gate	libresolv			\
787c478bd9Sstevel@tonic-gate	libresolv2		.WAIT	\
797c478bd9Sstevel@tonic-gate	libw			.WAIT	\
807c478bd9Sstevel@tonic-gate	libintl			.WAIT	\
817c478bd9Sstevel@tonic-gate	../cmd/sgs/librtld_db	\
827c478bd9Sstevel@tonic-gate	libaio			\
83da2e3ebdSchin	libast			\
84da2e3ebdSchin	libdll			\
85da2e3ebdSchin	libcmd			\
86da2e3ebdSchin	libshell		\
877c2fbfb3SApril Chin	libsum			\
887c478bd9Sstevel@tonic-gate	librt			\
897c478bd9Sstevel@tonic-gate	libadm			\
907c478bd9Sstevel@tonic-gate	libctf			\
917c478bd9Sstevel@tonic-gate	libdtrace		\
92fb3fb4f3Stomee	libdtrace_jni		\
937c478bd9Sstevel@tonic-gate	libcurses		\
947c478bd9Sstevel@tonic-gate	libgen			\
957c478bd9Sstevel@tonic-gate	libgss			\
967c478bd9Sstevel@tonic-gate	libpam			\
977c478bd9Sstevel@tonic-gate	libuuid			\
987c478bd9Sstevel@tonic-gate	libthread		\
997c478bd9Sstevel@tonic-gate	libpthread	.WAIT	\
1007c478bd9Sstevel@tonic-gate	libslp		\
1017c478bd9Sstevel@tonic-gate	libbsdmalloc	\
1027c478bd9Sstevel@tonic-gate	libdoor		\
1037c478bd9Sstevel@tonic-gate	libdevinfo	\
1047c478bd9Sstevel@tonic-gate	libdladm	\
1057c478bd9Sstevel@tonic-gate	libdlpi		\
1067c478bd9Sstevel@tonic-gate	libeti		\
1077c478bd9Sstevel@tonic-gate	libcrypt	\
1084b22b933Srs200217	libdns_sd	\
1097c478bd9Sstevel@tonic-gate	libefi		\
1100e42dee6Sartem	libfstyp	\
1117c478bd9Sstevel@tonic-gate	libwanboot	\
1127c478bd9Sstevel@tonic-gate	libwanbootutil	\
1137c478bd9Sstevel@tonic-gate	libcryptoutil	\
1147c478bd9Sstevel@tonic-gate	libinetcfg	\
1157c478bd9Sstevel@tonic-gate	libinetutil	\
1167c478bd9Sstevel@tonic-gate	libipmp		\
117a6d42e7dSPeter Dunlap	libiscsit	\
118f3861e1aSahl	libiscsitgt	\
11999ebb4caSwyllys	libkmf		\
1207c478bd9Sstevel@tonic-gate	libkstat	\
1217c478bd9Sstevel@tonic-gate	libkvm		\
1227c478bd9Sstevel@tonic-gate	liblm		\
1237c478bd9Sstevel@tonic-gate	libmalloc	\
124f808c858Sraf	libmapmalloc	\
1257c478bd9Sstevel@tonic-gate	libmtmalloc	\
1267c478bd9Sstevel@tonic-gate	libnls		\
127b00044a2SJames Carlson	libnwam		\
12884ab085aSmws	libsmbios	\
1297c478bd9Sstevel@tonic-gate	libtecla	\
1307c478bd9Sstevel@tonic-gate	libumem		\
1317c478bd9Sstevel@tonic-gate	libnvpair	.WAIT	\
1327c478bd9Sstevel@tonic-gate	libexacct	\
1337c478bd9Sstevel@tonic-gate	libplot		\
1347c478bd9Sstevel@tonic-gate	libldap4	\
1357c478bd9Sstevel@tonic-gate	libsasl		\
1367c478bd9Sstevel@tonic-gate	libldap5	\
1377c478bd9Sstevel@tonic-gate	libsldap	.WAIT	\
1387c478bd9Sstevel@tonic-gate	libbsm		\
1397c478bd9Sstevel@tonic-gate	libsys		\
1407c478bd9Sstevel@tonic-gate	libsysevent	\
1417c478bd9Sstevel@tonic-gate	libnisdb	\
1427c478bd9Sstevel@tonic-gate	libpool		\
143da2e3ebdSchin	libpp		\
1447c478bd9Sstevel@tonic-gate	libproc		\
1457c478bd9Sstevel@tonic-gate	libproject	\
1467c478bd9Sstevel@tonic-gate	libsendfile	\
1477c478bd9Sstevel@tonic-gate	nametoaddr	\
1487c478bd9Sstevel@tonic-gate	ncad_addr	\
149fcf3ce44SJohn Forte	hbaapi		\
150fcf3ce44SJohn Forte	sun_fc		\
1517c478bd9Sstevel@tonic-gate	gss_mechs/mech_krb5	.WAIT	\
15210db1377Sgtb	libkrb5	.WAIT	\
1534bff34e3Sthurlow	krb5	.WAIT	\
154fcf3ce44SJohn Forte	libsmbfs	\
1552a8164dfSZhong Wang	libfcoe		\
156fcf3ce44SJohn Forte	libstmf		\
157fcf3ce44SJohn Forte	libnsctl	\
158fcf3ce44SJohn Forte	libunistat	\
159fcf3ce44SJohn Forte	libdscfg	\
160fcf3ce44SJohn Forte	librdc
161fb9f9b97Skupfer$(CLOSED_BUILD)SUBDIRS += \
162fb9f9b97Skupfer	$(CLOSED)/lib/smartcard
163fb9f9b97SkupferSUBDIRS += \
1647c478bd9Sstevel@tonic-gate	passwdutil	\
1657c478bd9Sstevel@tonic-gate	pam_modules	\
1667c478bd9Sstevel@tonic-gate	crypt_modules	\
1677c478bd9Sstevel@tonic-gate	libadt_jni	\
168f808c858Sraf	abi		\
1697c478bd9Sstevel@tonic-gate	auditd_plugins	\
1707c478bd9Sstevel@tonic-gate	libvolmgt	\
1717c478bd9Sstevel@tonic-gate	libdevice	\
1727c478bd9Sstevel@tonic-gate	libdevid	\
1737c478bd9Sstevel@tonic-gate	libdhcpsvc	\
1747c478bd9Sstevel@tonic-gate	libc_db		\
1752654012fSReza Sabdar	libndmp		\
1767c478bd9Sstevel@tonic-gate	libsec		\
1777c478bd9Sstevel@tonic-gate	libtnfprobe	\
1787c478bd9Sstevel@tonic-gate	libtnf		\
1797c478bd9Sstevel@tonic-gate	libtnfctl	\
1807c478bd9Sstevel@tonic-gate	libdhcpagent	\
1817c478bd9Sstevel@tonic-gate	libdhcpdu	\
1827c478bd9Sstevel@tonic-gate	libdhcputil	\
183fb9f9b97Skupfer	libipsecutil
184fb9f9b97Skupfer$(CLOSED_BUILD)SUBDIRS += \
1852654012fSReza Sabdar	$(CLOSED)/lib/libike
186fb9f9b97SkupferSUBDIRS += \
1877c478bd9Sstevel@tonic-gate	nsswitch	\
1887c478bd9Sstevel@tonic-gate	print		\
1897c478bd9Sstevel@tonic-gate	libuutil	\
1907c478bd9Sstevel@tonic-gate	libscf		\
1917c478bd9Sstevel@tonic-gate	libinetsvc	\
1927c478bd9Sstevel@tonic-gate	librestart	\
193df8bdeb3Sjohnz	libsched	\
194df8bdeb3Sjohnz	libelfsign	\
195768ad96bSWyllys Ingersoll	openssl		\
1967c478bd9Sstevel@tonic-gate	pkcs11		.WAIT	\
1977c478bd9Sstevel@tonic-gate	libpctx		.WAIT	\
1987c478bd9Sstevel@tonic-gate	libcpc		\
1997c478bd9Sstevel@tonic-gate	watchmalloc	\
200a5f69788Scraigm	extendedFILE	\
2017c478bd9Sstevel@tonic-gate	madv		\
2027c478bd9Sstevel@tonic-gate	mpss		\
203dc0093f4Seschrock	libdisasm	\
2047c478bd9Sstevel@tonic-gate	libwrap		\
2057c478bd9Sstevel@tonic-gate	libxcurses	\
2067c478bd9Sstevel@tonic-gate	libxcurses2	\
2077c478bd9Sstevel@tonic-gate	libxnet		\
2089acbbeafSnn35248	libbrand	.WAIT   \
2097c478bd9Sstevel@tonic-gate	libzonecfg	\
2107c478bd9Sstevel@tonic-gate	libzoneinfo	\
21145916cd2Sjpk	libtsnet	\
21245916cd2Sjpk	libtsol		\
2137c478bd9Sstevel@tonic-gate	gss_mechs/mech_spnego	\
2147c478bd9Sstevel@tonic-gate	gss_mechs/mech_dummy	\
2157c478bd9Sstevel@tonic-gate	gss_mechs/mech_dh	\
2167c478bd9Sstevel@tonic-gate	rpcsec_gss	\
217711890bcSjc156560	libraidcfg	.WAIT	\
2187c478bd9Sstevel@tonic-gate	librcm		.WAIT	\
2197c478bd9Sstevel@tonic-gate	libcfgadm	.WAIT	\
2207c478bd9Sstevel@tonic-gate	libpicl		.WAIT	\
2217c478bd9Sstevel@tonic-gate	libpicltree	.WAIT \
222711890bcSjc156560	raidcfg_plugins	\
2237c478bd9Sstevel@tonic-gate	cfgadm_plugins	\
2247c478bd9Sstevel@tonic-gate	libmail		\
2257c478bd9Sstevel@tonic-gate	lvm		\
2267c478bd9Sstevel@tonic-gate	libsmedia	\
2277c478bd9Sstevel@tonic-gate	libipp		\
2287c478bd9Sstevel@tonic-gate	libdiskmgt	\
2297c478bd9Sstevel@tonic-gate	liblgrp		\
2307c478bd9Sstevel@tonic-gate	libfsmgt	\
2317c478bd9Sstevel@tonic-gate	fm		\
2327c478bd9Sstevel@tonic-gate	libavl		\
2337c478bd9Sstevel@tonic-gate	libcmdutils	\
2347c478bd9Sstevel@tonic-gate	libcontract	\
2357c478bd9Sstevel@tonic-gate	../cmd/sendmail/libmilter	\
2367c478bd9Sstevel@tonic-gate	sasl_plugins	\
2377c478bd9Sstevel@tonic-gate	udapl		\
238fa9e4066Sahrens	libzpool	\
239fa9e4066Sahrens	libzfs		\
240fa9e4066Sahrens	libzfs_jni	\
24114843421SMatthew Ahrens	pyzfs		\
2428200fe25Srmesta	libmapid	\
2439acbbeafSnn35248	brand		\
24418c2aff7Sartem	policykit	\
24518c2aff7Sartem	hal		\
2466185db85Sdougm	libshare	\
247c5c4113dSnw141292	libsqlite	\
248c5c4113dSnw141292	libidmap	\
2492b4a7802SBaban Kenkre	libadutils	\
2509113a79cSeschrock	libipmi		\
251853de45fSdh155122	libexacct/demo	\
252911106dfSjm199354	libvscan	\
253753a6d45SSherry Moore	libgrubmgmt	\
254da6c28aaSamw	smbsrv		\
255275c9da8Seschrock	scsi		\
256cee0fb94SAllan Matthews	mms		\
257fcf3ce44SJohn Forte	libima		\
258fcf3ce44SJohn Forte	libsun_ima	\
259fcf3ce44SJohn Forte	mpapi		\
2607c478bd9Sstevel@tonic-gate	$($(MACH)_SUBDIRS)
2617c478bd9Sstevel@tonic-gate
262*7e7bd3dcSMark Logani386_SUBDIRS=		\
263*7e7bd3dcSMark Logan	libntfs		\
264*7e7bd3dcSMark Logan	libparted
265*7e7bd3dcSMark Logan
2667c478bd9Sstevel@tonic-gatesparc_SUBDIRS= .WAIT	\
2677c478bd9Sstevel@tonic-gate	efcode		\
26803831d35Sstevel	libc_psr	.WAIT	\
26930588217SMike Christensen	libds		\
27025cf1a30Sjl139090	libdscp		\
27103831d35Sstevel	libprtdiag	.WAIT	\
27203831d35Sstevel	libprtdiag_psr	\
273ef884685Srb144127	libpri		\
27403831d35Sstevel	librsc		\
2757c478bd9Sstevel@tonic-gate	libfruutils	.WAIT	\
2767c478bd9Sstevel@tonic-gate	libfru		\
2777c478bd9Sstevel@tonic-gate	storage		\
2784a6822d0Swillard	libpcp		\
2794a6822d0Swillard	libtsalarm
2807c478bd9Sstevel@tonic-gate
281ef884685Srb144127FM_sparc_DEPLIBS= libpri
282ef884685Srb144127
2832eeaed14Srobjfm:			\
2842eeaed14Srobj	libexacct	\
2852eeaed14Srobj	libipmi		\
286815b023eSStephen Hanson	libzfs		\
287940d71d2Seschrock	scsi		\
2882eeaed14Srobj	$(FM_$(MACH)_DEPLIBS)
2897c478bd9Sstevel@tonic-gate
2907c478bd9Sstevel@tonic-gate#
2917c478bd9Sstevel@tonic-gate# Create a special version of $(SUBDIRS) with no .WAIT's, for use with the
2927c478bd9Sstevel@tonic-gate# clean and clobber targets (for more information, see those targets, below).
2937c478bd9Sstevel@tonic-gate#
2947c478bd9Sstevel@tonic-gateNOWAIT_SUBDIRS= $(SUBDIRS:.WAIT=)
2957c478bd9Sstevel@tonic-gate
2967c478bd9Sstevel@tonic-gateDCSUBDIRS =		\
2977c478bd9Sstevel@tonic-gate	lvm
2987c478bd9Sstevel@tonic-gate
2997c478bd9Sstevel@tonic-gateMSGSUBDIRS=		\
3007c478bd9Sstevel@tonic-gate	abi		\
3017c478bd9Sstevel@tonic-gate	auditd_plugins	\
3029acbbeafSnn35248	brand		\
3037c478bd9Sstevel@tonic-gate	cfgadm_plugins	\
3047c478bd9Sstevel@tonic-gate	gss_mechs/mech_dh	\
3057c478bd9Sstevel@tonic-gate	gss_mechs/mech_krb5	\
3067c478bd9Sstevel@tonic-gate	krb5		\
307da2e3ebdSchin	libast		\
3087c478bd9Sstevel@tonic-gate	libbsm		\
3097c478bd9Sstevel@tonic-gate	libc		\
3107c478bd9Sstevel@tonic-gate	libcfgadm	\
311da2e3ebdSchin	libcmd		\
3127c478bd9Sstevel@tonic-gate	libcontract	\
3137c478bd9Sstevel@tonic-gate	libcurses	\
3147c478bd9Sstevel@tonic-gate	libdhcpsvc 	\
3157c478bd9Sstevel@tonic-gate	libdhcputil	\
316a7485808Smarkfen	libipsecutil	\
317181c2f42Smmusante	libdiskmgt	\
31833343a97Smeem	libdladm	\
319da2e3ebdSchin	libdll		\
320753a6d45SSherry Moore	libgrubmgmt	\
3217c478bd9Sstevel@tonic-gate	libgss		\
322c5c4113dSnw141292	libidmap	\
3237c478bd9Sstevel@tonic-gate	libinetcfg	\
3247c478bd9Sstevel@tonic-gate	libipmp		\
3258002d411SSowmini Varadhan	libinetutil	\
3267c478bd9Sstevel@tonic-gate	libnsl		\
3277c478bd9Sstevel@tonic-gate	libpam		\
3287c478bd9Sstevel@tonic-gate	libpicl		\
3297c478bd9Sstevel@tonic-gate	libpool		\
330da2e3ebdSchin	libpp		\
3317c478bd9Sstevel@tonic-gate	libscf		\
3327c478bd9Sstevel@tonic-gate	libsasl		\
3337c478bd9Sstevel@tonic-gate	libldap5	\
3347c478bd9Sstevel@tonic-gate	libsecdb	\
3356185db85Sdougm	libshare	\
336da2e3ebdSchin	libshell	\
3377c478bd9Sstevel@tonic-gate	libsldap	\
3387c478bd9Sstevel@tonic-gate	libslp		\
3394bff34e3Sthurlow	libsmbfs	\
3407c478bd9Sstevel@tonic-gate	libsmedia	\
3417c2fbfb3SApril Chin	libsum		\
34245916cd2Sjpk	libtsol		\
3437c478bd9Sstevel@tonic-gate	libuutil	\
344911106dfSjm199354	libvscan	\
3457c478bd9Sstevel@tonic-gate	libwanboot	\
3467c478bd9Sstevel@tonic-gate	libwanbootutil	\
347c3aa2a37Sck153898	libzfs		\
3487c478bd9Sstevel@tonic-gate	libzonecfg	\
3497c478bd9Sstevel@tonic-gate	lvm		\
3507c478bd9Sstevel@tonic-gate	madv		\
351d1d2228cSDavid Major	mms		\
3527c478bd9Sstevel@tonic-gate	mpss		\
3537c478bd9Sstevel@tonic-gate	pam_modules	\
35414843421SMatthew Ahrens	pyzfs		\
355fb9f9b97Skupfer	rpcsec_gss
356fb9f9b97Skupfer$(CLOSED_BUILD)MSGSUBDIRS += \
357fb9f9b97Skupfer	$(CLOSED)/lib/smartcard
358fb9f9b97SkupferMSGSUBDIRS += \
3597c478bd9Sstevel@tonic-gate	$($(MACH)_MSGSUBDIRS)
3607c478bd9Sstevel@tonic-gate
36103831d35Sstevelsparc_MSGSUBDIRS=	\
36203831d35Sstevel	libprtdiag	\
36303831d35Sstevel	libprtdiag_psr
3647c478bd9Sstevel@tonic-gate
365f841f6adSrafHDRSUBDIRS=		\
3667c478bd9Sstevel@tonic-gate	auditd_plugins	\
367da2e3ebdSchin	libast		\
3689acbbeafSnn35248	libbrand	\
3697c478bd9Sstevel@tonic-gate	libbsm		\
3707c478bd9Sstevel@tonic-gate	libc		\
371da2e3ebdSchin	libcmd		\
3727c478bd9Sstevel@tonic-gate	libcmdutils	\
3737c478bd9Sstevel@tonic-gate	libcontract	\
3747c478bd9Sstevel@tonic-gate	libcpc		\
3757c478bd9Sstevel@tonic-gate	libctf		\
3767c478bd9Sstevel@tonic-gate	libcurses	\
3777c478bd9Sstevel@tonic-gate	libcryptoutil	\
3787c478bd9Sstevel@tonic-gate	libdevice	\
3797c478bd9Sstevel@tonic-gate	libdevid	\
3807c478bd9Sstevel@tonic-gate	libdevinfo	\
3813e1bd7a2Ssjelinek	libdiskmgt	\
3827c478bd9Sstevel@tonic-gate	libdladm	\
383da2e3ebdSchin	libdll		\
3847c478bd9Sstevel@tonic-gate	libdlpi		\
3857c478bd9Sstevel@tonic-gate	libdhcpagent	\
3867c478bd9Sstevel@tonic-gate	libdhcpsvc	\
3877c478bd9Sstevel@tonic-gate	libdhcputil	\
388dc0093f4Seschrock	libdisasm	\
3894b22b933Srs200217	libdns_sd	\
390fcf3ce44SJohn Forte	libdscfg	\
3917c478bd9Sstevel@tonic-gate	libdtrace	\
392fb3fb4f3Stomee	libdtrace_jni	\
393df8bdeb3Sjohnz	libelfsign	\
3947c478bd9Sstevel@tonic-gate	libeti		\
3950e42dee6Sartem	libfstyp	\
3967c478bd9Sstevel@tonic-gate	libgen		\
3977c478bd9Sstevel@tonic-gate	libwanboot	\
3987c478bd9Sstevel@tonic-gate	libwanbootutil	\
3997c478bd9Sstevel@tonic-gate	libipsecutil	\
4007c478bd9Sstevel@tonic-gate	libinetcfg	\
4017c478bd9Sstevel@tonic-gate	libinetsvc	\
4027c478bd9Sstevel@tonic-gate	libinetutil	\
4039113a79cSeschrock	libipmi		\
4047c478bd9Sstevel@tonic-gate	libipmp		\
4057c478bd9Sstevel@tonic-gate	libipp		\
406a6d42e7dSPeter Dunlap	libiscsit	\
407f3861e1aSahl	libiscsitgt	\
4087c478bd9Sstevel@tonic-gate	libkstat	\
4097c478bd9Sstevel@tonic-gate	libkvm		\
4107c478bd9Sstevel@tonic-gate	libmail		\
411734b6a94Sdarrenm	libmd		\
4127c478bd9Sstevel@tonic-gate	libmtmalloc	\
4132654012fSReza Sabdar	libndmp		\
4147c478bd9Sstevel@tonic-gate	libnvpair	\
415fcf3ce44SJohn Forte	libnsctl	\
41645916cd2Sjpk	libnsl		\
417b00044a2SJames Carlson	libnwam		\
4187c478bd9Sstevel@tonic-gate	libpam		\
4197c478bd9Sstevel@tonic-gate	libpctx		\
4207c478bd9Sstevel@tonic-gate	libpicl		\
4217c478bd9Sstevel@tonic-gate	libpicltree	\
4227c478bd9Sstevel@tonic-gate	libplot		\
4237c478bd9Sstevel@tonic-gate	libpool		\
424da2e3ebdSchin	libpp		\
4257c478bd9Sstevel@tonic-gate	libproc		\
4263e4f2897Sjc156560	libraidcfg	\
4277c478bd9Sstevel@tonic-gate	librcm		\
428fcf3ce44SJohn Forte	librdc		\
4297c478bd9Sstevel@tonic-gate	libscf		\
43040cb5e5dSvi117747	libsip		\
431a93a1f58Sgm209912	libcommputil	\
43284ab085aSmws	libsmbios	\
4337c478bd9Sstevel@tonic-gate	librestart	\
4347c478bd9Sstevel@tonic-gate	librpcsvc	\
4357c478bd9Sstevel@tonic-gate	librsm		\
4367c478bd9Sstevel@tonic-gate	libsasl		\
437fa9e4066Sahrens	libsec		\
438da2e3ebdSchin	libshell	\
4397c478bd9Sstevel@tonic-gate	libslp		\
4407c478bd9Sstevel@tonic-gate	libsmedia	\
441c5c4113dSnw141292	libsqlite	\
4422a8164dfSZhong Wang	libfcoe		\
443fcf3ce44SJohn Forte	libstmf		\
4447c2fbfb3SApril Chin	libsum		\
4457c478bd9Sstevel@tonic-gate	libsysevent	\
4467c478bd9Sstevel@tonic-gate	libtecla	\
4477c478bd9Sstevel@tonic-gate	libtnf		\
4487c478bd9Sstevel@tonic-gate	libtnfctl	\
4497c478bd9Sstevel@tonic-gate	libtnfprobe	\
45045916cd2Sjpk	libtsnet	\
45145916cd2Sjpk	libtsol		\
4527c478bd9Sstevel@tonic-gate	libvolmgt	\
4537c478bd9Sstevel@tonic-gate	libumem		\
454fcf3ce44SJohn Forte	libunistat	\
4557c478bd9Sstevel@tonic-gate	libuutil	\
4567c478bd9Sstevel@tonic-gate	libwrap		\
4577c478bd9Sstevel@tonic-gate	libxcurses2	\
458fa9e4066Sahrens	libzfs		\
459088e9d47Seschrock	libzfs_jni	\
4607c478bd9Sstevel@tonic-gate	libzoneinfo	\
46118c2aff7Sartem	hal		\
46218c2aff7Sartem	policykit	\
4637c478bd9Sstevel@tonic-gate	lvm		\
4647c478bd9Sstevel@tonic-gate	openssl		\
4657c478bd9Sstevel@tonic-gate	pkcs11		\
4667c478bd9Sstevel@tonic-gate	passwdutil	\
4677c478bd9Sstevel@tonic-gate	../cmd/sendmail/libmilter	\
4687c478bd9Sstevel@tonic-gate	fm		\
4697c478bd9Sstevel@tonic-gate	udapl		\
4708200fe25Srmesta	libmapid	\
47110db1377Sgtb	libkrb5		\
4726185db85Sdougm	libshare	\
473c5c4113dSnw141292	libidmap	\
474911106dfSjm199354	libvscan	\
475753a6d45SSherry Moore	libgrubmgmt	\
476da6c28aaSamw	smbsrv		\
477275c9da8Seschrock	scsi		\
478fcf3ce44SJohn Forte	hbaapi		\
479fcf3ce44SJohn Forte	libima		\
480fcf3ce44SJohn Forte	libsun_ima	\
481fcf3ce44SJohn Forte	mpapi		\
482063ebb38SPaul Cheng	mms		\
4837c478bd9Sstevel@tonic-gate	$($(MACH)_HDRSUBDIRS)
4847c478bd9Sstevel@tonic-gate
485fb9f9b97Skupfer$(CLOSED_BUILD)HDRSUBDIRS += \
486fb9f9b97Skupfer	$(CLOSED)/lib/libc_i18n	\
487fb9f9b97Skupfer	$(CLOSED)/lib/libike	\
488fb9f9b97Skupfer	$(CLOSED)/lib/smartcard
489fb9f9b97Skupfer
4907c478bd9Sstevel@tonic-gatesparc_HDRSUBDIRS=	\
49130588217SMike Christensen	libds		\
49225cf1a30Sjl139090	libdscp		\
493fcf3ce44SJohn Forte	libpri		\
494fcf3ce44SJohn Forte	storage
4957c478bd9Sstevel@tonic-gate
4967c478bd9Sstevel@tonic-gateall :=		TARGET= all
4977c478bd9Sstevel@tonic-gatecheck :=	TARGET= check
4987c478bd9Sstevel@tonic-gateclean :=	TARGET= clean
4997c478bd9Sstevel@tonic-gateclobber :=	TARGET= clobber
5007c478bd9Sstevel@tonic-gateinstall :=	TARGET= install
5017c478bd9Sstevel@tonic-gateinstall_h :=	TARGET= install_h
5027c478bd9Sstevel@tonic-gatelint :=		TARGET= lint
5037c478bd9Sstevel@tonic-gate_dc :=		TARGET= _dc
5047c478bd9Sstevel@tonic-gate_msg :=		TARGET= _msg
5057c478bd9Sstevel@tonic-gate
5067c478bd9Sstevel@tonic-gate.KEEP_STATE:
5077c478bd9Sstevel@tonic-gate
5087c478bd9Sstevel@tonic-gate#
5097c478bd9Sstevel@tonic-gate# For the all and install targets, we clearly must respect library
5107c478bd9Sstevel@tonic-gate# dependencies so that the libraries link correctly.  However, for
5117c478bd9Sstevel@tonic-gate# the remaining targets (check, clean, clobber, install_h, lint, _dc
5127c478bd9Sstevel@tonic-gate# and _msg), libraries do not have any dependencies on one another
5137c478bd9Sstevel@tonic-gate# and thus respecting dependencies just slows down the build.
5147c478bd9Sstevel@tonic-gate# As such, for these rules, we use pattern replacement to explicitly
5157c478bd9Sstevel@tonic-gate# avoid triggering the dependency information.  Note that for clean,
5167c478bd9Sstevel@tonic-gate# clobber and lint, we must use $(NOWAIT_SUBDIRS) rather than
5177c478bd9Sstevel@tonic-gate# $(SUBDIRS), to prevent `.WAIT' from expanding to `.WAIT-nodepend'.
5187c478bd9Sstevel@tonic-gate#
5197c478bd9Sstevel@tonic-gate
5207c478bd9Sstevel@tonic-gateall:			$(SUBDIRS)
5217c478bd9Sstevel@tonic-gate
5227c478bd9Sstevel@tonic-gateinstall:		$(SUBDIRS) .WAIT install_extra
5237c478bd9Sstevel@tonic-gate
5247c478bd9Sstevel@tonic-gate# extra libraries kept in other source areas
5257c478bd9Sstevel@tonic-gateinstall_extra:
5267c478bd9Sstevel@tonic-gate	@cd ../cmd/sgs; pwd; $(MAKE) install_lib
5277c478bd9Sstevel@tonic-gate	@pwd
5287c478bd9Sstevel@tonic-gate
5297c478bd9Sstevel@tonic-gateclean clobber lint:	$(NOWAIT_SUBDIRS:%=%-nodepend)
5307c478bd9Sstevel@tonic-gate
5317c478bd9Sstevel@tonic-gateinstall_h check:	$(HDRSUBDIRS:%=%-nodepend)
5327c478bd9Sstevel@tonic-gate
5337c478bd9Sstevel@tonic-gate_msg:			$(MSGSUBDIRS:%=%-nodepend) .WAIT _dc
5347c478bd9Sstevel@tonic-gate
5357c478bd9Sstevel@tonic-gate_dc:			$(DCSUBDIRS:%=%-nodepend)
5367c478bd9Sstevel@tonic-gate
537fb9f9b97Skupfer# dependencies for pam_modules (see below)
538fb9f9b97Skupfer$(CLOSED_BUILD)SMARTCARD=	$(CLOSED)/lib/smartcard
539fb9f9b97Skupfer
5407c478bd9Sstevel@tonic-gate#
5417c478bd9Sstevel@tonic-gate# Library interdependencies are called out explicitly here
5427c478bd9Sstevel@tonic-gate#
5437c478bd9Sstevel@tonic-gateauditd_plugins: libbsm libnsl libsecdb
5447c478bd9Sstevel@tonic-gategss_mechs/mech_krb5:	libgss libnsl libsocket libresolv pkcs11
5457c478bd9Sstevel@tonic-gatelibadt_jni:	libbsm
546fb9f9b97Skupfer$(CLOSED_BUILD)libc:		$(CLOSED)/lib/libc_i18n
547da2e3ebdSchinlibast: 	libsocket
5487a8a68f5SJulian Pullenlibadutils: 	libldap5 libresolv libsocket libnsl
5497a8a68f5SJulian Pullennsswitch:	libadutils libidmap
55045916cd2Sjpklibbsm:		libtsol
5517c2fbfb3SApril Chinlibcmd: 	libsum libast libsocket libnsl
5527c478bd9Sstevel@tonic-gatelibcmdutils:	libavl
5537c478bd9Sstevel@tonic-gatelibcontract:	libnvpair
5547c478bd9Sstevel@tonic-gatelibdevid:	libdevinfo
555fa9e4066Sahrenslibdevinfo:	libnvpair libsec
556a1196271SJames Carlsonlibdhcpagent:	libsocket libdhcputil libuuid libdlpi libcontract
5577c478bd9Sstevel@tonic-gatelibdhcpsvc:	libinetutil
5584ee71a50Scarlsonjlibdhcputil:	libnsl libgen libinetutil libdlpi
55982a2fc47SJames Carlsonlibdladm:	libdevinfo libinetutil libsocket libscf librcm libnvpair \
56082a2fc47SJames Carlson		libexacct libnsl libkstat libcurses
561da2e3ebdSchinlibdll: 	libast
562d62bc4baSyz147064libdlpi:	libinetutil libdladm
563fcf3ce44SJohn Fortelibdscfg:	libnsctl libunistat libsocket libnsl
5647c478bd9Sstevel@tonic-gatelibdtrace:	libproc libgen libctf
565fb3fb4f3Stomeelibdtrace_jni:	libuutil libdtrace
5667c478bd9Sstevel@tonic-gatelibefi:		libuuid
5670e42dee6Sartemlibfstyp:	libnvpair
568df8bdeb3Sjohnzlibelfsign:	libcryptoutil libkmf
5697a8a68f5SJulian Pullenlibidmap:	libadutils libldap5 libavl libsldap
570d62bc4baSyz147064libinetcfg:	libnsl libsocket libdlpi
571a6d42e7dSPeter Dunlaplibiscsit:	libc libnvpair libstmf libuuid libnsl
57299ebb4caSwyllyslibkmf:		libcryptoutil pkcs11 openssl
5737c478bd9Sstevel@tonic-gatelibnsl:		libmd5 libscf
57406e1a714Sraflibmapid:	libresolv
575b00044a2SJames Carlsonlibnwam:	libdoor
576fcf3ce44SJohn Fortelibrdc:		libsocket libnsl libnsctl libunistat libdscfg
577d62bc4baSyz147064libuuid:	libdlpi
5787c478bd9Sstevel@tonic-gatelibinetutil:	libsocket
57906e1a714Sraflibsecdb:	libnsl
580734b6a94Sdarrenmlibsasl:	libgss libsocket pkcs11 libmd
5817c478bd9Sstevel@tonic-gatesasl_plugins:	pkcs11 libgss libsocket libsasl
5827c478bd9Sstevel@tonic-gatelibsctp:	libsocket
583da2e3ebdSchinlibshell:	libast libcmd libdll libsocket libsecdb
58440cb5e5dSvi117747libsip:		libmd5
5854bff34e3Sthurlowlibsmbfs:	libsocket libnsl libkrb5
5867c478bd9Sstevel@tonic-gatelibsocket:	libnsl
5877c2fbfb3SApril Chinlibsum: 	libast
588734b6a94Sdarrenmlibldap5:	libsasl libsocket libnsl libmd
589e1dd0a2fSth160488libsldap:	libldap5 libtsol libnsl libc libscf libresolv
5907c478bd9Sstevel@tonic-gatelibpool:	libnvpair libexacct
591da2e3ebdSchinlibpp:		libast
5929acbbeafSnn35248libzonecfg:	libc libsocket libnsl libuuid libnvpair libsysevent libsec \
5930209230bSgjelinek		libbrand libpool libscf
594c6e80875Srablibproc:	../cmd/sgs/librtld_db ../cmd/sgs/libelf libctf
5957c478bd9Sstevel@tonic-gatelibproject:	libpool libproc libsecdb
59645916cd2Sjpklibtsnet:	libnsl libtsol libsecdb
5977c478bd9Sstevel@tonic-gatelibwrap:	libnsl libsocket
5987c478bd9Sstevel@tonic-gatelibwanboot:	libnvpair libresolv libnsl libsocket libdevinfo libinetutil \
5997c478bd9Sstevel@tonic-gate		libdhcputil openssl
6007c478bd9Sstevel@tonic-gatelibwanbootutil:	libnsl
601da6c28aaSamwpam_modules:	libproject passwdutil $(SMARTCARD) smbsrv
602753a6d45SSherry Moorelibscf:		libuutil libmd libgen libsmbios
6037c478bd9Sstevel@tonic-gatelibinetsvc:	libscf
6047c478bd9Sstevel@tonic-gatelibrestart:	libuutil libscf
6057c478bd9Sstevel@tonic-gate../cmd/sgs/libdl:	../cmd/sgs/libconv
6067c478bd9Sstevel@tonic-gate../cmd/sgs/libelf:	../cmd/sgs/libconv
607768ad96bSWyllys Ingersollpkcs11:		libcryptoutil openssl
6087c478bd9Sstevel@tonic-gateprint:		libldap5
6097c478bd9Sstevel@tonic-gateudapl/udapl_tavor:	udapl/libdat
61014843421SMatthew Ahrenslibzfs:		libdevinfo libdevid libgen libnvpair libuutil libiscsitgt \
61114843421SMatthew Ahrens		libavl libefi libidmap libsec
612fa9e4066Sahrenslibzfs_jni:	libdiskmgt libnvpair libzfs
613fa9e4066Sahrenslibzpool:	libavl libumem libnvpair
614a74dfeddSMark Shellenbaumlibsec:		libavl libidmap
6159acbbeafSnn35248brand:		libc libsocket
6164bff34e3Sthurlowlibshare:	libscf libzfs libuuid libfsmgt libsecdb libumem libsmbfs
617853de45fSdh155122libexacct/demo:	libexacct libproject libsocket libnsl
6184a6822d0Swillardlibtsalarm:	libpcp
619da6c28aaSamwsmbsrv:		libsocket libnsl libmd libxnet libpthread librt \
620dc20a302Sas200622		libshare libidmap pkcs11 libsqlite
621911106dfSjm199354libvscan:	libscf
622275c9da8Seschrockscsi:		libnvpair
623fcf3ce44SJohn Fortempapi:		libpthread libdevinfo libsysevent libnvpair
624753a6d45SSherry Moorelibgrubmgmt:	libdevinfo libzfs libfstyp
62514843421SMatthew Ahrenspyzfs:		libnvpair libsec libidmap libzfs
6267c478bd9Sstevel@tonic-gate
6277c478bd9Sstevel@tonic-gate#
6287c478bd9Sstevel@tonic-gate# The reason this rule checks for the existence of the
6297c478bd9Sstevel@tonic-gate# Makefile is that some of the directories do not exist
630fb9f9b97Skupfer# in certain situations (e.g., exportable source builds,
631fb9f9b97Skupfer# OpenSolaris).
6327c478bd9Sstevel@tonic-gate#
633f808c858Sraf$(SUBDIRS): FRC
6347c478bd9Sstevel@tonic-gate	@if [ -f $@/Makefile  ]; then \
6357c478bd9Sstevel@tonic-gate		cd $@; pwd; $(MAKE) $(TARGET); \
6367c478bd9Sstevel@tonic-gate	else \
6377c478bd9Sstevel@tonic-gate		true; \
6387c478bd9Sstevel@tonic-gate	fi
6397c478bd9Sstevel@tonic-gate
640f808c858Sraf$(SUBDIRS:%=%-nodepend):
6417c478bd9Sstevel@tonic-gate	@if [ -f $(@:%-nodepend=%)/Makefile  ]; then \
6427c478bd9Sstevel@tonic-gate		cd $(@:%-nodepend=%); pwd; $(MAKE) $(TARGET); \
6437c478bd9Sstevel@tonic-gate	else \
6447c478bd9Sstevel@tonic-gate		true; \
6457c478bd9Sstevel@tonic-gate	fi
6467c478bd9Sstevel@tonic-gate
6477c478bd9Sstevel@tonic-gateFRC:
648