6811333 Remove prom_printf() message in emlxs driver
[opensolaris.git] / usr / src / lib / Makefile
blobbd432a268ec5710c407aa954f31483b71a11b5a7
2 # CDDL HEADER START
4 # The contents of this file are subject to the terms of the
5 # Common Development and Distribution License (the "License").
6 # You may not use this file except in compliance with the License.
8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 # or http://www.opensolaris.org/os/licensing.
10 # See the License for the specific language governing permissions
11 # and limitations under the License.
13 # When distributing Covered Code, include this CDDL HEADER in each
14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 # If applicable, add the following below this CDDL HEADER, with the
16 # fields enclosed by brackets "[]" replaced with your own identifying
17 # information: Portions Copyright [yyyy] [name of copyright owner]
19 # CDDL HEADER END
22 # Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 # Use is subject to license terms.
27 include ../Makefile.master
29 # Note that libcurses installs commands along with its library.
30 # This is a minor bug which probably should be fixed.
31 # Note also that a few extra libraries are kept in cmd source.
33 # Certain libraries are linked with, hence depend on, other libraries.
35 # Although we have historically used .WAIT to express dependencies, it
36 # reduces the amount of parallelism and thus lengthens the time it
37 # takes to build the libraries. Thus, we now require that any new
38 # libraries explicitly call out their dependencies. Eventually, all
39 # the library dependencies will be called out explicitly. See
40 # "Library interdependencies" near the end of this file.
42 # Aside from explicit dependencies (and legacy .WAITs), all libraries
43 # are built in parallel.
45 .PARALLEL:
48 # The $(CLOSED_BUILD) additions to SUBDIRS & MSGSUBDIRS are unfortunate,
49 # but required due to the "dependencies" of using .WAIT to barrier the
50 # parallel dmake builds. once 4631488 has been fixed, they can be
51 # consolidated into one $(CLOSED_BUILD)SUBDIRS += (all closed libs) as
52 # shown in HDRSUBDIRS
54 SUBDIRS= \
55 common .WAIT \
56 ../cmd/sgs/libconv \
57 ../cmd/sgs/libdl .WAIT
59 $(CLOSED_BUILD)SUBDIRS += \
60 $(CLOSED)/lib/libc_i18n
62 SUBDIRS += \
63 libc .WAIT \
64 ../cmd/sgs/libelf .WAIT \
65 c_synonyms \
66 libmd \
67 libmd5 \
68 librsm \
69 libmp .WAIT \
70 libnsl \
71 libsecdb .WAIT \
72 librpcsvc \
73 libsocket .WAIT \
74 libsctp \
75 libsip \
76 libcommputil \
77 libresolv \
78 libresolv2 .WAIT \
79 libw .WAIT \
80 libintl .WAIT \
81 ../cmd/sgs/librtld_db \
82 libaio \
83 libast \
84 libdll \
85 libcmd \
86 libshell \
87 libsum \
88 librt \
89 libadm \
90 libctf \
91 libdtrace \
92 libdtrace_jni \
93 libcurses \
94 libgen \
95 libgss \
96 libpam \
97 libuuid \
98 libthread \
99 libpthread .WAIT \
100 libslp \
101 libbsdmalloc \
102 libdoor \
103 libdevinfo \
104 libdladm \
105 libdlpi \
106 libeti \
107 libcrypt \
108 libdns_sd \
109 libefi \
110 libfstyp \
111 libwanboot \
112 libwanbootutil \
113 libcryptoutil \
114 libinetcfg \
115 libinetutil \
116 libipmp \
117 libiscsit \
118 libiscsitgt \
119 libkmf \
120 libkstat \
121 libkvm \
122 liblm \
123 libmalloc \
124 libmapmalloc \
125 libmtmalloc \
126 libnls \
127 libnwam \
128 libsmbios \
129 libtecla \
130 libumem \
131 libnvpair .WAIT \
132 libexacct \
133 libplot \
134 libldap4 \
135 libsasl \
136 libldap5 \
137 libsldap .WAIT \
138 libbsm \
139 libsys \
140 libsysevent \
141 libnisdb \
142 libpool \
143 libpp \
144 libproc \
145 libproject \
146 libsendfile \
147 nametoaddr \
148 ncad_addr \
149 hbaapi \
150 sun_fc \
151 gss_mechs/mech_krb5 .WAIT \
152 libkrb5 .WAIT \
153 krb5 .WAIT \
154 libsmbfs \
155 libstmf \
156 libnsctl \
157 libunistat \
158 libdscfg \
159 librdc
160 $(CLOSED_BUILD)SUBDIRS += \
161 $(CLOSED)/lib/smartcard
162 SUBDIRS += \
163 passwdutil \
164 pam_modules \
165 crypt_modules \
166 libadt_jni \
167 abi \
168 auditd_plugins \
169 libvolmgt \
170 libdevice \
171 libdevid \
172 libdhcpsvc \
173 libc_db \
174 libndmp \
175 libsec \
176 libtnfprobe \
177 libtnf \
178 libtnfctl \
179 libdhcpagent \
180 libdhcpdu \
181 libdhcputil \
182 libipsecutil
183 $(CLOSED_BUILD)SUBDIRS += \
184 $(CLOSED)/lib/libike
185 SUBDIRS += \
186 nsswitch \
187 print \
188 libuutil \
189 libscf \
190 libinetsvc \
191 librestart \
192 libsched \
193 libelfsign \
194 pkcs11 .WAIT \
195 libpctx .WAIT \
196 libcpc \
197 watchmalloc \
198 extendedFILE \
199 madv \
200 mpss \
201 libdisasm \
202 libwrap \
203 libxcurses \
204 libxcurses2 \
205 libxnet \
206 libbrand .WAIT \
207 libzonecfg \
208 libzoneinfo \
209 libtsnet \
210 libtsol \
211 gss_mechs/mech_spnego \
212 gss_mechs/mech_dummy \
213 gss_mechs/mech_dh \
214 rpcsec_gss \
215 libraidcfg .WAIT \
216 librcm .WAIT \
217 libcfgadm .WAIT \
218 libpicl .WAIT \
219 libpicltree .WAIT \
220 raidcfg_plugins \
221 cfgadm_plugins \
222 libmail \
223 lvm \
224 libsmedia \
225 libipp \
226 openssl \
227 libdiskmgt \
228 liblgrp \
229 libfsmgt \
230 fm \
231 libavl \
232 libcmdutils \
233 libcontract \
234 ../cmd/sendmail/libmilter \
235 sasl_plugins \
236 udapl \
237 libzpool \
238 libzfs \
239 libzfs_jni \
240 libmapid \
241 brand \
242 policykit \
243 hal \
244 libshare \
245 libsqlite \
246 libidmap \
247 libadutils \
248 libipmi \
249 libexacct/demo \
250 libvscan \
251 smbsrv \
252 scsi \
253 mms \
254 libima \
255 libsun_ima \
256 mpapi \
257 $($(MACH)_SUBDIRS)
259 sparc_SUBDIRS= .WAIT \
260 efcode \
261 libc_psr .WAIT \
262 libds \
263 libdscp \
264 libprtdiag .WAIT \
265 libprtdiag_psr \
266 libpri \
267 librsc \
268 libfruutils .WAIT \
269 libfru \
270 storage \
271 libpcp \
272 libtsalarm
274 FM_sparc_DEPLIBS= libpri
276 fm: \
277 libexacct \
278 libipmi \
279 libzfs \
280 scsi \
281 $(FM_$(MACH)_DEPLIBS)
284 # Create a special version of $(SUBDIRS) with no .WAIT's, for use with the
285 # clean and clobber targets (for more information, see those targets, below).
287 NOWAIT_SUBDIRS= $(SUBDIRS:.WAIT=)
289 DCSUBDIRS = \
292 MSGSUBDIRS= \
293 abi \
294 auditd_plugins \
295 brand \
296 cfgadm_plugins \
297 gss_mechs/mech_dh \
298 gss_mechs/mech_krb5 \
299 krb5 \
300 libast \
301 libbsm \
302 libc \
303 libcfgadm \
304 libcmd \
305 libcontract \
306 libcurses \
307 libdhcpsvc \
308 libdhcputil \
309 libipsecutil \
310 libdiskmgt \
311 libdladm \
312 libdll \
313 libgss \
314 libidmap \
315 libinetcfg \
316 libipmp \
317 libnsl \
318 libpam \
319 libpicl \
320 libpool \
321 libpp \
322 libscf \
323 libsasl \
324 libldap5 \
325 libsecdb \
326 libshare \
327 libshell \
328 libsldap \
329 libslp \
330 libsmbfs \
331 libsmedia \
332 libsum \
333 libtsol \
334 libuutil \
335 libvscan \
336 libwanboot \
337 libwanbootutil \
338 libzfs \
339 libzonecfg \
340 lvm \
341 madv \
342 mms \
343 mpss \
344 pam_modules \
345 rpcsec_gss
346 $(CLOSED_BUILD)MSGSUBDIRS += \
347 $(CLOSED)/lib/smartcard
348 MSGSUBDIRS += \
349 $($(MACH)_MSGSUBDIRS)
351 sparc_MSGSUBDIRS= \
352 libprtdiag \
353 libprtdiag_psr
355 HDRSUBDIRS= \
356 auditd_plugins \
357 libast \
358 libbrand \
359 libbsm \
360 libc \
361 libcmd \
362 libcmdutils \
363 libcontract \
364 libcpc \
365 libctf \
366 libcurses \
367 libcryptoutil \
368 libdevice \
369 libdevid \
370 libdevinfo \
371 libdiskmgt \
372 libdladm \
373 libdll \
374 libdlpi \
375 libdhcpagent \
376 libdhcpsvc \
377 libdhcputil \
378 libdisasm \
379 libdns_sd \
380 libdscfg \
381 libdtrace \
382 libdtrace_jni \
383 libelfsign \
384 libeti \
385 libfstyp \
386 libgen \
387 libwanboot \
388 libwanbootutil \
389 libipsecutil \
390 libinetcfg \
391 libinetsvc \
392 libinetutil \
393 libipmi \
394 libipmp \
395 libipp \
396 libiscsit \
397 libiscsitgt \
398 libkstat \
399 libkvm \
400 libmail \
401 libmd \
402 libmtmalloc \
403 libndmp \
404 libnvpair \
405 libnsctl \
406 libnsl \
407 libnwam \
408 libpam \
409 libpctx \
410 libpicl \
411 libpicltree \
412 libplot \
413 libpool \
414 libpp \
415 libproc \
416 libraidcfg \
417 librcm \
418 librdc \
419 libscf \
420 libsip \
421 libcommputil \
422 libsmbios \
423 librestart \
424 librpcsvc \
425 librsm \
426 libsasl \
427 libsec \
428 libshell \
429 libslp \
430 libsmedia \
431 libsqlite \
432 libstmf \
433 libsum \
434 libsysevent \
435 libtecla \
436 libtnf \
437 libtnfctl \
438 libtnfprobe \
439 libtsnet \
440 libtsol \
441 libvolmgt \
442 libumem \
443 libunistat \
444 libuutil \
445 libwrap \
446 libxcurses2 \
447 libzfs \
448 libzfs_jni \
449 libzoneinfo \
450 hal \
451 policykit \
452 lvm \
453 openssl \
454 pkcs11 \
455 passwdutil \
456 ../cmd/sendmail/libmilter \
457 fm \
458 udapl \
459 libmapid \
460 libkrb5 \
461 libshare \
462 libidmap \
463 libvscan \
464 smbsrv \
465 scsi \
466 hbaapi \
467 libima \
468 libsun_ima \
469 mpapi \
470 mms \
471 $($(MACH)_HDRSUBDIRS)
473 $(CLOSED_BUILD)HDRSUBDIRS += \
474 $(CLOSED)/lib/libc_i18n \
475 $(CLOSED)/lib/libike \
476 $(CLOSED)/lib/smartcard
478 sparc_HDRSUBDIRS= \
479 libds \
480 libdscp \
481 libpri \
482 storage
484 all := TARGET= all
485 check := TARGET= check
486 clean := TARGET= clean
487 clobber := TARGET= clobber
488 install := TARGET= install
489 install_h := TARGET= install_h
490 lint := TARGET= lint
491 _dc := TARGET= _dc
492 _msg := TARGET= _msg
494 .KEEP_STATE:
497 # For the all and install targets, we clearly must respect library
498 # dependencies so that the libraries link correctly. However, for
499 # the remaining targets (check, clean, clobber, install_h, lint, _dc
500 # and _msg), libraries do not have any dependencies on one another
501 # and thus respecting dependencies just slows down the build.
502 # As such, for these rules, we use pattern replacement to explicitly
503 # avoid triggering the dependency information. Note that for clean,
504 # clobber and lint, we must use $(NOWAIT_SUBDIRS) rather than
505 # $(SUBDIRS), to prevent `.WAIT' from expanding to `.WAIT-nodepend'.
508 all: $(SUBDIRS)
510 install: $(SUBDIRS) .WAIT install_extra
512 # extra libraries kept in other source areas
513 install_extra:
514 @cd ../cmd/sgs; pwd; $(MAKE) install_lib
515 @pwd
517 clean clobber lint: $(NOWAIT_SUBDIRS:%=%-nodepend)
519 install_h check: $(HDRSUBDIRS:%=%-nodepend)
521 _msg: $(MSGSUBDIRS:%=%-nodepend) .WAIT _dc
523 _dc: $(DCSUBDIRS:%=%-nodepend)
525 # dependencies for pam_modules (see below)
526 $(CLOSED_BUILD)SMARTCARD= $(CLOSED)/lib/smartcard
529 # Library interdependencies are called out explicitly here
531 auditd_plugins: libbsm libnsl libsecdb
532 gss_mechs/mech_krb5: libgss libnsl libsocket libresolv pkcs11
533 libadt_jni: libbsm
534 $(CLOSED_BUILD)libc: $(CLOSED)/lib/libc_i18n
535 libast: libsocket
536 libadutils: libldap5 libresolv libsocket libnsl
537 nsswitch: libadutils libidmap
538 libbsm: libtsol
539 libcmd: libsum libast libsocket libnsl
540 libcmdutils: libavl
541 libcontract: libnvpair
542 libdevid: libdevinfo
543 libdevinfo: libnvpair libsec
544 libdhcpagent: libsocket libdhcputil libuuid libdlpi
545 libdhcpsvc: libinetutil
546 libdhcputil: libnsl libgen libinetutil libdlpi
547 libdladm: libdevinfo libinetutil libsocket libnsl libexacct libscf
548 libdll: libast
549 libdlpi: libinetutil libdladm
550 libdscfg: libnsctl libunistat libsocket libnsl
551 libdtrace: libproc libgen libctf
552 libdtrace_jni: libuutil libdtrace
553 libefi: libuuid
554 libfstyp: libnvpair
555 libelfsign: libcryptoutil libkmf
556 libidmap: libadutils libldap5 libavl libsldap
557 libinetcfg: libnsl libsocket libdlpi
558 libiscsit: libc libnvpair libstmf libuuid libnsl
559 libkmf: libcryptoutil pkcs11 openssl
560 libnsl: libmd5 libscf
561 libmapid: libresolv
562 libnwam: libdoor
563 librdc: libsocket libnsl libnsctl libunistat libdscfg
564 libuuid: libdlpi
565 libinetutil: libsocket
566 libsecdb: libnsl
567 libsasl: libgss libsocket pkcs11 libmd
568 sasl_plugins: pkcs11 libgss libsocket libsasl
569 libsctp: libsocket
570 libshell: libast libcmd libdll libsocket libsecdb
571 libsip: libmd5
572 libsmbfs: libsocket libnsl libkrb5
573 libsocket: libnsl
574 libsum: libast
575 libldap5: libsasl libsocket libnsl libmd
576 libsldap: libldap5 libtsol libnsl libc libscf libresolv
577 libpool: libnvpair libexacct
578 libpp: libast
579 libzonecfg: libc libsocket libnsl libuuid libnvpair libsysevent libsec \
580 libbrand libpool libscf
581 libproc: ../cmd/sgs/librtld_db ../cmd/sgs/libelf libctf
582 libproject: libpool libproc libsecdb
583 libtsnet: libnsl libtsol libsecdb
584 libwrap: libnsl libsocket
585 libwanboot: libnvpair libresolv libnsl libsocket libdevinfo libinetutil \
586 libdhcputil openssl
587 libwanbootutil: libnsl
588 pam_modules: libproject passwdutil $(SMARTCARD) smbsrv
589 libscf: libuutil libmd libgen
590 libinetsvc: libscf
591 librestart: libuutil libscf
592 ../cmd/sgs/libdl: ../cmd/sgs/libconv
593 ../cmd/sgs/libelf: ../cmd/sgs/libconv
594 pkcs11: libcryptoutil
595 print: libldap5
596 udapl/udapl_tavor: udapl/libdat
597 libzfs: libdevinfo libdevid libgen libnvpair libuutil libiscsitgt
598 libzfs_jni: libdiskmgt libnvpair libzfs
599 libzpool: libavl libumem libnvpair
600 libsec: libavl libidmap
601 brand: libc libsocket
602 libshare: libscf libzfs libuuid libfsmgt libsecdb libumem libsmbfs
603 libexacct/demo: libexacct libproject libsocket libnsl
604 libtsalarm: libpcp
605 smbsrv: libsocket libnsl libmd libxnet libpthread librt \
606 libshare libidmap pkcs11 libsqlite
607 libvscan: libscf
608 scsi: libnvpair
609 mpapi: libpthread libdevinfo libsysevent libnvpair
612 # The reason this rule checks for the existence of the
613 # Makefile is that some of the directories do not exist
614 # in certain situations (e.g., exportable source builds,
615 # OpenSolaris).
617 $(SUBDIRS): FRC
618 @if [ -f $@/Makefile ]; then \
619 cd $@; pwd; $(MAKE) $(TARGET); \
620 else \
621 true; \
624 $(SUBDIRS:%=%-nodepend):
625 @if [ -f $(@:%-nodepend=%)/Makefile ]; then \
626 cd $(@:%-nodepend=%); pwd; $(MAKE) $(TARGET); \
627 else \
628 true; \
631 FRC: