lib: remove unused libfru & libfrureg
[unleashed.git] / usr / src / lib / Makefile
blob83e283c136773ba223feaea5d5b1141b3eb2226e
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 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 rpcsec_gss \
231 sasl_plugins \
232 scsi \
233 smbsrv \
234 smhba \
235 sun_fc \
236 sun_sas \
237 udapl \
238 watchmalloc \
239 $($(MACH)_SUBDIRS)
241 i386_SUBDIRS= \
242 libfdisk \
243 libsaveargs
246 # Create a special version of $(SUBDIRS) with no .WAIT's, for use with the
247 # clean and clobber targets (for more information, see those targets, below).
249 NOWAIT_SUBDIRS= $(SUBDIRS:.WAIT=)
251 DCSUBDIRS=
253 MSGSUBDIRS= \
254 abi \
255 auditd_plugins \
256 brand \
257 cfgadm_plugins \
258 gss_mechs/mech_dh \
259 gss_mechs/mech_krb5 \
260 krb5 \
261 libast \
262 libbsm \
263 libc \
264 libcfgadm \
265 libcmd \
266 libcontract \
267 libdhcputil \
268 libdiskmgt \
269 libdladm \
270 libdll \
271 libgss \
272 libidmap \
273 libilb \
274 libipadm \
275 libipmp \
276 libipsecutil \
277 libldap5 \
278 libnwam \
279 libofmt \
280 libpam \
281 libpicl \
282 libpool \
283 libpp \
284 libreparse \
285 libsasl \
286 libscf \
287 libsecdb \
288 libshare \
289 libshell \
290 libsldap \
291 libsmbfs \
292 libsmedia \
293 libsum \
294 libvrrpadm \
295 libvscan \
296 libzfs \
297 libzonecfg \
298 madv \
299 mpss \
300 pam_modules \
301 rpcsec_gss \
302 $($(MACH)_MSGSUBDIRS)
304 i386_MSGSUBDIRS= libfdisk
306 HDRSUBDIRS= \
307 auditd_plugins \
308 fm \
309 hal \
310 hbaapi \
311 libads \
312 libast \
313 libbrand \
314 libbsm \
315 libc \
316 libcmd \
317 libcmdutils \
318 libcommputil \
319 libcontract \
320 libcpc \
321 libcryptoutil \
322 libctf \
323 libcustr \
324 libdevice \
325 libdevid \
326 libdevinfo \
327 libdhcpagent \
328 libdhcputil \
329 libdisasm \
330 libdiskmgt \
331 libdwarf \
332 libdladm \
333 libdll \
334 libdlpi \
335 libdns_sd \
336 libdtrace \
337 libelfsign \
338 libeti \
339 libfcoe \
340 libfstyp \
341 libgen \
342 libidmap \
343 libilb \
344 libima \
345 libinetsvc \
346 libinetutil \
347 libipadm \
348 libipd \
349 libipmi \
350 libipmp \
351 libipp \
352 libipsecutil \
353 libiscsit \
354 libkrb5 \
355 libkstat \
356 libkvm \
357 libmail \
358 libmapid \
359 libmd \
360 libmlrpc \
361 libmtmalloc \
362 libndmp \
363 libnvpair \
364 libnwam \
365 libofmt \
366 libpam \
367 libpcidb \
368 libpctx \
369 libpicl \
370 libpicltree \
371 libpool \
372 libpp \
373 libproc \
374 libraidcfg \
375 librcm \
376 libreparse \
377 librestart \
378 librpcsvc \
379 librsm \
380 librstp \
381 libsasl \
382 libscf \
383 libsec \
384 libsff \
385 libshare \
386 libshell \
387 libsip \
388 libsmbfs \
389 libsmbios \
390 libsmedia \
391 libsqlite \
392 libsrpt \
393 libstmf \
394 libsum \
395 libsun_ima \
396 libsysevent \
397 libtecla \
398 libumem \
399 libvolmgt \
400 libvrrpadm \
401 libvscan \
402 libwrap \
403 libzfs \
404 libzfs_core \
405 libzonestat \
406 mpapi \
407 passwdutil \
408 pkcs11 \
409 policykit \
410 scsi \
411 smbsrv \
412 smhba \
413 udapl \
414 $($(MACH)_HDRSUBDIRS)
416 i386_HDRSUBDIRS= \
417 libfdisk \
418 libsaveargs
420 all := TARGET= all
421 check := TARGET= check
422 clean := TARGET= clean
423 clobber := TARGET= clobber
424 install := TARGET= install
425 install_h := TARGET= install_h
426 _dc := TARGET= _dc
427 _msg := TARGET= _msg
429 .KEEP_STATE:
432 # For the all and install targets, we clearly must respect library
433 # dependencies so that the libraries link correctly. However, for
434 # the remaining targets (check, clean, clobber, install_h, _dc, and
435 # _msg), libraries do not have any dependencies on one another and
436 # thus respecting dependencies just slows down the build. As such,
437 # for these rules, we use pattern replacement to explicitly avoid
438 # triggering the dependency information. Note that for clean and
439 # clobber, we must use $(NOWAIT_SUBDIRS) rather than $(SUBDIRS),
440 # to prevent `.WAIT' from expanding to `.WAIT-nodepend'.
443 all: $(SUBDIRS)
445 install: $(SUBDIRS) .WAIT install_extra
447 # extra libraries kept in other source areas
448 install_extra:
449 @cd ../cmd/sgs; pwd; $(MAKE) install_lib
450 @pwd
452 clean clobber: $(NOWAIT_SUBDIRS:%=%-nodepend)
454 install_h check: $(HDRSUBDIRS:%=%-nodepend)
456 _msg: $(MSGSUBDIRS:%=%-nodepend) .WAIT _dc
458 _dc: $(DCSUBDIRS:%=%-nodepend)
460 # Library interdependencies are called out explicitly here.
461 ../cmd/sgs/libconv: crt
462 ../cmd/sgs/libdl: crt
463 libc: ../cmd/sgs/libconv ../cmd/sgs/libdl
465 libm: libc
466 libmd: libc
467 libmp: libc
468 libnsl: libc libmd libmp
469 libnvpair: libc libnsl
471 basedeps: libc libm libmd libmp libnsl libnvpair
472 basedeps := TARGET=install
474 # The following dependencies are currently required by libdbus-1 and should
475 # be used for anything linking against it.
476 dbusdeps: libsecdb libinetutil libscf libgen libsmbios
478 # The following dependencies don't need to be listed below as they are built
479 # before everything else:
480 # libc libm libmd libmp libnsl libnvpair
481 abi: libctf libmapmalloc libproc
482 auditd_plugins: libbsm libsecdb libgss libmtmalloc
483 brand: libzonecfg libmapmalloc
484 cfgadm_plugins: libdevice libdevinfo libhotplug librcm hbaapi libkstat libscf
485 fm: libexacct libipmi libzfs scsi libdevinfo libdevid libcfgadm \
486 libcontract libsysevent ../cmd/sgs/libelf libdladm libsff \
487 libpcidb
488 hal: libbsm
489 gss_mechs/mech_dh: libgss
490 gss_mechs/mech_dummy: libgss
491 gss_mechs/mech_krb5: libgss libresolv2 pkcs11 libkstat
492 gss_mechs/mech_spnego: gss_mechs/mech_krb5
493 hal: dbusdeps
494 krb5: gss_mechs/mech_krb5 libtecla libldap5
495 libadutils: libldap5 libresolv2
496 libbe: libzfs libzonecfg libuuid libgen libdevinfo libefi libficl
497 libbsm: libinetutil libscf libsecdb
498 libcfgadm: libdevinfo
499 libcmd: libsum libast
500 libcmdutils: libavl
501 libcpc: libpctx
502 libcrypt: libgen
503 libctf: libdwarf
504 libdevid: libdevinfo
505 libdevinfo: libsec libgen
506 libdhcpagent: libdhcputil libuuid libdlpi libcontract
507 libdhcputil: libgen libinetutil libdlpi
508 libdiskmgt: libdevid libdevinfo libadm libefi libkstat libsysevent
509 $(INTEL_BLD)libdiskmgt: libfdisk
510 libdladm: libdevinfo libinetutil libscf librcm libexacct libkstat \
511 libpool
512 libdll: libast
513 libdlpi: libinetutil libdladm
514 libdtrace: libproc libgen libctf libmapmalloc
515 libefi: libuuid libsmbios
516 libelfsign: libcryptoutil libkmf ../cmd/sgs/libelf
517 libexacct/demo: libexacct libproject
518 libfcoe: libdladm
519 libficl: libuuid libumem
520 libfsmgt: libkstat
521 libidmap: libavl
522 libinetsvc: libscf
523 libipadm: libinetutil libdlpi libdhcpagent libdladm libsecdb libdhcputil
524 libipmp: libinetutil
525 libipsecutil: libtecla libkmf
526 libiscsit: libstmf libuuid
527 libkmf: libcryptoutil pkcs11 libcustr
528 libkvm: ../cmd/sgs/libelf
529 libldap5: libsasl
530 libmapid: libresolv2 libscf
531 libmlrpc: libsmbfs libuuid
532 libndmp: libscf
533 libnisdb: libldap5
534 libnwam: libscf libbsm libdladm libipadm
535 libpctx: libproc
536 libpool: libscf libexacct
537 libpp: libast
538 libproc: ../cmd/sgs/librtld_db ../cmd/sgs/libelf libctf
539 $(INTEL_BLD)libproc: libsaveargs
540 libproject: libpool libproc libsecdb
541 libraidcfg: libdevinfo
542 librestart: libscf libpool libproject libsecdb libsysevent
543 libsasl: libgss pkcs11
544 libsaveargs: libdisasm
545 libscf: libgen libsmbios
546 libsec: libavl libidmap
547 libsff: libnvpair
548 libshare: libscf libzfs libuuid libfsmgt libsecdb libumem libsmbfs
549 libshell: libast libcmd libdll libsecdb
550 libsip: libmd5
551 libsldap: libldap5 libscf
552 libsmbfs: libkrb5 libsec libidmap pkcs11
553 libsmbios: libdevinfo
554 libsrpt: libstmf
555 libstmf: libscf
556 libsum: libast
557 libsun_ima: libdevinfo libsysevent
558 libsysevent: libsecdb
559 libuuid: libdlpi
560 libvolmgt: libadm
561 libvrrpadm: libdladm libscf
562 libvscan: libscf libsecdb
563 libzfs: libdevid libgen libadm libavl libefi libidmap \
564 libumem libzfs_core
565 libzonecfg: libuuid libsysevent libsec libbrand libpool libscf libproc \
566 libbsm libsecdb
567 libzonestat: libcmdutils libumem
568 libzpool: libavl libumem libcmdutils libsysevent
569 madv: libgen
570 mpapi: libpthread libdevinfo libsysevent
571 mpss: libgen
572 nsswitch: libadutils libidmap libdns_sd libscf libldap5 libsldap
573 pam_modules: libproject passwdutil smbsrv libpam libbsm libsecdb
574 passwdutil: libsldap
575 pkcs11: libcryptoutil libgen libuuid
576 policykit: dbusdeps
577 pylibbe: libbe libzfs
578 rpcsec_gss: libgss
579 sasl_plugins: pkcs11 libgss libsasl
580 scsi: libumem libdevid libdevinfo
581 smbsrv: libpthread librt libshare libidmap pkcs11 libsqlite \
582 libcryptoutil libreparse libcmdutils libresolv2 libsmbfs \
583 libuuid libads libgss libldap5 krb5 libmlrpc
584 sun_fc: libdevinfo libsysevent
585 sun_sas: libdevinfo libsysevent libkstat libdevid
586 udapl: libdevinfo libdladm
589 # The reason this rule checks for the existence of the
590 # Makefile is that some of the directories do not exist
591 # in certain situations (e.g., exportable source builds,
592 # OpenSolaris).
594 $(SUBDIRS): FRC
595 @if [ -f $@/Makefile ]; then \
596 cd $@; pwd; $(MAKE) $(TARGET); \
597 else \
598 true; \
601 $(SUBDIRS:%=%-nodepend):
602 @if [ -f $(@:%-nodepend=%)/Makefile ]; then \
603 cd $(@:%-nodepend=%); pwd; $(MAKE) $(TARGET); \
604 else \
605 true; \
608 FRC: