xref: /titanic_51/usr/src/tools/Makefile.tools (revision 1c3a0e9dd9f5bb14378d99eee9ed261ce24fc4d3)
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
27#
28# Definitions common to tool source.
29#
30include $(SRC)/Makefile.master
31
32FILEMODE=	0555
33
34CLOBBERFILES += $(PYOBJS)
35
36TOOLS=			$(SRC)/tools
37TOOLS_PROTO=		$(TOOLS)/proto
38ROOTOPT=		$(TOOLS_PROTO)/opt
39ROOTONBLD=		$(ROOTOPT)/onbld
40ROOTONBLDBIN=		$(ROOTONBLD)/bin
41ROOTONBLDBINMACH=	$(ROOTONBLD)/bin/$(MACH)
42ROOTONBLDETC=		$(ROOTONBLD)/etc
43ROOTONBLDLIB=		$(ROOTONBLD)/lib
44ROOTONBLDLIBMACH=	$(ROOTONBLD)/lib/$(MACH)
45ROOTONBLDLIBPERL=	$(ROOTONBLD)/lib/perl
46ROOTONBLDLIBPY=		$(ROOTONBLD)/lib/python
47ROOTONBLDENV=		$(ROOTONBLD)/env
48ROOTONBLDGK=		$(ROOTONBLD)/gk
49ROOTONBLDMAN=		$(ROOTONBLD)/man
50ROOTONBLDMAN1=		$(ROOTONBLD)/man/man1
51ROOTONBLDETCABI=	$(ROOTONBLD)/etc/abi
52ROOTONBLDETCEXCEPT=	$(ROOTONBLD)/etc/exception_lists
53
54CPPFLAGS=		-D_TS_ERRNO
55ELFSIGN_O=		$(TRUE)
56LDLIBS=
57LDFLAGS=		$(MAPFILE.NES:%=-M%) $(MAPFILE.NED:%=-M%) \
58			    $(MAPFILE.PGA:%=-M%)
59
60ROOTONBLDPROG=		$(PROG:%=$(ROOTONBLDBIN)/%)
61ROOTONBLDMACHPROG=	$(PROG:%=$(ROOTONBLDBINMACH)/%)
62ROOTONBLDSHFILES=	$(SHFILES:%=$(ROOTONBLDBIN)/%)
63ROOTONBLDMAKEFILES=	$(MAKEFILES:%=$(ROOTONBLDBIN)/%)
64ROOTONBLDMACHSHFILES=	$(SHFILES:%=$(ROOTONBLDBINMACH)/%)
65ROOTONBLDMACHBINARIES=	$(BINARIES:%=$(ROOTONBLDBINMACH)/%)
66ROOTONBLDETCFILES=	$(ETCFILES:%=$(ROOTONBLDETC)/%)
67ROOTONBLDENVFILES=	$(ENVFILES:%=$(ROOTONBLDENV)/%)
68ROOTONBLDGKFILES=	$(GKFILES:%=$(ROOTONBLDGK)/.%)
69ROOTONBLDGKSHFILES=	$(SHFILES:%=$(ROOTONBLDGK)/%)
70ROOTONBLDPERLFILES=	$(PERLFILES:%=$(ROOTONBLDBIN)/%)
71ROOTONBLDPERLMODULES=	$(PERLMODULES:%=$(ROOTONBLDLIBPERL)/%)
72ROOTONBLDPYFILES=	$(PYFILES:%=$(ROOTONBLDBIN)/%)
73ROOTONBLDMAN1FILES=	$(MAN1FILES:%=$(ROOTONBLDMAN1)/%)
74ROOTONBLDABIAUDITFILES=	$(ABI_AUDITFILES:%=$(ROOTONBLDETCABI)/%)
75ROOTONBLDEXCEPTFILES=	$(EXCEPTFILES:%=$(ROOTONBLDETCEXCEPT)/%)
76
77# Break a chicken-and-egg dependency cycle for the tools build
78SCCSCHECK=@echo would sccscheck
79
80$(ROOTONBLDETCABI)/%: %
81	$(INS.file)
82
83$(ROOTONBLDETCEXCEPT)/%: $(CODEMGR_WS)/exception_lists/%
84	$(INS.file)
85
86$(ROOTONBLDBIN)/%: %
87	$(INS.file)
88
89$(ROOTONBLDBINMACH)/%: %
90	$(INS.file)
91
92$(ROOTONBLDETC)/%: %
93	$(INS.file)
94
95$(ROOTONBLDLIBPERL)/%: %
96	$(INS.file)
97
98$(ROOTONBLDMAN1)/%: %
99	$(INS.file)
100
101$(ROOTONBLDENV)/%: %
102	$(INS.file)
103
104$(ROOTONBLDGK)/.%: %
105	$(INS.rename)
106
107$(ROOTONBLDGK)/%: %
108	$(INS.file)
109