Makefile.master
author Jon Tibble <meths@btinternet.com>
Sun, 01 Jul 2012 13:30:52 +0100
changeset 576 4794d98b4945
parent 525 21efe377a4de
permissions -rw-r--r--
Added tag oi_151a_prestable4 for changeset a99c06dc8ffa
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
     1
#
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
     2
# CDDL HEADER START
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
     3
#
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
405
c601bc5ddd76 added archive downloads to one location
hnhn
parents: 345
diff changeset
     5
# Common Development and Distribution License (the "License").
0
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
     7
#
430
991b285f9b1a prevent xarch warnings
hnhn
parents: 423
diff changeset
     8
# You can obtain a copy of the license at src/OPENSOLARIS.LICENSE
0
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    10
# See the License for the specific language governing permissions
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    11
# and limitations under the License.
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    12
#
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
430
991b285f9b1a prevent xarch warnings
hnhn
parents: 423
diff changeset
    14
# file and include the License file at src/OPENSOLARIS.LICENSE.
0
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    18
#
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    19
# CDDL HEADER END
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    20
#
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    21
#
405
c601bc5ddd76 added archive downloads to one location
hnhn
parents: 345
diff changeset
    22
# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
0
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    23
# Use is subject to license terms.
525
21efe377a4de 339 g11n build path for xkbcomp needs to be adjusted
Andrzej Szeszo <aszeszo@gmail.com>
parents: 523
diff changeset
    24
# Copyright 2011 Every City Ltd. All rights reserved.
0
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    25
#
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    26
# ident	"@(#)Makefile.master	1.0	06/03/07 SMI"
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    27
#
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    28
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    29
MACH :sh= echo ${MACH-`uname -p`}
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    30
MACH64:sh = isainfo -k
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    31
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    32
#
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    33
# Global path variables - change these to suit your own build environment
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    34
#
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    35
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    36
# Base directory where compilers are located.
523
236459c1413a Sun Studio path changed from /opt/SUNWspro to /opt/sunstudio12.1
Andrzej Szeszo <aszeszo@gmail.com>
parents: 455
diff changeset
    37
SPRO_VROOT=             /opt/sunstudio12.1
0
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    38
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    39
# List of all our locales - if you need to add/remove any, do it here
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    40
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    41
ALL_LOCALES = ar_EG ar_SA bg_BG ca cs_CZ da_DK da_DK de_DE de_AT de_CH de_LU el_GR el_CY \
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    42
en_AU en_CA en_GB en_IE en_MT en_NZ en_US es_ES es_AR es_BO es_CL es_CO es_CR es_EC es_GT \
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    43
es_MX es_NI es_PA es_PE es_PY es_SV es_UY es_VE et_EE fi_FI fr_FR fr_BE fr_CA fr_CH fr_LU \
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    44
he_IL hi_IN hr_HR hu_HU is_IS it_IT ja_JP ko_KR lt_LT lv_LV mk_MK nb_NO nl_NL nl_BE nn_NO \
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    45
no_NO no_NY pl_PL pt_PT pt_BR ro_RO ru_RU sh_BA sk_SK sl_SI sq_AL sr_CS sr_SP sr_YU sv_SE \
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    46
ta_IN th_TH tr_TR zh_CN zh_HK zh_TW iconv
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    47
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    48
# Method version - the suffix for all shared objects
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    49
METHOD_VERSION = 3
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    50
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    51
#
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    52
# End global variables - you shouldn't need to change anything from here down
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    53
#
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    54
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    55
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    56
# the location of the built pkgs
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    57
DEST = $(SRC)/dist/$(MACH)
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    58
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    59
# the location of the built binary-only tarballs
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    60
TB_DEST = $(SRC)/dist/closed_tarballs
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    61
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    62
# the location of the pkg building files
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    63
ROOT = $(SRC)/proto/$(MACH)
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    64
PKGROOT = $(ROOT)/pkgroot
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    65
FILEROOT = $(ROOT)/fileroot
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    66
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    67
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    68
# BUILD_TOOLS is the root of all tools including compilers.
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    69
# ONBLD_TOOLS is the root of all the tools that are part of SUNWonbld.
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    70
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    71
BUILD_TOOLS=            /ws/onnv-tools
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    72
ONBLD_TOOLS=            $(BUILD_TOOLS)/onbld
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    73
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    74
JAVA_ROOT=      /usr/java
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    75
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    76
SFW_ROOT=       /usr/sfw
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    77
SFWINCDIR=      $(SFW_ROOT)/include
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    78
SFWLIBDIR=      $(SFW_ROOT)/lib
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    79
SFWLIBDIR64=    $(SFW_ROOT)/lib/$(MACH64)
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    80
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    81
RPCGEN=         /usr/bin/rpcgen
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    82
STABS=          $(ONBLD_TOOLS)/bin/$(MACH)/stabs
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    83
ECHO=           echo
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    84
INS=            /usr/sbin/install -f
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    85
INSDIR=		/usr/sbin/install -d	
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    86
TRUE=           true
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    87
TR = 		/usr/bin/tr
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    88
SYMLINK=        /usr/bin/ln -s
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    89
LN=             /usr/bin/ln
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    90
CHMOD=          /usr/bin/chmod
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    91
CHOWN=          $(TRUE)
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    92
CHGRP=          $(TRUE)
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    93
COMPRESS=	/usr/bin/compress
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    94
MV=             /usr/bin/mv -f
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    95
RM=             /usr/bin/rm -f
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    96
GREP=           /usr/bin/grep
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    97
SED=            /usr/bin/sed
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    98
NAWK=           /usr/bin/nawk
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
    99
CP=             /usr/bin/cp -f
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   100
MCS=            /usr/ccs/bin/mcs
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   101
CAT=            /usr/bin/cat
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   102
M4=             /usr/ccs/bin/m4
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   103
STRIP=          /usr/ccs/bin/strip
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   104
LEX=            /usr/ccs/bin/lex
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   105
YACC=           /usr/ccs/bin/yacc
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   106
CPP=            /usr/lib/cpp
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   107
JAVAC=          $(JAVA_ROOT)/bin/javac
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   108
JAVAH=          $(JAVA_ROOT)/bin/javah
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   109
JAVADOC=        $(JAVA_ROOT)/bin/javadoc
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   110
RMIC=           $(JAVA_ROOT)/bin/rmic
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   111
JAR=            $(JAVA_ROOT)/bin/jar
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   112
GENOFFSETS=     $(ONBLD_TOOLS)/bin/genoffsets
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   113
CTFCVTPTBL=     $(ONBLD_TOOLS)/bin/ctfcvtptbl
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   114
CTFFINDMOD=     $(ONBLD_TOOLS)/bin/ctffindmod
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   115
XREF=           $(ONBLD_TOOLS)/bin/xref
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   116
FIND=           /usr/bin/find
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   117
PERL=           /usr/bin/perl
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   118
SORT=           /usr/bin/sort
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   119
TOUCH=          /usr/bin/touch
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   120
WC=             /usr/bin/wc
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   121
XARGS=          /usr/bin/xargs
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   122
ELFSIGN=        /usr/bin/elfsign
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   123
PKGMK= 		pkgmk
12
eb55d85bc649 remove '-cf' from $(TAR), add definition of $(WGET), $(XKBCOMP_XSUN) and $(XKBCOMP_XORG)
Jan Lana <jan.lana@sun.com>
parents: 0
diff changeset
   124
TAR=		/usr/bin/tar
0
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   125
LD=		/usr/ccs/bin/ld
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   126
BDFTOPCF =	/usr/openwin/bin/bdftopcf
162
e228fc0931fa add $(BZIP2) to Makefile.master
jenda
parents: 52
diff changeset
   127
BZIP2=		/usr/bin/bzip2 -9
405
c601bc5ddd76 added archive downloads to one location
hnhn
parents: 345
diff changeset
   128
RSYNC=		/usr/bin/rsync
c601bc5ddd76 added archive downloads to one location
hnhn
parents: 345
diff changeset
   129
UNPACKARCHIVE=	$(SRC)/tools/unpack-archive
0
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   130
12
eb55d85bc649 remove '-cf' from $(TAR), add definition of $(WGET), $(XKBCOMP_XSUN) and $(XKBCOMP_XORG)
Jan Lana <jan.lana@sun.com>
parents: 0
diff changeset
   131
# SUNWwgetu
525
21efe377a4de 339 g11n build path for xkbcomp needs to be adjusted
Andrzej Szeszo <aszeszo@gmail.com>
parents: 523
diff changeset
   132
WGET=		/usr/bin/wget
12
eb55d85bc649 remove '-cf' from $(TAR), add definition of $(WGET), $(XKBCOMP_XSUN) and $(XKBCOMP_XORG)
Jan Lana <jan.lana@sun.com>
parents: 0
diff changeset
   133
eb55d85bc649 remove '-cf' from $(TAR), add definition of $(WGET), $(XKBCOMP_XSUN) and $(XKBCOMP_XORG)
Jan Lana <jan.lana@sun.com>
parents: 0
diff changeset
   134
# SUNWxorg-server
525
21efe377a4de 339 g11n build path for xkbcomp needs to be adjusted
Andrzej Szeszo <aszeszo@gmail.com>
parents: 523
diff changeset
   135
XKBCOMP=	/usr/bin/xkbcomp
12
eb55d85bc649 remove '-cf' from $(TAR), add definition of $(WGET), $(XKBCOMP_XSUN) and $(XKBCOMP_XORG)
Jan Lana <jan.lana@sun.com>
parents: 0
diff changeset
   136
345
500827fbb1be add GNU_PATCH definition
jenda
parents: 318
diff changeset
   137
# locale_cldr
500827fbb1be add GNU_PATCH definition
jenda
parents: 318
diff changeset
   138
GNU_PATCH=	/usr/bin/gpatch
12
eb55d85bc649 remove '-cf' from $(TAR), add definition of $(WGET), $(XKBCOMP_XSUN) and $(XKBCOMP_XORG)
Jan Lana <jan.lana@sun.com>
parents: 0
diff changeset
   139
eb55d85bc649 remove '-cf' from $(TAR), add definition of $(WGET), $(XKBCOMP_XSUN) and $(XKBCOMP_XORG)
Jan Lana <jan.lana@sun.com>
parents: 0
diff changeset
   140
0
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   141
# MACH must be set in the shell environment per uname -p on the build host
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   142
# More specific architecture variables should be set in lower makefiles.
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   143
#
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   144
# MACH64 is derived from MACH, and BUILD64 is set to `#' for
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   145
# architectures on which we do not build 64-bit versions.
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   146
# (There are no such architectures at the moment.)
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   147
#
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   148
# Set BUILD64=# in the environment to disable 64-bit amd64
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   149
# builds on i386 machines.
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   150
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   151
MACH64_1=	$(MACH:sparc=sparcv9)
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   152
MACH64=		$(MACH64_1:i386=amd64)
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   153
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   154
MACH32_1=	$(MACH:sparc=sparcv7)
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   155
MACH32=		$(MACH32_1:i386=i86)
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   156
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   157
sparc_BUILD64=
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   158
i386_BUILD64=
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   159
BUILD64=	$($(MACH)_BUILD64)
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   160
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   161
#
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   162
# C compiler mode. Future compilers may change the default on us,
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   163
# so force extended ANSI mode globally. Lower level makefiles can
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   164
# override this by setting CCMODE.
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   165
#
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   166
CCMODE=			-Xa
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   167
CCMODE64=		-Xa
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   168
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   169
#
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   170
# C compiler verbose mode. This is so we can enable it globally,
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   171
# but turn it off in the lower level makefiles of things we cannot
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   172
# (or aren't going to) fix.
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   173
#
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   174
CCVERBOSE=		-v
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   175
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   176
# set this to the secret flag "-Wc,-Qiselect-v9abiwarn=1" to get warnings
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   177
# from the compiler about places the -xarch=v9 may differ from -xarch=v9c.
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   178
V9ABIWARN=
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   179
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   180
# set this to the secret flag "-Wc,-Qiselect-regsym=0" to disable register
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   181
# symbols (used to detect conflicts between objects that use global registers)
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   182
# we disable this now for safety, and because genunix doesn't link with
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   183
# this feature (the v9 default) enabled.
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   184
#
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   185
# REGSYM is separate since the C++ driver syntax is different.
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   186
CCREGSYM=		-Wc,-Qiselect-regsym=0
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   187
CCCREGSYM=		-Qoption cg -Qiselect-regsym=0
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   188
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   189
#
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   190
# generate 32-bit addresses in the v9 kernel. Saves memory.
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   191
CCABS32=		-Wc,-xcode=abs32
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   192
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   193
# One optimization the compiler might perform is to turn this:
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   194
#	#pragma weak foo
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   195
#	extern int foo;
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   196
#	if (&foo)
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   197
#		foo = 5;
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   198
# into
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   199
#	foo = 5;
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   200
# Since we do some of this (foo might be referenced in common kernel code
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   201
# but provided only for some cpu modules or platforms), we disable this
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   202
# optimization.
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   203
# 
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   204
sparc_CCUNBOUND	= -Wd,-xsafe=unboundsym
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   205
i386_CCUNBOUND	=
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   206
CCUNBOUND	= $($(MACH)_CCUNBOUND)
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   207
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   208
#
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   209
# compiler '-xarch' flag. This is here to centralize it and make it
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   210
# overridable for testing.
318
c8a3ba7bb9c1 sync Makefile.master with g11n ws
hnhn
parents: 162
diff changeset
   211
#sparc_XARCH=		-xarch=v8
c8a3ba7bb9c1 sync Makefile.master with g11n ws
hnhn
parents: 162
diff changeset
   212
#sparcv9_XARCH=		-xarch=v9
c8a3ba7bb9c1 sync Makefile.master with g11n ws
hnhn
parents: 162
diff changeset
   213
#i386_XARCH=
c8a3ba7bb9c1 sync Makefile.master with g11n ws
hnhn
parents: 162
diff changeset
   214
#amd64_XARCH=		-xarch=amd64 -Ui386 -U__i386
c8a3ba7bb9c1 sync Makefile.master with g11n ws
hnhn
parents: 162
diff changeset
   215
c8a3ba7bb9c1 sync Makefile.master with g11n ws
hnhn
parents: 162
diff changeset
   216
#replace with ss12 specific flags
c8a3ba7bb9c1 sync Makefile.master with g11n ws
hnhn
parents: 162
diff changeset
   217
sparc_XARCH=		-xarch=sparc -m32
c8a3ba7bb9c1 sync Makefile.master with g11n ws
hnhn
parents: 162
diff changeset
   218
sparcv9_XARCH=		-xarch=sparc -m64
0
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   219
i386_XARCH=
318
c8a3ba7bb9c1 sync Makefile.master with g11n ws
hnhn
parents: 162
diff changeset
   220
amd64_XARCH=		-xarch=sse2 -m64 -Ui386 -U__i386
0
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   221
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   222
# assembler '-xarch' flag.  Different from compiler '-xarch' flag.
318
c8a3ba7bb9c1 sync Makefile.master with g11n ws
hnhn
parents: 162
diff changeset
   223
#sparc_AS_XARCH=		-xarch=v8
c8a3ba7bb9c1 sync Makefile.master with g11n ws
hnhn
parents: 162
diff changeset
   224
#sparcv9_AS_XARCH=	-xarch=v9
c8a3ba7bb9c1 sync Makefile.master with g11n ws
hnhn
parents: 162
diff changeset
   225
#i386_AS_XARCH=
c8a3ba7bb9c1 sync Makefile.master with g11n ws
hnhn
parents: 162
diff changeset
   226
#amd64_AS_XARCH=		-xarch=amd64 -P -Ui386 -U__i386
c8a3ba7bb9c1 sync Makefile.master with g11n ws
hnhn
parents: 162
diff changeset
   227
c8a3ba7bb9c1 sync Makefile.master with g11n ws
hnhn
parents: 162
diff changeset
   228
#replace with ss12 specific flags
c8a3ba7bb9c1 sync Makefile.master with g11n ws
hnhn
parents: 162
diff changeset
   229
sparc_AS_XARCH=         -xarch=sparc -m32
c8a3ba7bb9c1 sync Makefile.master with g11n ws
hnhn
parents: 162
diff changeset
   230
sparcv9_AS_XARCH=       -xarch=sparc -64
0
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   231
i386_AS_XARCH=
318
c8a3ba7bb9c1 sync Makefile.master with g11n ws
hnhn
parents: 162
diff changeset
   232
amd64_AS_XARCH=         -xarch=sse2 -m64 -P -Ui386 -U__i386
0
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   233
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   234
#
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   235
# These flags define what we need to be 'standalone' i.e. -not- part
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   236
# of the rather more cosy userland environment.  This basically means
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   237
# the kernel.
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   238
#
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   239
# XX64	future versions of gcc will make -mcmodel=kernel imply -mno-red-zone
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   240
#
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   241
sparc_STAND_FLAGS=	-_gcc=-ffreestanding
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   242
sparcv9_STAND_FLAGS=	-_gcc=-ffreestanding
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   243
i386_STAND_FLAGS=	-_gcc=-ffreestanding
455
fb16726337be 6914826 /usr/kernel/strmod/amd64/jconv* fail to load
asano
parents: 430
diff changeset
   244
amd64_STAND_FLAGS=	-xmodel=kernel
0
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   245
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   246
SAVEARGS=		-Wu,-save_args
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   247
amd64_STAND_FLAGS	+= $(SAVEARGS)
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   248
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   249
STAND_FLAGS_32 = $($(MACH)_STAND_FLAGS)
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   250
STAND_FLAGS_64 = $($(MACH64)_STAND_FLAGS)
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   251
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   252
#
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   253
# disable the incremental linker
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   254
ILDOFF=			-xildoff
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   255
#
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   256
XDEPEND=		-xdepend
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   257
XFFLAG=			-xF
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   258
XESS=			-xs
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   259
XSTRCONST=		-xstrconst 
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   260
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   261
#
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   262
# turn warnings into errors (C)
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   263
CERRWARN = -errtags=yes -errwarn=%all
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   264
CERRWARN += -erroff=E_EMPTY_TRANSLATION_UNIT
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   265
CERRWARN += -erroff=E_STATEMENT_NOT_REACHED
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   266
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   267
#
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   268
# turn warnings into errors (C++)
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   269
CCERRWARN=		-xwe
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   270
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   271
# C99 mode
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   272
C99_ENABLE=	-xc99=%all
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   273
C99_DISABLE=	-xc99=%none
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   274
C99MODE=	$(C99_DISABLE)
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   275
C99LMODE=	$(C99MODE:-xc99%=-Xc99%)
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   276
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   277
# In most places, assignments to these macros should be appended with +=
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   278
# (CPPFLAGS.master allows values to be prepended to CPPFLAGS).
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   279
sparc_CFLAGS=	$(sparc_XARCH)
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   280
sparcv9_CFLAGS=	$(sparcv9_XARCH) -dalign $(CCVERBOSE) $(V9ABIWARN) $(CCREGSYM)
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   281
i386_CFLAGS=	$(i386_XARCH)
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   282
amd64_CFLAGS=	$(amd64_XARCH)
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   283
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   284
sparc_ASFLAGS=	$(sparc_AS_XARCH)
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   285
sparcv9_ASFLAGS=$(sparcv9_AS_XARCH)
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   286
i386_ASFLAGS=	$(i386_AS_XARCH)
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   287
amd64_ASFLAGS=	$(amd64_AS_XARCH)
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   288
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   289
#
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   290
sparc_COPTFLAG=		-xO3
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   291
sparcv9_COPTFLAG=	-xO3
318
c8a3ba7bb9c1 sync Makefile.master with g11n ws
hnhn
parents: 162
diff changeset
   292
i386_COPTFLAG=		-O
0
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   293
amd64_COPTFLAG=		-xO3
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   294
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   295
COPTFLAG= $($(MACH)_COPTFLAG)
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   296
COPTFLAG64= $($(MACH64)_COPTFLAG)
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   297
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   298
#
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   299
# tradeoff time for space (smaller is better)
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   300
#
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   301
sparc_SPACEFLAG		= -xspace -W0,-Lt -W2,-Rcond_elim
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   302
sparcv9_SPACEFLAG	= -xspace -W0,-Lt -W2,-Rcond_elim
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   303
i386_SPACEFLAG		= -xspace
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   304
amd64_SPACEFLAG		=
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   305
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   306
SPACEFLAG		= $($(MACH)_SPACEFLAG)
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   307
SPACEFLAG64		= $($(MACH64)_SPACEFLAG)
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   308
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   309
sparc_XREGSFLAG		= -xregs=no%appl
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   310
sparcv9_XREGSFLAG	= -xregs=no%appl
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   311
i386_XREGSFLAG		=
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   312
amd64_XREGSFLAG		=
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   313
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   314
XREGSFLAG		= $($(MACH)_XREGSFLAG)
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   315
XREGSFLAG64		= $($(MACH64)_XREGSFLAG)
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   316
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   317
CFLAGS=         $(COPTFLAG) $($(MACH)_CFLAGS) $(SPACEFLAG) $(CCMODE) \
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   318
		$(ILDOFF) $(CERRWARN) $(C99MODE) $(CCUNBOUND)
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   319
CFLAGS64=       $(COPTFLAG64) $($(MACH64)_CFLAGS) $(SPACEFLAG64) $(CCMODE64) \
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   320
		$(ILDOFF) $(CERRWARN) $(C99MODE) $(CCUNBOUND)
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   321
NATIVE_CFLAGS=	$(COPTFLAG) $($(NATIVE_MACH)_CFLAGS) $(CCMODE) \
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   322
		$(ILDOFF) $(CERRWARN) $(C99MODE) $($(NATIVE_MACH)_CCUNBOUND)
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   323
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   324
DTEXTDOM=-DTEXT_DOMAIN=\"$(TEXT_DOMAIN)\"	# For messaging.
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   325
DTS_ERRNO=-D_TS_ERRNO
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   326
CPPFLAGS.master=$(DTEXTDOM) $(DTS_ERRNO) \
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   327
	$(ENVCPPFLAGS1) $(ENVCPPFLAGS2) $(ENVCPPFLAGS3) $(ENVCPPFLAGS4)
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   328
CPPFLAGS=	$(CPPFLAGS.master)
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   329
AS_CPPFLAGS=	$(CPPFLAGS.master)
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   330
JAVAFLAGS=	-deprecation
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   331
#
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   332
# This is overwritten by local Makefile when PROG is a list.
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   333
#
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   334
POFILE= $(PROG).po
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   335
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   336
sparc_CCFLAGS=		-cg92 -compat=4 \
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   337
			-Qoption ccfe -messages=no%anachronism \
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   338
			$(CCERRWARN)
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   339
sparcv9_CCFLAGS=	$(sparcv9_XARCH) -dalign -compat=5 \
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   340
			-Qoption ccfe -messages=no%anachronism \
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   341
			-Qoption ccfe -features=no%conststrings \
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   342
			$(CCCREGSYM) \
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   343
			$(CCERRWARN)
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   344
i386_CCFLAGS=		-compat=4 \
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   345
			-Qoption ccfe -messages=no%anachronism \
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   346
			-Qoption ccfe -features=no%conststrings \
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   347
			$(CCERRWARN)
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   348
amd64_CCFLAGS=		$(amd64_XARCH) -compat=5 \
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   349
			-Qoption ccfe -messages=no%anachronism \
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   350
			-Qoption ccfe -features=no%conststrings \
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   351
			$(CCERRWARN)
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   352
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   353
sparc_CCOPTFLAG=	-O
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   354
sparcv9_CCOPTFLAG=	-O
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   355
i386_CCOPTFLAG=		-O
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   356
amd64_CCOPTFLAG=	-O
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   357
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   358
CCOPTFLAG=	$($(MACH)_CCOPTFLAG)
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   359
CCOPTFLAG64=	$($(MACH64)_CCOPTFLAG)
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   360
CCFLAGS=	$(CCOPTFLAG) $($(MACH)_CCFLAGS)
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   361
CCFLAGS64=	$(CCOPTFLAG64) $($(MACH64)_CCFLAGS)
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   362
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   363
# For some future builds, NATIVE_MACH and MACH might be different.
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   364
# Therefore, NATIVE_MACH needs to be redefined in the
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   365
# environment as `uname -p` to override this macro.
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   366
#
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   367
# For now at least, we cross-compile amd64 on i386 machines.
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   368
NATIVE_MACH=	$(MACH:amd64=i386)
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   369
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   370
# Define native compilation macros
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   371
#
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   372
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   373
# Specify platform compiler versions for languages
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   374
# that we use (currently only c and c++).
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   375
#
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   376
sparc_CC=		$(SPRO_VROOT)/bin/cc
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   377
sparc_CCC=		$(SPRO_VROOT)/bin/CC
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   378
sparc_CPP=		/usr/ccs/lib/cpp
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   379
sparc_LD=		/usr/ccs/bin/ld
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   380
sparc_LINT=		$(SPRO_VROOT)/bin/lint
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   381
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   382
sparcv9_CC=		$(SPRO_VROOT)/bin/cc
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   383
sparcv9_CCC=		$(SPRO_VROOT)/bin/CC
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   384
sparcv9_CPP=		/usr/ccs/lib/cpp
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   385
sparcv9_LD=		/usr/ccs/bin/ld
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   386
sparcv9_LINT=		$(SPRO_VROOT)/bin/lint
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   387
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   388
# We compile 32-bit objects with cc by default
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   389
i386_CC=		$(SPRO_VROOT)/bin/cc
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   390
i386_CCC=		$(SPRO_VROOT)/bin/CC
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   391
i386_CPP=		/usr/ccs/lib/cpp
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   392
i386_LD=		/usr/ccs/bin/ld
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   393
i386_LINT=		$(SPRO_VROOT)/bin/lint
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   394
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   395
# We compile 64-bit objects with cc by default
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   396
amd64_CC=		$(SPRO_VROOT)/bin/cc
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   397
amd64_CCC=		$(SPRO_VROOT)/bin/CC
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   398
amd64_CPP=		/usr/ccs/lib/cpp
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   399
amd64_LD=		/usr/ccs/bin/ld
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   400
amd64_LINT=		$(SPRO_VROOT)/bin/lint
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   401
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   402
NATIVECC=		$($(NATIVE_MACH)_CC)
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   403
NATIVECCC=		$($(NATIVE_MACH)_CCC)
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   404
NATIVECPP=		$($(NATIVE_MACH)_CPP)
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   405
NATIVELD=		$($(NATIVE_MACH)_LD)
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   406
NATIVELINT=		$($(NATIVE_MACH)_LINT)
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   407
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   408
#
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   409
# Makefile.master.64 overrides these settings
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   410
#
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   411
CC=			$(NATIVECC)
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   412
CCC=			$(NATIVECCC)
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   413
CPP=			$(NATIVECPP)
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   414
LD=			$(NATIVELD)
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   415
LINT=			$(NATIVELINT)
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   416
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   417
#
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   418
# Optimization CFLAG
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   419
#
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   420
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   421
CFLAG_OPT =    -D_REENTRANT
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   422
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   423
CFLAG_OPT +=    $(SPACEFLAG) $(C99MODE) $(ILDOFF) $(CCUNBOUND)
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   424
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   425
CFLAG_OPT_64:sh=if [ "`isainfo -k`" = "sparcv9" ]; then \
430
991b285f9b1a prevent xarch warnings
hnhn
parents: 423
diff changeset
   426
			echo "-m64 -dalign -D`/usr/bin/uname -p`" ;\
0
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   427
		elif [ "`isainfo -k`" = "amd64" ]; then \
430
991b285f9b1a prevent xarch warnings
hnhn
parents: 423
diff changeset
   428
			echo "-m64" ;\
0
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   429
		else \
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   430
			echo ""; \
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   431
		fi
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   432
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   433
CFLAG_OPT_64 += $(CFLAG_OPT)
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   434
542988ea726d initial version of Nevada G11N repository
simford
parents:
diff changeset
   435