#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
#
#
# Includes basic system requirements, versions of utilities required,
# suffixes on files, and basic defaults attributed to the build platform.
#
#
# Assumes some basic unix system utilities (e.g. uname) are in the search path
# in order to figure out the system.
#
PLATFORM_SHARED=done
# Possible Input variables:
# ARCH_DATA_MODEL 32 or 64, default to 32
# USER, LOGNAME user name (runs logname, or id if not set)
# PROCESSOR_IDENTIFIER windows only: needed in environment
#
# (Also gets input by running the utilities uname, logname, isainfo, or id.)
#
# Variables set by this file:
# SYSTEM_UNAME what 'uname' says this system is
# USER login name of user (minus blanks)
# PLATFORM windows, solaris, or linux
# VARIANT OPT or DBG, OPT is the default
# TEMP_DISK /tmp or C:/temp
# ARCH_DATA_MODEL 32 or 64
# ARCH sparc, sparcv9, i586, amd64, or ia64
# ARCH_FAMILY sparc or i586
# ARCHPROP sparc or x86
# LIBARCH sparc, sparcv9, i386, amd64, or ia64
# CLASSPATH_SEPARATOR separator in classpath, ; or :
# LIB_PREFIX dynamic or static library prefix, lib or empty
# LIB_SUFFIX static library file suffix, .lib or .a?
# LIBRARY_SUFFIX dynamic library file suffix, .dll or .so
# OBJECT_SUFFIX object file suffix, .o or .obj
# EXE_SUFFIX executable file suffix, .exe or empty
# BUNDLE_FILE_SUFFIX suffix for bundles: .tar or .tar.gz
# ISA_DIR solaris only: /sparcv9 or /amd64
# LIBARCH32 solaris only: sparc or i386
# LIBARCH64 solaris only: sparcv9 or amd64
# USING_CYGWIN windows only: true or false
# ISHIELD_TEMP_MIN windows only: minimum disk space in temp area
# Only run uname once in this make session.
SYSTEM_UNAME := $(shell uname)
export SYSTEM_UNAME
#
# Prune out all known SCM (Source Code Management) directories
# so they will not be included when copying directory trees
# or packaging up .jar files, etc. This applies to all workspaces.
#
# When changing SCM_DIRs also change SCM_DIRS_rexp and SCM_DIRS_prune:
SCM_DIRS_rexp = ".hg|.svn|CVS|RCS|SCCS|Codemgr_wsdata|deleted_files|.hgignore|.hgtags"
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
# Don't define this unless it's not defined
# Platform settings specific to Solaris
# Solaris sparc build can be either 32-bit or 64-bit.
# Default to 32, but allow explicit setting to 32 or 64.
i[3-9]86) \
echo i586 \
;; \
sparc*) \
echo sparc \
;; \
*) \
echo $(processor) \
;; \
esac
else
# ISA_DIR is used to locate 64-bit specific libraries which are generally
# in the same general place as other libraries under the ./$(ARCH) directory
ARCH_FAMILY = $(ARCH)
# Value of Java os.arch property
else
else
# Value of Java os.arch property
# The two LIBARCH names
else
# Suffix for file bundles used in previous release
# How much RAM does this machine have (zones send an error to stderr):
MB_OF_MEMORY:=$(shell /usr/sbin/prtconf 2>/dev/null | fgrep 'Memory size:' | expand | cut -d' ' -f3)
# Platform settings specific to Linux
mach := $(CROSS_COMPILE_ARCH)
else
i[3-9]86) \
echo i586 \
;; \
ia64) \
echo ia64 \
;; \
x86_64) \
echo amd64 \
;; \
sparc*) \
echo sparc \
;; \
arm*) \
echo arm \
;; \
*) \
echo $(mach) \
;; \
esac
ARCH_FAMILY := $(ARCH)
# Linux builds may be 32-bit or 64-bit data model.
# Linux sparc build can be either 32-bit or 64-bit.
# Default to 32, but allow explicit setting to 32 or 64.
else
else
# Most archs are 32-bit
else
# Value of Java os.arch property
# Suffix for file bundles used in previous release
# How much RAM does this machine have:
OS_VERSION := $(shell uname -r)
# Allow arch to be set from the environment to avoid this.
# MMM: revisit when hotspot producinging universal libs
# mach := universal
else
else
i[3-9]86) \
echo i586 \
;; \
sparc64) \
echo sparcv9 \
;; \
sparc*) \
echo sparc \
;; \
x86_64) \
echo x86_64 \
;; \
"Power Macintosh") \
echo ppc \
;; \
*) \
echo $(mach) \
;; \
esac
ARCH_FAMILY := $(ARCH)
# i586, sparc, and ppc are 32 bit, amd64 and sparc64 are 64
# ARCH_DATA_MODEL does not exactly mean anything in universal
# but it has to be one or the other, so pick 32
else
else
# Value of Java os.arch property
# Suffix for file bundles used in previous release
# How much RAM does this machine have:
# Windows with and without CYGWIN will be slightly different
USING_CYGWIN = true
export USING_CYGWIN
CYGPATH_CMD=cygpath -a -s -m
# Only run "cygpath /" once in this make session.
export CYGWIN_HOME
# Platform settings specific to Windows
# Windows builds default to the appropriate for the underlaying
# architecture.
# Temporary disk area
# GNU Make or MKS overrides $(PROCESSOR_ARCHITECTURE) to always
# return "x86". Use the first word of $(PROCESSOR_IDENTIFIER) instead.
# And sometimes PROCESSOR_IDENTIFIER is not defined at all
# (in some restricted shells), so we use uname if we have to.
# Only run uname -m once in this make session.
SYSTEM_UNAME_M := $(shell uname -m)
export SYSTEM_UNAME_M
else
# Cover all the possibilities, MKS uname, CYGWIN uname, PROCESSOR_IDENTIFIER
# Get: X86, X64, or IA64
else
else
export ARCH_DATA_MODEL
# If the user wants to perform a cross compile build then they must
# - set ARCH_DATA_MODEL=64 and either
# + set ARCH to ia64 or amd64, or
else
# Value of Java os.arch property
else
# Value of Java os.arch property
ARCH_FAMILY = $(ARCH)
# Where is unwanted output to be delivered?
# MKS uses the special file "NUL", cygwin uses the customary unix file.
else
export DEV_NULL
# Classpath separator
# The suffix used for object file (.o for unix .obj for windows)
# The suffix applied to executables (.exe for windows, nothing for solaris)
EXE_SUFFIX = .exe
# The prefix applied to library files (lib for solaris, nothing for windows)
# User name determination (set _USER)
else
else
else
# Suffix for file bundles used in previous release
# ISHIELD_TEMP_MIN is the difference of an empty C:\TEMP vs. one after a
# bundles build on windows.
ISHIELD_TEMP_MIN=250000
# How much RAM does this machine have:
# CYGWIN has the 'free' utility
_MB_OF_MEMORY := \
else
# Windows 2000 has the mem utility, but two memory areas
# extended memory is what is beyond 1024M
_B_OF_EXT_MEMORY := \
_B_OF_MEMORY := \
else
_B_OF_MEMORY := \
# Windows 2003 has the systeminfo utility use it if mem doesn't work
_MB_OF_MEMORY := \
else
MB_OF_MEMORY := $(_MB_OF_MEMORY)
else
MB_OF_MEMORY := 512
# Unix type settings (same for all unix platforms)
# Temporary disk area
# Where is unwanted output to be delivered?
export DEV_NULL
# Character used between entries in classpath
# suffix used for object file (.o for unix .obj for windows)
OBJECT_SUFFIX = o
# The suffix applied to runtime libraries
# The suffix applied to link libraries
LIB_SUFFIX = so
# The suffix applied to executables (.exe for windows, nothing for solaris)
# The prefix applied to library files (lib for solaris, nothing for windows)
# User name determination (set _USER)
else
else
# Darwin-specific Overrides
# The suffix applied to runtime libraries
# The suffix applied to link libraries
LIB_SUFFIX = o
else
LIB_SUFFIX = a
# Machines with 512Mb or less of real memory are considered low memory
# build machines and adjustments will be made to prevent excessing
# system swapping during the build.
JDK_HAS_MEM_INFO=true
export JDK_HAS_MEM_INFO
LOW_MEMORY_MACHINE := $(shell \
echo "true"; \
else \
echo "false"; \
fi)
MAX_VM_MEMORY := 512
MIN_VM_MEMORY := $(MAX_VM_MEMORY)
else
LOW_MEMORY_MACHINE := true
MAX_VM_MEMORY := 384
MIN_VM_MEMORY := 128
export MB_OF_MEMORY
export LOW_MEMORY_MACHINE
export MAX_VM_MEMORY
export MIN_VM_MEMORY
# If blanks in the username, use the first 4 words and pack them together
_USER2:=$(subst ", ,$(_USER1))
USER:=$(word 1,$(_USER2))$(word 2,$(_USER2))$(word 3,$(_USER2))$(word 4,$(_USER2))
export USER
export PLATFORM
endif