xref: /titanic_50/usr/src/tools/Makefile (revision 711890bc9379ceea66272dc8d4981812224ea86e)
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	cscope-fast \
40	ctf \
41	depcheck \
42	env \
43	fastfs \
44	findunref \
45	pmodes \
46	gk \
47	install.bin \
48	lintdump \
49	protocmp \
50	protolist \
51	scripts
52
53#
54#  special versions of commands for use only in build
55#
56CLOSED_UNSHIPPED_SUBDIRS = \
57	elfsign
58
59sparc_SUBDIRS= \
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	protocmp \
75	protolist
76
77SUBDIRS= $(BOOT_SUBDIRS) $($(MACH)_SUBDIRS) $(COMMON_SUBDIRS)
78
79$(CLOSED_BUILD)CLOSED_SUBDIRS= $(CLOSED_UNSHIPPED_SUBDIRS)
80
81#
82# Packages built here
83#
84COMMON_PKG_SUBDIRS= \
85	SUNWonbld
86
87sparc_PKG_SUBDIRS=
88
89i386_PKG_SUBDIRS= \
90	SUNWmrtools
91
92PKG_SUBDIRS= $($(MACH)_PKG_SUBDIRS) $(COMMON_PKG_SUBDIRS)
93
94include Makefile.tools
95
96ROOTDIRS= \
97	$(ROOTONBLD) \
98	$(ROOTONBLD)/bin \
99	$(ROOTONBLD)/bin/$(MACH) \
100	$(ROOTONBLD)/lib \
101	$(ROOTONBLD)/lib/$(MACH) \
102	$(ROOTONBLD)/env \
103	$(ROOTONBLD)/etc \
104	$(ROOTONBLD)/etc/abi \
105	$(ROOTONBLD)/gk \
106	$(ROOTONBLD)/man \
107	$(ROOTONBLD)/man/man1
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
118all install: $(ROOTDIRS) .WAIT $(SUBDIRS) $(CLOSED_SUBDIRS)
119
120clean: $(SUBDIRS) $(CLOSED_SUBDIRS)
121
122clobber: $(SUBDIRS) $(CLOSED_SUBDIRS)
123	$(RM) -rf $(TOOLS_PROTO)
124
125pkg: install .WAIT $(PKG_SUBDIRS)
126
127lint: $(LINTSUBDIRS)
128
129_msg: $(MSGSUBDIRS)
130
131$(SUBDIRS): FRC
132	@cd $@; pwd; $(MAKE) $(TARGET)
133
134$(PKG_SUBDIRS): FRC
135	@cd $@; pwd; $(MAKE) install
136
137$(CLOSED_SUBDIRS): FRC
138	cd $(CLOSED)/tools/$@; pwd; $(MAKE) $(TARGET)
139
140FRC:
141
142$(ROOTDIRS):
143	$(INS.dir)
144