make-rules/shared-macros.mk
author Srinivasa Sarva <srinivasa.sarva@oracle.com>
Tue, 15 Feb 2011 16:12:40 -0800
changeset 90 5483a3df388e
parent 85 8098282b503b
child 93 b579c7b1bb44
permissions -rw-r--r--
7019432 Move tcpdump to userland
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
     1
#
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
     2
# CDDL HEADER START
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
     3
#
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
     5
# Common Development and Distribution License (the "License").
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
     7
#
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    10
# See the License for the specific language governing permissions
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    11
# and limitations under the License.
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    12
#
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    18
#
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    19
# CDDL HEADER END
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    20
#
58
d8024c042a00 7011369 gmake complains about fresh userland bits
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 53
diff changeset
    21
# Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
2
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    22
#
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    23
32
280a7444e782 automatically generate intercomponent dependencies for build ordering
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 31
diff changeset
    24
PATH=/usr/bin:/usr/gnu/bin
280a7444e782 automatically generate intercomponent dependencies for build ordering
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 31
diff changeset
    25
2
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    26
CONSOLIDATION =	userland
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    27
PUBLISHER =	$(CONSOLIDATION)-build
26
8a9f4e791832 packaging changes including canonical manifest support with manifest validation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 16
diff changeset
    28
38
cd00ea74156e package audits should pass pkglint
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 34
diff changeset
    29
IS_GLOBAL_ZONE =	$(shell /usr/sbin/zoneadm list | grep -c global)
cd00ea74156e package audits should pass pkglint
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 34
diff changeset
    30
ROOT =			/
cd00ea74156e package audits should pass pkglint
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 34
diff changeset
    31
29
eb4177698749 Generate the build number from the most recent mercurial tag
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 26
diff changeset
    32
# get the most recent build number from the last mercurial tag
eb4177698749 Generate the build number from the most recent mercurial tag
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 26
diff changeset
    33
LAST_HG_TAG =	$(shell hg tags -q | head -2 | tail -1)
eb4177698749 Generate the build number from the most recent mercurial tag
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 26
diff changeset
    34
LAST_BUILD_NUM = $(LAST_HG_TAG:build-%=%)
eb4177698749 Generate the build number from the most recent mercurial tag
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 26
diff changeset
    35
26
8a9f4e791832 packaging changes including canonical manifest support with manifest validation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 16
diff changeset
    36
OS_VERSION =		$(shell uname -r)
8a9f4e791832 packaging changes including canonical manifest support with manifest validation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 16
diff changeset
    37
SOLARIS_VERSION =	$(OS_VERSION:5.%=2.%)
29
eb4177698749 Generate the build number from the most recent mercurial tag
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 26
diff changeset
    38
BUILD_NUM =		0.$(shell expr $(LAST_BUILD_NUM) + 1)
26
8a9f4e791832 packaging changes including canonical manifest support with manifest validation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 16
diff changeset
    39
BUILD_VERSION =		$(OS_VERSION)-$(BUILD_NUM)
2
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    40
38
cd00ea74156e package audits should pass pkglint
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 34
diff changeset
    41
2
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    42
COMPILER =		studio
6
20f80c019d73 add compiler date/time chatter reduction tools
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 2
diff changeset
    43
BITS =			32
2
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    44
PYTHON_VERSION =	2.6
58
d8024c042a00 7011369 gmake complains about fresh userland bits
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 53
diff changeset
    45
PYTHON_VERSIONS =	2.6
2
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    46
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    47
WS_LOGS =	$(WS_TOP)/logs
34
d20b10eba317 prepare for zone based component builds
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 32
diff changeset
    48
WS_REPO =	$(WS_TOP)/repo
d20b10eba317 prepare for zone based component builds
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 32
diff changeset
    49
WS_TOOLS =	$(WS_TOP)/tools
d20b10eba317 prepare for zone based component builds
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 32
diff changeset
    50
WS_MAKE_RULES =	$(WS_TOP)/make-rules
d20b10eba317 prepare for zone based component builds
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 32
diff changeset
    51
WS_COMPONENTS =	$(WS_TOP)/components
49
13d31a6d756e improve parallel build
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 47
diff changeset
    52
WS_INCORPORATIONS =	$(WS_TOP)/incorporations
70
c610cf9d3d5d 7016863 userland build fails in parallel
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 64
diff changeset
    53
WS_LINT_CACHE =	$(WS_TOP)/pkglint-cache
2
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    54
34
d20b10eba317 prepare for zone based component builds
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 32
diff changeset
    55
BASS_O_MATIC =	$(WS_TOOLS)/bass-o-matic
d20b10eba317 prepare for zone based component builds
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 32
diff changeset
    56
d20b10eba317 prepare for zone based component builds
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 32
diff changeset
    57
PKG_REPO =	file:$(WS_REPO)
59
7500d63edb42 7012375 userland build and proto areas should be outside of unpacked source dirs
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 58
diff changeset
    58
72
4c33a310f793 7015633 move gtar to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents: 70
diff changeset
    59
COMPONENT_DIR =	$(shell pwd)
4c33a310f793 7015633 move gtar to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents: 70
diff changeset
    60
SOURCE_DIR =	$(COMPONENT_DIR)/$(COMPONENT_SRC)
4c33a310f793 7015633 move gtar to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents: 70
diff changeset
    61
BUILD_DIR =	$(COMPONENT_DIR)/build
59
7500d63edb42 7012375 userland build and proto areas should be outside of unpacked source dirs
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 58
diff changeset
    62
PROTO_DIR =	$(BUILD_DIR)/prototype/$(MACH)
2
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    63
85
8098282b503b 7018226 move GNU screen to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents: 82
diff changeset
    64
ETCDIR =	/etc
61
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
    65
USRDIR =	/usr
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
    66
BINDIR =	/bin
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
    67
LIBDIR =	/lib
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
    68
USRBINDIR =	$(USRDIR)/bin
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
    69
USRLIBDIR =	$(USRDIR)/lib
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
    70
USRSHAREDIR =	$(USRDIR)/share
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
    71
USRSHAREMANDIR =	$(USRSHAREDIR)/man
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
    72
USRSHAREMAN1DIR =	$(USRSHAREMANDIR)/man1
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
    73
USRSHAREMAN3DIR =	$(USRSHAREMANDIR)/man3
74
7e35801ce8b8 7016379 migrate elinks to userland
Kevin Crowe <Kevin.Crowe@oracle.com>
parents: 72
diff changeset
    74
USRSHAREMAN5DIR =	$(USRSHAREMANDIR)/man5
61
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
    75
USRLIBDIR64 =	$(USRDIR)/lib/$(MACH64)
85
8098282b503b 7018226 move GNU screen to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents: 82
diff changeset
    76
PROTOETCDIR =	$(PROTO_DIR)/$(ETCDIR)
61
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
    77
PROTOUSRDIR =	$(PROTO_DIR)/$(USRDIR)
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
    78
PROTOUSRBINDIR =	$(PROTO_DIR)/$(USRBINDIR)
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
    79
PROTOUSRLIBDIR =	$(PROTO_DIR)/$(USRLIBDIR)
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
    80
PROTOUSRLIBDIR64 =	$(PROTO_DIR)/$(USRLIBDIR64)
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
    81
PROTOUSRSHAREDIR =	$(PROTO_DIR)/$(USRSHAREDIR)
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
    82
PROTOUSRSHAREMANDIR =	$(PROTO_DIR)/$(USRSHAREMANDIR)
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
    83
PROTOUSRSHAREMAN1DIR =	$(PROTO_DIR)/$(USRSHAREMAN1DIR)
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
    84
PROTOUSRSHAREMAN3DIR =	$(PROTO_DIR)/$(USRSHAREMAN3DIR)
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
    85
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
    86
43
9f5ebe30300c switch to CBE sunstudio12.1 compilers
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 40
diff changeset
    87
SFWBIN =	/usr/sfw/bin
9f5ebe30300c switch to CBE sunstudio12.1 compilers
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 40
diff changeset
    88
SFWLIB =	/usr/sfw/lib
64
a4b12971cf99 7014330 has userland lost its mapfile mind?
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 62
diff changeset
    89
SFWSHARE =	/usr/sfw/share
a4b12971cf99 7014330 has userland lost its mapfile mind?
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 62
diff changeset
    90
SFWSHAREMAN =	/usr/sfw/share/man
a4b12971cf99 7014330 has userland lost its mapfile mind?
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 62
diff changeset
    91
SFWSHAREMAN1 =	/usr/sfw/share/man/man1
43
9f5ebe30300c switch to CBE sunstudio12.1 compilers
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 40
diff changeset
    92
PROTOSFWBIN =	$(PROTO_DIR)/$(SFWBIN)
9f5ebe30300c switch to CBE sunstudio12.1 compilers
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 40
diff changeset
    93
PROTOSFWLIB =	$(PROTO_DIR)/$(SFWLIB)
64
a4b12971cf99 7014330 has userland lost its mapfile mind?
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 62
diff changeset
    94
PROTOSFWSHARE =	$(PROTO_DIR)/$(SFWSHARE)
a4b12971cf99 7014330 has userland lost its mapfile mind?
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 62
diff changeset
    95
PROTOSFWSHAREMAN =	$(PROTO_DIR)/$(SFWSHAREMAN)
a4b12971cf99 7014330 has userland lost its mapfile mind?
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 62
diff changeset
    96
PROTOSFWSHAREMAN1 =	$(PROTO_DIR)/$(SFWSHAREMAN1)
a4b12971cf99 7014330 has userland lost its mapfile mind?
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 62
diff changeset
    97
a4b12971cf99 7014330 has userland lost its mapfile mind?
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 62
diff changeset
    98
GNUBIN =	/usr/gnu/bin
a4b12971cf99 7014330 has userland lost its mapfile mind?
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 62
diff changeset
    99
GNUSHARE =	/usr/gnu/share
a4b12971cf99 7014330 has userland lost its mapfile mind?
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 62
diff changeset
   100
GNUSHAREMAN =	/usr/gnu/share/man
a4b12971cf99 7014330 has userland lost its mapfile mind?
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 62
diff changeset
   101
GNUSHAREMAN1 =	/usr/gnu/share/man/man1
a4b12971cf99 7014330 has userland lost its mapfile mind?
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 62
diff changeset
   102
PROTOGNUBIN =	$(PROTO_DIR)/$(GNUBIN)
a4b12971cf99 7014330 has userland lost its mapfile mind?
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 62
diff changeset
   103
PROTOGNUSHARE =	$(PROTO_DIR)/$(GNUSHARE)
a4b12971cf99 7014330 has userland lost its mapfile mind?
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 62
diff changeset
   104
PROTOGNUSHAREMAN =	$(PROTO_DIR)/$(GNUSHAREMAN)
a4b12971cf99 7014330 has userland lost its mapfile mind?
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 62
diff changeset
   105
PROTOGNUSHAREMAN1 =	$(PROTO_DIR)/$(GNUSHAREMAN1)
43
9f5ebe30300c switch to CBE sunstudio12.1 compilers
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 40
diff changeset
   106
16
33aaaec59991 update _DATE/_TIME compiler chatter reduction bits.
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 12
diff changeset
   107
# work around _TIME, _DATE, embedded date chatter in component builds
33aaaec59991 update _DATE/_TIME compiler chatter reduction bits.
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 12
diff changeset
   108
# to use, set TIME_CONSTANT in the component Makefile and add $(CONSTANT_TIME)
33aaaec59991 update _DATE/_TIME compiler chatter reduction bits.
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 12
diff changeset
   109
# to the appropriate {CONFIGURE|BUILD|INSTALL}_ENV
34
d20b10eba317 prepare for zone based component builds
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 32
diff changeset
   110
CONSTANT_TIME =		LD_PRELOAD_32=$(WS_TOOLS)/time-$(MACH32).so
d20b10eba317 prepare for zone based component builds
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 32
diff changeset
   111
CONSTANT_TIME +=	LD_PRELOAD_64=$(WS_TOOLS)/time-$(MACH64).so
16
33aaaec59991 update _DATE/_TIME compiler chatter reduction bits.
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 12
diff changeset
   112
CONSTANT_TIME +=	TIME_CONSTANT=$(TIME_CONSTANT)
6
20f80c019d73 add compiler date/time chatter reduction tools
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 2
diff changeset
   113
12
41aeb1fd8c2d Fix MACH32/MACH64 so more than one architecture can build in the same workspace
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 7
diff changeset
   114
# set MACH from uname -p to either sparc or i386
41aeb1fd8c2d Fix MACH32/MACH64 so more than one architecture can build in the same workspace
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 7
diff changeset
   115
MACH =		$(shell uname -p)
41aeb1fd8c2d Fix MACH32/MACH64 so more than one architecture can build in the same workspace
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 7
diff changeset
   116
41aeb1fd8c2d Fix MACH32/MACH64 so more than one architecture can build in the same workspace
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 7
diff changeset
   117
# set MACH32 from MACH to either sparcv7 or i86
41aeb1fd8c2d Fix MACH32/MACH64 so more than one architecture can build in the same workspace
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 7
diff changeset
   118
MACH32_1 =	$(MACH:sparc=sparcv7)
41aeb1fd8c2d Fix MACH32/MACH64 so more than one architecture can build in the same workspace
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 7
diff changeset
   119
MACH32 =	$(MACH32_1:i386=i86)
41aeb1fd8c2d Fix MACH32/MACH64 so more than one architecture can build in the same workspace
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 7
diff changeset
   120
41aeb1fd8c2d Fix MACH32/MACH64 so more than one architecture can build in the same workspace
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 7
diff changeset
   121
# set MACH64 from MACH to either sparcv9 or amd64
41aeb1fd8c2d Fix MACH32/MACH64 so more than one architecture can build in the same workspace
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 7
diff changeset
   122
MACH64_1 =	$(MACH:sparc=sparcv9)
41aeb1fd8c2d Fix MACH32/MACH64 so more than one architecture can build in the same workspace
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 7
diff changeset
   123
MACH64 =	$(MACH64_1:i386=amd64)
41aeb1fd8c2d Fix MACH32/MACH64 so more than one architecture can build in the same workspace
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 7
diff changeset
   124
61
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   125
BUILD_DIR_32 =		$(BUILD_DIR)/$(MACH32)
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   126
BUILD_DIR_64 =		$(BUILD_DIR)/$(MACH64)
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   127
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   128
BUILD_32 =		$(BUILD_DIR_32)/.built
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   129
BUILD_64 =		$(BUILD_DIR_64)/.built
12
41aeb1fd8c2d Fix MACH32/MACH64 so more than one architecture can build in the same workspace
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 7
diff changeset
   130
BUILD_32_and_64 =	$(BUILD_32) $(BUILD_64)
41aeb1fd8c2d Fix MACH32/MACH64 so more than one architecture can build in the same workspace
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 7
diff changeset
   131
61
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   132
INSTALL_32 =		$(BUILD_DIR_32)/.installed
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   133
INSTALL_64 =		$(BUILD_DIR_64)/.installed
12
41aeb1fd8c2d Fix MACH32/MACH64 so more than one architecture can build in the same workspace
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 7
diff changeset
   134
INSTALL_32_and_64 =	$(INSTALL_32) $(INSTALL_64)
2
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   135
40
84267c1130e9 fix SPRO_ROOT usage to match ON and SFW and not be confusing
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 38
diff changeset
   136
# BUILD_TOOLS is the root of all tools not normally installed on the system.
84267c1130e9 fix SPRO_ROOT usage to match ON and SFW and not be confusing
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 38
diff changeset
   137
BUILD_TOOLS =	/ws/onnv-tools
84267c1130e9 fix SPRO_ROOT usage to match ON and SFW and not be confusing
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 38
diff changeset
   138
84267c1130e9 fix SPRO_ROOT usage to match ON and SFW and not be confusing
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 38
diff changeset
   139
SPRO_ROOT =	$(BUILD_TOOLS)/SUNWspro
43
9f5ebe30300c switch to CBE sunstudio12.1 compilers
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 40
diff changeset
   140
SPRO_VROOT =	$(SPRO_ROOT)/sunstudio12.1
40
84267c1130e9 fix SPRO_ROOT usage to match ON and SFW and not be confusing
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 38
diff changeset
   141
2
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   142
GCC_ROOT =	/usr/gnu
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   143
40
84267c1130e9 fix SPRO_ROOT usage to match ON and SFW and not be confusing
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 38
diff changeset
   144
CC.studio.32 =	$(SPRO_VROOT)/bin/cc -m32
84267c1130e9 fix SPRO_ROOT usage to match ON and SFW and not be confusing
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 38
diff changeset
   145
CCC.studio.32 =	$(SPRO_VROOT)/bin/CC -m32
2
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   146
40
84267c1130e9 fix SPRO_ROOT usage to match ON and SFW and not be confusing
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 38
diff changeset
   147
CC.studio.64 =	$(SPRO_VROOT)/bin/cc -m64
84267c1130e9 fix SPRO_ROOT usage to match ON and SFW and not be confusing
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 38
diff changeset
   148
CCC.studio.64 =	$(SPRO_VROOT)/bin/CC -m64
2
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   149
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   150
CC.gcc.32 =	$(GCC_ROOT)/bin/cc -m32
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   151
CCC.gcc.32 =	$(GCC_ROOT)/bin/CC -m32
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   152
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   153
CC.gcc.64 =	$(GCC_ROOT)/bin/cc -m64
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   154
CCC.gcc.64 =	$(GCC_ROOT)/bin/CC -m64
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   155
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   156
CC =		$(CC.$(COMPILER).$(BITS))
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   157
CCC =		$(CCC.$(COMPILER).$(BITS))
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   158
61
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   159
lint.32 =	$(SPRO_VROOT)/bin/lint -m32
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   160
lint.64 =	$(SPRO_VROOT)/bin/lint -m64
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   161
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   162
LINT =		$(lint.$(BITS))
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   163
16
33aaaec59991 update _DATE/_TIME compiler chatter reduction bits.
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 12
diff changeset
   164
LD =		/usr/bin/ld
33aaaec59991 update _DATE/_TIME compiler chatter reduction bits.
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 12
diff changeset
   165
2
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   166
PYTHON.2.6.32 =	/usr/bin/python2.6
47
28ef4b1fcfb1 64-bit python should use $(MACH64), not amd64
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 43
diff changeset
   167
PYTHON.2.6.64 =	/usr/bin/$(MACH64)/python2.6
2
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   168
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   169
PYTHON.32 =	$(PYTHON.$(PYTHON_VERSION).$(BITS))
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   170
PYTHON.64 =	$(PYTHON.$(PYTHON_VERSION).$(BITS))
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   171
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   172
GMAKE =		/usr/gnu/bin/make
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   173
GPATCH =	/usr/gnu/bin/patch
82
2f155565730b 7017244 move ggrep to userland (fix mismerge)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 80
diff changeset
   174
PATCH_LEVEL =	1
2f155565730b 7017244 move ggrep to userland (fix mismerge)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 80
diff changeset
   175
GPATCH_FLAGS =	-p$(PATCH_LEVEL) -b
2
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   176
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   177
PKGSEND =	/usr/bin/pkgsend
70
c610cf9d3d5d 7016863 userland build fails in parallel
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 64
diff changeset
   178
PKGLINT =	/usr/bin/pkglint
2
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   179
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   180
TOUCH =		/usr/bin/touch
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   181
MKDIR =		/bin/mkdir -p
125cd5d2cd9e include gmake example
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
   182
RM =		/bin/rm -f
7
d42300cb8715 add license/copyright info for ips generation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 6
diff changeset
   183
CP =		/bin/cp -f
43
9f5ebe30300c switch to CBE sunstudio12.1 compilers
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 40
diff changeset
   184
LN =		/bin/ln
9f5ebe30300c switch to CBE sunstudio12.1 compilers
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 40
diff changeset
   185
SYMLINK =	/bin/ln -s
16
33aaaec59991 update _DATE/_TIME compiler chatter reduction bits.
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 12
diff changeset
   186
ENV =		/usr/bin/env
43
9f5ebe30300c switch to CBE sunstudio12.1 compilers
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 40
diff changeset
   187
INSTALL =	/usr/bin/ginstall
61
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   188
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   189
INS.dir=        $(INSTALL) -d [email protected]
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   190
INS.file=       $(INSTALL) -m 444 $< $(@D)
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   191
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   192
# C compiler mode. Future compilers may change the default on us,
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   193
# so force transition mode globally. Lower level makefiles can
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   194
# override this by setting CCMODE.
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   195
#
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   196
CCMODE=		-Xa
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   197
CCMODE64=	-Xa
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   198
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   199
# compiler '-xarch' flag. This is here to centralize it and make it
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   200
# overridable for testing.
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   201
sparc_XARCH=    $(CCBITS32) -xarch=sparc
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   202
sparcv9_XARCH=  $(CCBITS64) -xcode=abs64
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   203
i386_XARCH=     $(CCBITS32) -xchip=pentium
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   204
amd64_XARCH=    $(CCBITS64) -xarch=generic -Ui386 -U__i386
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   205
80
7f8350e3f91a 7017244 move ggrep to userland
April Chin <april.chin@oracle.com>
parents: 79
diff changeset
   206
# allow zero-sized struct/union declarations and
7f8350e3f91a 7017244 move ggrep to userland
April Chin <april.chin@oracle.com>
parents: 79
diff changeset
   207
# void functions with return statements
7f8350e3f91a 7017244 move ggrep to userland
April Chin <april.chin@oracle.com>
parents: 79
diff changeset
   208
FEATURES_EXTENSIONS=	-features=extensions
7f8350e3f91a 7017244 move ggrep to userland
April Chin <april.chin@oracle.com>
parents: 79
diff changeset
   209
61
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   210
# disable the incremental linker
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   211
ILDOFF=         -xildoff
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   212
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   213
# C99 mode
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   214
C99_ENABLE=     -xc99=all
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   215
C99_DISABLE=    -xc99=none
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   216
C99MODE=        $(C99_ENABLE)
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   217
C99LMODE=       $(C99MODE:-xc99%=-Xc99%)
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   218
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   219
# XPG6 mode.  This option enables XPG6 conformance, plus extensions.
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   220
# Amongst other things, this option will cause system calls like
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   221
# popen (3C) and system (3C) to invoke the standards-conforming
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   222
# shell, /usr/xpg4/bin/sh, instead of /usr/bin/sh.
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   223
XPG6MODE=	$(C99MODE) -D_XOPEN_SOURCE=600 -D__EXTENSIONS__=1
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   224
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   225
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   226
# The Sun Studio 11 compiler has changed the behaviour of integer
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   227
# wrap arounds and so a flag is needed to use the legacy behaviour
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   228
# (without this flag panics/hangs could be exposed within the source).
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   229
#
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   230
sparc_IROPTFLAG		= -W2,-xwrap_int
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   231
sparcv9_IROPTFLAG	= -W2,-xwrap_int
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   232
i386_IROPTFLAG		=
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   233
amd64_IROPTFLAG		=
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   234
IROPTFLAG		= $($(MACH)_IROPTFLAG)
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   235
IROPTFLAG64		= $($(MACH64)_IROPTFLAG)
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   236
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   237
sparc_CFLAGS=	$(sparc_XARCH)
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   238
sparcv9_CFLAGS=	$(sparcv9_XARCH) -dalign $(CCVERBOSE)
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   239
i386_CFLAGS=	$(i386_XARCH)
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   240
amd64_CFLAGS=	$(amd64_XARCH)
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   241
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   242
sparc_COPTFLAG=		-xO3
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   243
sparcv9_COPTFLAG=	-xO3
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   244
i386_COPTFLAG=		-xO3
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   245
amd64_COPTFLAG=		-xO3
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   246
COPTFLAG= $($(MACH)_COPTFLAG)
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   247
COPTFLAG64= $($(MACH64)_COPTFLAG)
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   248
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   249
sparc_XREGSFLAG		= -xregs=no%appl
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   250
sparcv9_XREGSFLAG	= -xregs=no%appl
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   251
i386_XREGSFLAG		=
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   252
amd64_XREGSFLAG		=
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   253
XREGSFLAG		= $($(MACH)_XREGSFLAG)
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   254
XREGSFLAG64		= $($(MACH64)_XREGSFLAG)
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   255
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   256
CFLAGS=  \
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   257
	$(COPTFLAG) $($(MACH)_CFLAGS) $(CCMODE) \
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   258
	$(ILDOFF) $(C99MODE) $(IROPTFLAG)
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   259
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   260
CFLAGS64= \
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   261
	$(COPTFLAG64) $($(MACH64)_CFLAGS) $(CCMODE64) \
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   262
	$(ILDOFF) $(C99MODE) $(IROPTFLAG64)
7684fe2a9eb5 7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 59
diff changeset
   263
64
a4b12971cf99 7014330 has userland lost its mapfile mind?
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 62
diff changeset
   264
# build with a non-executable stack by default.
a4b12971cf99 7014330 has userland lost its mapfile mind?
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 62
diff changeset
   265
# override this if necessary
82
2f155565730b 7017244 move ggrep to userland (fix mismerge)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 80
diff changeset
   266
LD_MAP_NOEXSTK=-M /usr/lib/ld/map.noexstk
64
a4b12971cf99 7014330 has userland lost its mapfile mind?
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 62
diff changeset
   267
LD_OPTIONS+= $(LD_MAP_NOEXSTK)
a4b12971cf99 7014330 has userland lost its mapfile mind?
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 62
diff changeset
   268
62
519e6e3788ce 7013265 userland could use a tool to aid in SUNW package generation
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 61
diff changeset
   269
# Environment variables and arguments passed into the build and install
64
a4b12971cf99 7014330 has userland lost its mapfile mind?
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 62
diff changeset
   270
# environment(s).  These are the initial settings.
a4b12971cf99 7014330 has userland lost its mapfile mind?
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 62
diff changeset
   271
COMPONENT_BUILD_ENV= \
82
2f155565730b 7017244 move ggrep to userland (fix mismerge)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 80
diff changeset
   272
    LD_OPTIONS="$(LD_OPTIONS)"
64
a4b12971cf99 7014330 has userland lost its mapfile mind?
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 62
diff changeset
   273
COMPONENT_INSTALL_ENV= \
82
2f155565730b 7017244 move ggrep to userland (fix mismerge)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 80
diff changeset
   274
    LD_OPTIONS="$(LD_OPTIONS)"
64
a4b12971cf99 7014330 has userland lost its mapfile mind?
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 62
diff changeset
   275
a4b12971cf99 7014330 has userland lost its mapfile mind?
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 62
diff changeset
   276
# Add any bit-specific settings
62
519e6e3788ce 7013265 userland could use a tool to aid in SUNW package generation
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 61
diff changeset
   277
COMPONENT_BUILD_ENV += $(COMPONENT_BUILD_ENV.$(BITS))
519e6e3788ce 7013265 userland could use a tool to aid in SUNW package generation
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 61
diff changeset
   278
COMPONENT_BUILD_ARGS += $(COMPONENT_BUILD_ARGS.$(BITS))
519e6e3788ce 7013265 userland could use a tool to aid in SUNW package generation
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 61
diff changeset
   279
COMPONENT_INSTALL_ENV += $(COMPONENT_INSTALL_ENV.$(BITS))
519e6e3788ce 7013265 userland could use a tool to aid in SUNW package generation
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 61
diff changeset
   280
COMPONENT_INSTALL_ARGS += $(COMPONENT_INSTALL_ARGS.$(BITS))