xref: /titanic_52/usr/src/tools/Makefile (revision e5803b76927480e8f9b67b22201c484ccf4c2bcf)
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	$(ROOTONBLD)/man/sman1
110
111all :=		TARGET= install
112install :=	TARGET= install
113clean :=	TARGET= clean
114clobber :=	TARGET= clobber
115lint :=		TARGET= lint
116_msg :=		TARGET= _msg
117
118.KEEP_STATE:
119
120#
121# Only create directories in the tools proto area when doing an actual
122# build, not a clean or clobber.
123#
124DOROOTDIRS= $(ROOTDIRS)
125clobber:= DOROOTDIRS=
126clean:= DOROOTDIRS=
127
128all install: $(SUBDIRS)
129
130clean: $(SUBDIRS)
131
132clobber: $(SUBDIRS)
133	$(RM) -rf $(TOOLS_PROTO)
134
135lint: $(LINTSUBDIRS)
136
137_msg: $(MSGSUBDIRS)
138
139.PARALLEL: $(SUBDIRS) $(CLOSED_SUBDIRS)
140
141$(SUBDIRS) $(CLOSED_SUBDIRS): $(BOOT_SUBDIRS)
142
143$(BOOT_SUBDIRS) $(SUBDIRS): $$(DOROOTDIRS) $(ROOTONBLDLIBPY) FRC
144	@cd $@; pwd; $(MAKE) $(TARGET)
145
146$(ROOTDIRS):
147	$(INS.dir)
148
149$(ROOTONBLDLIBPY): $(ROOTDIRS)
150	$(RM) -r $@; $(SYMLINK) python2.4 $@
151
152FRC:
153