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