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