6809997 COMSTAR iscsi target DTrace Provider needed
[illumos-gate.git] / usr / src / lib / Makefile
blob5d7a30377bd02b87fb51c92782c1889bc7b243f8
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 libfcoe \
156 libstmf \
157 libnsctl \
158 libunistat \
159 libdscfg \
160 librdc
161 $(CLOSED_BUILD)SUBDIRS += \
162 $(CLOSED)/lib/smartcard
163 SUBDIRS += \
164 passwdutil \
165 pam_modules \
166 crypt_modules \
167 libadt_jni \
168 abi \
169 auditd_plugins \
170 libvolmgt \
171 libdevice \
172 libdevid \
173 libdhcpsvc \
174 libc_db \
175 libndmp \
176 libsec \
177 libtnfprobe \
178 libtnf \
179 libtnfctl \
180 libdhcpagent \
181 libdhcpdu \
182 libdhcputil \
183 libipsecutil
184 $(CLOSED_BUILD)SUBDIRS += \
185 $(CLOSED)/lib/libike
186 SUBDIRS += \
187 nsswitch \
188 print \
189 libuutil \
190 libscf \
191 libinetsvc \
192 librestart \
193 libsched \
194 libelfsign \
195 openssl \
196 pkcs11 .WAIT \
197 libpctx .WAIT \
198 libcpc \
199 watchmalloc \
200 extendedFILE \
201 madv \
202 mpss \
203 libdisasm \
204 libwrap \
205 libxcurses \
206 libxcurses2 \
207 libxnet \
208 libbrand .WAIT \
209 libzonecfg \
210 libzoneinfo \
211 libtsnet \
212 libtsol \
213 gss_mechs/mech_spnego \
214 gss_mechs/mech_dummy \
215 gss_mechs/mech_dh \
216 rpcsec_gss \
217 libraidcfg .WAIT \
218 librcm .WAIT \
219 libcfgadm .WAIT \
220 libpicl .WAIT \
221 libpicltree .WAIT \
222 raidcfg_plugins \
223 cfgadm_plugins \
224 libmail \
225 lvm \
226 libsmedia \
227 libipp \
228 libdiskmgt \
229 liblgrp \
230 libfsmgt \
231 fm \
232 libavl \
233 libcmdutils \
234 libcontract \
235 ../cmd/sendmail/libmilter \
236 sasl_plugins \
237 udapl \
238 libzpool \
239 libzfs \
240 libzfs_jni \
241 pyzfs \
242 libmapid \
243 brand \
244 policykit \
245 hal \
246 libshare \
247 libsqlite \
248 libidmap \
249 libadutils \
250 libipmi \
251 libexacct/demo \
252 libvscan \
253 libgrubmgmt \
254 smbsrv \
255 scsi \
256 mms \
257 libima \
258 libsun_ima \
259 mpapi \
260 $($(MACH)_SUBDIRS)
262 i386_SUBDIRS= \
263 libntfs \
264 libparted
266 sparc_SUBDIRS= .WAIT \
267 efcode \
268 libc_psr .WAIT \
269 libds \
270 libdscp \
271 libprtdiag .WAIT \
272 libprtdiag_psr \
273 libpri \
274 librsc \
275 libfruutils .WAIT \
276 libfru \
277 storage \
278 libpcp \
279 libtsalarm
281 FM_sparc_DEPLIBS= libpri
283 fm: \
284 libexacct \
285 libipmi \
286 libzfs \
287 scsi \
288 $(FM_$(MACH)_DEPLIBS)
291 # Create a special version of $(SUBDIRS) with no .WAIT's, for use with the
292 # clean and clobber targets (for more information, see those targets, below).
294 NOWAIT_SUBDIRS= $(SUBDIRS:.WAIT=)
296 DCSUBDIRS = \
299 MSGSUBDIRS= \
300 abi \
301 auditd_plugins \
302 brand \
303 cfgadm_plugins \
304 gss_mechs/mech_dh \
305 gss_mechs/mech_krb5 \
306 krb5 \
307 libast \
308 libbsm \
309 libc \
310 libcfgadm \
311 libcmd \
312 libcontract \
313 libcurses \
314 libdhcpsvc \
315 libdhcputil \
316 libipsecutil \
317 libdiskmgt \
318 libdladm \
319 libdll \
320 libgrubmgmt \
321 libgss \
322 libidmap \
323 libinetcfg \
324 libipmp \
325 libinetutil \
326 libnsl \
327 libpam \
328 libpicl \
329 libpool \
330 libpp \
331 libscf \
332 libsasl \
333 libldap5 \
334 libsecdb \
335 libshare \
336 libshell \
337 libsldap \
338 libslp \
339 libsmbfs \
340 libsmedia \
341 libsum \
342 libtsol \
343 libuutil \
344 libvscan \
345 libwanboot \
346 libwanbootutil \
347 libzfs \
348 libzonecfg \
349 lvm \
350 madv \
351 mms \
352 mpss \
353 pam_modules \
354 pyzfs \
355 rpcsec_gss
356 $(CLOSED_BUILD)MSGSUBDIRS += \
357 $(CLOSED)/lib/smartcard
358 MSGSUBDIRS += \
359 $($(MACH)_MSGSUBDIRS)
361 sparc_MSGSUBDIRS= \
362 libprtdiag \
363 libprtdiag_psr
365 HDRSUBDIRS= \
366 auditd_plugins \
367 libast \
368 libbrand \
369 libbsm \
370 libc \
371 libcmd \
372 libcmdutils \
373 libcontract \
374 libcpc \
375 libctf \
376 libcurses \
377 libcryptoutil \
378 libdevice \
379 libdevid \
380 libdevinfo \
381 libdiskmgt \
382 libdladm \
383 libdll \
384 libdlpi \
385 libdhcpagent \
386 libdhcpsvc \
387 libdhcputil \
388 libdisasm \
389 libdns_sd \
390 libdscfg \
391 libdtrace \
392 libdtrace_jni \
393 libelfsign \
394 libeti \
395 libfstyp \
396 libgen \
397 libwanboot \
398 libwanbootutil \
399 libipsecutil \
400 libinetcfg \
401 libinetsvc \
402 libinetutil \
403 libipmi \
404 libipmp \
405 libipp \
406 libiscsit \
407 libiscsitgt \
408 libkstat \
409 libkvm \
410 libmail \
411 libmd \
412 libmtmalloc \
413 libndmp \
414 libnvpair \
415 libnsctl \
416 libnsl \
417 libnwam \
418 libpam \
419 libpctx \
420 libpicl \
421 libpicltree \
422 libplot \
423 libpool \
424 libpp \
425 libproc \
426 libraidcfg \
427 librcm \
428 librdc \
429 libscf \
430 libsip \
431 libcommputil \
432 libsmbios \
433 librestart \
434 librpcsvc \
435 librsm \
436 libsasl \
437 libsec \
438 libshell \
439 libslp \
440 libsmedia \
441 libsqlite \
442 libfcoe \
443 libstmf \
444 libsum \
445 libsysevent \
446 libtecla \
447 libtnf \
448 libtnfctl \
449 libtnfprobe \
450 libtsnet \
451 libtsol \
452 libvolmgt \
453 libumem \
454 libunistat \
455 libuutil \
456 libwrap \
457 libxcurses2 \
458 libzfs \
459 libzfs_jni \
460 libzoneinfo \
461 hal \
462 policykit \
463 lvm \
464 openssl \
465 pkcs11 \
466 passwdutil \
467 ../cmd/sendmail/libmilter \
468 fm \
469 udapl \
470 libmapid \
471 libkrb5 \
472 libshare \
473 libidmap \
474 libvscan \
475 libgrubmgmt \
476 smbsrv \
477 scsi \
478 hbaapi \
479 libima \
480 libsun_ima \
481 mpapi \
482 mms \
483 $($(MACH)_HDRSUBDIRS)
485 $(CLOSED_BUILD)HDRSUBDIRS += \
486 $(CLOSED)/lib/libc_i18n \
487 $(CLOSED)/lib/libike \
488 $(CLOSED)/lib/smartcard
490 sparc_HDRSUBDIRS= \
491 libds \
492 libdscp \
493 libpri \
494 storage
496 all := TARGET= all
497 check := TARGET= check
498 clean := TARGET= clean
499 clobber := TARGET= clobber
500 install := TARGET= install
501 install_h := TARGET= install_h
502 lint := TARGET= lint
503 _dc := TARGET= _dc
504 _msg := TARGET= _msg
506 .KEEP_STATE:
509 # For the all and install targets, we clearly must respect library
510 # dependencies so that the libraries link correctly. However, for
511 # the remaining targets (check, clean, clobber, install_h, lint, _dc
512 # and _msg), libraries do not have any dependencies on one another
513 # and thus respecting dependencies just slows down the build.
514 # As such, for these rules, we use pattern replacement to explicitly
515 # avoid triggering the dependency information. Note that for clean,
516 # clobber and lint, we must use $(NOWAIT_SUBDIRS) rather than
517 # $(SUBDIRS), to prevent `.WAIT' from expanding to `.WAIT-nodepend'.
520 all: $(SUBDIRS)
522 install: $(SUBDIRS) .WAIT install_extra
524 # extra libraries kept in other source areas
525 install_extra:
526 @cd ../cmd/sgs; pwd; $(MAKE) install_lib
527 @pwd
529 clean clobber lint: $(NOWAIT_SUBDIRS:%=%-nodepend)
531 install_h check: $(HDRSUBDIRS:%=%-nodepend)
533 _msg: $(MSGSUBDIRS:%=%-nodepend) .WAIT _dc
535 _dc: $(DCSUBDIRS:%=%-nodepend)
537 # dependencies for pam_modules (see below)
538 $(CLOSED_BUILD)SMARTCARD= $(CLOSED)/lib/smartcard
541 # Library interdependencies are called out explicitly here
543 auditd_plugins: libbsm libnsl libsecdb
544 gss_mechs/mech_krb5: libgss libnsl libsocket libresolv pkcs11
545 libadt_jni: libbsm
546 $(CLOSED_BUILD)libc: $(CLOSED)/lib/libc_i18n
547 libast: libsocket
548 libadutils: libldap5 libresolv libsocket libnsl
549 nsswitch: libadutils libidmap
550 libbsm: libtsol
551 libcmd: libsum libast libsocket libnsl
552 libcmdutils: libavl
553 libcontract: libnvpair
554 libdevid: libdevinfo
555 libdevinfo: libnvpair libsec
556 libdhcpagent: libsocket libdhcputil libuuid libdlpi libcontract
557 libdhcpsvc: libinetutil
558 libdhcputil: libnsl libgen libinetutil libdlpi
559 libdladm: libdevinfo libinetutil libsocket libscf librcm libnvpair \
560 libexacct libnsl libkstat libcurses
561 libdll: libast
562 libdlpi: libinetutil libdladm
563 libdscfg: libnsctl libunistat libsocket libnsl
564 libdtrace: libproc libgen libctf
565 libdtrace_jni: libuutil libdtrace
566 libefi: libuuid
567 libfstyp: libnvpair
568 libelfsign: libcryptoutil libkmf
569 libidmap: libadutils libldap5 libavl libsldap
570 libinetcfg: libnsl libsocket libdlpi
571 libiscsit: libc libnvpair libstmf libuuid libnsl
572 libkmf: libcryptoutil pkcs11 openssl
573 libnsl: libmd5 libscf
574 libmapid: libresolv
575 libnwam: libdoor
576 librdc: libsocket libnsl libnsctl libunistat libdscfg
577 libuuid: libdlpi
578 libinetutil: libsocket
579 libsecdb: libnsl
580 libsasl: libgss libsocket pkcs11 libmd
581 sasl_plugins: pkcs11 libgss libsocket libsasl
582 libsctp: libsocket
583 libshell: libast libcmd libdll libsocket libsecdb
584 libsip: libmd5
585 libsmbfs: libsocket libnsl libkrb5
586 libsocket: libnsl
587 libsum: libast
588 libldap5: libsasl libsocket libnsl libmd
589 libsldap: libldap5 libtsol libnsl libc libscf libresolv
590 libpool: libnvpair libexacct
591 libpp: libast
592 libzonecfg: libc libsocket libnsl libuuid libnvpair libsysevent libsec \
593 libbrand libpool libscf
594 libproc: ../cmd/sgs/librtld_db ../cmd/sgs/libelf libctf
595 libproject: libpool libproc libsecdb
596 libtsnet: libnsl libtsol libsecdb
597 libwrap: libnsl libsocket
598 libwanboot: libnvpair libresolv libnsl libsocket libdevinfo libinetutil \
599 libdhcputil openssl
600 libwanbootutil: libnsl
601 pam_modules: libproject passwdutil $(SMARTCARD) smbsrv
602 libscf: libuutil libmd libgen libsmbios
603 libinetsvc: libscf
604 librestart: libuutil libscf
605 ../cmd/sgs/libdl: ../cmd/sgs/libconv
606 ../cmd/sgs/libelf: ../cmd/sgs/libconv
607 pkcs11: libcryptoutil openssl
608 print: libldap5
609 udapl/udapl_tavor: udapl/libdat
610 libzfs: libdevinfo libdevid libgen libnvpair libuutil libiscsitgt \
611 libavl libefi libidmap libsec
612 libzfs_jni: libdiskmgt libnvpair libzfs
613 libzpool: libavl libumem libnvpair
614 libsec: libavl libidmap
615 brand: libc libsocket
616 libshare: libscf libzfs libuuid libfsmgt libsecdb libumem libsmbfs
617 libexacct/demo: libexacct libproject libsocket libnsl
618 libtsalarm: libpcp
619 smbsrv: libsocket libnsl libmd libxnet libpthread librt \
620 libshare libidmap pkcs11 libsqlite
621 libvscan: libscf
622 scsi: libnvpair
623 mpapi: libpthread libdevinfo libsysevent libnvpair
624 libgrubmgmt: libdevinfo libzfs libfstyp
625 pyzfs: libnvpair libsec libidmap libzfs
628 # The reason this rule checks for the existence of the
629 # Makefile is that some of the directories do not exist
630 # in certain situations (e.g., exportable source builds,
631 # OpenSolaris).
633 $(SUBDIRS): FRC
634 @if [ -f $@/Makefile ]; then \
635 cd $@; pwd; $(MAKE) $(TARGET); \
636 else \
637 true; \
640 $(SUBDIRS:%=%-nodepend):
641 @if [ -f $(@:%-nodepend=%)/Makefile ]; then \
642 cd $(@:%-nodepend=%); pwd; $(MAKE) $(TARGET); \
643 else \
644 true; \
647 FRC: