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