duke@1: # ohair@158: # Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved. duke@1: # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. duke@1: # duke@1: # This code is free software; you can redistribute it and/or modify it duke@1: # under the terms of the GNU General Public License version 2 only, as ohair@158: # published by the Free Software Foundation. Oracle designates this duke@1: # particular file as subject to the "Classpath" exception as provided ohair@158: # by Oracle in the LICENSE file that accompanied this code. duke@1: # duke@1: # This code is distributed in the hope that it will be useful, but WITHOUT duke@1: # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or duke@1: # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License duke@1: # version 2 for more details (a copy is included in the LICENSE file that duke@1: # accompanied this code). duke@1: # duke@1: # You should have received a copy of the GNU General Public License version duke@1: # 2 along with this work; if not, write to the Free Software Foundation, duke@1: # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. duke@1: # ohair@158: # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ohair@158: # or visit www.oracle.com if you need additional information or have any ohair@158: # questions. duke@1: # duke@1: duke@1: # duke@1: # Shared platform (OS/ARCH) variable settings for the JDK builds. duke@1: # duke@1: # Includes basic system requirements, versions of utilities required, duke@1: # suffixes on files, and basic defaults attributed to the build platform. duke@1: # duke@1: duke@1: # duke@1: # Assumes some basic unix system utilities (e.g. uname) are in the search path duke@1: # in order to figure out the system. duke@1: # duke@1: duke@1: ifndef PLATFORM_SHARED duke@1: duke@1: PLATFORM_SHARED=done duke@1: duke@1: # Possible Input variables: duke@1: # ARCH_DATA_MODEL 32 or 64, default to 32 duke@1: # USER, LOGNAME user name (runs logname, or id if not set) duke@1: # PROCESSOR_IDENTIFIER windows only: needed in environment duke@1: # duke@1: # (Also gets input by running the utilities uname, logname, isainfo, or id.) duke@1: # duke@1: # Variables set by this file: duke@1: # SYSTEM_UNAME what 'uname' says this system is duke@1: # USER login name of user (minus blanks) duke@1: # PLATFORM windows, solaris, or linux duke@1: # VARIANT OPT or DBG, OPT is the default duke@1: # OS_NAME solaris, linux, or nt duke@1: # OS_VERSION specific version of os, 5.10, 2.4.9-e.3, etc. duke@1: # TEMP_DISK /tmp or C:/temp duke@1: # ARCH_DATA_MODEL 32 or 64 duke@1: # ARCH sparc, sparcv9, i586, amd64, or ia64 duke@1: # ARCH_FAMILY sparc or i586 duke@1: # ARCHPROP sparc or x86 duke@1: # DEV_NULL destination of /dev/null, NUL or /dev/NULL duke@1: # CLASSPATH_SEPARATOR separator in classpath, ; or : duke@1: # BUNDLE_FILE_SUFFIX suffix for bundles: .tar or .tar.gz duke@1: # ISA_DIR solaris only: /sparcv9 or /amd64 duke@1: # REQUIRED_WINDOWS_NAME windows only: basic name of windows duke@1: # REQUIRED_WINDOWS_VERSION windows only: specific version of windows duke@1: # USING_CYGWIN windows only: true or false duke@1: # WINDOWS_NT_VERSION_STRING windows only: long version name duke@1: # REQUIRED_OS_VERSION required OS version, e.g. 5.10, 2.4 duke@1: # REQUIRED_FREE_SPACE minimum disk space needed for outputdir duke@1: # REQUIRED_ZIP_VER required version of zip duke@1: # REQUIRED_UNZIP_VER required version of unzip duke@1: # LINUX_VERSION_INFO linux only: location of linux release file duke@1: # REQUIRED_LINUX_VER linux only: required version of linux duke@1: # REQUIRED_LINUX_FULLVER linux only: required full version of linux duke@1: ohair@114: ifndef SYSTEM_UNAME ohair@114: SYSTEM_UNAME := $(shell uname) ohair@114: export SYSTEM_UNAME ohair@114: endif duke@1: duke@1: # Normal boot jdk is previous release, but a hard requirement is a 1.5 boot duke@1: REQUIRED_BOOT_VER = 1.5 duke@1: duke@1: # Don't define this unless it's not defined duke@1: ifndef VARIANT duke@1: VARIANT=OPT duke@1: endif duke@1: duke@1: # Platform settings specific to Solaris duke@1: ifeq ($(SYSTEM_UNAME), SunOS) duke@1: PLATFORM = solaris duke@1: OS_NAME = solaris duke@1: OS_VERSION := $(shell uname -r) duke@1: # Solaris sparc build can be either 32-bit or 64-bit. duke@1: # Default to 32, but allow explicit setting to 32 or 64. duke@1: ifndef ARCH_DATA_MODEL duke@1: ARCH_DATA_MODEL=32 duke@1: endif duke@1: ifeq ($(ARCH_DATA_MODEL), 32) duke@1: processor := $(shell uname -p) duke@1: archExpr = case "$(processor)" in \ duke@1: i[3-9]86) \ duke@1: echo i586 \ duke@1: ;; \ duke@1: sparc*) \ duke@1: echo sparc \ duke@1: ;; \ duke@1: *) \ duke@1: echo $(processor) \ duke@1: ;; \ duke@1: esac duke@1: ARCH := $(shell $(archExpr)) duke@1: else duke@1: ARCH := $(shell isainfo -n) duke@1: # ISA_DIR is used to locate 64-bit specific libraries which are generally duke@1: # in the same general place as other libraries under the ./$(ARCH) directory duke@1: ISA_DIR = /$(ARCH) duke@1: endif duke@1: # Need to maintain the jre/lib/i386 location for 32-bit Intel duke@1: ifeq ($(ARCH), i586) duke@1: ARCH_FAMILY = $(ARCH) duke@1: # Value of Java os.arch property duke@1: ARCHPROP = x86 duke@1: else duke@1: ifeq ($(ARCH), amd64) duke@1: ARCH_FAMILY = i586 duke@1: else duke@1: ARCH_FAMILY = sparc duke@1: endif duke@1: # Value of Java os.arch property ohair@194: ARCHPROP = $(ARCH) duke@1: endif duke@1: # Suffix for file bundles used in previous release duke@1: BUNDLE_FILE_SUFFIX=.tar duke@1: # Required Solaris version duke@1: REQUIRED_OS_VERSION = 5.10 duke@1: # Minimum disk space needed as determined by running 'du -sk' on duke@1: # a fully built workspace. duke@1: ifeq ($(ARCH_FAMILY), sparc) duke@1: REQUIRED_FREE_SPACE=1300000 duke@1: else duke@1: REQUIRED_FREE_SPACE=1040000 duke@1: endif duke@1: # How much RAM does this machine have: duke@1: MB_OF_MEMORY=$(shell /etc/prtconf | fgrep 'Memory size:' | expand | cut -d' ' -f3) duke@1: endif duke@1: duke@1: # Platform settings specific to Linux duke@1: ifeq ($(SYSTEM_UNAME), Linux) duke@1: PLATFORM = linux duke@1: OS_NAME = linux duke@1: OS_VERSION := $(shell uname -r) duke@1: # Arch and OS name/version duke@1: mach := $(shell uname -m) duke@1: archExpr = case "$(mach)" in \ duke@1: i[3-9]86) \ duke@1: echo i586 \ duke@1: ;; \ duke@1: ia64) \ duke@1: echo ia64 \ duke@1: ;; \ duke@1: x86_64) \ duke@1: echo amd64 \ duke@1: ;; \ duke@1: sparc*) \ duke@1: echo sparc \ duke@1: ;; \ gbenson@129: arm*) \ gbenson@129: echo arm \ gbenson@129: ;; \ duke@1: *) \ duke@1: echo $(mach) \ duke@1: ;; \ duke@1: esac duke@1: ARCH := $(shell $(archExpr) ) duke@1: ARCH_FAMILY := $(ARCH) duke@1: duke@1: # Linux builds may be 32-bit or 64-bit data model. duke@1: ifeq ($(ARCH), sparc) duke@1: # Linux sparc build can be either 32-bit or 64-bit. duke@1: # Default to 32, but allow explicit setting to 32 or 64. duke@1: ifndef ARCH_DATA_MODEL duke@1: ARCH_DATA_MODEL=32 duke@1: endif duke@1: ifeq ($(ARCH_DATA_MODEL), 32) duke@1: ARCH=sparc duke@1: else duke@1: ARCH=sparcv9 duke@1: endif duke@1: else duke@1: # i586 is 32-bit, amd64 is 64-bit duke@1: ifndef ARCH_DATA_MODEL duke@1: ifeq ($(ARCH), i586) duke@1: ARCH_DATA_MODEL=32 duke@1: else duke@1: ARCH_DATA_MODEL=64 duke@1: endif duke@1: endif duke@1: endif duke@1: duke@1: ifeq ($(ARCH), i586) ohair@194: ARCHPROP = i386 duke@1: else ohair@194: ARCHPROP = $(ARCH) duke@1: endif duke@1: duke@1: # Suffix for file bundles used in previous release duke@1: BUNDLE_FILE_SUFFIX=.tar.gz duke@1: # Minimum disk space needed as determined by running 'du -sk' on duke@1: # a fully built workspace. duke@1: REQUIRED_FREE_SPACE=1460000 duke@1: LINUX_VERSION_INFO = /etc/redhat-release duke@1: ifeq ($(ARCH_DATA_MODEL), 32) duke@1: REQUIRED_LINUX_VER = Advanced Server duke@1: REQUIRED_LINUX_FULLVER = Advanced Server release 2.1AS duke@1: REQUIRED_OS_VERSION = 2.4.9-e.3 duke@1: else duke@1: ifeq ($(ARCH), amd64) duke@1: LINUX_VERSION_INFO = /etc/SuSE-release duke@1: REQUIRED_LINUX_VER = 8.1 duke@1: REQUIRED_LINUX_FULLVER = $(REQUIRED_LINUX_VER) SLSE AMD64 duke@1: REQUIRED_OS_VERSION = 2.4.19-SMP duke@1: else duke@1: REQUIRED_LINUX_VER = Advanced Server duke@1: REQUIRED_LINUX_FULLVER = Advanced Server release 2.1AS 64 bit duke@1: REQUIRED_OS_VERSION = 2.4.19-SMP duke@1: endif duke@1: endif duke@1: # How much RAM does this machine have: duke@1: MB_OF_MEMORY := $(shell free -m | fgrep Mem: | sed -e 's@\ \ *@ @g' | cut -d' ' -f2) duke@1: endif duke@1: duke@1: # Windows with and without CYGWIN will be slightly different duke@1: ifeq ($(SYSTEM_UNAME), Windows_NT) duke@1: PLATFORM = windows duke@1: OS_VERSION := $(shell uname -r) duke@1: WINDOWS_NT_VERSION_STRING=Windows_NT duke@1: REQUIRED_MKS_VER=6.1 duke@1: endif duke@1: ifneq (,$(findstring CYGWIN,$(SYSTEM_UNAME))) duke@1: PLATFORM = windows duke@1: OS_VERSION := 5 duke@1: USING_CYGWIN = true duke@1: export USING_CYGWIN duke@1: WINDOWS_NT_VERSION_STRING=CYGWIN_NT duke@1: REQUIRED_CYGWIN_VER=4.0 duke@1: endif duke@1: duke@1: # Platform settings specific to Windows duke@1: ifeq ($(PLATFORM), windows) duke@1: OS_NAME = nt duke@1: REQUIRED_OS_VERSION=5 duke@1: # Windows builds default to the appropriate for the underlaying duke@1: # architecture. duke@1: # Temporary disk area duke@1: TEMP_DISK=C:/temp duke@1: # GNU Make or MKS overrides $(PROCESSOR_ARCHITECTURE) to always duke@1: # return "x86". Use the first word of $(PROCESSOR_IDENTIFIER) instead. ohair@76: PROC_ARCH:=$(word 1, $(PROCESSOR_IDENTIFIER)) ohair@76: PROC_ARCH:=$(subst x86,X86,$(PROC_ARCH)) ohair@76: PROC_ARCH:=$(subst x64,X64,$(PROC_ARCH)) ohair@76: PROC_ARCH:=$(subst intel64,X64,$(PROC_ARCH)) ohair@76: PROC_ARCH:=$(subst Intel64,X64,$(PROC_ARCH)) ohair@76: PROC_ARCH:=$(subst INTEL64,X64,$(PROC_ARCH)) ohair@76: PROC_ARCH:=$(subst em64t,X64,$(PROC_ARCH)) ohair@76: PROC_ARCH:=$(subst EM64T,X64,$(PROC_ARCH)) ohair@76: PROC_ARCH:=$(subst amd64,X64,$(PROC_ARCH)) ohair@76: PROC_ARCH:=$(subst AMD64,X64,$(PROC_ARCH)) ohair@76: PROC_ARCH:=$(subst ia64,IA64,$(PROC_ARCH)) duke@1: ifndef ARCH_DATA_MODEL ohair@76: ifeq ($(PROC_ARCH),IA64) duke@1: ARCH_DATA_MODEL=64 duke@1: else ohair@76: ifeq ($(PROC_ARCH),X64) duke@1: ARCH_DATA_MODEL=64 duke@1: else duke@1: ARCH_DATA_MODEL=32 duke@1: endif duke@1: endif duke@1: endif duke@1: export ARCH_DATA_MODEL duke@1: ARCH=i586 duke@1: # Value of Java os.arch property duke@1: ARCHPROP=x86 duke@1: REQUIRED_WINDOWS_NAME=Windows Professional 2000 duke@1: REQUIRED_WINDOWS_VERSION=5 0 Service Pack 4 duke@1: ifeq ($(ARCH_DATA_MODEL), 64) duke@1: # If the user wants to perform a cross compile build then they must duke@1: # - set ARCH_DATA_MODEL=64 and either duke@1: # + set ARCH to ia64 or amd64, or duke@1: REQUIRED_WINDOWS_NAME=Windows Server 2003 duke@1: REQUIRED_WINDOWS_VERSION=5 2 Service Pack 1 ohair@76: ifeq ($(PROC_ARCH),X64) duke@1: ARCH=amd64 duke@1: else ohair@76: ifeq ($(PROC_ARCH),IA64) ohair@76: ARCH=ia64 ohair@76: endif duke@1: endif duke@1: # Value of Java os.arch property ohair@194: ARCHPROP=$(ARCH) duke@1: endif duke@1: ARCH_FAMILY = $(ARCH) duke@1: # Where is unwanted output to be delivered? prr@150: ifeq ($(USING_CYGWIN),true) prr@150: DEV_NULL = /dev/null prr@150: else prr@150: DEV_NULL = NUL prr@150: endif duke@1: export DEV_NULL duke@1: # Classpath separator duke@1: CLASSPATH_SEPARATOR = ; duke@1: # User name determination (set _USER) duke@1: ifndef USER duke@1: ifdef USERNAME duke@1: _USER := $(USERNAME) duke@1: else duke@1: ifdef LOGNAME duke@1: _USER := $(LOGNAME) duke@1: else duke@1: _USER := $(shell id -un) duke@1: endif duke@1: endif duke@1: else duke@1: _USER:=$(USER) duke@1: endif duke@1: # Suffix for file bundles used in previous release duke@1: BUNDLE_FILE_SUFFIX=.tar duke@1: # Minimum disk space needed as determined by running 'du -sk' on duke@1: # a fully built workspace. duke@1: REQUIRED_FREE_SPACE=500000 duke@1: # How much RAM does this machine have: ohair@114: ifndef MB_OF_MEMORY ohair@114: MB_OF_MEMORY := $(shell \ ohair@114: if [ -f "C:/cygwin/bin/free.exe" ] ; then \ ohair@114: ( C:/cygwin/bin/bash.exe -c "C:/cygwin/bin/free.exe -m" ) | \ ohair@114: grep Mem: | \ ohair@114: sed -e 's@\ \ *@ @g' | cut -d' ' -f2 ; \ ohair@114: else \ ohair@114: echo "512"; \ ohair@114: fi) ohair@114: export MB_OF_MEMORY ohair@114: endif duke@1: endif duke@1: duke@1: # Machines with 512Mb or less of real memory are considered low memory duke@1: # build machines and adjustments will be made to prevent excessing duke@1: # system swapping during the build. duke@1: # If we don't know, assume 512. Subtract 128 from MB for VM MAX. duke@1: # Don't set VM max over 1024-128=896. ohair@114: ifndef MAX_VM_MEMORY ohair@114: ifneq ($(MB_OF_MEMORY),) ohair@114: LOW_MEMORY_MACHINE := $(shell \ ohair@114: if [ $(MB_OF_MEMORY) -le 512 ] ; then \ ohair@114: echo "true"; \ ohair@114: else \ ohair@114: echo "false"; \ ohair@114: fi) ohair@114: MAX_VM_MEMORY := $(shell \ ohair@114: if [ $(MB_OF_MEMORY) -le 1024 ] ; then \ ohair@114: expr $(MB_OF_MEMORY) '-' 128 ; \ ohair@114: else \ ohair@114: echo "896"; \ ohair@114: fi) ohair@114: MIN_VM_MEMORY := $(shell \ ohair@114: if [ $(MAX_VM_MEMORY) -le 128 ] ; then \ ohair@114: expr $(MAX_VM_MEMORY) '-' 8 ; \ ohair@114: else \ ohair@114: echo "128"; \ ohair@114: fi) ohair@114: else ohair@114: MB_OF_MEMORY := unknown ohair@114: LOW_MEMORY_MACHINE := true ohair@114: MAX_VM_MEMORY := 384 ohair@114: MIN_VM_MEMORY := 128 ohair@114: endif ohair@114: export MAX_VM_MEMORY ohair@114: export MIN_VM_MEMORY ohair@114: export LOW_MEMORY_MACHINE ohair@114: export MAX_VM_MEMORY duke@1: endif duke@1: duke@1: REQUIRED_ZIP_VER = 2.2 duke@1: REQUIRED_UNZIP_VER = 5.12 duke@1: REQUIRED_MAKE_VER = 3.78 duke@1: duke@1: # Unix type settings (same for all unix platforms) duke@1: ifneq ($(PLATFORM), windows) duke@1: # Temporary disk area duke@1: TEMP_DISK=/tmp duke@1: # Where is unwanted output to be delivered? duke@1: DEV_NULL = /dev/null duke@1: export DEV_NULL duke@1: # Character used between entries in classpath duke@1: CLASSPATH_SEPARATOR = : duke@1: # User name determination (set _USER) duke@1: ifndef USER duke@1: ifdef LOGNAME duke@1: _USER := $(LOGNAME) duke@1: else duke@1: _USER := $(shell logname) duke@1: endif duke@1: else duke@1: _USER:=$(USER) duke@1: endif duke@1: endif duke@1: duke@1: # If blanks in the username, use the first 4 words and pack them together duke@1: _USER1:=$(subst ', ,$(_USER)) duke@1: _USER2:=$(subst ", ,$(_USER1)) duke@1: USER:=$(word 1,$(_USER2))$(word 2,$(_USER2))$(word 3,$(_USER2))$(word 4,$(_USER2)) duke@1: export USER duke@1: duke@1: export PLATFORM duke@1: endif duke@1: