xref: /titanic_51/usr/src/tools/Makefile (revision facf4a8d7b59fde89a8662b4f4c73a758e6c402c)
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 2006 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
66LINTSUBDIRS= \
67	codereview \
68	ctf \
69	cw \
70	findunref \
71	lintdump \
72	protocmp \
73	protolist
74
75SUBDIRS= $(BOOT_SUBDIRS) $($(MACH)_SUBDIRS) $(COMMON_SUBDIRS)
76
77$(CLOSED_BUILD)CLOSED_SUBDIRS= $(CLOSED_UNSHIPPED_SUBDIRS)
78
79#
80# Packages built here
81#
82COMMON_PKG_SUBDIRS= \
83	SUNWonbld
84
85sparc_PKG_SUBDIRS=
86
87i386_PKG_SUBDIRS= \
88	SUNWmrtools
89
90PKG_SUBDIRS= $($(MACH)_PKG_SUBDIRS) $(COMMON_PKG_SUBDIRS)
91
92include Makefile.tools
93
94ROOTDIRS= \
95	$(ROOTONBLD) \
96	$(ROOTONBLD)/bin \
97	$(ROOTONBLD)/bin/$(MACH) \
98	$(ROOTONBLD)/lib \
99	$(ROOTONBLD)/lib/$(MACH) \
100	$(ROOTONBLD)/env \
101	$(ROOTONBLD)/etc \
102	$(ROOTONBLD)/etc/abi \
103	$(ROOTONBLD)/gk \
104	$(ROOTONBLD)/man \
105	$(ROOTONBLD)/man/man1
106
107all :=		TARGET= install
108install :=	TARGET= install
109clean :=	TARGET= clean
110clobber :=	TARGET= clobber
111lint :=		TARGET= lint
112_msg :=		TARGET= _msg
113
114.KEEP_STATE:
115
116all install: $(ROOTDIRS) .WAIT $(SUBDIRS) $(CLOSED_SUBDIRS)
117
118clean: $(SUBDIRS) $(CLOSED_SUBDIRS)
119
120clobber: $(SUBDIRS) $(CLOSED_SUBDIRS)
121	$(RM) -rf $(TOOLS_PROTO)
122
123pkg: install .WAIT $(PKG_SUBDIRS)
124
125lint: $(LINTSUBDIRS)
126
127_msg: $(MSGSUBDIRS)
128
129$(SUBDIRS): FRC
130	@cd $@; pwd; $(MAKE) $(TARGET)
131
132$(PKG_SUBDIRS): FRC
133	@cd $@; pwd; $(MAKE) install
134
135$(CLOSED_SUBDIRS): FRC
136	cd $(CLOSED)/tools/$@; pwd; $(MAKE) $(TARGET)
137
138FRC:
139
140$(ROOTDIRS):
141	$(INS.dir)
142