xref: /titanic_41/usr/src/tools/Makefile (revision 505d05c73a6e56769f263d4803b22eddd168ee24)
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, Version 1.0 only
6# (the "License").  You may not use this file except in compliance
7# with the License.
8#
9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10# or http://www.opensolaris.org/os/licensing.
11# See the License for the specific language governing permissions
12# and limitations under the License.
13#
14# When distributing Covered Code, include this CDDL HEADER in each
15# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16# If applicable, add the following below this CDDL HEADER, with the
17# fields enclosed by brackets "[]" replaced with your own identifying
18# information: Portions Copyright [yyyy] [name of copyright owner]
19#
20# CDDL HEADER END
21#
22#
23# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26#ident	"%Z%%M%	%I%	%E% SMI"
27
28include ../Makefile.master
29
30# Bootstrap problem --
31# 'cw' must be built before anything else can be built.
32
33BOOT_SUBDIRS= \
34	cw
35
36COMMON_SUBDIRS= \
37	abi \
38	bfuld \
39	codereview \
40	cscope-fast \
41	ctf \
42	depcheck \
43	env \
44	fastfs \
45	findunref \
46	pmodes \
47	gk \
48	install.bin \
49	protocmp \
50	protolist \
51	scripts
52
53#
54#  special versions of commands for use only in build
55#
56UNSHIPPED_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	protocmp \
72	protolist
73
74SUBDIRS= $(BOOT_SUBDIRS) $($(MACH)_SUBDIRS) $(COMMON_SUBDIRS) \
75	$(UNSHIPPED_SUBDIRS)
76
77#
78# Packages built here
79#
80COMMON_PKG_SUBDIRS= \
81	SUNWonbld
82
83sparc_PKG_SUBDIRS=
84
85i386_PKG_SUBDIRS= \
86	SUNWmrtools
87
88PKG_SUBDIRS= $($(MACH)_PKG_SUBDIRS) $(COMMON_PKG_SUBDIRS)
89
90include Makefile.tools
91
92ROOTDIRS= \
93	$(ROOTONBLD) \
94	$(ROOTONBLD)/bin \
95	$(ROOTONBLD)/bin/$(MACH) \
96	$(ROOTONBLD)/lib \
97	$(ROOTONBLD)/lib/$(MACH) \
98	$(ROOTONBLD)/env \
99	$(ROOTONBLD)/etc \
100	$(ROOTONBLD)/etc/abi \
101	$(ROOTONBLD)/gk \
102	$(ROOTONBLD)/man \
103	$(ROOTONBLD)/man/man1
104
105all :=		TARGET= install
106install :=	TARGET= install
107clean :=	TARGET= clean
108clobber :=	TARGET= clobber
109lint :=		TARGET= lint
110_msg :=		TARGET= _msg
111
112.KEEP_STATE:
113
114all install: $(ROOTDIRS) .WAIT $(SUBDIRS)
115
116clean: $(SUBDIRS)
117
118clobber: $(SUBDIRS)
119	$(RM) -rf $(TOOLS_PROTO)
120
121pkg: install .WAIT $(PKG_SUBDIRS)
122
123lint: $(LINTSUBDIRS)
124
125_msg: $(MSGSUBDIRS)
126
127$(SUBDIRS): FRC
128	@cd $@; pwd; $(MAKE) $(TARGET)
129
130$(PKG_SUBDIRS): FRC
131	@cd $@; pwd; $(MAKE) install
132
133FRC:
134
135$(ROOTDIRS):
136	$(INS.dir)
137