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