xref: /titanic_51/usr/src/tools/Makefile.tools (revision 20e0c306d13b54840b7f8b12a43090fcb2bdbc04)
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 2006 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25# ident	"%Z%%M%	%I%	%E% SMI"
26#
27# Definitions common to tool source.
28#
29include $(SRC)/Makefile.master
30
31FILEMODE=	0555
32
33TOOLS=			$(SRC)/tools
34TOOLS_PROTO=		$(TOOLS)/proto
35ROOTONBLD=		$(TOOLS_PROTO)/opt/onbld
36ROOTONBLDBIN=		$(ROOTONBLD)/bin
37ROOTONBLDBINMACH=	$(ROOTONBLD)/bin/$(MACH)
38ROOTONBLDLIB=		$(ROOTONBLD)/lib
39ROOTONBLDLIBMACH=	$(ROOTONBLD)/lib/$(MACH)
40ROOTONBLDENV=		$(ROOTONBLD)/env
41ROOTONBLDGK=		$(ROOTONBLD)/gk
42ROOTONBLDMAN=		$(ROOTONBLD)/man
43ROOTONBLDMAN1=		$(ROOTONBLD)/man/man1
44ROOTONBLDETCABI=	$(ROOTONBLD)/etc/abi
45
46NX_MAP_i386=		$(SRC)/cmd/mapfile_noexdata
47NX_MAP_sparc=
48NX_MAP=			$(NX_MAP_$(MACH))
49NES_MAPFILE=		$(SRC)/cmd/mapfile_noexstk $(NX_MAP)
50
51CPPFLAGS=		-D_TS_ERRNO
52ELFSIGN_O=		$(TRUE)
53LDLIBS=
54LDFLAGS=		$(NES_MAPFILE:%=-M%)
55
56ROOTONBLDPROG=		$(PROG:%=$(ROOTONBLDBIN)/%)
57ROOTONBLDMACHPROG=	$(PROG:%=$(ROOTONBLDBINMACH)/%)
58ROOTONBLDSHFILES=	$(SHFILES:%=$(ROOTONBLDBIN)/%)
59ROOTONBLDMAKEFILES=	$(MAKEFILES:%=$(ROOTONBLDBIN)/%)
60ROOTONBLDMACHSHFILES=	$(SHFILES:%=$(ROOTONBLDBINMACH)/%)
61ROOTONBLDMACHBINARIES=	$(BINARIES:%=$(ROOTONBLDBINMACH)/%)
62ROOTONBLDENVFILES=	$(ENVFILES:%=$(ROOTONBLDENV)/%)
63ROOTONBLDGKFILES=	$(GKFILES:%=$(ROOTONBLDGK)/.%)
64ROOTONBLDPERLFILES=	$(PERLFILES:%=$(ROOTONBLDBIN)/%)
65ROOTONBLDMAN1FILES=	$(MAN1FILES:%=$(ROOTONBLDMAN1)/%)
66ROOTONBLDABIAUDITFILES=	$(ABI_AUDITFILES:%=$(ROOTONBLDETCABI)/%)
67
68# Break a chicken-and-egg dependency cycle for the tools build
69SCCSCHECK=@echo would sccscheck
70
71$(ROOTONBLDETCABI)/%: %
72	$(INS.file)
73
74$(ROOTONBLDBIN)/%: %
75	$(INS.file)
76
77$(ROOTONBLDBINMACH)/%: %
78	$(INS.file)
79
80$(ROOTONBLDMAN1)/%: %
81	$(INS.file)
82
83$(ROOTONBLDENV)/%: %
84	$(INS.file)
85
86$(ROOTONBLDGK)/.%: %
87	$(INS.rename)
88