libefi: import efichar.c for ucs2 support
[unleashed.git] / usr / src / cmd / Makefile
blobf0323b9bb9006212a7e4c6aa526124e61599abb1
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 2016 Joyent, Inc.
25 # Copyright (c) 2012 by Delphix. All rights reserved.
26 # Copyright (c) 2013 DEY Storage Systems, Inc. All rights reserved.
27 # Copyright 2014 Garrett D'Amore <garrett@damore.org>
28 # Copyright 2016 Toomas Soome <tsoome@me.com>
29 # Copyright 2016 Nexenta Systems, Inc.
32 include ../Makefile.master
35 # Note that the command 'perl' is first in the list, violating
36 # alphabetical order. This is because it is very long-running and
37 # should be given the most wall-clock time for a parallel build.
39 # Commands in the FIRST_SUBDIRS list are built before starting the build
40 # of other commands. Currently this includes only 'isaexec' and
41 # 'platexec'. This is necessary because $(ROOT)/usr/lib/isaexec or
42 # $(ROOT)/usr/lib/platexec must exist when some other commands are built
43 # because their 'make install' creates a hard link to one of them.
46 FIRST_SUBDIRS= \
47 isaexec \
48 platexec
50 COMMON_SUBDIRS= \
51 allocate \
52 perl \
53 Adm \
54 abi \
55 acct \
56 acctadm \
57 ast \
58 audio \
59 auths \
60 autopush \
61 backup \
62 bart \
63 basename \
64 bc \
65 beadm \
66 boot \
67 busstat \
68 cal \
69 cdrw \
70 cfgadm \
71 chgrp \
72 chmod \
73 chown \
74 chroot \
75 cmd-crypto \
76 cmd-inet \
77 col \
78 compress \
79 consadm \
80 coreadm \
81 cpio \
82 cpc \
83 cron \
84 crypt \
85 csh \
86 csplit \
87 ctfconvert \
88 ctfdiff \
89 ctfdump \
90 ctfmerge \
91 ctrun \
92 ctstat \
93 ctwatch \
94 datadm \
95 date \
96 dc \
97 dd \
98 devfsadm \
99 syseventd \
100 devctl \
101 devinfo \
102 devmgmt \
103 devprop \
104 dfs.cmds \
105 diff \
106 diff3 \
107 dircmp \
108 dirname \
109 diskinfo \
110 diskmgtd \
111 dispadmin \
112 dladm \
113 dlstat \
114 dmesg \
115 dodatadm \
116 dtrace \
117 du \
118 dumpadm \
119 dumpcs \
120 ed \
121 eeprom \
122 eject \
123 emul64ioctl \
124 enhance \
125 expand \
126 expr \
127 exstr \
128 factor \
129 fcinfo \
130 fcoesvc \
131 fdetach \
132 fdformat \
133 fdisk \
134 ficl \
135 filesync \
136 find \
137 flowadm \
138 flowstat \
139 fm \
140 fmt \
141 fmthard \
142 fmtmsg \
143 fold \
144 format \
145 fs.d \
146 fstyp \
147 fuser \
148 fwflash \
149 gcore \
150 gencat \
151 geniconvtbl \
152 genmsg \
153 getconf \
154 getdevpolicy \
155 getent \
156 getfacl \
157 getmajor \
158 getopt \
159 gettext \
160 gettxt \
161 groups \
162 growfs \
163 grpck \
164 gss \
165 hal \
166 halt \
167 head \
168 hostid \
169 hostname \
170 hotplug \
171 hotplugd \
172 ibd_upgrade \
173 iconv \
174 idmap \
175 init \
176 initpkg \
177 intrd \
178 intrstat \
179 ipcrm \
180 ipcs \
181 ipdadm \
182 ipf \
183 isainfo \
184 isalist \
185 itutools \
186 iscsiadm \
187 iscsid \
188 iscsitsvc \
189 isns \
190 itadm \
191 kbd \
192 keyserv \
193 killall \
194 krb5 \
195 ksh \
196 kvmstat \
197 last \
198 lastcomm \
199 latencytop \
200 ldap \
201 ldapcachemgr \
202 lgrpinfo \
203 line \
204 link \
205 dlmgmtd \
206 listen \
207 loadkeys \
208 locale \
209 lockstat \
210 locator \
211 lofiadm \
212 logadm \
213 logger \
214 login \
215 logins \
216 look \
217 ls \
218 luxadm \
219 mail \
220 mailwrapper \
221 mailx \
222 make \
223 mdb \
224 mesg \
225 mkdir \
226 mkfifo \
227 mkfile \
228 mkmsgs \
229 mknod \
230 mkpwdict \
231 mktemp \
232 modload \
233 mpathadm \
234 msgfmt \
235 msgid \
236 mt \
237 mv \
238 mvdir \
239 ndmpadm \
240 ndmpd \
241 ndmpstat \
242 netadm \
243 netfiles \
244 newform \
245 newgrp \
246 news \
247 newtask \
248 nice \
249 nl \
250 nlsadmin \
251 nohup \
252 nscd \
253 oamuser \
254 od \
255 pack \
256 pagesize \
257 passmgmt \
258 passwd \
259 pathchk \
260 pbind \
261 pcidr \
262 pcitool \
263 pfexec \
264 pfexecd \
265 pginfo \
266 pgstat \
267 pgrep \
268 picl \
269 plimit \
270 policykit \
271 pools \
272 power \
273 powertop \
274 ppgsz \
275 pg \
276 plockstat \
277 pr \
278 prctl \
279 printenv \
280 printf \
281 priocntl \
282 profiles \
283 projadd \
284 projects \
285 prstat \
286 prtconf \
287 prtdiag \
288 prtvtoc \
289 ps \
290 psradm \
291 psrinfo \
292 psrset \
293 ptools \
294 pwck \
295 pyzfs \
296 raidctl \
297 ramdiskadm \
298 rcap \
299 rcm_daemon \
300 rctladm \
301 refer \
302 regcmp \
303 renice \
304 rm \
305 rmdir \
306 rmformat \
307 rmmount \
308 rmvolmgr \
309 roles \
310 rpcbind \
311 rpcgen \
312 rpcinfo \
313 rpcsvc \
314 runat \
315 sa \
316 saf \
317 sasinfo \
318 savecore \
319 sbdadm \
320 script \
321 scsi \
322 sdiff \
323 sdpadm \
324 setfacl \
325 setmnt \
326 setpgrp \
327 sgs \
328 shcomp \
329 smbios \
330 smbsrv \
331 smserverd \
332 sort \
333 spell \
334 split \
335 sqlite \
336 srchtxt \
337 srptadm \
338 srptsvc \
339 stat \
340 stmfadm \
341 stmfsvc \
342 stmsboot \
343 streams \
344 strings \
345 su \
346 sulogin \
347 sunpc \
348 svc \
349 swap \
350 sync \
351 sysdef \
352 syseventadm \
353 syslogd \
354 tail \
355 tar \
356 tcpd \
357 th_tools \
358 tip \
359 terminfo \
360 touch \
361 tr \
362 trapstat \
363 truss \
364 tty \
365 ttymon \
366 tzreload \
367 units \
368 unlink \
369 unpack \
370 userattr \
371 users \
372 utmpd \
373 uuidgen \
374 volcheck \
375 volrmmount \
376 vrrpadm \
377 vscan \
378 vt \
380 wall \
381 which \
382 who \
383 whodo \
384 wracct \
385 write \
386 xargs \
387 xhci \
388 xstr \
389 ypcmd \
390 yppasswd \
391 zdb \
392 zdump \
393 zfs \
394 zhack \
395 zinject \
396 zlogin \
397 zoneadm \
398 zoneadmd \
399 zonecfg \
400 zonename \
401 zpool \
402 zlook \
403 zonestat \
404 zstreamdump \
405 ztest
407 i386_SUBDIRS= \
408 acpi \
409 acpihpd \
410 biosdev \
411 diskscan \
412 nvmeadm \
413 rtc \
414 ucodeadm \
416 sparc_SUBDIRS= \
417 cvcd \
418 dcs \
419 device_remap \
420 drd \
421 fruadm \
422 ldmad \
423 oplhpd \
424 prtdscp \
425 prtfru \
426 scadm \
427 sckmd \
428 sf880drd \
429 virtinfo \
430 vntsd
433 # Commands that are messaged.
435 MSGSUBDIRS= \
436 abi \
437 acctadm \
438 allocate \
439 audio \
440 audit \
441 auditconfig \
442 auditd \
443 auditrecord \
444 auditset \
445 auths \
446 autopush \
447 backup \
448 bart \
449 basename \
450 beadm \
451 busstat \
452 cal \
453 cdrw \
454 cfgadm \
455 chgrp \
456 chmod \
457 chown \
458 cmd-crypto \
459 cmd-inet \
460 col \
461 compress \
462 consadm \
463 coreadm \
464 cpio \
465 cpc \
466 cron \
467 csh \
468 csplit \
469 ctrun \
470 ctstat \
471 ctwatch \
472 datadm \
473 date \
474 dc \
475 dcs \
476 dd \
477 devfsadm \
478 dfs.cmds \
479 diff \
480 dladm \
481 dlstat \
482 du \
483 dumpcs \
484 ed \
485 eject \
486 expand \
487 expr \
488 fcinfo \
489 filesync \
490 find \
491 flowadm \
492 flowstat \
493 fm \
494 fold \
495 fs.d \
496 fwflash \
497 geniconvtbl \
498 genmsg \
499 getconf \
500 getent \
501 gettext \
502 gettxt \
503 grpck \
504 gss \
505 halt \
506 head \
507 hostname \
508 hotplug \
509 iconv \
510 idmap \
511 isaexec \
512 iscsiadm \
513 iscsid \
514 isns \
515 itadm \
516 kbd \
517 krb5 \
518 ksh \
519 last \
520 ldap \
521 ldapcachemgr \
522 lgrpinfo \
523 locale \
524 lofiadm \
525 logadm \
526 logger \
527 logins \
528 ls \
529 luxadm \
530 mailx \
531 make \
532 mesg \
533 mkdir \
534 mkpwdict \
535 mktemp \
536 mpathadm \
537 msgfmt \
538 mv \
539 ndmpadm \
540 ndmpstat \
541 newgrp \
542 newtask \
543 nice \
544 nohup \
545 pack \
546 passwd \
547 passmgmt \
548 pathchk \
549 pfexec \
550 pg \
551 pgrep \
552 picl \
553 pools \
554 power \
555 pr \
556 praudit \
557 profiles \
558 projadd \
559 projects \
560 prstat \
561 prtdiag \
562 ps \
563 psrinfo \
564 ptools \
565 raidctl \
566 ramdiskadm \
567 rcap \
568 rcm_daemon \
569 refer \
570 regcmp \
571 renice \
572 roles \
573 rm \
574 rmdir \
575 rmformat \
576 rmmount \
577 rmvolmgr \
578 sasinfo \
579 sbdadm \
580 scadm \
581 script \
582 scsi \
583 sdiff \
584 sdpadm \
585 sgs \
586 shcomp \
587 smbsrv \
588 sort \
589 split \
590 srptadm \
591 stat \
592 stmfadm \
593 stmsboot \
594 strings \
595 su \
596 svc \
597 swap \
598 syseventadm \
599 syseventd \
600 tar \
601 touch \
602 tty \
603 ttymon \
604 tzreload \
605 units \
606 unlink \
607 unpack \
608 userattr \
609 volcheck \
610 volrmmount \
611 vrrpadm \
612 vscan \
614 who \
615 whodo \
616 wracct \
617 write \
618 xargs \
619 yppasswd \
620 zdump \
621 zfs \
622 zlogin \
623 zoneadm \
624 zoneadmd \
625 zonecfg \
626 zonename \
627 zpool \
628 zonestat
630 sparc_MSGSUBDIRS= \
631 fruadm \
632 prtdscp \
633 prtfru \
634 virtinfo \
635 vntsd
637 i386_MSGSUBDIRS= \
638 ucodeadm
641 # commands that use dcgettext for localized time, LC_TIME
643 DCSUBDIRS= \
644 cal \
645 cfgadm \
646 diff \
647 ls \
648 pr \
649 ps \
650 tar \
652 who \
653 whodo \
654 write
657 # commands that belong only to audit.
659 AUDITSUBDIRS= \
660 amt \
661 audit \
662 audit_warn \
663 auditconfig \
664 auditd \
665 auditrecord \
666 auditreduce \
667 auditset \
668 auditstat \
669 praudit
672 # commands not owned by the systems group
674 BWOSDIRS=
677 all := TARGET = all
678 install := TARGET = install
679 clean := TARGET = clean
680 clobber := TARGET = clobber
681 _msg := TARGET = _msg
682 _dc := TARGET = _dc
684 .KEEP_STATE:
686 SUBDIRS = $(COMMON_SUBDIRS) $($(MACH)_SUBDIRS)
688 .PARALLEL: $(BWOSDIRS) $(SUBDIRS) $(MSGSUBDIRS) $(AUDITSUBDIRS)
690 all install clean clobber: $(FIRST_SUBDIRS) .WAIT $(SUBDIRS) \
691 $(AUDITSUBDIRS)
694 # Manifests cannot be checked in parallel, because we are using
695 # the global repository that is in $(SRC)/cmd/svc/seed/global.db.
696 # For this reason, to avoid .PARALLEL and .NO_PARALLEL conflicts,
697 # we spawn off a sub-make to perform the non-parallel 'make check'
699 check:
700 $(MAKE) -f Makefile.check check
703 # The .WAIT directive works around an apparent bug in parallel make.
704 # Evidently make was getting the target _msg vs. _dc confused under
705 # some level of parallelization, causing some of the _dc objects
706 # not to be built.
708 _msg: $(MSGSUBDIRS) $($(MACH)_MSGSUBDIRS) .WAIT _dc
710 _dc: $(DCSUBDIRS)
713 # Dependencies
715 fs.d: fstyp
716 ksh: shcomp isaexec
717 mdb: terminfo
718 fmt: mailx
720 $(FIRST_SUBDIRS) $(BWOSDIRS) $(SUBDIRS) $(AUDITSUBDIRS): FRC
721 @if [ -f $@/Makefile ]; then \
722 cd $@; pwd; $(MAKE) $(TARGET); \
723 else \
724 true; \
726 FRC: