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