xref: /titanic_41/usr/src/tools/Makefile (revision f39b87890f92b92a38d84654c635ca63e14ffb1d)
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# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25#ident	"%Z%%M%	%I%	%E% SMI"
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	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	stabs \
63	tokenize
64
65i386_SUBDIRS=		\
66	aw		\
67	elfextract	\
68	mbh_patch
69
70LINTSUBDIRS= \
71	codereview \
72	ctf \
73	cw \
74	findunref \
75	lintdump \
76	ndrgen \
77	protocmp \
78	protolist
79
80SUBDIRS= \
81	$(BOOT_SUBDIRS) \
82	$($(MACH)_SUBDIRS) \
83	$(COMMON_SUBDIRS) \
84	$(UNSHIPPED_SUBDIRS)
85
86#
87# Packages built here
88#
89COMMON_PKG_SUBDIRS= \
90	SUNWonbld
91
92sparc_PKG_SUBDIRS=
93
94i386_PKG_SUBDIRS= \
95	SUNWmrtools
96
97PKG_SUBDIRS= $($(MACH)_PKG_SUBDIRS) $(COMMON_PKG_SUBDIRS)
98
99include Makefile.tools
100
101ROOTDIRS= \
102	$(ROOTONBLD) \
103	$(ROOTONBLD)/bin \
104	$(ROOTONBLD)/bin/$(MACH) \
105	$(ROOTONBLD)/lib \
106	$(ROOTONBLD)/lib/$(MACH) \
107	$(ROOTONBLD)/env \
108	$(ROOTONBLD)/etc \
109	$(ROOTONBLD)/etc/abi \
110	$(ROOTONBLD)/gk \
111	$(ROOTONBLD)/man \
112	$(ROOTONBLD)/man/man1
113
114all :=		TARGET= install
115install :=	TARGET= install
116clean :=	TARGET= clean
117clobber :=	TARGET= clobber
118lint :=		TARGET= lint
119_msg :=		TARGET= _msg
120
121.KEEP_STATE:
122
123all install: $(ROOTDIRS) .WAIT $(SUBDIRS)
124
125clean: $(SUBDIRS)
126
127clobber: $(SUBDIRS)
128	$(RM) -rf $(TOOLS_PROTO)
129
130pkg: install .WAIT $(PKG_SUBDIRS)
131
132lint: $(LINTSUBDIRS)
133
134_msg: $(MSGSUBDIRS)
135
136$(SUBDIRS): FRC
137	@cd $@; pwd; $(MAKE) $(TARGET)
138
139$(PKG_SUBDIRS): FRC
140	@cd $@; pwd; $(MAKE) install
141
142FRC:
143
144$(ROOTDIRS):
145	$(INS.dir)
146