xref: /illumos-gate/usr/src/tools/Makefile (revision 84bf06e9e5fd6d61897cc8c298a0f3e807b27094)
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	chk4ubin \
64	stabs \
65	tokenize
66
67i386_SUBDIRS=		\
68	aw		\
69	elfextract	\
70	mbh_patch
71
72LINTSUBDIRS= \
73	codereview \
74	ctf \
75	cw \
76	findunref \
77	lintdump \
78	ndrgen \
79	protocmp \
80	protolist
81
82SUBDIRS= \
83	$($(MACH)_SUBDIRS) \
84	$(COMMON_SUBDIRS) \
85	$(UNSHIPPED_SUBDIRS)
86
87#
88# Packages built here
89#
90PKG_SUBDIRS= SUNWonbld
91
92include Makefile.tools
93
94ROOTDIRS= \
95	$(ROOTOPT) \
96	$(ROOTONBLD) \
97	$(ROOTONBLD)/bin \
98	$(ROOTONBLD)/bin/$(MACH) \
99	$(ROOTONBLD)/lib \
100	$(ROOTONBLD)/lib/$(MACH) \
101	$(ROOTONBLD)/lib/python \
102	$(ROOTONBLD)/lib/python/onbld \
103	$(ROOTONBLD)/lib/python/onbld/Checks \
104	$(ROOTONBLD)/lib/python/onbld/hgext \
105	$(ROOTONBLD)/lib/python/onbld/Scm \
106	$(ROOTONBLD)/env \
107	$(ROOTONBLD)/etc \
108	$(ROOTONBLD)/etc/abi \
109	$(ROOTONBLD)/gk \
110	$(ROOTONBLD)/man \
111	$(ROOTONBLD)/man/man1
112
113all :=		TARGET= install
114install :=	TARGET= install
115clean :=	TARGET= clean
116clobber :=	TARGET= clobber
117lint :=		TARGET= lint
118_msg :=		TARGET= _msg
119
120.KEEP_STATE:
121
122all install: $(SUBDIRS)
123
124clean: $(SUBDIRS)
125
126clobber: $(SUBDIRS)
127	$(RM) -rf $(TOOLS_PROTO)
128
129pkg: install .WAIT $(PKG_SUBDIRS)
130
131lint: $(LINTSUBDIRS)
132
133_msg: $(MSGSUBDIRS)
134
135.PARALLEL: $(SUBDIRS) $(PKG_SUBDIRS) $(CLOSED_SUBDIRS)
136
137$(SUBDIRS) $(CLOSED_SUBDIRS): $(BOOT_SUBDIRS)
138
139$(BOOT_SUBDIRS) $(SUBDIRS): $(ROOTDIRS) FRC
140	@cd $@; pwd; $(MAKE) $(TARGET)
141
142$(PKG_SUBDIRS): FRC
143	@cd $@; pwd; $(MAKE) install
144
145FRC:
146
147$(ROOTDIRS):
148	$(INS.dir)
149