make/common/shared/Platform.gmk

Sun, 03 Nov 2013 07:32:11 +0000

author
chegar
date
Sun, 03 Nov 2013 07:32:11 +0000
changeset 559
98a5caae1990
parent 406
0a5931be9176
permissions
-rw-r--r--

Merge

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

mercurial