xref: /illumos-gate/usr/src/tools/Makefile.tools (revision 094e47e980b0796b94b1b8f51f462a64d246e516)
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 (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
23#
24# Definitions common to tool source.
25#
26include $(SRC)/Makefile.master
27
28FILEMODE=	0555
29
30TOOLS=			$(SRC)/tools
31TOOLS_PROTO=		$(TOOLS)/proto/root_$(MACH)-nd
32ROOTOPT=		$(TOOLS_PROTO)/opt
33ROOTONBLD=		$(ROOTOPT)/onbld
34ROOTONBLDBIN=		$(ROOTONBLD)/bin
35ROOTONBLDBINMACH=	$(ROOTONBLD)/bin/$(MACH)
36ROOTONBLDETC=		$(ROOTONBLD)/etc
37ROOTONBLDLIB=		$(ROOTONBLD)/lib
38ROOTONBLDLIBMACH=	$(ROOTONBLD)/lib/$(MACH)
39ROOTONBLDLIBMACH64=	$(ROOTONBLD)/lib/$(MACH)/64
40ROOTONBLDLIBPERL=	$(ROOTONBLD)/lib/perl
41ROOTONBLDLIBPY=		$(ROOTONBLD)/lib/python
42ROOTONBLDENV=		$(ROOTONBLD)/env
43ROOTONBLDMAN=		$(ROOTONBLD)/man
44ROOTONBLDMAN1ONBLD=	$(ROOTONBLD)/man/man1onbld
45ROOTONBLDETCABI=	$(ROOTONBLD)/etc/abi
46ROOTONBLDETCEXCEPT=	$(ROOTONBLD)/etc/exception_lists
47ROOTONBLDSHARE=		$(ROOTONBLD)/share
48
49CC =			$(NATIVECC)
50CCC =			$(NATIVECCC)
51CFLAGS =		$(NATIVE_CFLAGS)
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)/%)
66ROOTONBLDPERLFILES=	$(PERLFILES:%=$(ROOTONBLDBIN)/%)
67ROOTONBLDPERLMODULES=	$(PERLMODULES:%=$(ROOTONBLDLIBPERL)/%)
68ROOTONBLDPYFILES=	$(PYFILES:%=$(ROOTONBLDBIN)/%)
69ROOTONBLDMAN1ONBLDFILES=$(MAN1ONBLDFILES:%=$(ROOTONBLDMAN1ONBLD)/%)
70ROOTONBLDABIAUDITFILES=	$(ABI_AUDITFILES:%=$(ROOTONBLDETCABI)/%)
71ROOTONBLDEXCEPTFILES=	$(EXCEPTFILES:%=$(ROOTONBLDETCEXCEPT)/%)
72
73# Break a chicken-and-egg dependency cycle for the tools build
74SCCSCHECK=@echo would sccscheck
75
76$(ROOTONBLDETCABI)/%: %
77	$(INS.file)
78
79$(ROOTONBLDETCEXCEPT)/%: $(CODEMGR_WS)/exception_lists/%
80	$(INS.file)
81
82$(ROOTONBLDBIN)/%: %
83	$(INS.file)
84
85$(ROOTONBLDBINMACH)/%: %
86	$(INS.file)
87
88$(ROOTONBLDETC)/%: %
89	$(INS.file)
90
91$(ROOTONBLDLIBPERL)/%: %
92	$(INS.file)
93
94$(ROOTONBLDMAN1ONBLD)/%: %
95	$(INS.file)
96
97$(ROOTONBLDENV)/%: %
98	$(INS.file)
99