xref: /titanic_51/usr/src/tools/Makefile (revision f34a71784df3fbc5d1227a7b6201fd318ad1667e)
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 2009 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	abi \
37	bfuld \
38	codereview \
39	codesign \
40	cscope-fast \
41	ctf \
42	depcheck \
43	env \
44	fastfs \
45	findunref \
46	ndrgen \
47	onbld \
48	pmodes \
49	gk \
50	install.bin \
51	lintdump \
52	protocmp \
53	protolist \
54	scripts
55
56#
57#  special versions of commands for use only in build
58#
59UNSHIPPED_SUBDIRS = \
60	elfsign
61
62sparc_SUBDIRS= \
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
86#
87# Packages built here
88#
89PKG_SUBDIRS= SUNWonbld
90
91include Makefile.tools
92
93ROOTDIRS= \
94	$(ROOTOPT) \
95	$(ROOTONBLD) \
96	$(ROOTONBLD)/bin \
97	$(ROOTONBLD)/bin/$(MACH) \
98	$(ROOTONBLD)/lib \
99	$(ROOTONBLD)/lib/$(MACH) \
100	$(ROOTONBLD)/lib/python \
101	$(ROOTONBLD)/lib/python/onbld \
102	$(ROOTONBLD)/lib/python/onbld/Checks \
103	$(ROOTONBLD)/lib/python/onbld/hgext \
104	$(ROOTONBLD)/lib/python/onbld/Scm \
105	$(ROOTONBLD)/env \
106	$(ROOTONBLD)/etc \
107	$(ROOTONBLD)/etc/abi \
108	$(ROOTONBLD)/gk \
109	$(ROOTONBLD)/man \
110	$(ROOTONBLD)/man/man1
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
121all install: $(SUBDIRS)
122
123clean: $(SUBDIRS)
124
125clobber: $(SUBDIRS)
126	$(RM) -rf $(TOOLS_PROTO)
127
128pkg: install .WAIT $(PKG_SUBDIRS)
129
130lint: $(LINTSUBDIRS)
131
132_msg: $(MSGSUBDIRS)
133
134.PARALLEL: $(SUBDIRS) $(PKG_SUBDIRS) $(CLOSED_SUBDIRS)
135
136$(SUBDIRS) $(CLOSED_SUBDIRS): $(BOOT_SUBDIRS)
137
138$(BOOT_SUBDIRS) $(SUBDIRS): $(ROOTDIRS) FRC
139	@cd $@; pwd; $(MAKE) $(TARGET)
140
141$(PKG_SUBDIRS): FRC
142	@cd $@; pwd; $(MAKE) install
143
144FRC:
145
146$(ROOTDIRS):
147	$(INS.dir)
148