xref: /titanic_52/usr/src/tools/Makefile (revision 269e59f9a28bf47e0f463e64fc5af4a408b73b21)
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	bfuld \
36	codereview \
37	codesign \
38	cscope-fast \
39	ctf \
40	depcheck \
41	env \
42	fastfs \
43	findunref \
44	ndrgen \
45	onbld \
46	pmodes \
47	gk \
48	install.bin \
49	lintdump \
50	protocmp \
51	protolist \
52	scripts
53
54#
55#  special versions of commands for use only in build
56#
57UNSHIPPED_SUBDIRS = \
58	elfsign
59
60sparc_SUBDIRS= \
61	chk4ubin \
62	stabs \
63	tokenize
64
65i386_SUBDIRS=		\
66	aw		\
67	elfextract	\
68	mbh_patch
69
70LINTSUBDIRS= \
71	codereview \
72	ctf \
73	cw \
74	findunref \
75	lintdump \
76	ndrgen \
77	protocmp \
78	protolist
79
80SUBDIRS= \
81	$($(MACH)_SUBDIRS) \
82	$(COMMON_SUBDIRS) \
83	$(UNSHIPPED_SUBDIRS)
84
85include Makefile.tools
86
87ROOTDIRS= \
88	$(ROOTOPT) \
89	$(ROOTONBLD) \
90	$(ROOTONBLD)/bin \
91	$(ROOTONBLD)/bin/$(MACH) \
92	$(ROOTONBLD)/lib \
93	$(ROOTONBLD)/lib/$(MACH) \
94	$(ROOTONBLD)/lib/perl \
95	$(ROOTONBLD)/lib/python2.4 \
96	$(ROOTONBLD)/lib/python2.4/onbld \
97	$(ROOTONBLD)/lib/python2.4/onbld/Checks \
98	$(ROOTONBLD)/lib/python2.4/onbld/hgext \
99	$(ROOTONBLD)/lib/python2.4/onbld/Scm \
100	$(ROOTONBLD)/lib/python2.6 \
101	$(ROOTONBLD)/lib/python2.6/onbld \
102	$(ROOTONBLD)/lib/python2.6/onbld/Checks \
103	$(ROOTONBLD)/lib/python2.6/onbld/hgext \
104	$(ROOTONBLD)/lib/python2.6/onbld/Scm \
105	$(ROOTONBLD)/env \
106	$(ROOTONBLD)/etc \
107	$(ROOTONBLD)/etc/exception_lists \
108	$(ROOTONBLD)/gk \
109	$(ROOTONBLD)/man \
110	$(ROOTONBLD)/man/man1 \
111	$(ROOTONBLD)/man/sman1
112
113all :=		TARGET= install
114install :=	TARGET= install
115clean :=	TARGET= clean
116clobber :=	TARGET= clobber
117lint :=		TARGET= lint
118_msg :=		TARGET= _msg
119
120.KEEP_STATE:
121
122#
123# Only create directories in the tools proto area when doing an actual
124# build, not a clean or clobber.
125#
126DOROOTDIRS= $(ROOTDIRS)
127clobber:= DOROOTDIRS=
128clean:= DOROOTDIRS=
129
130all install: $(SUBDIRS)
131
132clean: $(SUBDIRS)
133
134clobber: $(SUBDIRS)
135	$(RM) -rf $(TOOLS_PROTO)
136
137lint: $(LINTSUBDIRS)
138
139_msg: $(MSGSUBDIRS)
140
141.PARALLEL: $(SUBDIRS) $(CLOSED_SUBDIRS)
142
143$(SUBDIRS) $(CLOSED_SUBDIRS): $(BOOT_SUBDIRS)
144
145$(BOOT_SUBDIRS) $(SUBDIRS): $$(DOROOTDIRS) $(ROOTONBLDLIBPY) FRC
146	@cd $@; pwd; $(MAKE) $(TARGET)
147
148$(ROOTDIRS):
149	$(INS.dir)
150
151$(ROOTONBLDLIBPY): $(ROOTDIRS)
152	$(RM) -r $@; $(SYMLINK) python2.4 $@
153
154FRC:
155