xref: /titanic_52/usr/src/tools/Makefile (revision a5eb7107f06a6e23e8e77e8d3a84c1ff90a73ac6)
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 (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
24# Copyright 2014 Garrett D'Amore <garrett@damore.org>
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	codereview \
37	codesign \
38	cscope-fast \
39	ctf \
40	depcheck \
41	env \
42	findunref \
43	gk \
44	install.bin \
45	lintdump \
46	make \
47	ndrgen \
48	onbld \
49	pmodes \
50	protocmp \
51	protolist \
52	scripts
53
54#
55#  special versions of commands for use only in build
56#
57UNSHIPPED_SUBDIRS = \
58	elfsign \
59	mandoc
60
61sparc_SUBDIRS= \
62	chk4ubin \
63	stabs \
64	tokenize
65
66i386_SUBDIRS=		\
67	aw		\
68	elfextract	\
69	mbh_patch
70
71LINTSUBDIRS= \
72	codereview \
73	ctf \
74	cw \
75	findunref \
76	lintdump \
77	ndrgen \
78	protocmp \
79	protolist
80
81SUBDIRS= \
82	$($(MACH)_SUBDIRS) \
83	$(COMMON_SUBDIRS) \
84	$(UNSHIPPED_SUBDIRS)
85
86include Makefile.tools
87
88ROOTDIRS= \
89	$(ROOTOPT) \
90	$(ROOTONBLD) \
91	$(ROOTONBLD)/bin \
92	$(ROOTONBLD)/bin/$(MACH) \
93	$(ROOTONBLD)/lib \
94	$(ROOTONBLD)/lib/$(MACH) \
95	$(ROOTONBLD)/lib/$(MACH)/64 \
96	$(ROOTONBLD)/lib/perl \
97	$(ROOTONBLD)/lib/python2.6 \
98	$(ROOTONBLD)/lib/python2.6/onbld \
99	$(ROOTONBLD)/lib/python2.6/onbld/Checks \
100	$(ROOTONBLD)/lib/python2.6/onbld/hgext \
101	$(ROOTONBLD)/lib/python2.6/onbld/Scm \
102	$(ROOTONBLD)/env \
103	$(ROOTONBLD)/etc \
104	$(ROOTONBLD)/etc/exception_lists \
105	$(ROOTONBLD)/share \
106	$(ROOTONBLD)/gk \
107	$(ROOTONBLD)/man \
108	$(ROOTONBLD)/man/man1onbld
109
110all :=		TARGET= install
111install :=	TARGET= install
112clean :=	TARGET= clean
113clobber :=	TARGET= clobber
114lint :=		TARGET= lint
115_msg :=		TARGET= _msg
116
117.KEEP_STATE:
118
119#
120# Only create directories in the tools proto area when doing an actual
121# build, not a clean or clobber.
122#
123DOROOTDIRS= $(ROOTDIRS)
124clobber:= DOROOTDIRS=
125clean:= DOROOTDIRS=
126
127all install: $(SUBDIRS)
128
129clean: $(SUBDIRS)
130
131clobber: $(SUBDIRS)
132	$(RM) -rf $(TOOLS_PROTO)
133
134lint: $(LINTSUBDIRS)
135
136_msg: $(MSGSUBDIRS)
137
138.PARALLEL: $(SUBDIRS) $(CLOSED_SUBDIRS)
139
140$(SUBDIRS) $(CLOSED_SUBDIRS): $(BOOT_SUBDIRS)
141
142$(BOOT_SUBDIRS) $(SUBDIRS): $$(DOROOTDIRS) $(ROOTONBLDLIBPY) FRC
143	@cd $@; pwd; $(MAKE) $(TARGET)
144
145$(ROOTDIRS):
146	$(INS.dir)
147
148$(ROOTONBLDLIBPY): $(ROOTDIRS)
149	$(RM) -r $@; $(SYMLINK) python2.6 $@
150
151make: ctf
152
153FRC:
154