xref: /titanic_41/usr/src/tools/Makefile (revision 56b2bdd1f04d465cfe4a95b88ae5cba5884154e4)
1#
2# CDDL HEADER START
3#
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.
7#
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.
12#
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]
18#
19# CDDL HEADER END
20#
21
22#
23# Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
24#
25
26include ../Makefile.master
27
28# Bootstrap problem --
29# 'cw' must be built before anything else can be built.
30
31BOOT_SUBDIRS= \
32	cw
33
34COMMON_SUBDIRS= \
35	codereview \
36	codesign \
37	cscope-fast \
38	ctf \
39	depcheck \
40	env \
41	findunref \
42	ndrgen \
43	onbld \
44	pmodes \
45	gk \
46	install.bin \
47	lintdump \
48	protocmp \
49	protolist \
50	scripts
51
52#
53#  special versions of commands for use only in build
54#
55UNSHIPPED_SUBDIRS = \
56	elfsign
57
58sparc_SUBDIRS= \
59	chk4ubin \
60	stabs \
61	tokenize
62
63i386_SUBDIRS=		\
64	aw		\
65	elfextract	\
66	mbh_patch
67
68LINTSUBDIRS= \
69	codereview \
70	ctf \
71	cw \
72	findunref \
73	lintdump \
74	ndrgen \
75	protocmp \
76	protolist
77
78SUBDIRS= \
79	$($(MACH)_SUBDIRS) \
80	$(COMMON_SUBDIRS) \
81	$(UNSHIPPED_SUBDIRS)
82
83include Makefile.tools
84
85ROOTDIRS= \
86	$(ROOTOPT) \
87	$(ROOTONBLD) \
88	$(ROOTONBLD)/bin \
89	$(ROOTONBLD)/bin/$(MACH) \
90	$(ROOTONBLD)/lib \
91	$(ROOTONBLD)/lib/$(MACH) \
92	$(ROOTONBLD)/lib/perl \
93	$(ROOTONBLD)/lib/python2.6 \
94	$(ROOTONBLD)/lib/python2.6/onbld \
95	$(ROOTONBLD)/lib/python2.6/onbld/Checks \
96	$(ROOTONBLD)/lib/python2.6/onbld/hgext \
97	$(ROOTONBLD)/lib/python2.6/onbld/Scm \
98	$(ROOTONBLD)/env \
99	$(ROOTONBLD)/etc \
100	$(ROOTONBLD)/etc/exception_lists \
101	$(ROOTONBLD)/gk \
102	$(ROOTONBLD)/man \
103	$(ROOTONBLD)/man/man1
104
105all :=		TARGET= install
106install :=	TARGET= install
107clean :=	TARGET= clean
108clobber :=	TARGET= clobber
109lint :=		TARGET= lint
110_msg :=		TARGET= _msg
111
112.KEEP_STATE:
113
114#
115# Only create directories in the tools proto area when doing an actual
116# build, not a clean or clobber.
117#
118DOROOTDIRS= $(ROOTDIRS)
119clobber:= DOROOTDIRS=
120clean:= DOROOTDIRS=
121
122all install: $(SUBDIRS)
123
124clean: $(SUBDIRS)
125
126clobber: $(SUBDIRS)
127	$(RM) -rf $(TOOLS_PROTO)
128
129lint: $(LINTSUBDIRS)
130
131_msg: $(MSGSUBDIRS)
132
133.PARALLEL: $(SUBDIRS) $(CLOSED_SUBDIRS)
134
135$(SUBDIRS) $(CLOSED_SUBDIRS): $(BOOT_SUBDIRS)
136
137$(BOOT_SUBDIRS) $(SUBDIRS): $$(DOROOTDIRS) $(ROOTONBLDLIBPY) FRC
138	@cd $@; pwd; $(MAKE) $(TARGET)
139
140$(ROOTDIRS):
141	$(INS.dir)
142
143$(ROOTONBLDLIBPY): $(ROOTDIRS)
144	$(RM) -r $@; $(SYMLINK) python2.6 $@
145
146FRC:
147