Cross Reference: /illumos-gate/usr/src/lib/Makefile
Makefile revision 9acbbeaf2a1ffe5c14b244867d427714fab43c5c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
0N/A#
0N/A# CDDL HEADER START
0N/A#
292N/A# The contents of this file are subject to the terms of the
0N/A# Common Development and Distribution License (the "License").
0N/A# You may not use this file except in compliance with the License.
0N/A#
0N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
292N/A# or http://www.opensolaris.org/os/licensing.
292N/A# See the License for the specific language governing permissions
292N/A# and limitations under the License.
292N/A#
0N/A# When distributing Covered Code, include this CDDL HEADER in each
0N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
0N/A# If applicable, add the following below this CDDL HEADER, with the
292N/A# fields enclosed by brackets "[]" replaced with your own identifying
292N/A# information: Portions Copyright [yyyy] [name of copyright owner]
292N/A#
292N/A# CDDL HEADER END
292N/A#
292N/A#
292N/A# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
292N/A# Use is subject to license terms.
292N/A#
292N/A# ident "%Z%%M% %I% %E% SMI"
292N/A#
0N/A
0N/Ainclude ../Makefile.master
0N/A
0N/A# Note that libcurses installs commands along with its library.
0N/A# This is a minor bug which probably should be fixed.
0N/A# Note also that a few extra libraries are kept in cmd source.
0N/A#
0N/A# Certain libraries are linked with, hence depend on, other libraries.
0N/A#
0N/A# Although we have historically used .WAIT to express dependencies, it
0N/A# reduces the amount of parallelism and thus lengthens the time it
0N/A# takes to build the libraries. Thus, we now require that any new
0N/A# libraries explicitly call out their dependencies. Eventually, all
0N/A# the library dependencies will be called out explicitly. See
0N/A# "Library interdependencies" near the end of this file.
0N/A#
0N/A# Aside from explicit dependencies (and legacy .WAITs), all libraries
0N/A# are built in parallel.
0N/A#
0N/A.PARALLEL:
0N/A
0N/A#
0N/A# The $(CLOSED_BUILD) additions to SUBDIRS & MSGSUBDIRS are unfortunate,
0N/A# but required due to the "dependencies" of using .WAIT to barrier the
0N/A# parallel dmake builds. once 4631488 has been fixed, they can be
0N/A# consolidated into one $(CLOSED_BUILD)SUBDIRS += (all closed libs) as
0N/A# shown in HDRSUBDIRS
0N/A#
0N/ASUBDIRS= \
0N/A common .WAIT \
0N/A ../cmd/sgs/libconv \
0N/A ../cmd/sgs/libdl .WAIT
0N/A
0N/A$(CLOSED_BUILD)SUBDIRS += \
0N/A $(CLOSED)/lib/libc_i18n
0N/A
0N/ASUBDIRS += \
0N/A libc .WAIT \
0N/A ../cmd/sgs/libelf .WAIT \
0N/A libmd \
0N/A libmd5 \
0N/A librsm \
0N/A libmp .WAIT \
0N/A libcmd \
0N/A libnsl \
0N/A libsecdb .WAIT \
0N/A librpcsvc \
libsocket .WAIT \
libsctp \
libresolv \
libresolv2 .WAIT \
libw .WAIT \
libintl .WAIT \
../cmd/sgs/librtld_db \
libaio \
librt \
libadm \
libctf \
libdtrace \
libdtrace_jni \
libcurses \
libgen \
libgss \
libpam \
libuuid \
libthread \
libpthread .WAIT \
libslp \
libbsdmalloc \
libdoor \
libdevinfo \
libdladm \
libdlpi \
libeti \
libcrypt \
libefi \
libfstyp \
libwanboot \
libwanbootutil \
libcryptoutil \
libinetcfg \
libinetutil \
libipmp \
libkstat \
libkvm \
liblaadm \
liblm \
libmacadm \
libmalloc \
libmapmalloc \
libmtmalloc \
libnls \
libsmbios \
libtecla \
libumem \
libnvpair .WAIT \
libexacct \
libplot \
libldap4 \
libsasl \
libldap5 \
libsldap .WAIT \
libbsm \
libsys \
libsysevent \
libnisdb \
libpool \
libproc \
libproject \
libsendfile \
nametoaddr \
ncad_addr \
gss_mechs/mech_krb5 .WAIT \
libkrb5 .WAIT \
krb5 .WAIT
$(CLOSED_BUILD)SUBDIRS += \
$(CLOSED)/lib/smartcard
SUBDIRS += \
passwdutil \
pam_modules \
crypt_modules \
libadt_jni \
abi \
auditd_plugins \
libvolmgt \
libdevice \
libdevid \
libdhcpsvc \
libc_db \
libsec \
libtnfprobe \
libtnf \
libtnfctl \
libdhcpagent \
libdhcpdu \
libdhcputil \
libipsecutil
$(CLOSED_BUILD)SUBDIRS += \
$(CLOSED)/lib/libike
SUBDIRS += \
nsswitch \
print \
libuutil \
libscf \
libinetsvc \
librestart \
libsched
$(CLOSED_BUILD)SUBDIRS += \
$(CLOSED)/lib/libelfsign
SUBDIRS += \
pkcs11 .WAIT \
libpctx .WAIT \
libcpc \
watchmalloc \
extendedFILE \
madv \
mpss \
libdisasm \
libwrap \
libxcurses \
libxcurses2 \
libxnet \
libbrand .WAIT \
libzonecfg \
libzoneinfo \
libtsnet \
libtsol \
gss_mechs/mech_spnego \
gss_mechs/mech_dummy \
gss_mechs/mech_dh \
rpcsec_gss \
librcm .WAIT \
libcfgadm .WAIT \
libpicl .WAIT \
libpicltree .WAIT \
cfgadm_plugins \
libmail \
lvm \
libsmedia \
libipp \
openssl \
libdiskmgt \
liblgrp \
libfsmgt \
fm \
libavl \
libcmdutils \
libcontract \
../cmd/sendmail/libmilter \
sasl_plugins \
udapl \
libzpool \
libzfs \
libzfs_jni \
libmapid \
brand \
$($(MACH)_SUBDIRS)
sparc_SUBDIRS= .WAIT \
efcode \
libc_psr .WAIT \
libdscp \
libprtdiag .WAIT \
libprtdiag_psr \
librsc \
libfruutils .WAIT \
libfru \
libwrsmconf \
storage \
wrsm \
libpcp
fm: libexacct
#
# Create a special version of $(SUBDIRS) with no .WAIT's, for use with the
# clean and clobber targets (for more information, see those targets, below).
#
NOWAIT_SUBDIRS= $(SUBDIRS:.WAIT=)
DCSUBDIRS = \
lvm
MSGSUBDIRS= \
abi \
auditd_plugins \
brand \
cfgadm_plugins \
gss_mechs/mech_dh \
gss_mechs/mech_krb5 \
krb5 \
libbsm \
libc \
libcfgadm \
libcontract \
libcurses \
libdhcpsvc \
libdhcputil \
libgss \
libinetcfg \
libipmp \
libnsl \
libpam \
libpicl \
libpool \
libscf \
libsasl \
libldap5 \
libsecdb \
libsldap \
libslp \
libsmedia \
libtsol \
libuutil \
libwanboot \
libwanbootutil \
libzonecfg \
lvm \
madv \
mpss \
pam_modules \
rpcsec_gss
$(CLOSED_BUILD)MSGSUBDIRS += \
$(CLOSED)/lib/smartcard
MSGSUBDIRS += \
$($(MACH)_MSGSUBDIRS)
sparc_MSGSUBDIRS= \
libprtdiag \
libprtdiag_psr
HDRSUBDIRS= \
auditd_plugins \
libbrand \
libbsm \
libc \
libcmdutils \
libcontract \
libcpc \
libctf \
libcurses \
libcryptoutil \
libdevice \
libdevid \
libdevinfo \
libdiskmgt \
libdladm \
libdlpi \
libdhcpagent \
libdhcpsvc \
libdhcputil \
libdisasm \
libdtrace \
libdtrace_jni \
libeti \
libfstyp \
libgen \
libwanboot \
libwanbootutil \
libipsecutil \
libinetcfg \
libinetsvc \
libinetutil \
libipmp \
libipp \
libkstat \
libkvm \
liblaadm \
libmacadm \
libmail \
libmd \
libmtmalloc \
libnvpair \
libnsl \
libpam \
libpctx \
libpicl \
libpicltree \
libplot \
libpool \
libproc \
librcm \
libscf \
libsmbios \
librestart \
librpcsvc \
librsm \
libsasl \
libsec \
libslp \
libsmedia \
libsysevent \
libtecla \
libtnf \
libtnfctl \
libtnfprobe \
libtsnet \
libtsol \
libvolmgt \
libumem \
libuutil \
libwrap \
libxcurses2 \
libzfs \
libzfs_jni \
libzoneinfo \
lvm \
openssl \
pkcs11 \
passwdutil \
../cmd/sendmail/libmilter \
fm \
udapl \
libmapid \
libkrb5 \
$($(MACH)_HDRSUBDIRS)
$(CLOSED_BUILD)HDRSUBDIRS += \
$(CLOSED)/lib/libc_i18n \
$(CLOSED)/lib/libike \
$(CLOSED)/lib/smartcard
sparc_HDRSUBDIRS= \
libdscp \
libwrsmconf
all := TARGET= all
check := TARGET= check
clean := TARGET= clean
clobber := TARGET= clobber
install := TARGET= install
install_h := TARGET= install_h
lint := TARGET= lint
_dc := TARGET= _dc
_msg := TARGET= _msg
.KEEP_STATE:
#
# For the all and install targets, we clearly must respect library
# dependencies so that the libraries link correctly. However, for
# the remaining targets (check, clean, clobber, install_h, lint, _dc
# and _msg), libraries do not have any dependencies on one another
# and thus respecting dependencies just slows down the build.
# As such, for these rules, we use pattern replacement to explicitly
# avoid triggering the dependency information. Note that for clean,
# clobber and lint, we must use $(NOWAIT_SUBDIRS) rather than
# $(SUBDIRS), to prevent `.WAIT' from expanding to `.WAIT-nodepend'.
#
all: $(SUBDIRS)
install: $(SUBDIRS) .WAIT install_extra
# extra libraries kept in other source areas
install_extra:
@cd ../cmd/sgs; pwd; $(MAKE) install_lib
@pwd
clean clobber lint: $(NOWAIT_SUBDIRS:%=%-nodepend)
install_h check: $(HDRSUBDIRS:%=%-nodepend)
_msg: $(MSGSUBDIRS:%=%-nodepend) .WAIT _dc
_dc: $(DCSUBDIRS:%=%-nodepend)
# dependencies for pam_modules (see below)
$(CLOSED_BUILD)SMARTCARD= $(CLOSED)/lib/smartcard
#
# Library interdependencies are called out explicitly here
#
auditd_plugins: libbsm libnsl libsecdb
gss_mechs/mech_krb5: libgss libnsl libsocket libresolv pkcs11
libadt_jni: libbsm
$(CLOSED_BUILD)libc: $(CLOSED)/lib/libc_i18n
libbsm: libtsol
libcmdutils: libavl
libcontract: libnvpair
libdevid: libdevinfo
libdevinfo: libnvpair libsec
libdhcpagent: libdhcputil libnsl libsocket
libdhcpsvc: libinetutil
libdhcputil: libinetutil
libdladm: libdlpi libdevinfo
libdtrace: libproc libgen libctf
libdtrace_jni: libuutil libdtrace
libefi: libuuid
libfstyp: libnvpair
$(CLOSED_BUILD)$(CLOSED)/lib/libelfsign: \
$(CLOSED)/lib/libike libcryptoutil pkcs11
libinetcfg: libnsl libsocket libdevinfo
libnsl: libmd5 libscf
libmapid: libresolv libcmd
libmacadm: libdevinfo
libuuid: libsocket
libinetutil: libsocket
libsecdb: libcmd libnsl
libsasl: libgss libsocket pkcs11 libmd
sasl_plugins: pkcs11 libgss libsocket libsasl
libsctp: libsocket
libsocket: libnsl
libldap5: libsasl libsocket libnsl libmd
libsldap: libldap5 libtsol
libpool: libnvpair libexacct
libzonecfg: libc libsocket libnsl libuuid libnvpair libsysevent libsec \
libbrand
libproc: ../cmd/sgs/librtld_db libzonecfg ../cmd/sgs/libelf libctf \
libbrand
libproject: libpool libproc libsecdb
libtsnet: libnsl libtsol libsecdb
libwrap: libnsl libsocket
libwanboot: libnvpair libresolv libnsl libsocket libdevinfo libinetutil \
libdhcputil openssl
libwanbootutil: libnsl
pam_modules: libproject passwdutil $(SMARTCARD)
libscf: libuutil libmd
libinetsvc: libscf
librestart: libuutil libscf
../cmd/sgs/libdl: ../cmd/sgs/libconv
../cmd/sgs/libelf: ../cmd/sgs/libconv
pkcs11: libcryptoutil
print: libldap5
udapl/udapl_tavor: udapl/libdat
libzfs: libdevinfo libdevid libgen libnvpair libuutil
libzfs_jni: libdiskmgt libnvpair libzfs
libzpool: libavl libumem libnvpair
libsec: libavl
brand: libc libsocket
#
# The reason this rule checks for the existence of the
# Makefile is that some of the directories do not exist
# in certain situations (e.g., exportable source builds,
# OpenSolaris).
#
$(SUBDIRS): FRC
@if [ -f $@/Makefile ]; then \
cd $@; pwd; $(MAKE) $(TARGET); \
else \
true; \
fi
$(SUBDIRS:%=%-nodepend):
@if [ -f $(@:%-nodepend=%)/Makefile ]; then \
cd $(@:%-nodepend=%); pwd; $(MAKE) $(TARGET); \
else \
true; \
fi
FRC: