xref: /titanic_44/usr/src/tools/Makefile.tools (revision 14d912249090fc833b92625af4f618803de6a6c6)
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 2008 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
31TOOLS=			$(SRC)/tools
32TOOLS_PROTO=		$(TOOLS)/proto
33ROOTONBLD=		$(TOOLS_PROTO)/opt/onbld
34ROOTONBLDBIN=		$(ROOTONBLD)/bin
35ROOTONBLDBINMACH=	$(ROOTONBLD)/bin/$(MACH)
36ROOTONBLDETC=		$(ROOTONBLD)/etc
37ROOTONBLDLIB=		$(ROOTONBLD)/lib
38ROOTONBLDLIBMACH=	$(ROOTONBLD)/lib/$(MACH)
39ROOTONBLDLIBPY=		$(ROOTONBLD)/lib/python
40ROOTONBLDENV=		$(ROOTONBLD)/env
41ROOTONBLDGK=		$(ROOTONBLD)/gk
42ROOTONBLDMAN=		$(ROOTONBLD)/man
43ROOTONBLDMAN1=		$(ROOTONBLD)/man/man1
44ROOTONBLDETCABI=	$(ROOTONBLD)/etc/abi
45
46CPPFLAGS=		-D_TS_ERRNO
47ELFSIGN_O=		$(TRUE)
48LDLIBS=
49LDFLAGS=		$(MAPFILE.NES:%=-M%) $(MAPFILE.NED:%=-M%) \
50			    $(MAPFILE.PGA:%=-M%)
51
52ROOTONBLDPROG=		$(PROG:%=$(ROOTONBLDBIN)/%)
53ROOTONBLDMACHPROG=	$(PROG:%=$(ROOTONBLDBINMACH)/%)
54ROOTONBLDSHFILES=	$(SHFILES:%=$(ROOTONBLDBIN)/%)
55ROOTONBLDMAKEFILES=	$(MAKEFILES:%=$(ROOTONBLDBIN)/%)
56ROOTONBLDMACHSHFILES=	$(SHFILES:%=$(ROOTONBLDBINMACH)/%)
57ROOTONBLDMACHBINARIES=	$(BINARIES:%=$(ROOTONBLDBINMACH)/%)
58ROOTONBLDETCFILES=	$(ETCFILES:%=$(ROOTONBLDETC)/%)
59ROOTONBLDENVFILES=	$(ENVFILES:%=$(ROOTONBLDENV)/%)
60ROOTONBLDGKFILES=	$(GKFILES:%=$(ROOTONBLDGK)/.%)
61ROOTONBLDPERLFILES=	$(PERLFILES:%=$(ROOTONBLDBIN)/%)
62ROOTONBLDPYFILES=	$(PYFILES:%=$(ROOTONBLDBIN)/%)
63ROOTONBLDMAN1FILES=	$(MAN1FILES:%=$(ROOTONBLDMAN1)/%)
64ROOTONBLDABIAUDITFILES=	$(ABI_AUDITFILES:%=$(ROOTONBLDETCABI)/%)
65
66# Break a chicken-and-egg dependency cycle for the tools build
67SCCSCHECK=@echo would sccscheck
68
69$(ROOTONBLDETCABI)/%: %
70	$(INS.file)
71
72$(ROOTONBLDBIN)/%: %
73	$(INS.file)
74
75$(ROOTONBLDBINMACH)/%: %
76	$(INS.file)
77
78$(ROOTONBLDETC)/%: %
79	$(INS.file)
80
81$(ROOTONBLDMAN1)/%: %
82	$(INS.file)
83
84$(ROOTONBLDENV)/%: %
85	$(INS.file)
86
87$(ROOTONBLDGK)/.%: %
88	$(INS.rename)
89