make/common/shared/Platform.gmk

Print this page




  36 #
  37 
  38 ifndef PLATFORM_SHARED
  39 
  40 PLATFORM_SHARED=done
  41 
  42 # Possible Input variables:
  43 #     ARCH_DATA_MODEL             32 or 64, default to 32
  44 #     USER, LOGNAME               user name (runs logname, or id if not set)
  45 #     PROCESSOR_IDENTIFIER        windows only: needed in environment
  46 #
  47 # (Also gets input by running the utilities uname, logname, isainfo, or id.)
  48 #
  49 # Variables set by this file:
  50 #     SYSTEM_UNAME                what 'uname' says this system is
  51 #     USER                        login name of user (minus blanks)
  52 #     PLATFORM                    windows, solaris, or linux
  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
  58 #     ARCH_DATA_MODEL             32 or 64
  59 #     ARCH                        sparc, sparcv9, i586, amd64, or ia64
  60 #     ARCH_FAMILY                 sparc or i586
  61 #     ARCHPROP                    sparc or x86
  62 #     ARCH_VM_SUBDIR              jre/bin, jre/lib/sparc, etc.
  63 #     LIBARCH                     sparc, sparcv9, i386, amd64, or ia64
  64 #     DEV_NULL                    destination of /dev/null, NUL or /dev/NULL
  65 #     CLASSPATH_SEPARATOR         separator in classpath, ; or :
  66 #     LIB_PREFIX                  dynamic or static library prefix, lib or empty
  67 #     LIB_SUFFIX                  static library file suffix, .lib or .a?
  68 #     LIBRARY_SUFFIX              dynamic library file suffix, .dll or .so
  69 #     OBJECT_SUFFIX               object file suffix, .o or .obj
  70 #     EXE_SUFFIX                  executable file suffix, .exe or empty
  71 #     BUNDLE_FILE_SUFFIX          suffix for bundles: .tar or .tar.gz
  72 #     ISA_DIR                     solaris only: /sparcv9 or /amd64
  73 #     LIBARCH32                   solaris only: sparc or i386
  74 #     LIBARCH64                   solaris only: sparcv9 or amd64
  75 #     REQUIRED_WINDOWS_VERSION    windows only: specific version of windows 
  76 #     USING_CYGWIN                windows only: true or false


 149   else
 150      ifeq ($(ARCH), amd64)
 151         ARCH_FAMILY = i586
 152      else
 153         ARCH_FAMILY = sparc
 154      endif
 155      LIBARCH  = $(ARCH)
 156      # Value of Java os.arch property
 157      ARCHPROP = $(LIBARCH)
 158   endif
 159   # The two LIBARCH names
 160   ifeq ($(ARCH_FAMILY), sparc)
 161     LIBARCH32 = sparc
 162     LIBARCH64 = sparcv9
 163   else
 164     LIBARCH32 = i386
 165     LIBARCH64 = amd64
 166   endif
 167   # Suffix for file bundles used in previous release
 168   BUNDLE_FILE_SUFFIX=.tar
 169   OS_VENDOR = Sun Microsystems
 170   # Required Solaris version
 171   ifeq ($(ARCH), amd64)
 172     REQUIRED_OS_VERSION = 5.10
 173   else
 174     REQUIRED_OS_VERSION = 5.8
 175   endif
 176   # Minimum disk space needed as determined by running 'du -sk' on 
 177   #    a fully built workspace.
 178   ifeq ($(ARCH_FAMILY), sparc)
 179     REQUIRED_FREE_SPACE=1300000
 180   else
 181     REQUIRED_FREE_SPACE=1040000
 182   endif
 183   # How much RAM does this machine have:
 184   MB_OF_MEMORY=$(shell /etc/prtconf | fgrep 'Memory size:' | expand | cut -d' ' -f3)
 185 endif
 186 
 187 # Platform settings specific to Linux
 188 ifeq ($(SYSTEM_UNAME), Linux)
 189   PLATFORM = linux


 236       endif
 237     endif
 238   endif
 239 
 240   # Need to maintain the jre/lib/i386 location for 32-bit Intel
 241   ifeq ($(ARCH), i586)
 242     LIBARCH = i386
 243   else
 244     LIBARCH = $(ARCH)
 245   endif
 246 
 247   # Value of Java os.arch property
 248   ARCHPROP  = $(LIBARCH)
 249 
 250   # Suffix for file bundles used in previous release
 251   BUNDLE_FILE_SUFFIX=.tar.gz
 252   # Minimum disk space needed as determined by running 'du -sk' on 
 253   #    a fully built workspace.
 254   REQUIRED_FREE_SPACE=1460000
 255   LINUX_VERSION_INFO = /etc/redhat-release
 256   OS_VENDOR = Red Hat
 257   ifeq ($(ARCH_DATA_MODEL), 32)
 258     REQUIRED_LINUX_VER = Advanced Server
 259     REQUIRED_LINUX_FULLVER = Advanced Server release 2.1AS
 260     REQUIRED_OS_VERSION = 2.4.9-e.3
 261   else
 262     ifeq ($(ARCH), amd64)
 263       LINUX_VERSION_INFO = /etc/SuSE-release
 264       OS_VENDOR = SuSE Enterprise
 265       REQUIRED_LINUX_VER = 8.1
 266       REQUIRED_LINUX_FULLVER = $(REQUIRED_LINUX_VER) SLSE AMD64
 267       REQUIRED_OS_VERSION = 2.4.19-SMP
 268     else
 269       REQUIRED_LINUX_VER = Advanced Server
 270       REQUIRED_LINUX_FULLVER = Advanced Server release 2.1AS 64 bit
 271       REQUIRED_OS_VERSION = 2.4.19-SMP
 272     endif
 273   endif
 274   ifneq ($(ARCH), ia64)
 275     # ALSA 0.9.1 and above
 276     REQUIRED_ALSA_VERSION = ^((0[.]9[.][1-9])|(1[.]0[.][0-9]))[0-9]*
 277   endif
 278   # How much RAM does this machine have:
 279   MB_OF_MEMORY := $(shell free -m | fgrep Mem: | sed -e 's@\ \ *@ @g' | cut -d' ' -f2)
 280 endif
 281 
 282 # Windows with and without CYGWIN will be slightly different
 283 ifeq ($(SYSTEM_UNAME), Windows_NT)
 284   PLATFORM = windows


 361       ifdef LOGNAME
 362         _USER := $(LOGNAME)
 363       else
 364         _USER := $(shell id -un)
 365       endif
 366     endif
 367   else
 368     _USER:=$(USER)
 369   endif
 370   # Location of client/server directories
 371   ARCH_VM_SUBDIR=jre/bin
 372   # Suffix for file bundles used in previous release
 373   BUNDLE_FILE_SUFFIX=.tar
 374   # Minimum disk space needed as determined by running 'du -sk' on 
 375   #    a fully built workspace.
 376   REQUIRED_FREE_SPACE=500000
 377   # ISHIELD_TEMP_MIN is the difference of an empty C:\TEMP vs. one after a
 378   #     bundles build on windows.
 379   ISHIELD_TEMP_MIN=250000
 380   REQUIRED_DXSDK_VER = 0x0700
 381   OS_VENDOR = Microsoft
 382   # How much RAM does this machine have:
 383   MB_OF_MEMORY := $(shell \
 384     if [ -f "C:/cygwin/bin/free.exe" ] ; then \
 385       ( C:/cygwin/bin/bash.exe -c "C:/cygwin/bin/free.exe -m" ) | \
 386         grep Mem: | \
 387         sed -e 's@\ \ *@ @g' | cut -d' ' -f2 ; \
 388     else \
 389       echo "512"; \
 390     fi)
 391 endif
 392 
 393 # Machines with 512Mb or less of real memory are considered low memory
 394 #    build machines and adjustments will be made to prevent excessing
 395 #    system swapping during the build.
 396 #    If we don't know, assume 512. Subtract 128 from MB for VM MAX.
 397 #    Don't set VM max over 1024-128=896.
 398 ifneq ($(MB_OF_MEMORY),)
 399   LOW_MEMORY_MACHINE := $(shell \
 400     if [ $(MB_OF_MEMORY) -le 512 ] ; then \
 401       echo "true"; \




  36 #
  37 
  38 ifndef PLATFORM_SHARED
  39 
  40 PLATFORM_SHARED=done
  41 
  42 # Possible Input variables:
  43 #     ARCH_DATA_MODEL             32 or 64, default to 32
  44 #     USER, LOGNAME               user name (runs logname, or id if not set)
  45 #     PROCESSOR_IDENTIFIER        windows only: needed in environment
  46 #
  47 # (Also gets input by running the utilities uname, logname, isainfo, or id.)
  48 #
  49 # Variables set by this file:
  50 #     SYSTEM_UNAME                what 'uname' says this system is
  51 #     USER                        login name of user (minus blanks)
  52 #     PLATFORM                    windows, solaris, or linux
  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 #     TEMP_DISK                   /tmp or C:/temp
  57 #     ARCH_DATA_MODEL             32 or 64
  58 #     ARCH                        sparc, sparcv9, i586, amd64, or ia64
  59 #     ARCH_FAMILY                 sparc or i586
  60 #     ARCHPROP                    sparc or x86
  61 #     ARCH_VM_SUBDIR              jre/bin, jre/lib/sparc, etc.
  62 #     LIBARCH                     sparc, sparcv9, i386, amd64, or ia64
  63 #     DEV_NULL                    destination of /dev/null, NUL or /dev/NULL
  64 #     CLASSPATH_SEPARATOR         separator in classpath, ; or :
  65 #     LIB_PREFIX                  dynamic or static library prefix, lib or empty
  66 #     LIB_SUFFIX                  static library file suffix, .lib or .a?
  67 #     LIBRARY_SUFFIX              dynamic library file suffix, .dll or .so
  68 #     OBJECT_SUFFIX               object file suffix, .o or .obj
  69 #     EXE_SUFFIX                  executable file suffix, .exe or empty
  70 #     BUNDLE_FILE_SUFFIX          suffix for bundles: .tar or .tar.gz
  71 #     ISA_DIR                     solaris only: /sparcv9 or /amd64
  72 #     LIBARCH32                   solaris only: sparc or i386
  73 #     LIBARCH64                   solaris only: sparcv9 or amd64
  74 #     REQUIRED_WINDOWS_VERSION    windows only: specific version of windows 
  75 #     USING_CYGWIN                windows only: true or false


 148   else
 149      ifeq ($(ARCH), amd64)
 150         ARCH_FAMILY = i586
 151      else
 152         ARCH_FAMILY = sparc
 153      endif
 154      LIBARCH  = $(ARCH)
 155      # Value of Java os.arch property
 156      ARCHPROP = $(LIBARCH)
 157   endif
 158   # The two LIBARCH names
 159   ifeq ($(ARCH_FAMILY), sparc)
 160     LIBARCH32 = sparc
 161     LIBARCH64 = sparcv9
 162   else
 163     LIBARCH32 = i386
 164     LIBARCH64 = amd64
 165   endif
 166   # Suffix for file bundles used in previous release
 167   BUNDLE_FILE_SUFFIX=.tar

 168   # Required Solaris version
 169   ifeq ($(ARCH), amd64)
 170     REQUIRED_OS_VERSION = 5.10
 171   else
 172     REQUIRED_OS_VERSION = 5.8
 173   endif
 174   # Minimum disk space needed as determined by running 'du -sk' on 
 175   #    a fully built workspace.
 176   ifeq ($(ARCH_FAMILY), sparc)
 177     REQUIRED_FREE_SPACE=1300000
 178   else
 179     REQUIRED_FREE_SPACE=1040000
 180   endif
 181   # How much RAM does this machine have:
 182   MB_OF_MEMORY=$(shell /etc/prtconf | fgrep 'Memory size:' | expand | cut -d' ' -f3)
 183 endif
 184 
 185 # Platform settings specific to Linux
 186 ifeq ($(SYSTEM_UNAME), Linux)
 187   PLATFORM = linux


 234       endif
 235     endif
 236   endif
 237 
 238   # Need to maintain the jre/lib/i386 location for 32-bit Intel
 239   ifeq ($(ARCH), i586)
 240     LIBARCH = i386
 241   else
 242     LIBARCH = $(ARCH)
 243   endif
 244 
 245   # Value of Java os.arch property
 246   ARCHPROP  = $(LIBARCH)
 247 
 248   # Suffix for file bundles used in previous release
 249   BUNDLE_FILE_SUFFIX=.tar.gz
 250   # Minimum disk space needed as determined by running 'du -sk' on 
 251   #    a fully built workspace.
 252   REQUIRED_FREE_SPACE=1460000
 253   LINUX_VERSION_INFO = /etc/redhat-release

 254   ifeq ($(ARCH_DATA_MODEL), 32)
 255     REQUIRED_LINUX_VER = Advanced Server
 256     REQUIRED_LINUX_FULLVER = Advanced Server release 2.1AS
 257     REQUIRED_OS_VERSION = 2.4.9-e.3
 258   else
 259     ifeq ($(ARCH), amd64)
 260       LINUX_VERSION_INFO = /etc/SuSE-release

 261       REQUIRED_LINUX_VER = 8.1
 262       REQUIRED_LINUX_FULLVER = $(REQUIRED_LINUX_VER) SLSE AMD64
 263       REQUIRED_OS_VERSION = 2.4.19-SMP
 264     else
 265       REQUIRED_LINUX_VER = Advanced Server
 266       REQUIRED_LINUX_FULLVER = Advanced Server release 2.1AS 64 bit
 267       REQUIRED_OS_VERSION = 2.4.19-SMP
 268     endif
 269   endif
 270   ifneq ($(ARCH), ia64)
 271     # ALSA 0.9.1 and above
 272     REQUIRED_ALSA_VERSION = ^((0[.]9[.][1-9])|(1[.]0[.][0-9]))[0-9]*
 273   endif
 274   # How much RAM does this machine have:
 275   MB_OF_MEMORY := $(shell free -m | fgrep Mem: | sed -e 's@\ \ *@ @g' | cut -d' ' -f2)
 276 endif
 277 
 278 # Windows with and without CYGWIN will be slightly different
 279 ifeq ($(SYSTEM_UNAME), Windows_NT)
 280   PLATFORM = windows


 357       ifdef LOGNAME
 358         _USER := $(LOGNAME)
 359       else
 360         _USER := $(shell id -un)
 361       endif
 362     endif
 363   else
 364     _USER:=$(USER)
 365   endif
 366   # Location of client/server directories
 367   ARCH_VM_SUBDIR=jre/bin
 368   # Suffix for file bundles used in previous release
 369   BUNDLE_FILE_SUFFIX=.tar
 370   # Minimum disk space needed as determined by running 'du -sk' on 
 371   #    a fully built workspace.
 372   REQUIRED_FREE_SPACE=500000
 373   # ISHIELD_TEMP_MIN is the difference of an empty C:\TEMP vs. one after a
 374   #     bundles build on windows.
 375   ISHIELD_TEMP_MIN=250000
 376   REQUIRED_DXSDK_VER = 0x0700

 377   # How much RAM does this machine have:
 378   MB_OF_MEMORY := $(shell \
 379     if [ -f "C:/cygwin/bin/free.exe" ] ; then \
 380       ( C:/cygwin/bin/bash.exe -c "C:/cygwin/bin/free.exe -m" ) | \
 381         grep Mem: | \
 382         sed -e 's@\ \ *@ @g' | cut -d' ' -f2 ; \
 383     else \
 384       echo "512"; \
 385     fi)
 386 endif
 387 
 388 # Machines with 512Mb or less of real memory are considered low memory
 389 #    build machines and adjustments will be made to prevent excessing
 390 #    system swapping during the build.
 391 #    If we don't know, assume 512. Subtract 128 from MB for VM MAX.
 392 #    Don't set VM max over 1024-128=896.
 393 ifneq ($(MB_OF_MEMORY),)
 394   LOW_MEMORY_MACHINE := $(shell \
 395     if [ $(MB_OF_MEMORY) -le 512 ] ; then \
 396       echo "true"; \