annotate make/common/shared/Platform.gmk @ 433:2776a8638537

Merge
author lana
date Tue, 05 Aug 2008 17:44:17 -0700
parents 5a9e7ac25d30 c51121419e30
children 5df63dc24cfe 30bf00392b6d 7f45fcc04f8e
rev   line source
duke@0 1 #
xdono@381 2 # Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
duke@0 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
duke@0 4 #
duke@0 5 # This code is free software; you can redistribute it and/or modify it
duke@0 6 # under the terms of the GNU General Public License version 2 only, as
duke@0 7 # published by the Free Software Foundation. Sun designates this
duke@0 8 # particular file as subject to the "Classpath" exception as provided
duke@0 9 # by Sun in the LICENSE file that accompanied this code.
duke@0 10 #
duke@0 11 # This code is distributed in the hope that it will be useful, but WITHOUT
duke@0 12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
duke@0 13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
duke@0 14 # version 2 for more details (a copy is included in the LICENSE file that
duke@0 15 # accompanied this code).
duke@0 16 #
duke@0 17 # You should have received a copy of the GNU General Public License version
duke@0 18 # 2 along with this work; if not, write to the Free Software Foundation,
duke@0 19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
duke@0 20 #
duke@0 21 # Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
duke@0 22 # CA 95054 USA or visit www.sun.com if you need additional information or
duke@0 23 # have any questions.
duke@0 24 #
duke@0 25
duke@0 26 #
duke@0 27 # Shared platform (OS/ARCH) variable settings for the JDK builds.
duke@0 28 #
duke@0 29 # Includes basic system requirements, versions of utilities required,
duke@0 30 # suffixes on files, and basic defaults attributed to the build platform.
duke@0 31 #
duke@0 32
duke@0 33 #
duke@0 34 # Assumes some basic unix system utilities (e.g. uname) are in the search path
duke@0 35 # in order to figure out the system.
duke@0 36 #
duke@0 37
duke@0 38 ifndef PLATFORM_SHARED
duke@0 39
duke@0 40 PLATFORM_SHARED=done
duke@0 41
duke@0 42 # Possible Input variables:
duke@0 43 # ARCH_DATA_MODEL 32 or 64, default to 32
duke@0 44 # USER, LOGNAME user name (runs logname, or id if not set)
duke@0 45 # PROCESSOR_IDENTIFIER windows only: needed in environment
duke@0 46 #
duke@0 47 # (Also gets input by running the utilities uname, logname, isainfo, or id.)
duke@0 48 #
duke@0 49 # Variables set by this file:
duke@0 50 # SYSTEM_UNAME what 'uname' says this system is
duke@0 51 # USER login name of user (minus blanks)
duke@0 52 # PLATFORM windows, solaris, or linux
duke@0 53 # VARIANT OPT or DBG, OPT is the default
duke@0 54 # OS_NAME solaris, linux, or nt
duke@0 55 # OS_VERSION specific version of os, 5.10, 2.4.9-e.3, etc.
duke@0 56 # OS_VENDOR company name
duke@0 57 # TEMP_DISK /tmp or C:/temp
duke@0 58 # ARCH_DATA_MODEL 32 or 64
duke@0 59 # ARCH sparc, sparcv9, i586, amd64, or ia64
duke@0 60 # ARCH_FAMILY sparc or i586
duke@0 61 # ARCHPROP sparc or x86
duke@0 62 # ARCH_VM_SUBDIR jre/bin, jre/lib/sparc, etc.
duke@0 63 # LIBARCH sparc, sparcv9, i386, amd64, or ia64
duke@0 64 # DEV_NULL destination of /dev/null, NUL or /dev/NULL
duke@0 65 # CLASSPATH_SEPARATOR separator in classpath, ; or :
duke@0 66 # LIB_PREFIX dynamic or static library prefix, lib or empty
duke@0 67 # LIB_SUFFIX static library file suffix, .lib or .a?
duke@0 68 # LIBRARY_SUFFIX dynamic library file suffix, .dll or .so
duke@0 69 # OBJECT_SUFFIX object file suffix, .o or .obj
duke@0 70 # EXE_SUFFIX executable file suffix, .exe or empty
duke@0 71 # BUNDLE_FILE_SUFFIX suffix for bundles: .tar or .tar.gz
duke@0 72 # ISA_DIR solaris only: /sparcv9 or /amd64
duke@0 73 # LIBARCH32 solaris only: sparc or i386
duke@0 74 # LIBARCH64 solaris only: sparcv9 or amd64
duke@0 75 # REQUIRED_WINDOWS_VERSION windows only: specific version of windows
duke@0 76 # USING_CYGWIN windows only: true or false
duke@0 77 # WINDOWS_NT_VERSION_STRING windows only: long version name
duke@0 78 # REQUIRED_OS_VERSION required OS version, e.g. 5.10, 2.4
duke@0 79 # REQUIRED_FREE_SPACE minimum disk space needed for outputdir
duke@0 80 # ISHIELD_TEMP_MIN windows only: minimum disk space in temp area
duke@0 81 # REQUIRED_ZIP_VER required version of zip
duke@0 82 # REQUIRED_UNZIP_VER required version of unzip
duke@0 83 # REQUIRED_DXSDK_VER windows only: required version of DirectX
duke@0 84 # LINUX_VERSION_INFO linux only: location of linux release file
duke@0 85 # REQUIRED_LINUX_VER linux only: required version of linux
duke@0 86 # REQUIRED_LINUX_FULLVER linux only: required full version of linux
duke@0 87 # REQUIRED_ALSA_VERSION linux only: required version of ALSA
duke@0 88 # REQUIRED_FREETYPE_VERSION openjdk only: required version of freetype
duke@0 89
duke@0 90 SYSTEM_UNAME := $(shell uname)
duke@0 91
duke@0 92 # Normal boot jdk is previous release, but a hard requirement is a 1.5 boot
duke@0 93 REQUIRED_BOOT_VER = 1.5
duke@0 94
ohair@3 95 # If we are using freetype, this is the required version
ohair@3 96 REQUIRED_FREETYPE_VERSION=2.3.0
duke@0 97
duke@0 98 #
duke@0 99 # Prune out all known SCM (Source Code Management) directories
duke@0 100 # so they will not be included when copying directory trees
duke@0 101 # or packaging up .jar files, etc. This applies to all workspaces.
duke@0 102 #
ohair@8 103 SCM_DIRs = .hg .svn CVS RCS SCCS Codemgr_wsdata deleted_files .hgignore .hgtags
duke@0 104 # When changing SCM_DIRs also change SCM_DIRS_rexp and SCM_DIRS_prune:
ohair@8 105 SCM_DIRS_rexp = ".hg|.svn|CVS|RCS|SCCS|Codemgr_wsdata|deleted_files|.hgignore|.hgtags"
ohair@8 106 SCM_DIRS_prune = \( -name .hg -o -name .svn -o -name CVS -o -name RCS -o -name SCCS -o -name Codemgr_wsdata -o -name deleted_files -o -name .hgignore -o -name .hgtags \) -prune
duke@0 107
duke@0 108 # Don't define this unless it's not defined
duke@0 109 ifndef VARIANT
duke@0 110 VARIANT=OPT
duke@0 111 endif
duke@0 112
duke@0 113 # Platform settings specific to Solaris
duke@0 114 ifeq ($(SYSTEM_UNAME), SunOS)
duke@0 115 PLATFORM = solaris
duke@0 116 OS_NAME = solaris
duke@0 117 OS_VERSION := $(shell uname -r)
duke@0 118 # Solaris sparc build can be either 32-bit or 64-bit.
duke@0 119 # Default to 32, but allow explicit setting to 32 or 64.
duke@0 120 ifndef ARCH_DATA_MODEL
duke@0 121 ARCH_DATA_MODEL=32
duke@0 122 endif
duke@0 123 ifeq ($(ARCH_DATA_MODEL), 32)
duke@0 124 processor := $(shell uname -p)
duke@0 125 archExpr = case "$(processor)" in \
duke@0 126 i[3-9]86) \
duke@0 127 echo i586 \
duke@0 128 ;; \
duke@0 129 sparc*) \
duke@0 130 echo sparc \
duke@0 131 ;; \
duke@0 132 *) \
duke@0 133 echo $(processor) \
duke@0 134 ;; \
duke@0 135 esac
duke@0 136 ARCH := $(shell $(archExpr))
duke@0 137 else
duke@0 138 ARCH := $(shell isainfo -n)
duke@0 139 # ISA_DIR is used to locate 64-bit specific libraries which are generally
duke@0 140 # in the same general place as other libraries under the ./$(ARCH) directory
duke@0 141 ISA_DIR = /$(ARCH)
duke@0 142 endif
duke@0 143 # Need to maintain the jre/lib/i386 location for 32-bit Intel
duke@0 144 ifeq ($(ARCH), i586)
duke@0 145 ARCH_FAMILY = $(ARCH)
duke@0 146 LIBARCH = i386
duke@0 147 # Value of Java os.arch property
duke@0 148 ARCHPROP = x86
duke@0 149 else
duke@0 150 ifeq ($(ARCH), amd64)
duke@0 151 ARCH_FAMILY = i586
duke@0 152 else
duke@0 153 ARCH_FAMILY = sparc
duke@0 154 endif
duke@0 155 LIBARCH = $(ARCH)
duke@0 156 # Value of Java os.arch property
duke@0 157 ARCHPROP = $(LIBARCH)
duke@0 158 endif
duke@0 159 # The two LIBARCH names
duke@0 160 ifeq ($(ARCH_FAMILY), sparc)
duke@0 161 LIBARCH32 = sparc
duke@0 162 LIBARCH64 = sparcv9
duke@0 163 else
duke@0 164 LIBARCH32 = i386
duke@0 165 LIBARCH64 = amd64
duke@0 166 endif
duke@0 167 # Suffix for file bundles used in previous release
duke@0 168 BUNDLE_FILE_SUFFIX=.tar
duke@0 169 OS_VENDOR = Sun Microsystems
duke@0 170 # Required Solaris version
duke@0 171 REQUIRED_OS_VERSION = 5.10
duke@0 172 # Minimum disk space needed as determined by running 'du -sk' on
duke@0 173 # a fully built workspace.
duke@0 174 ifeq ($(ARCH_FAMILY), sparc)
duke@0 175 REQUIRED_FREE_SPACE=1300000
duke@0 176 else
duke@0 177 REQUIRED_FREE_SPACE=1040000
duke@0 178 endif
duke@0 179 # How much RAM does this machine have:
duke@0 180 MB_OF_MEMORY=$(shell /etc/prtconf | fgrep 'Memory size:' | expand | cut -d' ' -f3)
duke@0 181 endif
duke@0 182
duke@0 183 # Platform settings specific to Linux
duke@0 184 ifeq ($(SYSTEM_UNAME), Linux)
duke@0 185 PLATFORM = linux
duke@0 186 OS_NAME = linux
duke@0 187 OS_VERSION := $(shell uname -r)
duke@0 188 # Arch and OS name/version
duke@0 189 mach := $(shell uname -m)
duke@0 190 archExpr = case "$(mach)" in \
duke@0 191 i[3-9]86) \
duke@0 192 echo i586 \
duke@0 193 ;; \
duke@0 194 ia64) \
duke@0 195 echo ia64 \
duke@0 196 ;; \
duke@0 197 x86_64) \
duke@0 198 echo amd64 \
duke@0 199 ;; \
duke@0 200 sparc*) \
duke@0 201 echo sparc \
duke@0 202 ;; \
duke@0 203 *) \
duke@0 204 echo $(mach) \
duke@0 205 ;; \
duke@0 206 esac
duke@0 207 ARCH := $(shell $(archExpr) )
duke@0 208 ARCH_FAMILY := $(ARCH)
duke@0 209
duke@0 210 # Linux builds may be 32-bit or 64-bit data model.
duke@0 211 ifeq ($(ARCH), sparc)
duke@0 212 # Linux sparc build can be either 32-bit or 64-bit.
duke@0 213 # Default to 32, but allow explicit setting to 32 or 64.
duke@0 214 ifndef ARCH_DATA_MODEL
duke@0 215 ARCH_DATA_MODEL=32
duke@0 216 endif
duke@0 217 ifeq ($(ARCH_DATA_MODEL), 32)
duke@0 218 ARCH=sparc
duke@0 219 else
duke@0 220 ARCH=sparcv9
duke@0 221 endif
duke@0 222 else
duke@0 223 # i586 is 32-bit, amd64 is 64-bit
duke@0 224 ifndef ARCH_DATA_MODEL
duke@0 225 ifeq ($(ARCH), i586)
duke@0 226 ARCH_DATA_MODEL=32
duke@0 227 else
duke@0 228 ARCH_DATA_MODEL=64
duke@0 229 endif
duke@0 230 endif
duke@0 231 endif
duke@0 232
duke@0 233 # Need to maintain the jre/lib/i386 location for 32-bit Intel
duke@0 234 ifeq ($(ARCH), i586)
duke@0 235 LIBARCH = i386
duke@0 236 else
duke@0 237 LIBARCH = $(ARCH)
duke@0 238 endif
duke@0 239
duke@0 240 # Value of Java os.arch property
duke@0 241 ARCHPROP = $(LIBARCH)
duke@0 242
duke@0 243 # Suffix for file bundles used in previous release
duke@0 244 BUNDLE_FILE_SUFFIX=.tar.gz
duke@0 245 # Minimum disk space needed as determined by running 'du -sk' on
duke@0 246 # a fully built workspace.
duke@0 247 REQUIRED_FREE_SPACE=1460000
duke@0 248 LINUX_VERSION_INFO = /etc/redhat-release
duke@0 249 OS_VENDOR = Red Hat
duke@0 250 ifeq ($(ARCH_DATA_MODEL), 32)
duke@0 251 REQUIRED_LINUX_VER = Advanced Server
duke@0 252 REQUIRED_LINUX_FULLVER = Advanced Server release 2.1AS
duke@0 253 REQUIRED_OS_VERSION = 2.4.9-e.3
duke@0 254 else
duke@0 255 ifeq ($(ARCH), amd64)
duke@0 256 LINUX_VERSION_INFO = /etc/SuSE-release
duke@0 257 OS_VENDOR = SuSE Enterprise
duke@0 258 REQUIRED_LINUX_VER = 8.1
duke@0 259 REQUIRED_LINUX_FULLVER = $(REQUIRED_LINUX_VER) SLSE AMD64
duke@0 260 REQUIRED_OS_VERSION = 2.4.19-SMP
duke@0 261 else
duke@0 262 REQUIRED_LINUX_VER = Advanced Server
duke@0 263 REQUIRED_LINUX_FULLVER = Advanced Server release 2.1AS 64 bit
duke@0 264 REQUIRED_OS_VERSION = 2.4.19-SMP
duke@0 265 endif
duke@0 266 endif
duke@0 267 ifneq ($(ARCH), ia64)
duke@0 268 # ALSA 0.9.1 and above
duke@0 269 REQUIRED_ALSA_VERSION = ^((0[.]9[.][1-9])|(1[.]0[.][0-9]))[0-9]*
duke@0 270 endif
duke@0 271 # How much RAM does this machine have:
ohair@118 272 MB_OF_MEMORY := $(shell free -m | fgrep Mem: | awk '{print $$2;}' )
duke@0 273 endif
duke@0 274
duke@0 275 # Windows with and without CYGWIN will be slightly different
duke@0 276 ifeq ($(SYSTEM_UNAME), Windows_NT)
duke@0 277 PLATFORM = windows
duke@0 278 OS_VERSION := $(shell uname -r)
duke@0 279 WINDOWS_NT_VERSION_STRING=Windows_NT
duke@0 280 REQUIRED_MKS_VER=6.1
duke@0 281 endif
duke@0 282 ifneq (,$(findstring CYGWIN,$(SYSTEM_UNAME)))
duke@0 283 PLATFORM = windows
duke@0 284 OS_VERSION := 5
duke@0 285 USING_CYGWIN = true
duke@0 286 export USING_CYGWIN
duke@0 287 WINDOWS_NT_VERSION_STRING=CYGWIN_NT
duke@0 288 REQUIRED_CYGWIN_VER=4.0
duke@0 289 endif
duke@0 290
duke@0 291 # Platform settings specific to Windows
duke@0 292 ifeq ($(PLATFORM), windows)
duke@0 293 OS_NAME = nt
duke@0 294 REQUIRED_OS_VERSION=5
duke@0 295 # Windows builds default to the appropriate for the underlaying
duke@0 296 # architecture.
duke@0 297 # Temporary disk area
duke@0 298 TEMP_DISK=C:/temp
duke@0 299 # GNU Make or MKS overrides $(PROCESSOR_ARCHITECTURE) to always
duke@0 300 # return "x86". Use the first word of $(PROCESSOR_IDENTIFIER) instead.
duke@0 301 ifndef ARCH_DATA_MODEL
duke@0 302 ifeq ($(word 1, $(PROCESSOR_IDENTIFIER)),ia64)
duke@0 303 ARCH_DATA_MODEL=64
duke@0 304 else
duke@0 305 ifeq ($(word 1, $(PROCESSOR_IDENTIFIER)),AMD64)
duke@0 306 ARCH_DATA_MODEL=64
duke@0 307 else
duke@0 308 ARCH_DATA_MODEL=32
duke@0 309 endif
duke@0 310 endif
duke@0 311 endif
duke@0 312 export ARCH_DATA_MODEL
duke@0 313 ifeq ($(ARCH_DATA_MODEL), 64)
duke@0 314 # If the user wants to perform a cross compile build then they must
duke@0 315 # - set ARCH_DATA_MODEL=64 and either
duke@0 316 # + set ARCH to ia64 or amd64, or
ohair@398 317 REQUIRED_WINDOWS_VERSION=Server 2003 Enterprise x64 Edition
duke@0 318 ifeq ($(word 1, $(PROCESSOR_IDENTIFIER)), AMD64)
duke@0 319 ARCH=amd64
duke@0 320 else
duke@0 321 ARCH=ia64
duke@0 322 endif
duke@0 323 LIBARCH=$(ARCH)
duke@0 324 # Value of Java os.arch property
duke@0 325 ARCHPROP=$(LIBARCH)
ohair@398 326 else
ohair@398 327 REQUIRED_WINDOWS_VERSION=2000 or Unknown
ohair@398 328 #REQUIRED_WINDOWS_VERSION=XP Professional
ohair@398 329 # LIBARCH is used to preserve the jre/lib/i386 directory name for 32-bit intel
ohair@398 330 ARCH=i586
ohair@398 331 LIBARCH=i386
ohair@398 332 # Value of Java os.arch property
ohair@398 333 ARCHPROP=x86
duke@0 334 endif
duke@0 335 ARCH_FAMILY = $(ARCH)
duke@0 336 # Where is unwanted output to be delivered?
duke@0 337 DEV_NULL = NUL
duke@0 338 export DEV_NULL
duke@0 339 # Classpath separator
duke@0 340 CLASSPATH_SEPARATOR = ;
duke@0 341 # The suffix used for object file (.o for unix .obj for windows)
duke@0 342 OBJECT_SUFFIX = obj
duke@0 343 # The suffix applied to executables (.exe for windows, nothing for solaris)
duke@0 344 EXE_SUFFIX = .exe
duke@0 345 # The prefix applied to library files (lib for solaris, nothing for windows)
duke@0 346 LIB_PREFIX=
duke@0 347 LIBRARY_SUFFIX = dll
duke@0 348 LIB_SUFFIX = lib
duke@0 349 # User name determination (set _USER)
duke@0 350 ifndef USER
duke@0 351 ifdef USERNAME
duke@0 352 _USER := $(USERNAME)
duke@0 353 else
duke@0 354 ifdef LOGNAME
duke@0 355 _USER := $(LOGNAME)
duke@0 356 else
duke@0 357 _USER := $(shell id -un)
duke@0 358 endif
duke@0 359 endif
duke@0 360 else
duke@0 361 _USER:=$(USER)
duke@0 362 endif
duke@0 363 # Location of client/server directories
duke@0 364 ARCH_VM_SUBDIR=jre/bin
duke@0 365 # Suffix for file bundles used in previous release
duke@0 366 BUNDLE_FILE_SUFFIX=.tar
duke@0 367 # Minimum disk space needed as determined by running 'du -sk' on
duke@0 368 # a fully built workspace.
duke@0 369 REQUIRED_FREE_SPACE=500000
duke@0 370 # ISHIELD_TEMP_MIN is the difference of an empty C:\TEMP vs. one after a
duke@0 371 # bundles build on windows.
duke@0 372 ISHIELD_TEMP_MIN=250000
tdv@430 373 REQUIRED_DXSDK_VER = 0x0900
duke@0 374 OS_VENDOR = Microsoft
duke@0 375 # How much RAM does this machine have:
ohair@422 376 ifeq ($(JDK_HAS_MEM_INFO),)
ohair@422 377 ifeq ($(USING_CYGWIN),true)
ohair@422 378 # CYGWIN has the 'free' utility
ohair@422 379 _MB_OF_MEMORY := \
ohair@422 380 $(shell free -m | grep Mem: | awk '{print $$2;}' )
ohair@118 381 else
ohair@422 382 # Windows 2000 has the mem utility, but two memory areas
ohair@422 383 # extended memory is what is beyond 1024M
ohair@422 384 _B_OF_EXT_MEMORY := \
ohair@422 385 $(shell mem 2> $(DEV_NULL) | \
ohair@422 386 grep 'total contiguous extended memory' | awk '{print $$1;}')
ohair@422 387 ifeq ($(_B_OF_EXT_MEMORY),)
ohair@422 388 _B_OF_MEMORY := \
ohair@422 389 $(shell mem 2> $(DEV_NULL) | \
ohair@422 390 grep 'total conventional memory' | awk '{print $$1;}')
ohair@422 391 else
ohair@422 392 _B_OF_MEMORY := \
ohair@422 393 $(shell expr 1048576 '+' $(_B_OF_EXT_MEMORY) 2> $(DEV_NULL))
ohair@422 394 endif
ohair@422 395 ifeq ($(_B_OF_MEMORY),)
ohair@422 396 # Windows 2003 has the systeminfo utility use it if mem doesn't work
ohair@422 397 _MB_OF_MEMORY := \
ohair@422 398 $(shell systeminfo 2> $(DEV_NULL) | \
ohair@422 399 grep 'Total Physical Memory:' | \
ohair@422 400 awk '{print $$4;}' | sed -e 's@,@@')
ohair@422 401 else
ohair@422 402 _MB_OF_MEMORY := $(shell expr $(_B_OF_MEMORY) '/' 1024 2> $(DEV_NULL))
ohair@422 403 endif
ohair@118 404 endif
ohair@422 405 ifeq ($(shell expr $(_MB_OF_MEMORY) '+' 0 2> $(DEV_NULL)), $(_MB_OF_MEMORY))
ohair@422 406 MB_OF_MEMORY := $(_MB_OF_MEMORY)
ohair@118 407 else
ohair@422 408 MB_OF_MEMORY := 512
ohair@118 409 endif
ohair@118 410 endif
duke@0 411 endif
duke@0 412
duke@0 413 REQUIRED_ZIP_VER = 2.2
duke@0 414 REQUIRED_UNZIP_VER = 5.12
duke@0 415 REQUIRED_MAKE_VER = 3.78
duke@0 416
duke@0 417 # Unix type settings (same for all unix platforms)
duke@0 418 ifneq ($(PLATFORM), windows)
duke@0 419 # Temporary disk area
duke@0 420 TEMP_DISK=/tmp
duke@0 421 # Where is unwanted output to be delivered?
duke@0 422 DEV_NULL = /dev/null
duke@0 423 export DEV_NULL
duke@0 424 # Character used between entries in classpath
duke@0 425 CLASSPATH_SEPARATOR = :
duke@0 426 # suffix used for object file (.o for unix .obj for windows)
duke@0 427 OBJECT_SUFFIX = o
duke@0 428 # The suffix applied to runtime libraries
duke@0 429 LIBRARY_SUFFIX = so
duke@0 430 # The suffix applied to link libraries
duke@0 431 LIB_SUFFIX = so
duke@0 432 # The suffix applied to executables (.exe for windows, nothing for solaris)
duke@0 433 EXE_SUFFIX =
duke@0 434 # The prefix applied to library files (lib for solaris, nothing for windows)
duke@0 435 LIB_PREFIX = lib
duke@0 436 # User name determination (set _USER)
duke@0 437 ifndef USER
duke@0 438 ifdef LOGNAME
duke@0 439 _USER := $(LOGNAME)
duke@0 440 else
duke@0 441 _USER := $(shell logname)
duke@0 442 endif
duke@0 443 else
duke@0 444 _USER:=$(USER)
duke@0 445 endif
duke@0 446 # Location of client/server directories
duke@0 447 ARCH_VM_SUBDIR=jre/lib/$(LIBARCH)
duke@0 448 endif
duke@0 449
ohair@118 450 # Machines with 512Mb or less of real memory are considered low memory
ohair@118 451 # build machines and adjustments will be made to prevent excessing
ohair@118 452 # system swapping during the build.
ohair@118 453 # If we don't know, assume 512. Subtract 128 from MB for VM MAX.
ohair@118 454 # Don't set VM max over 1024-128=896.
ohair@422 455 ifeq ($(JDK_HAS_MEM_INFO),)
ohair@422 456 JDK_HAS_MEM_INFO=true
ohair@422 457 export JDK_HAS_MEM_INFO
ohair@422 458 ifneq ($(MB_OF_MEMORY),)
ohair@422 459 LOW_MEMORY_MACHINE := $(shell \
ohair@422 460 if [ $(MB_OF_MEMORY) -le 512 ] ; then \
ohair@422 461 echo "true"; \
ohair@422 462 else \
ohair@422 463 echo "false"; \
ohair@422 464 fi)
ohair@422 465 MAX_VM_MEMORY := $(shell \
ohair@422 466 if [ $(MB_OF_MEMORY) -le 1024 ] ; then \
ohair@422 467 expr $(MB_OF_MEMORY) '-' 128 2> $(DEV_NULL) ; \
ohair@422 468 else \
ohair@422 469 echo "896"; \
ohair@422 470 fi)
ohair@422 471 MIN_VM_MEMORY := $(shell \
ohair@422 472 if [ $(MAX_VM_MEMORY) -le 128 ] ; then \
ohair@422 473 expr $(MAX_VM_MEMORY) '-' 8 2> $(DEV_NULL) ; \
ohair@422 474 else \
ohair@422 475 echo "128"; \
ohair@422 476 fi)
ohair@422 477 else
ohair@422 478 MB_OF_MEMORY := unknown
ohair@422 479 LOW_MEMORY_MACHINE := true
ohair@422 480 MAX_VM_MEMORY := 384
ohair@422 481 MIN_VM_MEMORY := 128
ohair@422 482 endif
ohair@422 483 export MB_OF_MEMORY
ohair@422 484 export LOW_MEMORY_MACHINE
ohair@422 485 export MAX_VM_MEMORY
ohair@422 486 export MIN_VM_MEMORY
ohair@118 487 endif
ohair@118 488
duke@0 489 # If blanks in the username, use the first 4 words and pack them together
duke@0 490 _USER1:=$(subst ', ,$(_USER))
duke@0 491 _USER2:=$(subst ", ,$(_USER1))
duke@0 492 USER:=$(word 1,$(_USER2))$(word 2,$(_USER2))$(word 3,$(_USER2))$(word 4,$(_USER2))
duke@0 493 export USER
duke@0 494
duke@0 495 export PLATFORM
duke@0 496 endif
duke@0 497