jdk/makefiles/common/shared/Platform.gmk
changeset 13164 72c5d01a857d
parent 13082 9b19b2302c28
child 13167 efec101d7d87
equal deleted inserted replaced
13082:9b19b2302c28 13164:72c5d01a857d
     1 #
       
     2 # Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
       
     3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       
     4 #
       
     5 # This code is free software; you can redistribute it and/or modify it
       
     6 # under the terms of the GNU General Public License version 2 only, as
       
     7 # published by the Free Software Foundation.  Oracle designates this
       
     8 # particular file as subject to the "Classpath" exception as provided
       
     9 # by Oracle in the LICENSE file that accompanied this code.
       
    10 #
       
    11 # This code is distributed in the hope that it will be useful, but WITHOUT
       
    12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
       
    13 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
       
    14 # version 2 for more details (a copy is included in the LICENSE file that
       
    15 # accompanied this code).
       
    16 #
       
    17 # You should have received a copy of the GNU General Public License version
       
    18 # 2 along with this work; if not, write to the Free Software Foundation,
       
    19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
       
    20 #
       
    21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
       
    22 # or visit www.oracle.com if you need additional information or have any
       
    23 # questions.
       
    24 #
       
    25 
       
    26 #
       
    27 # Shared platform (OS/ARCH) variable settings for the JDK builds.
       
    28 #
       
    29 # Includes basic system requirements, versions of utilities required,
       
    30 #   suffixes on files, and basic defaults attributed to the build platform.
       
    31 #
       
    32 
       
    33 #
       
    34 # Assumes some basic unix system utilities (e.g. uname) are in the search path
       
    35 #   in order to figure out the system.
       
    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 #     TEMP_DISK                   /tmp or C:/temp
       
    55 #     ARCH_DATA_MODEL             32 or 64
       
    56 #     ARCH                        sparc, sparcv9, i586, amd64, or ia64
       
    57 #     ARCH_FAMILY                 sparc or i586
       
    58 #     ARCHPROP                    sparc or x86
       
    59 #     ARCH_VM_SUBDIR              jre/bin, jre/lib/sparc, etc.
       
    60 #     LIBARCH                     sparc, sparcv9, i386, amd64, or ia64
       
    61 #     DEV_NULL                    destination of /dev/null, NUL or /dev/NULL
       
    62 #     CLASSPATH_SEPARATOR         separator in classpath, ; or :
       
    63 #     LIB_PREFIX                  dynamic or static library prefix, lib or empty
       
    64 #     LIB_SUFFIX                  static library file suffix, .lib or .a?
       
    65 #     LIBRARY_SUFFIX              dynamic library file suffix, .dll or .so
       
    66 #     OBJECT_SUFFIX               object file suffix, .o or .obj
       
    67 #     EXE_SUFFIX                  executable file suffix, .exe or empty
       
    68 #     BUNDLE_FILE_SUFFIX          suffix for bundles: .tar or .tar.gz
       
    69 #     ISA_DIR                     solaris only: /sparcv9 or /amd64
       
    70 #     LIBARCH32                   solaris only: sparc or i386
       
    71 #     LIBARCH64                   solaris only: sparcv9 or amd64
       
    72 #     USING_CYGWIN                windows only: true or false
       
    73 #     ISHIELD_TEMP_MIN            windows only: minimum disk space in temp area
       
    74 
       
    75 # Only run uname once in this make session.
       
    76 ifndef SYSTEM_UNAME
       
    77   SYSTEM_UNAME := $(shell uname)
       
    78   export SYSTEM_UNAME
       
    79 endif
       
    80 
       
    81 #
       
    82 # Prune out all known SCM (Source Code Management) directories
       
    83 # so they will not be included when copying directory trees
       
    84 # or packaging up .jar files, etc.  This applies to all workspaces.
       
    85 #
       
    86 SCM_DIRs = .hg .svn CVS RCS SCCS Codemgr_wsdata deleted_files .hgignore .hgtags
       
    87 # When changing SCM_DIRs also change SCM_DIRS_rexp and SCM_DIRS_prune:
       
    88 SCM_DIRS_rexp = ".hg|.svn|CVS|RCS|SCCS|Codemgr_wsdata|deleted_files|.hgignore|.hgtags"
       
    89 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
       
    90 
       
    91 # Don't define this unless it's not defined
       
    92 ifndef VARIANT
       
    93   VARIANT=OPT
       
    94 endif
       
    95 
       
    96 # Platform settings specific to Solaris
       
    97 ifeq ($(SYSTEM_UNAME), SunOS)
       
    98   PLATFORM = solaris
       
    99   # Solaris sparc build can be either 32-bit or 64-bit.
       
   100   #   Default to 32, but allow explicit setting to 32 or 64.
       
   101   ifndef ARCH_DATA_MODEL
       
   102     ARCH_DATA_MODEL=32
       
   103   endif
       
   104   ifeq ($(ARCH_DATA_MODEL), 32)
       
   105     processor := $(shell uname -p)
       
   106     archExpr = case "$(processor)" in  \
       
   107                 i[3-9]86) \
       
   108                     echo i586 \
       
   109                     ;; \
       
   110                 sparc*)  \
       
   111                     echo sparc \
       
   112                     ;; \
       
   113                 *) \
       
   114                     echo $(processor)  \
       
   115                     ;; \
       
   116         esac
       
   117     ARCH        := $(shell $(archExpr))
       
   118   else
       
   119     ARCH := $(shell isainfo -n)
       
   120     # ISA_DIR is used to locate 64-bit specific libraries which are generally
       
   121     # in the same general place as other libraries under the ./$(ARCH) directory
       
   122     ISA_DIR = /$(ARCH)
       
   123   endif
       
   124   # Need to maintain the jre/lib/i386 location for 32-bit Intel
       
   125   ifeq ($(ARCH), i586)
       
   126      ARCH_FAMILY = $(ARCH)
       
   127      LIBARCH     = i386
       
   128      # Value of Java os.arch property
       
   129      ARCHPROP    = x86
       
   130   else
       
   131      ifeq ($(ARCH), amd64)
       
   132         ARCH_FAMILY = i586
       
   133      else
       
   134         ARCH_FAMILY = sparc
       
   135      endif
       
   136      LIBARCH  = $(ARCH)
       
   137      # Value of Java os.arch property
       
   138      ARCHPROP = $(LIBARCH)
       
   139   endif
       
   140   # The two LIBARCH names
       
   141   ifeq ($(ARCH_FAMILY), sparc)
       
   142     LIBARCH32 = sparc
       
   143     LIBARCH64 = sparcv9
       
   144   else
       
   145     LIBARCH32 = i386
       
   146     LIBARCH64 = amd64
       
   147   endif
       
   148   # Suffix for file bundles used in previous release
       
   149   BUNDLE_FILE_SUFFIX=.tar
       
   150   # How much RAM does this machine have (zones send an error to stderr):
       
   151   MB_OF_MEMORY:=$(shell /usr/sbin/prtconf 2>/dev/null | fgrep 'Memory size:' | expand | cut -d' ' -f3)
       
   152 endif
       
   153 
       
   154 # Platform settings specific to Linux
       
   155 ifeq ($(SYSTEM_UNAME), Linux)
       
   156   PLATFORM = linux
       
   157   # Arch and OS name/version
       
   158   ifdef CROSS_COMPILE_ARCH
       
   159     mach := $(CROSS_COMPILE_ARCH)
       
   160   else
       
   161     mach := $(shell uname -m)
       
   162   endif
       
   163   archExpr = case "$(mach)" in \
       
   164                 i[3-9]86) \
       
   165                     echo i586 \
       
   166                     ;; \
       
   167                 ia64) \
       
   168                     echo ia64 \
       
   169                     ;; \
       
   170                 x86_64) \
       
   171                     echo amd64 \
       
   172                     ;; \
       
   173                 sparc*) \
       
   174                     echo sparc \
       
   175                     ;; \
       
   176                 arm*) \
       
   177                     echo arm \
       
   178                     ;; \
       
   179                 *) \
       
   180                     echo $(mach) \
       
   181                     ;; \
       
   182       esac
       
   183   ARCH        := $(shell $(archExpr) )
       
   184   ARCH_FAMILY := $(ARCH)
       
   185 
       
   186   # Linux builds may be 32-bit or 64-bit data model.
       
   187   ifeq ($(ARCH), sparc)
       
   188     # Linux sparc build can be either 32-bit or 64-bit.
       
   189     #   Default to 32, but allow explicit setting to 32 or 64.
       
   190     ifndef ARCH_DATA_MODEL
       
   191       ARCH_DATA_MODEL=32
       
   192     endif
       
   193     ifeq ($(ARCH_DATA_MODEL), 32)
       
   194       ARCH=sparc
       
   195     else
       
   196       ARCH=sparcv9
       
   197     endif
       
   198   else
       
   199     # Most archs are 32-bit
       
   200     ifndef ARCH_DATA_MODEL
       
   201       ARCH_DATA_MODEL=32
       
   202       ifeq ($(ARCH), amd64)
       
   203         ARCH_DATA_MODEL=64
       
   204       endif
       
   205       ifeq ($(ARCH), ia64)
       
   206         ARCH_DATA_MODEL=64
       
   207       endif
       
   208     endif
       
   209   endif
       
   210 
       
   211   # Need to maintain the jre/lib/i386 location for 32-bit Intel
       
   212   ifeq ($(ARCH), i586)
       
   213     LIBARCH = i386
       
   214   else
       
   215     LIBARCH = $(ARCH)
       
   216   endif
       
   217 
       
   218   # Value of Java os.arch property
       
   219   ARCHPROP  = $(LIBARCH)
       
   220 
       
   221   # Suffix for file bundles used in previous release
       
   222   BUNDLE_FILE_SUFFIX=.tar.gz
       
   223   # How much RAM does this machine have:
       
   224   MB_OF_MEMORY := $(shell free -m | fgrep Mem: | awk '{print $$2;}' )
       
   225 endif
       
   226 
       
   227 ifeq ($(SYSTEM_UNAME), Darwin)
       
   228   PLATFORM = macosx
       
   229   OS_NAME = darwin
       
   230   OS_VENDOR = Apple
       
   231   GB_OF_MEMORY := $(shell system_profiler SPHardwareDataType | fgrep Memory: | awk '{print $$2}')
       
   232   MB_OF_MEMORY := $(shell expr ${GB_OF_MEMORY} '*' 1024)
       
   233 endif
       
   234 
       
   235 # Platform settings specific to BSD/Mac OS X
       
   236 ifeq ($(PLATFORM), macosx)
       
   237   OS_VERSION := $(shell uname -r)
       
   238 
       
   239   # Arch and OS name/version
       
   240   # Darwin x86 builds are i386/amd64 universal by default.
       
   241   # Allow arch to be set from the environment to avoid this.
       
   242   ifeq ($(origin ARCH), undefined)
       
   243    ifeq ($(PLATFORM), macosx)
       
   244 #     ifdef OPENJDK -- when universal 32/64 binaries available in Hotspot
       
   245 #        mach := universal
       
   246 #     else
       
   247         mach := x86_64
       
   248 #     endif
       
   249    else
       
   250     mach := $(shell uname -m)
       
   251    endif
       
   252   else
       
   253    mach := $(ARCH)
       
   254   endif
       
   255 
       
   256   archExpr = case "$(mach)" in \
       
   257                 i[3-9]86) \
       
   258                     echo i586 \
       
   259                     ;; \
       
   260                 sparc64) \
       
   261                     echo sparcv9 \
       
   262                     ;; \
       
   263                 sparc*) \
       
   264                     echo sparc \
       
   265                     ;; \
       
   266                 x86_64) \
       
   267                     echo amd64 \
       
   268                     ;; \
       
   269                 universal) \
       
   270                     echo universal \
       
   271                     ;; \
       
   272                 "Power Macintosh") \
       
   273                     echo ppc \
       
   274                     ;; \
       
   275                 *) \
       
   276                     echo $(mach) \
       
   277                     ;; \
       
   278       esac
       
   279   ARCH        := $(shell $(archExpr) )
       
   280   ARCH_FAMILY := $(ARCH)
       
   281 
       
   282   # i586, sparc, and ppc are 32 bit, amd64 and sparc64 are 64
       
   283   # ARCH_DATA_MODEL does not exactly mean anything in universal
       
   284   # but it has to be one or the other, so pick 32
       
   285   ifneq (,$(findstring $(ARCH), i586 sparc ppc universal))
       
   286     ARCH_DATA_MODEL=32
       
   287   else
       
   288     ARCH_DATA_MODEL=64
       
   289   endif
       
   290 
       
   291   # Need to maintain the jre/lib/i386 location for 32-bit Intel
       
   292   ifeq ($(ARCH), i586)
       
   293     LIBARCH = i386
       
   294   else
       
   295     LIBARCH = $(ARCH)
       
   296   endif
       
   297 
       
   298   # Value of Java os.arch property
       
   299   ARCHPROP  = $(LIBARCH)
       
   300 
       
   301   # Suffix for file bundles used in previous release
       
   302   BUNDLE_FILE_SUFFIX=.tar.gz
       
   303   # How much RAM does this machine have:
       
   304 endif
       
   305 
       
   306 # Windows with and without CYGWIN will be slightly different
       
   307 ifeq ($(SYSTEM_UNAME), Windows_NT)
       
   308   PLATFORM = windows
       
   309 endif
       
   310 ifneq (,$(findstring CYGWIN,$(SYSTEM_UNAME)))
       
   311   PLATFORM = windows
       
   312   USING_CYGWIN = true
       
   313   export USING_CYGWIN
       
   314   CYGPATH_CMD=cygpath -a -s -m
       
   315   # Only run "cygpath /" once in this make session.
       
   316   ifndef CYGWIN_HOME
       
   317     CYGWIN_HOME := $(shell $(CYGPATH_CMD) /)
       
   318     export CYGWIN_HOME
       
   319   endif
       
   320 endif
       
   321 
       
   322 # Platform settings specific to Windows
       
   323 ifeq ($(PLATFORM), windows)
       
   324   # Windows builds default to the appropriate for the underlaying
       
   325   # architecture.
       
   326   # Temporary disk area
       
   327   TEMP_DISK=C:/temp
       
   328   # GNU Make or MKS overrides $(PROCESSOR_ARCHITECTURE) to always
       
   329   #  return "x86". Use the first word of $(PROCESSOR_IDENTIFIER) instead.
       
   330   #  And sometimes PROCESSOR_IDENTIFIER is not defined at all
       
   331   #  (in some restricted shells), so we use uname if we have to.
       
   332   ifeq ($(PROCESSOR_IDENTIFIER),)
       
   333     # Only run uname -m once in this make session.
       
   334     ifndef SYSTEM_UNAME_M
       
   335       SYSTEM_UNAME_M := $(shell uname -m)
       
   336       export SYSTEM_UNAME_M
       
   337     endif
       
   338     PROC_ARCH:=$(SYSTEM_UNAME_M)
       
   339   else
       
   340     PROC_ARCH:=$(word 1, $(PROCESSOR_IDENTIFIER))
       
   341   endif
       
   342   # Cover all the possibilities, MKS uname, CYGWIN uname, PROCESSOR_IDENTIFIER
       
   343   #    Get: X86, X64, or IA64
       
   344   PROC_ARCH:=$(patsubst 386,X86,$(PROC_ARCH))
       
   345   PROC_ARCH:=$(patsubst 486,X86,$(PROC_ARCH))
       
   346   PROC_ARCH:=$(patsubst 586,X86,$(PROC_ARCH))
       
   347   PROC_ARCH:=$(patsubst 686,X86,$(PROC_ARCH))
       
   348   PROC_ARCH:=$(patsubst i386,X86,$(PROC_ARCH))
       
   349   PROC_ARCH:=$(patsubst i486,X86,$(PROC_ARCH))
       
   350   PROC_ARCH:=$(patsubst i586,X86,$(PROC_ARCH))
       
   351   PROC_ARCH:=$(patsubst i686,X86,$(PROC_ARCH))
       
   352   PROC_ARCH:=$(patsubst x86,X86,$(PROC_ARCH))
       
   353   PROC_ARCH:=$(patsubst intel64,X64,$(PROC_ARCH))
       
   354   PROC_ARCH:=$(patsubst Intel64,X64,$(PROC_ARCH))
       
   355   PROC_ARCH:=$(patsubst INTEL64,X64,$(PROC_ARCH))
       
   356   PROC_ARCH:=$(patsubst em64t,X64,$(PROC_ARCH))
       
   357   PROC_ARCH:=$(patsubst EM64T,X64,$(PROC_ARCH))
       
   358   PROC_ARCH:=$(patsubst amd64,X64,$(PROC_ARCH))
       
   359   PROC_ARCH:=$(patsubst AMD64,X64,$(PROC_ARCH))
       
   360   PROC_ARCH:=$(patsubst 8664,X64,$(PROC_ARCH))
       
   361   PROC_ARCH:=$(patsubst x86_64,X64,$(PROC_ARCH))
       
   362   PROC_ARCH:=$(patsubst ia64,IA64,$(PROC_ARCH))
       
   363   ifndef ARCH_DATA_MODEL
       
   364     ifeq ($(PROC_ARCH),IA64)
       
   365       ARCH_DATA_MODEL=64
       
   366     else
       
   367       ifeq ($(PROC_ARCH),X64)
       
   368         ARCH_DATA_MODEL=64
       
   369       else
       
   370         ARCH_DATA_MODEL=32
       
   371       endif
       
   372     endif
       
   373   endif
       
   374   export ARCH_DATA_MODEL
       
   375   ifeq ($(ARCH_DATA_MODEL), 64)
       
   376     # If the user wants to perform a cross compile build then they must
       
   377     # - set ARCH_DATA_MODEL=64 and either
       
   378     #      + set ARCH to ia64 or amd64, or
       
   379     ifeq ($(PROC_ARCH),X64)
       
   380       ARCH=amd64
       
   381     else
       
   382       ifeq ($(PROC_ARCH),IA64)
       
   383         ARCH=ia64
       
   384       endif
       
   385     endif
       
   386     LIBARCH=$(ARCH)
       
   387     # Value of Java os.arch property
       
   388     ARCHPROP=$(LIBARCH)
       
   389   else
       
   390     # LIBARCH is used to preserve the jre/lib/i386 directory name for 32-bit intel
       
   391     ARCH=i586
       
   392     LIBARCH=i386
       
   393     # Value of Java os.arch property
       
   394     ARCHPROP=x86
       
   395   endif
       
   396   ARCH_FAMILY = $(ARCH)
       
   397   # Where is unwanted output to be delivered?
       
   398   # MKS uses the special file "NUL", cygwin uses the customary unix file.
       
   399   ifeq ($(USING_CYGWIN),true)
       
   400     DEV_NULL = /dev/null
       
   401   else
       
   402     DEV_NULL = NUL
       
   403   endif
       
   404   export DEV_NULL
       
   405   # Classpath separator
       
   406   CLASSPATH_SEPARATOR = ;
       
   407   # The suffix used for object file (.o for unix .obj for windows)
       
   408   OBJECT_SUFFIX = obj
       
   409   # The suffix applied to executables (.exe for windows, nothing for solaris)
       
   410   EXE_SUFFIX = .exe
       
   411   # The prefix applied to library files (lib for solaris, nothing for windows)
       
   412   LIB_PREFIX=
       
   413   LIBRARY_SUFFIX = dll
       
   414   LIB_SUFFIX     = lib
       
   415   # User name determination (set _USER)
       
   416   ifndef USER
       
   417     ifdef USERNAME
       
   418       _USER := $(USERNAME)
       
   419     else
       
   420       ifdef LOGNAME
       
   421         _USER := $(LOGNAME)
       
   422       else
       
   423         _USER := $(shell id -un)
       
   424       endif
       
   425     endif
       
   426   else
       
   427     _USER:=$(USER)
       
   428   endif
       
   429   # Location of client/server directories
       
   430   ARCH_VM_SUBDIR=jre/bin
       
   431   # Suffix for file bundles used in previous release
       
   432   BUNDLE_FILE_SUFFIX=.tar
       
   433   # ISHIELD_TEMP_MIN is the difference of an empty C:\TEMP vs. one after a
       
   434   #     bundles build on windows.
       
   435   ISHIELD_TEMP_MIN=250000
       
   436   # How much RAM does this machine have:
       
   437   ifeq ($(JDK_HAS_MEM_INFO),)
       
   438     MB_OF_MEMORY := 1024
       
   439   endif
       
   440 endif
       
   441 
       
   442 # Unix type settings (same for all unix platforms)
       
   443 ifneq ($(PLATFORM), windows)
       
   444   # Temporary disk area
       
   445   TEMP_DISK=/tmp
       
   446   # Where is unwanted output to be delivered?
       
   447   DEV_NULL = /dev/null
       
   448   export DEV_NULL
       
   449   # Character used between entries in classpath 
       
   450   CLASSPATH_SEPARATOR = :
       
   451   # suffix used for object file (.o for unix .obj for windows)
       
   452   OBJECT_SUFFIX = o
       
   453   # The suffix applied to runtime libraries
       
   454   LIBRARY_SUFFIX = so
       
   455   # The suffix applied to link libraries
       
   456   LIB_SUFFIX = so
       
   457   # The suffix applied to executables (.exe for windows, nothing for solaris)
       
   458   EXE_SUFFIX =
       
   459   # The prefix applied to library files (lib for solaris, nothing for windows)
       
   460   LIB_PREFIX = lib
       
   461   # User name determination (set _USER)
       
   462   ifndef USER
       
   463     ifdef LOGNAME
       
   464       _USER := $(LOGNAME)
       
   465     else
       
   466       _USER := $(shell logname)
       
   467     endif
       
   468   else
       
   469     _USER:=$(USER)
       
   470   endif
       
   471   # Location of client/server directories
       
   472   ARCH_VM_SUBDIR=jre/lib/$(LIBARCH)
       
   473 endif
       
   474 
       
   475 # Darwin-specific Overrides
       
   476 ifeq ($(SYSTEM_UNAME),Darwin)
       
   477   # The suffix applied to runtime libraries
       
   478   LIBRARY_SUFFIX = dylib
       
   479   # The suffix applied to link libraries
       
   480   ifeq ($(ARCH), universal)
       
   481     LIB_SUFFIX = o
       
   482   else
       
   483     LIB_SUFFIX = a
       
   484   endif
       
   485 
       
   486   ifeq ($(PLATFORM), macosx)
       
   487   	ARCH_VM_SUBDIR=jre/lib/$(LIBARCH)
       
   488   endif
       
   489 endif
       
   490 
       
   491 # Machines with 512Mb or less of real memory are considered low memory
       
   492 #    build machines and adjustments will be made to prevent excessing
       
   493 #    system swapping during the build.
       
   494 ifeq ($(JDK_HAS_MEM_INFO),)
       
   495   JDK_HAS_MEM_INFO=true
       
   496   export JDK_HAS_MEM_INFO
       
   497   ifneq ($(MB_OF_MEMORY),)
       
   498     LOW_MEMORY_MACHINE := $(shell \
       
   499       if [ $(MB_OF_MEMORY) -le 512 ] ; then \
       
   500         echo "true"; \
       
   501       else \
       
   502         echo "false"; \
       
   503       fi)
       
   504     MAX_VM_MEMORY := 512
       
   505     MIN_VM_MEMORY := $(MAX_VM_MEMORY)
       
   506   else
       
   507     MB_OF_MEMORY       := unknown
       
   508     LOW_MEMORY_MACHINE := true
       
   509     MAX_VM_MEMORY      := 384
       
   510     MIN_VM_MEMORY      := 128
       
   511   endif
       
   512   export MB_OF_MEMORY
       
   513   export LOW_MEMORY_MACHINE
       
   514   export MAX_VM_MEMORY
       
   515   export MIN_VM_MEMORY
       
   516 endif
       
   517 
       
   518 # If blanks in the username, use the first 4 words and pack them together
       
   519 _USER1:=$(subst ', ,$(_USER))
       
   520 _USER2:=$(subst ", ,$(_USER1))
       
   521 USER:=$(word 1,$(_USER2))$(word 2,$(_USER2))$(word 3,$(_USER2))$(word 4,$(_USER2))
       
   522 export USER
       
   523 
       
   524 export PLATFORM
       
   525 endif
       
   526