Platform.gmk revision 8
#
# Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved.
# 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. Sun designates this
# particular file as subject to the "Classpath" exception as provided
# by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
# CA 95054 USA or visit www.sun.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
# OS_NAME solaris, linux, or nt
# OS_VERSION specific version of os, 5.10, 2.4.9-e.3, etc.
# OS_VENDOR company name
# 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
# REQUIRED_WINDOWS_NAME windows only: basic name of windows
# REQUIRED_WINDOWS_VERSION windows only: specific version of windows
# USING_CYGWIN windows only: true or false
# WINDOWS_NT_VERSION_STRING windows only: long version name
# REQUIRED_OS_VERSION required OS version, e.g. 5.10, 2.4
# REQUIRED_FREE_SPACE minimum disk space needed for outputdir
# ISHIELD_TEMP_MIN windows only: minimum disk space in temp area
# REQUIRED_ZIP_VER required version of zip
# REQUIRED_UNZIP_VER required version of unzip
# REQUIRED_DXSDK_VER windows only: required version of DirectX
# LINUX_VERSION_INFO linux only: location of linux release file
# REQUIRED_LINUX_VER linux only: required version of linux
# REQUIRED_LINUX_FULLVER linux only: required full version of linux
# REQUIRED_ALSA_VERSION linux only: required version of ALSA
# REQUIRED_FREETYPE_VERSION openjdk only: required version of freetype
SYSTEM_UNAME := $(shell uname)
# Normal boot jdk is previous release, but a hard requirement is a 1.5 boot
REQUIRED_BOOT_VER = 1.5
# If we are using freetype, this is the required version
#
# 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
OS_VERSION := $(shell uname -r)
# 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
# Required Solaris version
REQUIRED_OS_VERSION = 5.10
# Minimum disk space needed as determined by running 'du -sk' on
# a fully built workspace.
REQUIRED_FREE_SPACE=1300000
else
REQUIRED_FREE_SPACE=1040000
# How much RAM does this machine have:
# Platform settings specific to Linux
OS_VERSION := $(shell uname -r)
i[3-9]86) \
echo i586 \
;; \
ia64) \
echo ia64 \
;; \
x86_64) \
echo amd64 \
;; \
sparc*) \
echo sparc \
;; \
*) \
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
# i586 is 32-bit, amd64 is 64-bit
else
else
# Value of Java os.arch property
# Suffix for file bundles used in previous release
# Minimum disk space needed as determined by running 'du -sk' on
# a fully built workspace.
REQUIRED_FREE_SPACE=1460000
else
REQUIRED_LINUX_VER = 8.1
else
# ALSA 0.9.1 and above
# How much RAM does this machine have:
# Windows with and without CYGWIN will be slightly different
OS_VERSION := $(shell uname -r)
REQUIRED_MKS_VER=6.1
OS_VERSION := 5
USING_CYGWIN = true
export USING_CYGWIN
# 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.
else
else
export ARCH_DATA_MODEL
# Value of Java os.arch property
# 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
ARCH_FAMILY = $(ARCH)
# Where is unwanted output to be delivered?
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
# Minimum disk space needed as determined by running 'du -sk' on
# a fully built workspace.
REQUIRED_FREE_SPACE=500000
# ISHIELD_TEMP_MIN is the difference of an empty C:\TEMP vs. one after a
# bundles build on windows.
ISHIELD_TEMP_MIN=250000
REQUIRED_DXSDK_VER = 0x0700
# How much RAM does this machine have:
MB_OF_MEMORY := $(shell \
else \
echo "512"; \
fi)
# 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.
# If we don't know, assume 512. Subtract 128 from MB for VM MAX.
# Don't set VM max over 1024-128=896.
LOW_MEMORY_MACHINE := $(shell \
echo "true"; \
else \
echo "false"; \
fi)
MAX_VM_MEMORY := $(shell \
else \
echo "896"; \
fi)
MIN_VM_MEMORY := $(shell \
else \
echo "128"; \
fi)
else
LOW_MEMORY_MACHINE := true
MAX_VM_MEMORY := 384
MIN_VM_MEMORY := 128
REQUIRED_ZIP_VER = 2.2
REQUIRED_UNZIP_VER = 5.12
REQUIRED_MAKE_VER = 3.78
# 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
# 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