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