lib: remove empty raidcfg_plugins dir
[unleashed.git] / usr / src / lib / Makefile
blobeb8ee21414fc41099800629ded967454d2f196f2
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 libcustr \
103 libdevice \
104 libdevid \
105 libdevinfo \
106 libdhcpagent \
107 libdhcputil \
108 libdisasm \
109 libdiskmgt \
110 libdladm \
111 libdll \
112 libdlpi \
113 libdns_sd \
114 libdoor \
115 libdtrace \
116 libdwarf \
117 libefi \
118 libelfsign \
119 libeti \
120 libexacct \
121 libexacct/demo \
122 libfcoe \
123 libficl \
124 libfru \
125 libfruutils \
126 libfsmgt \
127 libfstyp \
128 libgen \
129 libgss \
130 libhotplug \
131 libidmap \
132 libilb \
133 libima \
134 libinetsvc \
135 libinetutil \
136 libintl \
137 libipadm \
138 libipd \
139 libipmi \
140 libipmp \
141 libipp \
142 libipsecutil \
143 libiscsit \
144 libkmf \
145 libkrb5 \
146 libkstat \
147 libkvm \
148 libldap5 \
149 liblgrp \
150 liblm \
151 libmail \
152 libmalloc \
153 libmapid \
154 libmapmalloc \
155 libmd5 \
156 libmlrpc \
157 libmtmalloc \
158 libmvec \
159 libndmp \
160 libnisdb \
161 libnls \
162 libnwam \
163 libofmt \
164 libpam \
165 libpcidb \
166 libpctx \
167 libpicl \
168 libpicltree \
169 libpool \
170 libpp \
171 libproc \
172 libproject \
173 libpthread \
174 libraidcfg \
175 librcm \
176 libreparse \
177 libresolv \
178 libresolv2 \
179 librestart \
180 librpcsvc \
181 librsm \
182 librstp \
183 librt \
184 libsasl \
185 libscf \
186 libsched \
187 libsctp \
188 libsec \
189 libsecdb \
190 libsendfile \
191 libsff \
192 libshare \
193 libshell \
194 libsip \
195 libsldap \
196 libsmbfs \
197 libsmbios \
198 libsmedia \
199 libsqlite \
200 libsrpt \
201 libstmf \
202 libsum \
203 libsun_ima \
204 libsys \
205 libsysevent \
206 libtecla \
207 libthread \
208 libumem \
209 libuuid \
210 libvolmgt \
211 libvrrpadm \
212 libvscan \
213 libw \
214 libwrap \
215 libzfs \
216 libzfs_core \
217 libzonecfg \
218 libzonestat \
219 libzpool \
220 madv \
221 mpapi \
222 mpss \
223 nametoaddr \
224 ncad_addr \
225 nsswitch \
226 pam_modules \
227 passwdutil \
228 pkcs11 \
229 policykit \
230 pylibbe \
231 rpcsec_gss \
232 sasl_plugins \
233 scsi \
234 smbsrv \
235 smhba \
236 sun_fc \
237 sun_sas \
238 udapl \
239 watchmalloc \
240 $($(MACH)_SUBDIRS)
242 i386_SUBDIRS= \
243 libfdisk \
244 libsaveargs
247 # Create a special version of $(SUBDIRS) with no .WAIT's, for use with the
248 # clean and clobber targets (for more information, see those targets, below).
250 NOWAIT_SUBDIRS= $(SUBDIRS:.WAIT=)
252 DCSUBDIRS=
254 MSGSUBDIRS= \
255 abi \
256 auditd_plugins \
257 brand \
258 cfgadm_plugins \
259 gss_mechs/mech_dh \
260 gss_mechs/mech_krb5 \
261 krb5 \
262 libast \
263 libbsm \
264 libc \
265 libcfgadm \
266 libcmd \
267 libcontract \
268 libdhcputil \
269 libdiskmgt \
270 libdladm \
271 libdll \
272 libgss \
273 libidmap \
274 libilb \
275 libipadm \
276 libipmp \
277 libipsecutil \
278 libldap5 \
279 libnwam \
280 libofmt \
281 libpam \
282 libpicl \
283 libpool \
284 libpp \
285 libreparse \
286 libsasl \
287 libscf \
288 libsecdb \
289 libshare \
290 libshell \
291 libsldap \
292 libsmbfs \
293 libsmedia \
294 libsum \
295 libvrrpadm \
296 libvscan \
297 libzfs \
298 libzonecfg \
299 madv \
300 mpss \
301 pam_modules \
302 rpcsec_gss \
303 $($(MACH)_MSGSUBDIRS)
305 i386_MSGSUBDIRS= libfdisk
307 HDRSUBDIRS= \
308 auditd_plugins \
309 fm \
310 hal \
311 hbaapi \
312 libads \
313 libast \
314 libbrand \
315 libbsm \
316 libc \
317 libcmd \
318 libcmdutils \
319 libcommputil \
320 libcontract \
321 libcpc \
322 libcryptoutil \
323 libctf \
324 libcustr \
325 libdevice \
326 libdevid \
327 libdevinfo \
328 libdhcpagent \
329 libdhcputil \
330 libdisasm \
331 libdiskmgt \
332 libdwarf \
333 libdladm \
334 libdll \
335 libdlpi \
336 libdns_sd \
337 libdtrace \
338 libelfsign \
339 libeti \
340 libfcoe \
341 libfru \
342 libfstyp \
343 libgen \
344 libidmap \
345 libilb \
346 libima \
347 libinetsvc \
348 libinetutil \
349 libipadm \
350 libipd \
351 libipmi \
352 libipmp \
353 libipp \
354 libipsecutil \
355 libiscsit \
356 libkrb5 \
357 libkstat \
358 libkvm \
359 libmail \
360 libmapid \
361 libmd \
362 libmlrpc \
363 libmtmalloc \
364 libndmp \
365 libnvpair \
366 libnwam \
367 libofmt \
368 libpam \
369 libpcidb \
370 libpctx \
371 libpicl \
372 libpicltree \
373 libpool \
374 libpp \
375 libproc \
376 libraidcfg \
377 librcm \
378 libreparse \
379 librestart \
380 librpcsvc \
381 librsm \
382 librstp \
383 libsasl \
384 libscf \
385 libsec \
386 libsff \
387 libshare \
388 libshell \
389 libsip \
390 libsmbfs \
391 libsmbios \
392 libsmedia \
393 libsqlite \
394 libsrpt \
395 libstmf \
396 libsum \
397 libsun_ima \
398 libsysevent \
399 libtecla \
400 libumem \
401 libvolmgt \
402 libvrrpadm \
403 libvscan \
404 libwrap \
405 libzfs \
406 libzfs_core \
407 libzonestat \
408 mpapi \
409 passwdutil \
410 pkcs11 \
411 policykit \
412 scsi \
413 smbsrv \
414 smhba \
415 udapl \
416 $($(MACH)_HDRSUBDIRS)
418 i386_HDRSUBDIRS= \
419 libfdisk \
420 libsaveargs
422 all := TARGET= all
423 check := TARGET= check
424 clean := TARGET= clean
425 clobber := TARGET= clobber
426 install := TARGET= install
427 install_h := TARGET= install_h
428 _dc := TARGET= _dc
429 _msg := TARGET= _msg
431 .KEEP_STATE:
434 # For the all and install targets, we clearly must respect library
435 # dependencies so that the libraries link correctly. However, for
436 # the remaining targets (check, clean, clobber, install_h, _dc, and
437 # _msg), libraries do not have any dependencies on one another and
438 # thus respecting dependencies just slows down the build. As such,
439 # for these rules, we use pattern replacement to explicitly avoid
440 # triggering the dependency information. Note that for clean and
441 # clobber, we must use $(NOWAIT_SUBDIRS) rather than $(SUBDIRS),
442 # to prevent `.WAIT' from expanding to `.WAIT-nodepend'.
445 all: $(SUBDIRS)
447 install: $(SUBDIRS) .WAIT install_extra
449 # extra libraries kept in other source areas
450 install_extra:
451 @cd ../cmd/sgs; pwd; $(MAKE) install_lib
452 @pwd
454 clean clobber: $(NOWAIT_SUBDIRS:%=%-nodepend)
456 install_h check: $(HDRSUBDIRS:%=%-nodepend)
458 _msg: $(MSGSUBDIRS:%=%-nodepend) .WAIT _dc
460 _dc: $(DCSUBDIRS:%=%-nodepend)
462 # Library interdependencies are called out explicitly here.
463 ../cmd/sgs/libconv: crt
464 ../cmd/sgs/libdl: crt
465 libc: ../cmd/sgs/libconv ../cmd/sgs/libdl
467 libm: libc
468 libmd: libc
469 libmp: libc
470 libnsl: libc libmd libmp
471 libnvpair: libc libnsl
473 basedeps: libc libm libmd libmp libnsl libnvpair
474 basedeps := TARGET=install
476 # The following dependencies are currently required by libdbus-1 and should
477 # be used for anything linking against it.
478 dbusdeps: libsecdb libinetutil libscf libgen libsmbios
480 # The following dependencies don't need to be listed below as they are built
481 # before everything else:
482 # libc libm libmd libmp libnsl libnvpair
483 abi: libctf libmapmalloc libproc
484 auditd_plugins: libbsm libsecdb libgss libmtmalloc
485 brand: libzonecfg libmapmalloc
486 cfgadm_plugins: libdevice libdevinfo libhotplug librcm hbaapi libkstat libscf
487 fm: libexacct libipmi libzfs scsi libdevinfo libdevid libcfgadm \
488 libcontract libsysevent ../cmd/sgs/libelf libdladm libsff \
489 libpcidb
490 hal: libbsm
491 gss_mechs/mech_dh: libgss
492 gss_mechs/mech_dummy: libgss
493 gss_mechs/mech_krb5: libgss libresolv2 pkcs11 libkstat
494 gss_mechs/mech_spnego: gss_mechs/mech_krb5
495 hal: dbusdeps
496 krb5: gss_mechs/mech_krb5 libtecla libldap5
497 libadutils: libldap5 libresolv2
498 libbe: libzfs libzonecfg libuuid libgen libdevinfo libefi libficl
499 libbsm: libinetutil libscf libsecdb
500 libcfgadm: libdevinfo
501 libcmd: libsum libast
502 libcmdutils: libavl
503 libcpc: libpctx
504 libcrypt: libgen
505 libctf: libdwarf
506 libdevid: libdevinfo
507 libdevinfo: libsec libgen
508 libdhcpagent: libdhcputil libuuid libdlpi libcontract
509 libdhcputil: libgen libinetutil libdlpi
510 libdiskmgt: libdevid libdevinfo libadm libefi libkstat libsysevent
511 $(INTEL_BLD)libdiskmgt: libfdisk
512 libdladm: libdevinfo libinetutil libscf librcm libexacct libkstat \
513 libpool
514 libdll: libast
515 libdlpi: libinetutil libdladm
516 libdtrace: libproc libgen libctf libmapmalloc
517 libefi: libuuid libsmbios
518 libelfsign: libcryptoutil libkmf ../cmd/sgs/libelf
519 libexacct/demo: libexacct libproject
520 libfcoe: libdladm
521 libficl: libuuid libumem
522 libfru: libfruutils
523 libfsmgt: libkstat
524 libidmap: libavl
525 libinetsvc: libscf
526 libipadm: libinetutil libdlpi libdhcpagent libdladm libsecdb libdhcputil
527 libipmp: libinetutil
528 libipsecutil: libtecla libkmf
529 libiscsit: libstmf libuuid
530 libkmf: libcryptoutil pkcs11 libcustr
531 libkvm: ../cmd/sgs/libelf
532 libldap5: libsasl
533 libmapid: libresolv2 libscf
534 libmlrpc: libsmbfs libuuid
535 libndmp: libscf
536 libnisdb: libldap5
537 libnwam: libscf libbsm libdladm libipadm
538 libpctx: libproc
539 libpool: libscf libexacct
540 libpp: libast
541 libproc: ../cmd/sgs/librtld_db ../cmd/sgs/libelf libctf
542 $(INTEL_BLD)libproc: libsaveargs
543 libproject: libpool libproc libsecdb
544 libraidcfg: libdevinfo
545 librestart: libscf libpool libproject libsecdb libsysevent
546 libsasl: libgss pkcs11
547 libsaveargs: libdisasm
548 libscf: libgen libsmbios
549 libsec: libavl libidmap
550 libsff: libnvpair
551 libshare: libscf libzfs libuuid libfsmgt libsecdb libumem libsmbfs
552 libshell: libast libcmd libdll libsecdb
553 libsip: libmd5
554 libsldap: libldap5 libscf
555 libsmbfs: libkrb5 libsec libidmap pkcs11
556 libsmbios: libdevinfo
557 libsrpt: libstmf
558 libstmf: libscf
559 libsum: libast
560 libsun_ima: libdevinfo libsysevent
561 libsysevent: libsecdb
562 libuuid: libdlpi
563 libvolmgt: libadm
564 libvrrpadm: libdladm libscf
565 libvscan: libscf libsecdb
566 libzfs: libdevid libgen libadm libavl libefi libidmap \
567 libumem libzfs_core
568 libzonecfg: libuuid libsysevent libsec libbrand libpool libscf libproc \
569 libbsm libsecdb
570 libzonestat: libcmdutils libumem
571 libzpool: libavl libumem libcmdutils libsysevent
572 madv: libgen
573 mpapi: libpthread libdevinfo libsysevent
574 mpss: libgen
575 nsswitch: libadutils libidmap libdns_sd libscf libldap5 libsldap
576 pam_modules: libproject passwdutil smbsrv libpam libbsm libsecdb
577 passwdutil: libsldap
578 pkcs11: libcryptoutil libgen libuuid
579 policykit: dbusdeps
580 pylibbe: libbe libzfs
581 rpcsec_gss: libgss
582 sasl_plugins: pkcs11 libgss libsasl
583 scsi: libfru libumem libdevid libdevinfo
584 smbsrv: libpthread librt libshare libidmap pkcs11 libsqlite \
585 libcryptoutil libreparse libcmdutils libresolv2 libsmbfs \
586 libuuid libads libgss libldap5 krb5 libmlrpc
587 sun_fc: libdevinfo libsysevent
588 sun_sas: libdevinfo libsysevent libkstat libdevid
589 udapl: libdevinfo libdladm
592 # The reason this rule checks for the existence of the
593 # Makefile is that some of the directories do not exist
594 # in certain situations (e.g., exportable source builds,
595 # OpenSolaris).
597 $(SUBDIRS): FRC
598 @if [ -f $@/Makefile ]; then \
599 cd $@; pwd; $(MAKE) $(TARGET); \
600 else \
601 true; \
604 $(SUBDIRS:%=%-nodepend):
605 @if [ -f $(@:%-nodepend=%)/Makefile ]; then \
606 cd $(@:%-nodepend=%); pwd; $(MAKE) $(TARGET); \
607 else \
608 true; \
611 FRC: