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]
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.
45 # Build libc and its dependencies
53 # Build libraries with lots of dependents
62 # Build everything else. Aside from explicit dependencies, all libraries
63 # are built in parallel.
66 ..
/cmd
/sgs
/librtld_db \
75 gss_mechs
/mech_dummy \
77 gss_mechs
/mech_spnego \
238 # Create a special version of $(SUBDIRS) with no .WAIT's, for use with the
239 # clean and clobber targets (for more information, see those targets, below).
241 NOWAIT_SUBDIRS
= $(SUBDIRS
:.WAIT
=)
250 gss_mechs
/mech_krb5 \
285 $($(MACH
)_MSGSUBDIRS
)
287 i386_MSGSUBDIRS
= libfdisk
390 $($(MACH
)_HDRSUBDIRS
)
397 check := TARGET
= check
398 clean := TARGET
= clean
399 clobber := TARGET
= clobber
400 install := TARGET
= install
401 install_h
:= TARGET
= install_h
408 # For the all and install targets, we clearly must respect library
409 # dependencies so that the libraries link correctly. However, for
410 # the remaining targets (check, clean, clobber, install_h, _dc, and
411 # _msg), libraries do not have any dependencies on one another and
412 # thus respecting dependencies just slows down the build. As such,
413 # for these rules, we use pattern replacement to explicitly avoid
414 # triggering the dependency information. Note that for clean and
415 # clobber, we must use $(NOWAIT_SUBDIRS) rather than $(SUBDIRS),
416 # to prevent `.WAIT' from expanding to `.WAIT-nodepend'.
421 install: $(SUBDIRS
) .WAIT install_extra
423 # extra libraries kept in other source areas
425 @cd ..
/cmd
/sgs
; pwd
; $(MAKE
) install_lib
428 clean clobber: $(NOWAIT_SUBDIRS
:%=%-nodepend
)
430 install_h
check: $(HDRSUBDIRS
:%=%-nodepend
)
432 _msg
: $(MSGSUBDIRS
:%=%-nodepend
) .WAIT _dc
434 _dc
: $(DCSUBDIRS
:%=%-nodepend
)
436 # Library interdependencies are called out explicitly here.
437 ..
/cmd
/sgs
/libconv
: crt
438 ..
/cmd
/sgs
/libdl
: crt
439 libc
: ..
/cmd
/sgs
/libconv ..
/cmd
/sgs
/libdl
444 libnsl
: libc libmd libmp
445 libnvpair
: libc libnsl
447 basedeps
: libc libm libmd libmp libnsl libnvpair
448 basedeps
:= TARGET
=install
450 # The following dependencies are currently required by libdbus-1 and should
451 # be used for anything linking against it.
452 dbusdeps
: libsecdb libinetutil libscf libgen libsmbios
454 # The following dependencies don't need to be listed below as they are built
455 # before everything else:
456 # libc libm libmd libmp libnsl libnvpair
457 abi
: libctf libmapmalloc libproc
458 brand
: libzonecfg libmapmalloc
459 cfgadm_plugins
: libdevice libdevinfo libhotplug librcm hbaapi libkstat libscf
460 fm
: libexacct libipmi libzfs scsi libdevinfo libdevid libcfgadm \
461 libcontract libsysevent ..
/cmd
/sgs
/libelf libdladm libsff \
463 gss_mechs
/mech_dh
: libgss
464 gss_mechs
/mech_dummy
: libgss
465 gss_mechs
/mech_krb5
: libgss libresolv2 pkcs11 libkstat
466 gss_mechs
/mech_spnego
: gss_mechs
/mech_krb5
468 krb5
: gss_mechs
/mech_krb5 libtecla libldap5
469 libadutils
: libldap5 libresolv2
470 libbe
: libzfs libzonecfg libuuid libgen libdevinfo libefi libficl
471 libcfgadm
: libdevinfo
477 libdevinfo
: libsec libgen
478 libdhcpagent
: libdhcputil libuuid libdlpi libcontract
479 libdhcputil
: libgen libinetutil libdlpi
480 libdiskmgt
: libdevid libdevinfo libadm libefi libkstat libsysevent
481 $(INTEL_BLD
)libdiskmgt
: libfdisk
482 libdladm
: libdevinfo libinetutil libscf librcm libexacct libkstat \
484 libdlpi
: libinetutil libdladm
485 libdtrace
: libproc libgen libctf libmapmalloc
486 libefi
: libuuid libsmbios
487 libelfsign
: libcryptoutil libkmf ..
/cmd
/sgs
/libelf
488 libexacct
/demo
: libexacct libproject
490 libficl
: libuuid libumem
494 libipadm
: libinetutil libdlpi libdhcpagent libdladm libsecdb libdhcputil
496 libipsecutil
: libtecla libkmf
497 libiscsit
: libstmf libuuid
498 libkmf
: libcryptoutil pkcs11 libcustr
499 libkvm
: ..
/cmd
/sgs
/libelf
501 libmapid
: libresolv2 libscf
502 libmlrpc
: libsmbfs libuuid
505 libnwam
: libscf libdladm libipadm
507 libpool
: libscf libexacct
508 libproc
: ..
/cmd
/sgs
/librtld_db ..
/cmd
/sgs
/libelf libctf
509 $(INTEL_BLD
)libproc
: libsaveargs
510 libproject
: libpool libproc libsecdb
511 libraidcfg
: libdevinfo
512 librestart
: libscf libpool libproject libsecdb libsysevent
513 libsasl
: libgss pkcs11
514 libsaveargs
: libdisasm
515 libscf
: libgen libsmbios
516 libsec
: libavl libidmap
518 libshare
: libscf libzfs libuuid libfsmgt libsecdb libumem libsmbfs
520 libsldap
: libldap5 libscf
521 libsmbfs
: libkrb5 libsec libidmap pkcs11
522 libsmbios
: libdevinfo
525 libsun_ima
: libdevinfo libsysevent
526 libsysevent
: libsecdb
529 libvrrpadm
: libdladm libscf
530 libvscan
: libscf libsecdb
531 libzfs
: libdevid libgen libadm libavl libefi libidmap \
533 libzonecfg
: libuuid libsysevent libsec libbrand libpool libscf libproc \
535 libzonestat
: libcmdutils libumem
536 libzpool
: libavl libumem libcmdutils libsysevent
538 mpapi
: libpthread libdevinfo libsysevent
540 nsswitch
: libadutils libidmap libdns_sd libscf libldap5 libsldap
541 pam_modules
: libproject passwdutil smbsrv libpam libsecdb
543 pkcs11
: libcryptoutil libgen libuuid
545 pylibbe
: libbe libzfs
547 sasl_plugins
: pkcs11 libgss libsasl
548 scsi
: libumem libdevid libdevinfo
549 smbsrv
: libpthread librt libshare libidmap pkcs11 libsqlite \
550 libcryptoutil libreparse libcmdutils libresolv2 libsmbfs \
551 libuuid libads libgss libldap5 krb5 libmlrpc
552 sun_fc
: libdevinfo libsysevent
553 sun_sas
: libdevinfo libsysevent libkstat libdevid
554 udapl
: libdevinfo libdladm
557 # The reason this rule checks for the existence of the
558 # Makefile is that some of the directories do not exist
559 # in certain situations (e.g., exportable source builds,
563 @if
[ -f
$@
/Makefile
]; then \
564 cd
$@
; pwd
; $(MAKE
) $(TARGET
); \
569 $(SUBDIRS
:%=%-nodepend
):
570 @if
[ -f
$(@
:%-nodepend
=%)/Makefile
]; then \
571 cd
$(@
:%-nodepend
=%); pwd
; $(MAKE
) $(TARGET
); \