xref: /titanic_51/usr/src/tools/Makefile.tools (revision aa2aa9a662539940ddbc8610da5a3a874ebd7503)
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)
45ROOTONBLDLIBPY=		$(ROOTONBLD)/lib/python
46ROOTONBLDENV=		$(ROOTONBLD)/env
47ROOTONBLDGK=		$(ROOTONBLD)/gk
48ROOTONBLDMAN=		$(ROOTONBLD)/man
49ROOTONBLDMAN1=		$(ROOTONBLD)/man/man1
50ROOTONBLDETCABI=	$(ROOTONBLD)/etc/abi
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)/.%)
67ROOTONBLDPERLFILES=	$(PERLFILES:%=$(ROOTONBLDBIN)/%)
68ROOTONBLDPYFILES=	$(PYFILES:%=$(ROOTONBLDBIN)/%)
69ROOTONBLDMAN1FILES=	$(MAN1FILES:%=$(ROOTONBLDMAN1)/%)
70ROOTONBLDABIAUDITFILES=	$(ABI_AUDITFILES:%=$(ROOTONBLDETCABI)/%)
71
72# Break a chicken-and-egg dependency cycle for the tools build
73SCCSCHECK=@echo would sccscheck
74
75$(ROOTONBLDETCABI)/%: %
76	$(INS.file)
77
78$(ROOTONBLDBIN)/%: %
79	$(INS.file)
80
81$(ROOTONBLDBINMACH)/%: %
82	$(INS.file)
83
84$(ROOTONBLDETC)/%: %
85	$(INS.file)
86
87$(ROOTONBLDMAN1)/%: %
88	$(INS.file)
89
90$(ROOTONBLDENV)/%: %
91	$(INS.file)
92
93$(ROOTONBLDGK)/.%: %
94	$(INS.rename)
95