1# 2# CDDL HEADER START 3# 4# The contents of this file are subject to the terms of the 5# Common Development and Distribution License, Version 1.0 only 6# (the "License"). You may not use this file except in compliance 7# with the License. 8# 9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10# or http://www.opensolaris.org/os/licensing. 11# See the License for the specific language governing permissions 12# and limitations under the License. 13# 14# When distributing Covered Code, include this CDDL HEADER in each 15# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16# If applicable, add the following below this CDDL HEADER, with the 17# fields enclosed by brackets "[]" replaced with your own identifying 18# information: Portions Copyright [yyyy] [name of copyright owner] 19# 20# CDDL HEADER END 21# 22# 23# Copyright 2005 Sun Microsystems, Inc. All rights reserved. 24# Use is subject to license terms. 25# 26# ident "%Z%%M% %I% %E% SMI" 27 28include ../Makefile.master 29 30# Note that libcurses installs commands along with its library. 31# This is a minor bug which probably should be fixed. 32# Note also that a few extra libraries are kept in cmd source. 33# 34# Certain libraries are linked with, hence depend on, other libraries. 35# 36# Although we have historically used .WAIT to express dependencies, it 37# reduces the amount of parallelism and thus lengthens the time it 38# takes to build the libraries. Thus, we now require that any new 39# libraries explicitly call out their dependencies. Eventually, all 40# the library dependencies will be called out explicitly. See 41# "Library interdependencies" near the end of this file. 42# 43# Aside from explicit dependencies (and legacy .WAITs), all libraries 44# are built in parallel. 45# 46.PARALLEL: 47 48SUBDIRS= \ 49 common .WAIT \ 50 abi/apptrace .WAIT \ 51 ../cmd/abi/spectrans .WAIT \ 52 ../cmd/sgs/libconv \ 53 ../cmd/sgs/libdl .WAIT \ 54 libc_i18n \ 55 libc .WAIT \ 56 libmapmalloc .WAIT \ 57 ../cmd/sgs/libelf .WAIT \ 58 libmd5 \ 59 librsm \ 60 libmp .WAIT \ 61 libcmd \ 62 libnsl \ 63 libsecdb .WAIT \ 64 librpcsvc \ 65 libsocket .WAIT \ 66 libsctp \ 67 libresolv \ 68 libresolv2 .WAIT \ 69 libw .WAIT \ 70 libintl .WAIT \ 71 ../cmd/sgs/librtld_db \ 72 libaio \ 73 librt \ 74 libadm \ 75 libctf \ 76 libdtrace \ 77 libcurses \ 78 libgen \ 79 libgss \ 80 libpam \ 81 libuuid \ 82 libthread \ 83 libpthread .WAIT \ 84 libslp \ 85 libbsdmalloc \ 86 libdoor \ 87 libdevinfo \ 88 libdladm \ 89 libdlpi \ 90 libeti \ 91 libcrypt \ 92 libefi \ 93 libwanboot \ 94 libwanbootutil \ 95 libcryptoutil \ 96 libinetcfg \ 97 libinetutil \ 98 libipmp \ 99 libkstat \ 100 libkvm \ 101 liblaadm \ 102 liblm \ 103 libmacadm \ 104 libmalloc \ 105 libmtmalloc \ 106 libnls \ 107 libsmbios \ 108 libtecla \ 109 libumem \ 110 libnvpair .WAIT \ 111 libexacct \ 112 libplot \ 113 libldap4 \ 114 libsasl \ 115 libldap5 \ 116 libsldap .WAIT \ 117 libbsm \ 118 libsys \ 119 libsysevent \ 120 libnisdb \ 121 libpool \ 122 libproc \ 123 libproject \ 124 libsendfile \ 125 nametoaddr \ 126 ncad_addr \ 127 gss_mechs/mech_krb5 .WAIT \ 128 krb5 .WAIT \ 129 smartcard \ 130 passwdutil \ 131 pam_modules \ 132 crypt_modules \ 133 libadt_jni \ 134 auditd_plugins \ 135 libvolmgt \ 136 libdevice \ 137 libdevid \ 138 libdhcpsvc \ 139 libc_db \ 140 libsec \ 141 libtnfprobe \ 142 libtnf \ 143 libtnfctl \ 144 libdhcpagent \ 145 libdhcpdu \ 146 libdhcputil \ 147 libipsecutil \ 148 libike \ 149 nsswitch \ 150 print \ 151 libuutil \ 152 libscf \ 153 libinetsvc \ 154 librestart \ 155 libsched \ 156 libelfsign \ 157 pkcs11 .WAIT \ 158 libpctx .WAIT \ 159 libcpc \ 160 watchmalloc \ 161 madv \ 162 mpss \ 163 libwrap \ 164 libxcurses \ 165 libxcurses2 \ 166 libxnet \ 167 libzonecfg \ 168 libzoneinfo \ 169 gss_mechs/mech_spnego \ 170 gss_mechs/mech_dummy \ 171 gss_mechs/mech_dh \ 172 rpcsec_gss \ 173 librcm .WAIT \ 174 libcfgadm .WAIT \ 175 libpicl .WAIT \ 176 libpicltree .WAIT \ 177 cfgadm_plugins \ 178 libmail \ 179 lvm \ 180 libsmedia \ 181 libipp \ 182 openssl \ 183 libdiskmgt \ 184 liblgrp \ 185 libfsmgt \ 186 fm \ 187 libavl \ 188 libcmdutils \ 189 libcontract \ 190 ../cmd/sendmail/libmilter \ 191 sasl_plugins \ 192 udapl \ 193 $($(MACH)_SUBDIRS) 194 195sparc_SUBDIRS= .WAIT \ 196 efcode \ 197 libc_psr .WAIT \ 198 libmd5_psr .WAIT \ 199 libprtdiag .WAIT \ 200 libprtdiag_psr \ 201 librsc \ 202 libfruutils .WAIT \ 203 libfru \ 204 libwrsmconf \ 205 storage \ 206 wrsm \ 207 libpcp 208 209fm: libexacct 210 211# 212# Create a special version of $(SUBDIRS) with no .WAIT's, for use with the 213# clean and clobber targets (for more information, see those targets, below). 214# 215NOWAIT_SUBDIRS= $(SUBDIRS:.WAIT=) 216 217DCSUBDIRS = \ 218 lvm 219 220MSGSUBDIRS= \ 221 abi \ 222 auditd_plugins \ 223 cfgadm_plugins \ 224 gss_mechs/mech_dh \ 225 gss_mechs/mech_krb5 \ 226 krb5 \ 227 libbsm \ 228 libc \ 229 libcfgadm \ 230 libcontract \ 231 libcurses \ 232 libdhcpsvc \ 233 libdhcputil \ 234 libgss \ 235 libinetcfg \ 236 libipmp \ 237 libnsl \ 238 libpam \ 239 libpicl \ 240 libpool \ 241 libscf \ 242 libsasl \ 243 libldap5 \ 244 libsecdb \ 245 libsldap \ 246 libslp \ 247 libsmedia \ 248 libuutil \ 249 libwanboot \ 250 libwanbootutil \ 251 libzonecfg \ 252 lvm \ 253 madv \ 254 mpss \ 255 pam_modules \ 256 rpcsec_gss \ 257 smartcard \ 258 $($(MACH)_MSGSUBDIRS) 259 260sparc_MSGSUBDIRS= \ 261 libprtdiag \ 262 libprtdiag_psr 263 264HDRSUBDIRS= libaio \ 265 auditd_plugins \ 266 libbsm \ 267 libc \ 268 libc_i18n \ 269 libcmdutils \ 270 libcontract \ 271 libcpc \ 272 libctf \ 273 libcurses \ 274 libcryptoutil \ 275 libdevice \ 276 libdevid \ 277 libdevinfo \ 278 libdiskmgt \ 279 libdladm \ 280 libdlpi \ 281 libdhcpagent \ 282 libdhcpsvc \ 283 libdhcputil \ 284 libdtrace \ 285 libeti \ 286 libgen \ 287 libwanboot \ 288 libwanbootutil \ 289 libipsecutil \ 290 libike \ 291 libinetcfg \ 292 libinetsvc \ 293 libinetutil \ 294 libipmp \ 295 libipp \ 296 libkstat \ 297 libkvm \ 298 liblaadm \ 299 libmacadm \ 300 libmail \ 301 libmtmalloc \ 302 libnvpair \ 303 libpam \ 304 libpctx \ 305 libpicl \ 306 libpicltree \ 307 libplot \ 308 libpool \ 309 libproc \ 310 librcm \ 311 libscf \ 312 libsmbios \ 313 librestart \ 314 librpcsvc \ 315 librsm \ 316 libsasl \ 317 libslp \ 318 libsmedia \ 319 libsysevent \ 320 libtecla \ 321 libtnf \ 322 libtnfctl \ 323 libtnfprobe \ 324 libvolmgt \ 325 libumem \ 326 libuutil \ 327 libwrap \ 328 libxcurses2 \ 329 libzoneinfo \ 330 lvm \ 331 openssl \ 332 pkcs11 \ 333 smartcard \ 334 passwdutil \ 335 ../cmd/sendmail/libmilter \ 336 fm \ 337 udapl \ 338 $($(MACH)_HDRSUBDIRS) 339 340sparc_HDRSUBDIRS= \ 341 libwrsmconf 342 343all := TARGET= all 344check := TARGET= check 345clean := TARGET= clean 346clobber := TARGET= clobber 347install := TARGET= install 348install_h := TARGET= install_h 349lint := TARGET= lint 350_dc := TARGET= _dc 351_msg := TARGET= _msg 352 353.KEEP_STATE: 354 355# 356# For the all and install targets, we clearly must respect library 357# dependencies so that the libraries link correctly. However, for 358# the remaining targets (check, clean, clobber, install_h, lint, _dc 359# and _msg), libraries do not have any dependencies on one another 360# and thus respecting dependencies just slows down the build. 361# As such, for these rules, we use pattern replacement to explicitly 362# avoid triggering the dependency information. Note that for clean, 363# clobber and lint, we must use $(NOWAIT_SUBDIRS) rather than 364# $(SUBDIRS), to prevent `.WAIT' from expanding to `.WAIT-nodepend'. 365# 366 367all: $(SUBDIRS) 368 369install: $(SUBDIRS) .WAIT install_extra 370 371# extra libraries kept in other source areas 372install_extra: 373 @cd ../cmd/sgs; pwd; $(MAKE) install_lib 374 @pwd 375 376clean clobber lint: $(NOWAIT_SUBDIRS:%=%-nodepend) 377 378install_h check: $(HDRSUBDIRS:%=%-nodepend) 379 380_msg: $(MSGSUBDIRS:%=%-nodepend) .WAIT _dc 381 382_dc: $(DCSUBDIRS:%=%-nodepend) 383 384# 385# Library interdependencies are called out explicitly here 386# 387auditd_plugins: libbsm libnsl libsecdb 388gss_mechs/mech_krb5: libgss libnsl libsocket libresolv pkcs11 389libadt_jni: libbsm 390libc: libc_i18n 391libcmdutils: libavl 392libcontract: libnvpair 393libdevid: libdevinfo 394libdevinfo: libnvpair 395libdhcpagent: libdhcputil libnsl libsocket 396libdhcpsvc: libinetutil 397libdhcputil: libinetutil 398libdladm: libdlpi libdevinfo 399libdtrace: libproc libgen libctf 400libefi: libuuid 401libelfsign: libike libcryptoutil pkcs11 402libinetcfg: libnsl libsocket libdevinfo 403libnsl: libmd5 libscf 404libmacadm: libdevinfo 405libuuid: libsocket 406libinetutil: libsocket 407libsecdb: libcmd libnsl 408librt: libaio libmd5 409libsasl: libgss libsocket pkcs11 libmd5 410sasl_plugins: pkcs11 libgss libsocket libsasl 411libsctp: libsocket 412libsocket: libnsl 413libldap5: libsasl libsocket libnsl libmd5 414libsldap: libldap5 415libpool: libnvpair libexacct 416libproject: libpool libproc libsecdb 417libwrap: libnsl libsocket 418libwanboot: libnvpair libresolv libnsl libsocket libdevinfo libinetutil \ 419 libdhcputil openssl 420libwanbootutil: libnsl 421pam_modules: libproject smartcard 422libscf: libuutil 423libinetsvc: libscf 424librestart: libuutil libscf 425../cmd/sgs/libdl: ../cmd/sgs/libconv 426../cmd/sgs/libelf: ../cmd/sgs/libconv 427pkcs11: libcryptoutil 428print: libldap5 429udapl/udapl_tavor: udapl/libdat 430 431# 432# The reason this rule checks for the existence of the 433# Makefile is that some of the directories do not exist 434# in our exportable source builds. 435# 436$(SUBDIRS) abi: FRC 437 @if [ -f $@/Makefile ]; then \ 438 cd $@; pwd; $(MAKE) $(TARGET); \ 439 else \ 440 true; \ 441 fi 442 443$(SUBDIRS:%=%-nodepend) abi-nodepend: 444 @if [ -f $(@:%-nodepend=%)/Makefile ]; then \ 445 cd $(@:%-nodepend=%); pwd; $(MAKE) $(TARGET); \ 446 else \ 447 true; \ 448 fi 449 450FRC: 451