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