xref: /titanic_44/usr/src/tools/Makefile (revision f4c46b1eda9212fd32ba197043d52239ef5c0a7f)
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.4 \
94	$(ROOTONBLD)/lib/python2.4/onbld \
95	$(ROOTONBLD)/lib/python2.4/onbld/Checks \
96	$(ROOTONBLD)/lib/python2.4/onbld/hgext \
97	$(ROOTONBLD)/lib/python2.4/onbld/Scm \
98	$(ROOTONBLD)/lib/python2.6 \
99	$(ROOTONBLD)/lib/python2.6/onbld \
100	$(ROOTONBLD)/lib/python2.6/onbld/Checks \
101	$(ROOTONBLD)/lib/python2.6/onbld/hgext \
102	$(ROOTONBLD)/lib/python2.6/onbld/Scm \
103	$(ROOTONBLD)/env \
104	$(ROOTONBLD)/etc \
105	$(ROOTONBLD)/etc/exception_lists \
106	$(ROOTONBLD)/gk \
107	$(ROOTONBLD)/man \
108	$(ROOTONBLD)/man/man1
109
110all :=		TARGET= install
111install :=	TARGET= install
112clean :=	TARGET= clean
113clobber :=	TARGET= clobber
114lint :=		TARGET= lint
115_msg :=		TARGET= _msg
116
117.KEEP_STATE:
118
119#
120# Only create directories in the tools proto area when doing an actual
121# build, not a clean or clobber.
122#
123DOROOTDIRS= $(ROOTDIRS)
124clobber:= DOROOTDIRS=
125clean:= DOROOTDIRS=
126
127all install: $(SUBDIRS)
128
129clean: $(SUBDIRS)
130
131clobber: $(SUBDIRS)
132	$(RM) -rf $(TOOLS_PROTO)
133
134lint: $(LINTSUBDIRS)
135
136_msg: $(MSGSUBDIRS)
137
138.PARALLEL: $(SUBDIRS) $(CLOSED_SUBDIRS)
139
140$(SUBDIRS) $(CLOSED_SUBDIRS): $(BOOT_SUBDIRS)
141
142$(BOOT_SUBDIRS) $(SUBDIRS): $$(DOROOTDIRS) $(ROOTONBLDLIBPY) FRC
143	@cd $@; pwd; $(MAKE) $(TARGET)
144
145$(ROOTDIRS):
146	$(INS.dir)
147
148$(ROOTONBLDLIBPY): $(ROOTDIRS)
149	$(RM) -r $@; $(SYMLINK) python2.4 $@
150
151FRC:
152