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 \
241 # Create a special version of $(SUBDIRS) with no .WAIT's, for use with the
242 # clean and clobber targets (for more information, see those targets, below).
244 NOWAIT_SUBDIRS
= $(SUBDIRS
:.WAIT
=)
253 gss_mechs
/mech_krb5 \
294 $($(MACH
)_MSGSUBDIRS
)
296 i386_MSGSUBDIRS
= libfdisk
402 $($(MACH
)_HDRSUBDIRS
)
409 check := TARGET
= check
410 clean := TARGET
= clean
411 clobber := TARGET
= clobber
412 install := TARGET
= install
413 install_h
:= TARGET
= install_h
420 # For the all and install targets, we clearly must respect library
421 # dependencies so that the libraries link correctly. However, for
422 # the remaining targets (check, clean, clobber, install_h, _dc, and
423 # _msg), libraries do not have any dependencies on one another and
424 # thus respecting dependencies just slows down the build. As such,
425 # for these rules, we use pattern replacement to explicitly avoid
426 # triggering the dependency information. Note that for clean and
427 # clobber, we must use $(NOWAIT_SUBDIRS) rather than $(SUBDIRS),
428 # to prevent `.WAIT' from expanding to `.WAIT-nodepend'.
433 install: $(SUBDIRS
) .WAIT install_extra
435 # extra libraries kept in other source areas
437 @cd ..
/cmd
/sgs
; pwd
; $(MAKE
) install_lib
440 clean clobber: $(NOWAIT_SUBDIRS
:%=%-nodepend
)
442 install_h
check: $(HDRSUBDIRS
:%=%-nodepend
)
444 _msg
: $(MSGSUBDIRS
:%=%-nodepend
) .WAIT _dc
446 _dc
: $(DCSUBDIRS
:%=%-nodepend
)
448 # Library interdependencies are called out explicitly here.
449 ..
/cmd
/sgs
/libconv
: crt
450 ..
/cmd
/sgs
/libdl
: crt
451 libc
: ..
/cmd
/sgs
/libconv ..
/cmd
/sgs
/libdl
456 libnsl
: libc libmd libmp
457 libnvpair
: libc libnsl
459 basedeps
: libc libm libmd libmp libnsl libnvpair
460 basedeps
:= TARGET
=install
462 # The following dependencies are currently required by libdbus-1 and should
463 # be used for anything linking against it.
464 dbusdeps
: libsecdb libinetutil libscf libgen libsmbios
466 # The following dependencies don't need to be listed below as they are built
467 # before everything else:
468 # libc libm libmd libmp libnsl libnvpair
469 abi
: libctf libmapmalloc libproc
470 brand
: libzonecfg libmapmalloc
471 cfgadm_plugins
: libdevice libdevinfo libhotplug librcm hbaapi libkstat libscf
472 fm
: libexacct libipmi libzfs scsi libdevinfo libdevid libcfgadm \
473 libcontract libsysevent ..
/cmd
/sgs
/libelf libdladm libsff \
475 gss_mechs
/mech_dh
: libgss
476 gss_mechs
/mech_dummy
: libgss
477 gss_mechs
/mech_krb5
: libgss libresolv2 pkcs11 libkstat
478 gss_mechs
/mech_spnego
: gss_mechs
/mech_krb5
480 krb5
: gss_mechs
/mech_krb5 libtecla libldap5
481 libadutils
: libldap5 libresolv2
482 libbe
: libzfs libzonecfg libuuid libgen libdevinfo libefi libficl
483 libcfgadm
: libdevinfo
484 libcmd
: libsum libast
490 libdevinfo
: libsec libgen
491 libdhcpagent
: libdhcputil libuuid libdlpi libcontract
492 libdhcputil
: libgen libinetutil libdlpi
493 libdiskmgt
: libdevid libdevinfo libadm libefi libkstat libsysevent
494 $(INTEL_BLD
)libdiskmgt
: libfdisk
495 libdladm
: libdevinfo libinetutil libscf librcm libexacct libkstat \
498 libdlpi
: libinetutil libdladm
499 libdtrace
: libproc libgen libctf libmapmalloc
500 libefi
: libuuid libsmbios
501 libelfsign
: libcryptoutil libkmf ..
/cmd
/sgs
/libelf
502 libexacct
/demo
: libexacct libproject
504 libficl
: libuuid libumem
508 libipadm
: libinetutil libdlpi libdhcpagent libdladm libsecdb libdhcputil
510 libipsecutil
: libtecla libkmf
511 libiscsit
: libstmf libuuid
512 libkmf
: libcryptoutil pkcs11 libcustr
513 libkvm
: ..
/cmd
/sgs
/libelf
515 libmapid
: libresolv2 libscf
516 libmlrpc
: libsmbfs libuuid
519 libnwam
: libscf libdladm libipadm
521 libpool
: libscf libexacct
523 libproc
: ..
/cmd
/sgs
/librtld_db ..
/cmd
/sgs
/libelf libctf
524 $(INTEL_BLD
)libproc
: libsaveargs
525 libproject
: libpool libproc libsecdb
526 libraidcfg
: libdevinfo
527 librestart
: libscf libpool libproject libsecdb libsysevent
528 libsasl
: libgss pkcs11
529 libsaveargs
: libdisasm
530 libscf
: libgen libsmbios
531 libsec
: libavl libidmap
533 libshare
: libscf libzfs libuuid libfsmgt libsecdb libumem libsmbfs
534 libshell
: libast libcmd libdll libsecdb
536 libsldap
: libldap5 libscf
537 libsmbfs
: libkrb5 libsec libidmap pkcs11
538 libsmbios
: libdevinfo
542 libsun_ima
: libdevinfo libsysevent
543 libsysevent
: libsecdb
546 libvrrpadm
: libdladm libscf
547 libvscan
: libscf libsecdb
548 libzfs
: libdevid libgen libadm libavl libefi libidmap \
550 libzonecfg
: libuuid libsysevent libsec libbrand libpool libscf libproc \
552 libzonestat
: libcmdutils libumem
553 libzpool
: libavl libumem libcmdutils libsysevent
555 mpapi
: libpthread libdevinfo libsysevent
557 nsswitch
: libadutils libidmap libdns_sd libscf libldap5 libsldap
558 pam_modules
: libproject passwdutil smbsrv libpam libsecdb
560 pkcs11
: libcryptoutil libgen libuuid
562 pylibbe
: libbe libzfs
564 sasl_plugins
: pkcs11 libgss libsasl
565 scsi
: libumem libdevid libdevinfo
566 smbsrv
: libpthread librt libshare libidmap pkcs11 libsqlite \
567 libcryptoutil libreparse libcmdutils libresolv2 libsmbfs \
568 libuuid libads libgss libldap5 krb5 libmlrpc
569 sun_fc
: libdevinfo libsysevent
570 sun_sas
: libdevinfo libsysevent libkstat libdevid
571 udapl
: libdevinfo libdladm
574 # The reason this rule checks for the existence of the
575 # Makefile is that some of the directories do not exist
576 # in certain situations (e.g., exportable source builds,
580 @if
[ -f
$@
/Makefile
]; then \
581 cd
$@
; pwd
; $(MAKE
) $(TARGET
); \
586 $(SUBDIRS
:%=%-nodepend
):
587 @if
[ -f
$(@
:%-nodepend
=%)/Makefile
]; then \
588 cd
$(@
:%-nodepend
=%); pwd
; $(MAKE
) $(TARGET
); \