jdk/make/common/shared/Platform.gmk
changeset 2158 68869a085470
parent 890 7336798a900d
child 2300 103e268e2d16
equal deleted inserted replaced
1795:5843778bda89 2158:68869a085470
    49 # Variables set by this file:
    49 # Variables set by this file:
    50 #     SYSTEM_UNAME                what 'uname' says this system is
    50 #     SYSTEM_UNAME                what 'uname' says this system is
    51 #     USER                        login name of user (minus blanks)
    51 #     USER                        login name of user (minus blanks)
    52 #     PLATFORM                    windows, solaris, or linux
    52 #     PLATFORM                    windows, solaris, or linux
    53 #     VARIANT                     OPT or DBG, OPT is the default
    53 #     VARIANT                     OPT or DBG, OPT is the default
    54 #     OS_NAME                     solaris, linux, or nt
       
    55 #     OS_VERSION                  specific version of os, 5.10, 2.4.9-e.3, etc.
       
    56 #     OS_VENDOR                   company name
       
    57 #     TEMP_DISK                   /tmp or C:/temp
    54 #     TEMP_DISK                   /tmp or C:/temp
    58 #     ARCH_DATA_MODEL             32 or 64
    55 #     ARCH_DATA_MODEL             32 or 64
    59 #     ARCH                        sparc, sparcv9, i586, amd64, or ia64
    56 #     ARCH                        sparc, sparcv9, i586, amd64, or ia64
    60 #     ARCH_FAMILY                 sparc or i586
    57 #     ARCH_FAMILY                 sparc or i586
    61 #     ARCHPROP                    sparc or x86
    58 #     ARCHPROP                    sparc or x86
    70 #     EXE_SUFFIX                  executable file suffix, .exe or empty
    67 #     EXE_SUFFIX                  executable file suffix, .exe or empty
    71 #     BUNDLE_FILE_SUFFIX          suffix for bundles: .tar or .tar.gz
    68 #     BUNDLE_FILE_SUFFIX          suffix for bundles: .tar or .tar.gz
    72 #     ISA_DIR                     solaris only: /sparcv9 or /amd64
    69 #     ISA_DIR                     solaris only: /sparcv9 or /amd64
    73 #     LIBARCH32                   solaris only: sparc or i386
    70 #     LIBARCH32                   solaris only: sparc or i386
    74 #     LIBARCH64                   solaris only: sparcv9 or amd64
    71 #     LIBARCH64                   solaris only: sparcv9 or amd64
    75 #     REQUIRED_WINDOWS_VERSION    windows only: specific version of windows 
       
    76 #     USING_CYGWIN                windows only: true or false
    72 #     USING_CYGWIN                windows only: true or false
    77 #     WINDOWS_NT_VERSION_STRING   windows only: long version name
       
    78 #     REQUIRED_OS_VERSION         required OS version, e.g. 5.10, 2.4
       
    79 #     REQUIRED_FREE_SPACE         minimum disk space needed for outputdir
       
    80 #     ISHIELD_TEMP_MIN            windows only: minimum disk space in temp area
    73 #     ISHIELD_TEMP_MIN            windows only: minimum disk space in temp area
    81 #     REQUIRED_ZIP_VER            required version of zip
       
    82 #     REQUIRED_UNZIP_VER          required version of unzip
       
    83 #     REQUIRED_DXSDK_VER          windows only: required version of DirectX
       
    84 #     LINUX_VERSION_INFO          linux only: location of linux release file
       
    85 #     REQUIRED_LINUX_VER          linux only: required version of linux
       
    86 #     REQUIRED_LINUX_FULLVER      linux only: required full version of linux
       
    87 #     REQUIRED_ALSA_VERSION       linux only: required version of ALSA
       
    88 #     REQUIRED_FREETYPE_VERSION   openjdk only: required version of freetype 
       
    89 
    74 
    90 SYSTEM_UNAME := $(shell uname)
    75 SYSTEM_UNAME := $(shell uname)
    91 
       
    92 # Normal boot jdk is previous release, but a hard requirement is a 1.5 boot
       
    93 REQUIRED_BOOT_VER = 1.5
       
    94 
       
    95 # If we are using freetype, this is the required version
       
    96 REQUIRED_FREETYPE_VERSION=2.3.0
       
    97 
    76 
    98 #
    77 #
    99 # Prune out all known SCM (Source Code Management) directories
    78 # Prune out all known SCM (Source Code Management) directories
   100 # so they will not be included when copying directory trees
    79 # so they will not be included when copying directory trees
   101 # or packaging up .jar files, etc.  This applies to all workspaces.
    80 # or packaging up .jar files, etc.  This applies to all workspaces.
   111 endif
    90 endif
   112 
    91 
   113 # Platform settings specific to Solaris
    92 # Platform settings specific to Solaris
   114 ifeq ($(SYSTEM_UNAME), SunOS)
    93 ifeq ($(SYSTEM_UNAME), SunOS)
   115   PLATFORM = solaris
    94   PLATFORM = solaris
   116   OS_NAME = solaris
       
   117   OS_VERSION := $(shell uname -r)
       
   118   # Solaris sparc build can be either 32-bit or 64-bit.
    95   # Solaris sparc build can be either 32-bit or 64-bit.
   119   #   Default to 32, but allow explicit setting to 32 or 64.
    96   #   Default to 32, but allow explicit setting to 32 or 64.
   120   ifndef ARCH_DATA_MODEL
    97   ifndef ARCH_DATA_MODEL
   121     ARCH_DATA_MODEL=32
    98     ARCH_DATA_MODEL=32
   122   endif
    99   endif
   164     LIBARCH32 = i386
   141     LIBARCH32 = i386
   165     LIBARCH64 = amd64
   142     LIBARCH64 = amd64
   166   endif
   143   endif
   167   # Suffix for file bundles used in previous release
   144   # Suffix for file bundles used in previous release
   168   BUNDLE_FILE_SUFFIX=.tar
   145   BUNDLE_FILE_SUFFIX=.tar
   169   OS_VENDOR = Sun Microsystems
       
   170   # Required Solaris version
       
   171   REQUIRED_OS_VERSION = 5.10
       
   172   # Minimum disk space needed as determined by running 'du -sk' on 
       
   173   #    a fully built workspace.
       
   174   ifeq ($(ARCH_FAMILY), sparc)
       
   175     REQUIRED_FREE_SPACE=1300000
       
   176   else
       
   177     REQUIRED_FREE_SPACE=1040000
       
   178   endif
       
   179   # How much RAM does this machine have:
   146   # How much RAM does this machine have:
   180   MB_OF_MEMORY=$(shell /etc/prtconf | fgrep 'Memory size:' | expand | cut -d' ' -f3)
   147   MB_OF_MEMORY=$(shell /etc/prtconf | fgrep 'Memory size:' | expand | cut -d' ' -f3)
   181 endif
   148 endif
   182 
   149 
   183 # Platform settings specific to Linux
   150 # Platform settings specific to Linux
   184 ifeq ($(SYSTEM_UNAME), Linux)
   151 ifeq ($(SYSTEM_UNAME), Linux)
   185   PLATFORM = linux
   152   PLATFORM = linux
   186   OS_NAME = linux
       
   187   OS_VERSION := $(shell uname -r)
       
   188   # Arch and OS name/version
   153   # Arch and OS name/version
   189   mach := $(shell uname -m)
   154   mach := $(shell uname -m)
   190   archExpr = case "$(mach)" in \
   155   archExpr = case "$(mach)" in \
   191                 i[3-9]86) \
   156                 i[3-9]86) \
   192                     echo i586 \
   157                     echo i586 \
   240   # Value of Java os.arch property
   205   # Value of Java os.arch property
   241   ARCHPROP  = $(LIBARCH)
   206   ARCHPROP  = $(LIBARCH)
   242 
   207 
   243   # Suffix for file bundles used in previous release
   208   # Suffix for file bundles used in previous release
   244   BUNDLE_FILE_SUFFIX=.tar.gz
   209   BUNDLE_FILE_SUFFIX=.tar.gz
   245   # Minimum disk space needed as determined by running 'du -sk' on 
       
   246   #    a fully built workspace.
       
   247   REQUIRED_FREE_SPACE=1460000
       
   248   LINUX_VERSION_INFO = /etc/redhat-release
       
   249   OS_VENDOR = Red Hat
       
   250   ifeq ($(ARCH_DATA_MODEL), 32)
       
   251     REQUIRED_LINUX_VER = Advanced Server
       
   252     REQUIRED_LINUX_FULLVER = Advanced Server release 2.1AS
       
   253     REQUIRED_OS_VERSION = 2.4.9-e.3
       
   254   else
       
   255     ifeq ($(ARCH), amd64)
       
   256       LINUX_VERSION_INFO = /etc/SuSE-release
       
   257       OS_VENDOR = SuSE Enterprise
       
   258       REQUIRED_LINUX_VER = 8.1
       
   259       REQUIRED_LINUX_FULLVER = $(REQUIRED_LINUX_VER) SLSE AMD64
       
   260       REQUIRED_OS_VERSION = 2.4.19-SMP
       
   261     else
       
   262       REQUIRED_LINUX_VER = Advanced Server
       
   263       REQUIRED_LINUX_FULLVER = Advanced Server release 2.1AS 64 bit
       
   264       REQUIRED_OS_VERSION = 2.4.19-SMP
       
   265     endif
       
   266   endif
       
   267   ifneq ($(ARCH), ia64)
       
   268     # ALSA 0.9.1 and above
       
   269     REQUIRED_ALSA_VERSION = ^((0[.]9[.][1-9])|(1[.]0[.][0-9]))[0-9]*
       
   270   endif
       
   271   # How much RAM does this machine have:
   210   # How much RAM does this machine have:
   272   MB_OF_MEMORY := $(shell free -m | fgrep Mem: | awk '{print $$2;}' )
   211   MB_OF_MEMORY := $(shell free -m | fgrep Mem: | awk '{print $$2;}' )
   273 endif
   212 endif
   274 
   213 
   275 # Windows with and without CYGWIN will be slightly different
   214 # Windows with and without CYGWIN will be slightly different
   276 ifeq ($(SYSTEM_UNAME), Windows_NT)
   215 ifeq ($(SYSTEM_UNAME), Windows_NT)
   277   PLATFORM = windows
   216   PLATFORM = windows
   278   OS_VERSION := $(shell uname -r)
       
   279   WINDOWS_NT_VERSION_STRING=Windows_NT
       
   280   REQUIRED_MKS_VER=6.1
       
   281 endif
   217 endif
   282 ifneq (,$(findstring CYGWIN,$(SYSTEM_UNAME)))
   218 ifneq (,$(findstring CYGWIN,$(SYSTEM_UNAME)))
   283   PLATFORM = windows
   219   PLATFORM = windows
   284   OS_VERSION := 5
       
   285   USING_CYGWIN = true
   220   USING_CYGWIN = true
   286   export USING_CYGWIN
   221   export USING_CYGWIN
   287   WINDOWS_NT_VERSION_STRING=CYGWIN_NT
       
   288   REQUIRED_CYGWIN_VER=4.0
       
   289 endif
   222 endif
   290 
   223 
   291 # Platform settings specific to Windows
   224 # Platform settings specific to Windows
   292 ifeq ($(PLATFORM), windows)
   225 ifeq ($(PLATFORM), windows)
   293   OS_NAME = nt
       
   294   REQUIRED_OS_VERSION=5
       
   295   # Windows builds default to the appropriate for the underlaying
   226   # Windows builds default to the appropriate for the underlaying
   296   # architecture.
   227   # architecture.
   297   # Temporary disk area
   228   # Temporary disk area
   298   TEMP_DISK=C:/temp
   229   TEMP_DISK=C:/temp
   299   # GNU Make or MKS overrides $(PROCESSOR_ARCHITECTURE) to always
   230   # GNU Make or MKS overrides $(PROCESSOR_ARCHITECTURE) to always
   312   export ARCH_DATA_MODEL
   243   export ARCH_DATA_MODEL
   313   ifeq ($(ARCH_DATA_MODEL), 64)
   244   ifeq ($(ARCH_DATA_MODEL), 64)
   314     # If the user wants to perform a cross compile build then they must
   245     # If the user wants to perform a cross compile build then they must
   315     # - set ARCH_DATA_MODEL=64 and either
   246     # - set ARCH_DATA_MODEL=64 and either
   316     #      + set ARCH to ia64 or amd64, or
   247     #      + set ARCH to ia64 or amd64, or
   317     REQUIRED_WINDOWS_VERSION=Server 2003 Enterprise x64 Edition
       
   318     ifeq ($(word 1, $(PROCESSOR_IDENTIFIER)), AMD64)
   248     ifeq ($(word 1, $(PROCESSOR_IDENTIFIER)), AMD64)
   319       ARCH=amd64
   249       ARCH=amd64
   320     else
   250     else
   321       ARCH=ia64
   251       ARCH=ia64
   322     endif
   252     endif
   323     LIBARCH=$(ARCH)
   253     LIBARCH=$(ARCH)
   324     # Value of Java os.arch property
   254     # Value of Java os.arch property
   325     ARCHPROP=$(LIBARCH)
   255     ARCHPROP=$(LIBARCH)
   326   else
   256   else
   327     REQUIRED_WINDOWS_VERSION=2000 or Unknown
       
   328     #REQUIRED_WINDOWS_VERSION=XP Professional
       
   329     # LIBARCH is used to preserve the jre/lib/i386 directory name for 32-bit intel
   257     # LIBARCH is used to preserve the jre/lib/i386 directory name for 32-bit intel
   330     ARCH=i586
   258     ARCH=i586
   331     LIBARCH=i386
   259     LIBARCH=i386
   332     # Value of Java os.arch property
   260     # Value of Java os.arch property
   333     ARCHPROP=x86
   261     ARCHPROP=x86
   362   endif
   290   endif
   363   # Location of client/server directories
   291   # Location of client/server directories
   364   ARCH_VM_SUBDIR=jre/bin
   292   ARCH_VM_SUBDIR=jre/bin
   365   # Suffix for file bundles used in previous release
   293   # Suffix for file bundles used in previous release
   366   BUNDLE_FILE_SUFFIX=.tar
   294   BUNDLE_FILE_SUFFIX=.tar
   367   # Minimum disk space needed as determined by running 'du -sk' on 
       
   368   #    a fully built workspace.
       
   369   REQUIRED_FREE_SPACE=500000
       
   370   # ISHIELD_TEMP_MIN is the difference of an empty C:\TEMP vs. one after a
   295   # ISHIELD_TEMP_MIN is the difference of an empty C:\TEMP vs. one after a
   371   #     bundles build on windows.
   296   #     bundles build on windows.
   372   ISHIELD_TEMP_MIN=250000
   297   ISHIELD_TEMP_MIN=250000
   373   REQUIRED_DXSDK_VER = 0x0900
       
   374   OS_VENDOR = Microsoft
       
   375   # How much RAM does this machine have:
   298   # How much RAM does this machine have:
   376   ifeq ($(JDK_HAS_MEM_INFO),)
   299   ifeq ($(JDK_HAS_MEM_INFO),)
   377     ifeq ($(USING_CYGWIN),true)
   300     ifeq ($(USING_CYGWIN),true)
   378       # CYGWIN has the 'free' utility
   301       # CYGWIN has the 'free' utility
   379       _MB_OF_MEMORY := \
   302       _MB_OF_MEMORY := \
   407     else
   330     else
   408       MB_OF_MEMORY := 512
   331       MB_OF_MEMORY := 512
   409     endif
   332     endif
   410   endif
   333   endif
   411 endif
   334 endif
   412 
       
   413 REQUIRED_ZIP_VER = 2.2
       
   414 REQUIRED_UNZIP_VER = 5.12
       
   415 REQUIRED_MAKE_VER = 3.78
       
   416 
   335 
   417 # Unix type settings (same for all unix platforms)
   336 # Unix type settings (same for all unix platforms)
   418 ifneq ($(PLATFORM), windows)
   337 ifneq ($(PLATFORM), windows)
   419   # Temporary disk area
   338   # Temporary disk area
   420   TEMP_DISK=/tmp
   339   TEMP_DISK=/tmp