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