remove pyzfs
[unleashed.git] / usr / src / lib / Makefile
blob2725442c7fbf02ee04a7a2725bf52ce7b3050087
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
23 # Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
24 # Copyright (c) 2012 by Delphix. All rights reserved.
25 # Copyright 2015, Joyent, Inc.
26 # Copyright (c) 2013 Gary Mills
27 # Copyright 2014 Garrett D'Amore <garrett@damore.org>
28 # Copyright (c) 2015 Gary Mills
29 # Copyright 2016 Toomas Soome <tsoome@me.com>
30 # Copyright 2018 Nexenta Systems, Inc.
31 # Copyright (c) 2016, Chris Fraire <cfraire@me.com>.
34 include ../Makefile.master
36 # Note that libcurses installs commands along with its library.
37 # This is a minor bug which probably should be fixed.
38 # Note also that a few extra libraries are kept in cmd source.
40 # Certain libraries are linked with, hence depend on, other libraries.
41 # Library dependencies are called out explicitly, see "Library
42 # interdependencies" below.
43 .PARALLEL:
45 # Build libc and its dependencies
46 SUBDIRS= \
47 crt \
48 ../cmd/sgs/libconv \
49 ../cmd/sgs/libdl \
50 libc \
51 .WAIT
53 # Build libraries with lots of dependents
54 SUBDIRS += \
55 libm \
56 libmd \
57 libmp \
58 libnsl \
59 libnvpair \
60 .WAIT
62 # Build everything else. Aside from explicit dependencies, all libraries
63 # are built in parallel.
64 SUBDIRS += \
65 ../cmd/sgs/libelf \
66 ../cmd/sgs/librtld_db \
67 abi \
68 auditd_plugins \
69 brand \
70 cfgadm_plugins \
71 crypt_modules \
72 extendedFILE \
73 fm \
74 getloginx \
75 gss_mechs/mech_dh \
76 gss_mechs/mech_dummy \
77 gss_mechs/mech_krb5 \
78 gss_mechs/mech_spnego \
79 hal \
80 hbaapi \
81 krb5 \
82 libadm \
83 libads \
84 libadutils \
85 libaio \
86 libast \
87 libavl \
88 libbe \
89 libbrand \
90 libbsdmalloc \
91 libbsm \
92 libc_db \
93 libcfgadm \
94 libcmd \
95 libcmdutils \
96 libcommputil \
97 libcontract \
98 libcpc \
99 libcrypt \
100 libcryptoutil \
101 libctf \
102 libdevice \
103 libdevid \
104 libdevinfo \
105 libdhcpagent \
106 libdhcputil \
107 libdisasm \
108 libdiskmgt \
109 libdladm \
110 libdll \
111 libdlpi \
112 libdns_sd \
113 libdoor \
114 libdtrace \
115 libdwarf \
116 libefi \
117 libelfsign \
118 libeti \
119 libexacct \
120 libexacct/demo \
121 libfcoe \
122 libficl \
123 libfru \
124 libfruutils \
125 libfsmgt \
126 libfstyp \
127 libgen \
128 libgss \
129 libhotplug \
130 libidmap \
131 libilb \
132 libima \
133 libinetsvc \
134 libinetutil \
135 libintl \
136 libipadm \
137 libipd \
138 libipmi \
139 libipmp \
140 libipp \
141 libipsecutil \
142 libiscsit \
143 libkmf \
144 libkrb5 \
145 libkstat \
146 libkvm \
147 libldap5 \
148 liblgrp \
149 liblm \
150 libmail \
151 libmalloc \
152 libmapid \
153 libmapmalloc \
154 libmd5 \
155 libmlrpc \
156 libmtmalloc \
157 libmvec \
158 libndmp \
159 libnisdb \
160 libnls \
161 libnwam \
162 libofmt \
163 libpam \
164 libpcidb \
165 libpctx \
166 libpicl \
167 libpicltree \
168 libpool \
169 libpp \
170 libproc \
171 libproject \
172 libpthread \
173 libraidcfg \
174 librcm \
175 libreparse \
176 libresolv \
177 libresolv2 \
178 librestart \
179 librpcsvc \
180 librsm \
181 librstp \
182 librt \
183 libsasl \
184 libscf \
185 libsched \
186 libsctp \
187 libsec \
188 libsecdb \
189 libsendfile \
190 libsff \
191 libshare \
192 libshell \
193 libsip \
194 libsldap \
195 libsmbfs \
196 libsmbios \
197 libsmedia \
198 libsqlite \
199 libsrpt \
200 libstmf \
201 libsum \
202 libsun_ima \
203 libsys \
204 libsysevent \
205 libtecla \
206 libthread \
207 libumem \
208 libuuid \
209 libvolmgt \
210 libvrrpadm \
211 libvscan \
212 libw \
213 libwrap \
214 libzfs \
215 libzfs_core \
216 libzonecfg \
217 libzonestat \
218 libzpool \
219 madv \
220 mpapi \
221 mpss \
222 nametoaddr \
223 ncad_addr \
224 nsswitch \
225 pam_modules \
226 passwdutil \
227 pkcs11 \
228 policykit \
229 pylibbe \
230 pysolaris \
231 raidcfg_plugins \
232 rpcsec_gss \
233 sasl_plugins \
234 scsi \
235 smbsrv \
236 smhba \
237 sun_fc \
238 sun_sas \
239 udapl \
240 watchmalloc \
241 $($(MACH)_SUBDIRS)
243 i386_SUBDIRS= \
244 libfdisk \
245 libsaveargs
247 sparc_SUBDIRS= \
248 efcode \
249 libds \
250 libdscp \
251 libprtdiag \
252 libprtdiag_psr \
253 libpri \
254 librsc \
255 storage \
256 libpcp \
257 libtsalarm \
258 libv12n
261 # Create a special version of $(SUBDIRS) with no .WAIT's, for use with the
262 # clean and clobber targets (for more information, see those targets, below).
264 NOWAIT_SUBDIRS= $(SUBDIRS:.WAIT=)
266 DCSUBDIRS=
268 MSGSUBDIRS= \
269 abi \
270 auditd_plugins \
271 brand \
272 cfgadm_plugins \
273 gss_mechs/mech_dh \
274 gss_mechs/mech_krb5 \
275 krb5 \
276 libast \
277 libbsm \
278 libc \
279 libcfgadm \
280 libcmd \
281 libcontract \
282 libdhcputil \
283 libdiskmgt \
284 libdladm \
285 libdll \
286 libgss \
287 libidmap \
288 libilb \
289 libipadm \
290 libipmp \
291 libipsecutil \
292 libldap5 \
293 libnwam \
294 libofmt \
295 libpam \
296 libpicl \
297 libpool \
298 libpp \
299 libreparse \
300 libsasl \
301 libscf \
302 libsecdb \
303 libshare \
304 libshell \
305 libsldap \
306 libsmbfs \
307 libsmedia \
308 libsum \
309 libvrrpadm \
310 libvscan \
311 libzfs \
312 libzonecfg \
313 madv \
314 mpss \
315 pam_modules \
316 rpcsec_gss \
317 $($(MACH)_MSGSUBDIRS)
319 sparc_MSGSUBDIRS= \
320 libprtdiag \
321 libprtdiag_psr
323 i386_MSGSUBDIRS= libfdisk
325 HDRSUBDIRS= \
326 auditd_plugins \
327 fm \
328 hal \
329 hbaapi \
330 libads \
331 libast \
332 libbrand \
333 libbsm \
334 libc \
335 libcmd \
336 libcmdutils \
337 libcommputil \
338 libcontract \
339 libcpc \
340 libcryptoutil \
341 libctf \
342 libdevice \
343 libdevid \
344 libdevinfo \
345 libdhcpagent \
346 libdhcputil \
347 libdisasm \
348 libdiskmgt \
349 libdwarf \
350 libdladm \
351 libdll \
352 libdlpi \
353 libdns_sd \
354 libdtrace \
355 libelfsign \
356 libeti \
357 libfcoe \
358 libfru \
359 libfstyp \
360 libgen \
361 libidmap \
362 libilb \
363 libima \
364 libinetsvc \
365 libinetutil \
366 libipadm \
367 libipd \
368 libipmi \
369 libipmp \
370 libipp \
371 libipsecutil \
372 libiscsit \
373 libkrb5 \
374 libkstat \
375 libkvm \
376 libmail \
377 libmapid \
378 libmd \
379 libmlrpc \
380 libmtmalloc \
381 libndmp \
382 libnvpair \
383 libnwam \
384 libofmt \
385 libpam \
386 libpcidb \
387 libpctx \
388 libpicl \
389 libpicltree \
390 libpool \
391 libpp \
392 libproc \
393 libraidcfg \
394 librcm \
395 libreparse \
396 librestart \
397 librpcsvc \
398 librsm \
399 librstp \
400 libsasl \
401 libscf \
402 libsec \
403 libsff \
404 libshare \
405 libshell \
406 libsip \
407 libsmbfs \
408 libsmbios \
409 libsmedia \
410 libsqlite \
411 libsrpt \
412 libstmf \
413 libsum \
414 libsun_ima \
415 libsysevent \
416 libtecla \
417 libumem \
418 libvolmgt \
419 libvrrpadm \
420 libvscan \
421 libwrap \
422 libzfs \
423 libzfs_core \
424 libzonestat \
425 mpapi \
426 passwdutil \
427 pkcs11 \
428 policykit \
429 scsi \
430 smbsrv \
431 smhba \
432 udapl \
433 $($(MACH)_HDRSUBDIRS)
435 i386_HDRSUBDIRS= \
436 libfdisk \
437 libsaveargs
439 sparc_HDRSUBDIRS= \
440 libds \
441 libdscp \
442 libpri \
443 libv12n \
444 storage
446 all := TARGET= all
447 check := TARGET= check
448 clean := TARGET= clean
449 clobber := TARGET= clobber
450 install := TARGET= install
451 install_h := TARGET= install_h
452 _dc := TARGET= _dc
453 _msg := TARGET= _msg
455 .KEEP_STATE:
458 # For the all and install targets, we clearly must respect library
459 # dependencies so that the libraries link correctly. However, for
460 # the remaining targets (check, clean, clobber, install_h, _dc, and
461 # _msg), libraries do not have any dependencies on one another and
462 # thus respecting dependencies just slows down the build. As such,
463 # for these rules, we use pattern replacement to explicitly avoid
464 # triggering the dependency information. Note that for clean and
465 # clobber, we must use $(NOWAIT_SUBDIRS) rather than $(SUBDIRS),
466 # to prevent `.WAIT' from expanding to `.WAIT-nodepend'.
469 all: $(SUBDIRS)
471 install: $(SUBDIRS) .WAIT install_extra
473 # extra libraries kept in other source areas
474 install_extra:
475 @cd ../cmd/sgs; pwd; $(MAKE) install_lib
476 @pwd
478 clean clobber: $(NOWAIT_SUBDIRS:%=%-nodepend)
480 install_h check: $(HDRSUBDIRS:%=%-nodepend)
482 _msg: $(MSGSUBDIRS:%=%-nodepend) .WAIT _dc
484 _dc: $(DCSUBDIRS:%=%-nodepend)
486 # Library interdependencies are called out explicitly here.
487 ../cmd/sgs/libconv: crt
488 ../cmd/sgs/libdl: crt
489 libc: ../cmd/sgs/libconv ../cmd/sgs/libdl
491 libm: libc
492 libmd: libc
493 libmp: libc
494 libnsl: libc libmd libmp
495 libnvpair: libc libnsl
497 basedeps: libc libm libmd libmp libnsl libnvpair
498 basedeps := TARGET=install
500 # The following dependencies are currently required by libdbus-1 and should
501 # be used for anything linking against it.
502 dbusdeps: libsecdb libinetutil libscf libgen libsmbios
504 # The following dependencies don't need to be listed below as they are built
505 # before everything else:
506 # libc libm libmd libmp libnsl libnvpair
507 abi: libctf libmapmalloc libproc
508 auditd_plugins: libbsm libsecdb libgss libmtmalloc
509 brand: libzonecfg libmapmalloc
510 cfgadm_plugins: libdevice libdevinfo libhotplug librcm hbaapi libkstat libscf
511 fm: libexacct libipmi libzfs scsi libdevinfo libdevid libcfgadm \
512 libcontract libsysevent ../cmd/sgs/libelf libdladm libsff \
513 libpcidb
514 hal: libbsm
515 $(SPARC_BLD)fm: libpri
516 gss_mechs/mech_dh: libgss
517 gss_mechs/mech_dummy: libgss
518 gss_mechs/mech_krb5: libgss libresolv2 pkcs11 libkstat
519 gss_mechs/mech_spnego: gss_mechs/mech_krb5
520 hal: dbusdeps
521 krb5: gss_mechs/mech_krb5 libtecla libldap5
522 libadutils: libldap5 libresolv2
523 libbe: libzfs libzonecfg libuuid libgen libdevinfo libefi libficl
524 libbsm: libinetutil libscf libsecdb
525 libcfgadm: libdevinfo
526 libcmd: libsum libast
527 libcmdutils: libavl
528 libcpc: libpctx
529 libcrypt: libgen
530 libctf: libdwarf
531 libdevid: libdevinfo
532 libdevinfo: libsec libgen
533 libdhcpagent: libdhcputil libuuid libdlpi libcontract
534 libdhcputil: libgen libinetutil libdlpi
535 libdiskmgt: libdevid libdevinfo libadm libefi libkstat libsysevent
536 $(INTEL_BLD)libdiskmgt: libfdisk
537 libdladm: libdevinfo libinetutil libscf librcm libexacct libkstat \
538 libpool
539 libdll: libast
540 libdlpi: libinetutil libdladm
541 libds: libsysevent
542 libdtrace: libproc libgen libctf libmapmalloc
543 libefi: libuuid libsmbios
544 libelfsign: libcryptoutil libkmf ../cmd/sgs/libelf
545 libexacct/demo: libexacct libproject
546 libfcoe: libdladm
547 libficl: libuuid libumem
548 libfru: libfruutils
549 libfsmgt: libkstat
550 libidmap: libavl
551 libinetsvc: libscf
552 libipadm: libinetutil libdlpi libdhcpagent libdladm libsecdb libdhcputil
553 libipmp: libinetutil
554 libipsecutil: libtecla
555 libiscsit: libstmf libuuid
556 libkmf: libcryptoutil pkcs11
557 libkvm: ../cmd/sgs/libelf
558 libldap5: libsasl
559 libmapid: libresolv2 libscf
560 libmlrpc: libsmbfs libuuid
561 libndmp: libscf
562 libnisdb: libldap5
563 libnwam: libscf libbsm libdladm libipadm
564 libpcp: libumem libdevinfo
565 libpctx: libproc
566 libpool: libscf libexacct
567 libpp: libast
568 libproc: ../cmd/sgs/librtld_db ../cmd/sgs/libelf libctf
569 $(INTEL_BLD)libproc: libsaveargs
570 libproject: libpool libproc libsecdb
571 libprtdiag: libkstat
572 libprtdiag_psr: libprtdiag
573 libraidcfg: libdevinfo
574 librestart: libscf libpool libproject libsecdb libsysevent
575 libsasl: libgss pkcs11
576 libsaveargs: libdisasm
577 libscf: libgen libsmbios
578 libsec: libavl libidmap
579 libsff: libnvpair
580 libshare: libscf libzfs libuuid libfsmgt libsecdb libumem libsmbfs
581 libshell: libast libcmd libdll libsecdb
582 libsip: libmd5
583 libsldap: libldap5 libscf
584 libsmbfs: libkrb5 libsec libidmap pkcs11
585 libsmbios: libdevinfo
586 libsrpt: libstmf
587 libstmf: libscf
588 libsum: libast
589 libsun_ima: libdevinfo libsysevent
590 libsysevent: libsecdb
591 libtsalarm: libpcp
592 libuuid: libdlpi
593 libv12n: libds libuuid
594 libvolmgt: libadm
595 libvrrpadm: libdladm libscf
596 libvscan: libscf libsecdb
597 libzfs: libdevid libgen libadm libavl libefi libidmap \
598 libumem libzfs_core
599 libzonecfg: libuuid libsysevent libsec libbrand libpool libscf libproc \
600 libbsm libsecdb
601 libzonestat: libcmdutils libumem
602 libzpool: libavl libumem libcmdutils libsysevent
603 madv: libgen
604 mpapi: libpthread libdevinfo libsysevent
605 mpss: libgen
606 nsswitch: libadutils libidmap libdns_sd libscf libldap5 libsldap
607 pam_modules: libproject passwdutil smbsrv libpam libbsm libsecdb
608 passwdutil: libsldap
609 pkcs11: libcryptoutil libgen libuuid
610 policykit: dbusdeps
611 pylibbe: libbe libzfs
612 pysolaris: libsec libidmap
613 raidcfg_plugins: libraidcfg librcm libcfgadm libpicl libpicltree
614 rpcsec_gss: libgss
615 sasl_plugins: pkcs11 libgss libsasl
616 scsi: libfru libumem libdevid libdevinfo
617 smbsrv: libpthread librt libshare libidmap pkcs11 libsqlite \
618 libcryptoutil libreparse libcmdutils libresolv2 libsmbfs \
619 libuuid libads libgss libldap5 krb5 libmlrpc
620 storage: libdevice libdevinfo libdevid
621 sun_fc: libdevinfo libsysevent
622 sun_sas: libdevinfo libsysevent libkstat libdevid
623 udapl: libdevinfo libdladm
626 # The reason this rule checks for the existence of the
627 # Makefile is that some of the directories do not exist
628 # in certain situations (e.g., exportable source builds,
629 # OpenSolaris).
631 $(SUBDIRS): FRC
632 @if [ -f $@/Makefile ]; then \
633 cd $@; pwd; $(MAKE) $(TARGET); \
634 else \
635 true; \
638 $(SUBDIRS:%=%-nodepend):
639 @if [ -f $(@:%-nodepend=%)/Makefile ]; then \
640 cd $(@:%-nodepend=%); pwd; $(MAKE) $(TARGET); \
641 else \
642 true; \
645 FRC: