xref: /titanic_44/usr/src/tools/Makefile (revision 786d1eec1cd1cac7e26243d118cd209e84bc6bb9)
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	ndrgen \
44	onbld \
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#
56UNSHIPPED_SUBDIRS = \
57	elfsign \
58	mandoc
59
60sparc_SUBDIRS= \
61	chk4ubin \
62	stabs \
63	tokenize
64
65i386_SUBDIRS=		\
66	aw		\
67	elfextract	\
68	mbh_patch
69
70LINTSUBDIRS= \
71	codereview \
72	ctf \
73	cw \
74	findunref \
75	lintdump \
76	ndrgen \
77	protocmp \
78	protolist
79
80SUBDIRS= \
81	$($(MACH)_SUBDIRS) \
82	$(COMMON_SUBDIRS) \
83	$(UNSHIPPED_SUBDIRS)
84
85include Makefile.tools
86
87ROOTDIRS= \
88	$(ROOTOPT) \
89	$(ROOTONBLD) \
90	$(ROOTONBLD)/bin \
91	$(ROOTONBLD)/bin/$(MACH) \
92	$(ROOTONBLD)/lib \
93	$(ROOTONBLD)/lib/$(MACH) \
94	$(ROOTONBLD)/lib/perl \
95	$(ROOTONBLD)/lib/python2.6 \
96	$(ROOTONBLD)/lib/python2.6/onbld \
97	$(ROOTONBLD)/lib/python2.6/onbld/Checks \
98	$(ROOTONBLD)/lib/python2.6/onbld/hgext \
99	$(ROOTONBLD)/lib/python2.6/onbld/Scm \
100	$(ROOTONBLD)/env \
101	$(ROOTONBLD)/etc \
102	$(ROOTONBLD)/etc/exception_lists \
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
116#
117# Only create directories in the tools proto area when doing an actual
118# build, not a clean or clobber.
119#
120DOROOTDIRS= $(ROOTDIRS)
121clobber:= DOROOTDIRS=
122clean:= DOROOTDIRS=
123
124all install: $(SUBDIRS)
125
126clean: $(SUBDIRS)
127
128clobber: $(SUBDIRS)
129	$(RM) -rf $(TOOLS_PROTO)
130
131lint: $(LINTSUBDIRS)
132
133_msg: $(MSGSUBDIRS)
134
135.PARALLEL: $(SUBDIRS) $(CLOSED_SUBDIRS)
136
137$(SUBDIRS) $(CLOSED_SUBDIRS): $(BOOT_SUBDIRS)
138
139$(BOOT_SUBDIRS) $(SUBDIRS): $$(DOROOTDIRS) $(ROOTONBLDLIBPY) FRC
140	@cd $@; pwd; $(MAKE) $(TARGET)
141
142$(ROOTDIRS):
143	$(INS.dir)
144
145$(ROOTONBLDLIBPY): $(ROOTDIRS)
146	$(RM) -r $@; $(SYMLINK) python2.6 $@
147
148FRC:
149