corba/make/common/shared/Platform.gmk
author ohair
Wed, 02 Sep 2009 09:20:17 -0700
changeset 3871 3d528461f61d
parent 3291 805a72a26925
child 4290 1258c05e707a
permissions -rw-r--r--
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building) Reviewed-by: jjg, iris
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4
02bb8761fcce Initial load
duke
parents:
diff changeset
     1
#
3291
805a72a26925 6862919: Update copyright year
xdono
parents: 2823
diff changeset
     2
# Copyright 1997-2009 Sun Microsystems, Inc.  All Rights Reserved.
4
02bb8761fcce Initial load
duke
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
02bb8761fcce Initial load
duke
parents:
diff changeset
     4
#
02bb8761fcce Initial load
duke
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
02bb8761fcce Initial load
duke
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
02bb8761fcce Initial load
duke
parents:
diff changeset
     7
# published by the Free Software Foundation.  Sun designates this
02bb8761fcce Initial load
duke
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
02bb8761fcce Initial load
duke
parents:
diff changeset
     9
# by Sun in the LICENSE file that accompanied this code.
02bb8761fcce Initial load
duke
parents:
diff changeset
    10
#
02bb8761fcce Initial load
duke
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
02bb8761fcce Initial load
duke
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
02bb8761fcce Initial load
duke
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
02bb8761fcce Initial load
duke
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
02bb8761fcce Initial load
duke
parents:
diff changeset
    15
# accompanied this code).
02bb8761fcce Initial load
duke
parents:
diff changeset
    16
#
02bb8761fcce Initial load
duke
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
02bb8761fcce Initial load
duke
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
02bb8761fcce Initial load
duke
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
02bb8761fcce Initial load
duke
parents:
diff changeset
    20
#
02bb8761fcce Initial load
duke
parents:
diff changeset
    21
# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
02bb8761fcce Initial load
duke
parents:
diff changeset
    22
# CA 95054 USA or visit www.sun.com if you need additional information or
02bb8761fcce Initial load
duke
parents:
diff changeset
    23
# have any questions.
02bb8761fcce Initial load
duke
parents:
diff changeset
    24
#
02bb8761fcce Initial load
duke
parents:
diff changeset
    25
02bb8761fcce Initial load
duke
parents:
diff changeset
    26
#
02bb8761fcce Initial load
duke
parents:
diff changeset
    27
# Shared platform (OS/ARCH) variable settings for the JDK builds.
02bb8761fcce Initial load
duke
parents:
diff changeset
    28
#
02bb8761fcce Initial load
duke
parents:
diff changeset
    29
# Includes basic system requirements, versions of utilities required,
02bb8761fcce Initial load
duke
parents:
diff changeset
    30
#   suffixes on files, and basic defaults attributed to the build platform.
02bb8761fcce Initial load
duke
parents:
diff changeset
    31
#
02bb8761fcce Initial load
duke
parents:
diff changeset
    32
02bb8761fcce Initial load
duke
parents:
diff changeset
    33
#
02bb8761fcce Initial load
duke
parents:
diff changeset
    34
# Assumes some basic unix system utilities (e.g. uname) are in the search path
02bb8761fcce Initial load
duke
parents:
diff changeset
    35
#   in order to figure out the system.
02bb8761fcce Initial load
duke
parents:
diff changeset
    36
#
02bb8761fcce Initial load
duke
parents:
diff changeset
    37
02bb8761fcce Initial load
duke
parents:
diff changeset
    38
ifndef PLATFORM_SHARED
02bb8761fcce Initial load
duke
parents:
diff changeset
    39
02bb8761fcce Initial load
duke
parents:
diff changeset
    40
PLATFORM_SHARED=done
02bb8761fcce Initial load
duke
parents:
diff changeset
    41
02bb8761fcce Initial load
duke
parents:
diff changeset
    42
# Possible Input variables:
02bb8761fcce Initial load
duke
parents:
diff changeset
    43
#     ARCH_DATA_MODEL             32 or 64, default to 32
02bb8761fcce Initial load
duke
parents:
diff changeset
    44
#     USER, LOGNAME               user name (runs logname, or id if not set)
02bb8761fcce Initial load
duke
parents:
diff changeset
    45
#     PROCESSOR_IDENTIFIER        windows only: needed in environment
02bb8761fcce Initial load
duke
parents:
diff changeset
    46
#
02bb8761fcce Initial load
duke
parents:
diff changeset
    47
# (Also gets input by running the utilities uname, logname, isainfo, or id.)
02bb8761fcce Initial load
duke
parents:
diff changeset
    48
#
02bb8761fcce Initial load
duke
parents:
diff changeset
    49
# Variables set by this file:
02bb8761fcce Initial load
duke
parents:
diff changeset
    50
#     SYSTEM_UNAME                what 'uname' says this system is
02bb8761fcce Initial load
duke
parents:
diff changeset
    51
#     USER                        login name of user (minus blanks)
02bb8761fcce Initial load
duke
parents:
diff changeset
    52
#     PLATFORM                    windows, solaris, or linux
02bb8761fcce Initial load
duke
parents:
diff changeset
    53
#     VARIANT                     OPT or DBG, OPT is the default
02bb8761fcce Initial load
duke
parents:
diff changeset
    54
#     OS_NAME                     solaris, linux, or nt
02bb8761fcce Initial load
duke
parents:
diff changeset
    55
#     OS_VERSION                  specific version of os, 5.10, 2.4.9-e.3, etc.
02bb8761fcce Initial load
duke
parents:
diff changeset
    56
#     OS_VENDOR                   company name
02bb8761fcce Initial load
duke
parents:
diff changeset
    57
#     TEMP_DISK                   /tmp or C:/temp
02bb8761fcce Initial load
duke
parents:
diff changeset
    58
#     ARCH_DATA_MODEL             32 or 64
02bb8761fcce Initial load
duke
parents:
diff changeset
    59
#     ARCH                        sparc, sparcv9, i586, amd64, or ia64
02bb8761fcce Initial load
duke
parents:
diff changeset
    60
#     ARCH_FAMILY                 sparc or i586
02bb8761fcce Initial load
duke
parents:
diff changeset
    61
#     ARCHPROP                    sparc or x86
02bb8761fcce Initial load
duke
parents:
diff changeset
    62
#     ARCH_VM_SUBDIR              jre/bin, jre/lib/sparc, etc.
02bb8761fcce Initial load
duke
parents:
diff changeset
    63
#     LIBARCH                     sparc, sparcv9, i386, amd64, or ia64
02bb8761fcce Initial load
duke
parents:
diff changeset
    64
#     DEV_NULL                    destination of /dev/null, NUL or /dev/NULL
02bb8761fcce Initial load
duke
parents:
diff changeset
    65
#     CLASSPATH_SEPARATOR         separator in classpath, ; or :
02bb8761fcce Initial load
duke
parents:
diff changeset
    66
#     LIB_PREFIX                  dynamic or static library prefix, lib or empty
02bb8761fcce Initial load
duke
parents:
diff changeset
    67
#     LIB_SUFFIX                  static library file suffix, .lib or .a?
02bb8761fcce Initial load
duke
parents:
diff changeset
    68
#     LIBRARY_SUFFIX              dynamic library file suffix, .dll or .so
02bb8761fcce Initial load
duke
parents:
diff changeset
    69
#     OBJECT_SUFFIX               object file suffix, .o or .obj
02bb8761fcce Initial load
duke
parents:
diff changeset
    70
#     EXE_SUFFIX                  executable file suffix, .exe or empty
02bb8761fcce Initial load
duke
parents:
diff changeset
    71
#     BUNDLE_FILE_SUFFIX          suffix for bundles: .tar or .tar.gz
02bb8761fcce Initial load
duke
parents:
diff changeset
    72
#     ISA_DIR                     solaris only: /sparcv9 or /amd64
02bb8761fcce Initial load
duke
parents:
diff changeset
    73
#     LIBARCH32                   solaris only: sparc or i386
02bb8761fcce Initial load
duke
parents:
diff changeset
    74
#     LIBARCH64                   solaris only: sparcv9 or amd64
02bb8761fcce Initial load
duke
parents:
diff changeset
    75
#     REQUIRED_WINDOWS_NAME       windows only: basic name of windows 
02bb8761fcce Initial load
duke
parents:
diff changeset
    76
#     REQUIRED_WINDOWS_VERSION    windows only: specific version of windows 
02bb8761fcce Initial load
duke
parents:
diff changeset
    77
#     USING_CYGWIN                windows only: true or false
02bb8761fcce Initial load
duke
parents:
diff changeset
    78
#     WINDOWS_NT_VERSION_STRING   windows only: long version name
02bb8761fcce Initial load
duke
parents:
diff changeset
    79
#     REQUIRED_OS_VERSION         required OS version, e.g. 5.10, 2.4
02bb8761fcce Initial load
duke
parents:
diff changeset
    80
#     REQUIRED_FREE_SPACE         minimum disk space needed for outputdir
02bb8761fcce Initial load
duke
parents:
diff changeset
    81
#     REQUIRED_ZIP_VER            required version of zip
02bb8761fcce Initial load
duke
parents:
diff changeset
    82
#     REQUIRED_UNZIP_VER          required version of unzip
02bb8761fcce Initial load
duke
parents:
diff changeset
    83
#     LINUX_VERSION_INFO          linux only: location of linux release file
02bb8761fcce Initial load
duke
parents:
diff changeset
    84
#     REQUIRED_LINUX_VER          linux only: required version of linux
02bb8761fcce Initial load
duke
parents:
diff changeset
    85
#     REQUIRED_LINUX_FULLVER      linux only: required full version of linux
02bb8761fcce Initial load
duke
parents:
diff changeset
    86
3871
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
    87
ifndef SYSTEM_UNAME
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
    88
  SYSTEM_UNAME := $(shell uname)
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
    89
  export SYSTEM_UNAME
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
    90
endif
4
02bb8761fcce Initial load
duke
parents:
diff changeset
    91
02bb8761fcce Initial load
duke
parents:
diff changeset
    92
# Normal boot jdk is previous release, but a hard requirement is a 1.5 boot
02bb8761fcce Initial load
duke
parents:
diff changeset
    93
REQUIRED_BOOT_VER = 1.5
02bb8761fcce Initial load
duke
parents:
diff changeset
    94
02bb8761fcce Initial load
duke
parents:
diff changeset
    95
# Don't define this unless it's not defined
02bb8761fcce Initial load
duke
parents:
diff changeset
    96
ifndef VARIANT
02bb8761fcce Initial load
duke
parents:
diff changeset
    97
  VARIANT=OPT
02bb8761fcce Initial load
duke
parents:
diff changeset
    98
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
    99
02bb8761fcce Initial load
duke
parents:
diff changeset
   100
# Platform settings specific to Solaris
02bb8761fcce Initial load
duke
parents:
diff changeset
   101
ifeq ($(SYSTEM_UNAME), SunOS)
02bb8761fcce Initial load
duke
parents:
diff changeset
   102
  PLATFORM = solaris
02bb8761fcce Initial load
duke
parents:
diff changeset
   103
  OS_NAME = solaris
02bb8761fcce Initial load
duke
parents:
diff changeset
   104
  OS_VERSION := $(shell uname -r)
02bb8761fcce Initial load
duke
parents:
diff changeset
   105
  # Solaris sparc build can be either 32-bit or 64-bit.
02bb8761fcce Initial load
duke
parents:
diff changeset
   106
  #   Default to 32, but allow explicit setting to 32 or 64.
02bb8761fcce Initial load
duke
parents:
diff changeset
   107
  ifndef ARCH_DATA_MODEL
02bb8761fcce Initial load
duke
parents:
diff changeset
   108
    ARCH_DATA_MODEL=32
02bb8761fcce Initial load
duke
parents:
diff changeset
   109
  endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   110
  ifeq ($(ARCH_DATA_MODEL), 32)
02bb8761fcce Initial load
duke
parents:
diff changeset
   111
    processor := $(shell uname -p)
02bb8761fcce Initial load
duke
parents:
diff changeset
   112
    archExpr = case "$(processor)" in  \
02bb8761fcce Initial load
duke
parents:
diff changeset
   113
                i[3-9]86) \
02bb8761fcce Initial load
duke
parents:
diff changeset
   114
                    echo i586 \
02bb8761fcce Initial load
duke
parents:
diff changeset
   115
                    ;; \
02bb8761fcce Initial load
duke
parents:
diff changeset
   116
                sparc*)  \
02bb8761fcce Initial load
duke
parents:
diff changeset
   117
                    echo sparc \
02bb8761fcce Initial load
duke
parents:
diff changeset
   118
                    ;; \
02bb8761fcce Initial load
duke
parents:
diff changeset
   119
                *) \
02bb8761fcce Initial load
duke
parents:
diff changeset
   120
                    echo $(processor)  \
02bb8761fcce Initial load
duke
parents:
diff changeset
   121
                    ;; \
02bb8761fcce Initial load
duke
parents:
diff changeset
   122
        esac
02bb8761fcce Initial load
duke
parents:
diff changeset
   123
    ARCH        := $(shell $(archExpr))
02bb8761fcce Initial load
duke
parents:
diff changeset
   124
  else
02bb8761fcce Initial load
duke
parents:
diff changeset
   125
    ARCH := $(shell isainfo -n)
02bb8761fcce Initial load
duke
parents:
diff changeset
   126
    # ISA_DIR is used to locate 64-bit specific libraries which are generally
02bb8761fcce Initial load
duke
parents:
diff changeset
   127
    # in the same general place as other libraries under the ./$(ARCH) directory
02bb8761fcce Initial load
duke
parents:
diff changeset
   128
    ISA_DIR = /$(ARCH)
02bb8761fcce Initial load
duke
parents:
diff changeset
   129
  endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   130
  # Need to maintain the jre/lib/i386 location for 32-bit Intel
02bb8761fcce Initial load
duke
parents:
diff changeset
   131
  ifeq ($(ARCH), i586)
02bb8761fcce Initial load
duke
parents:
diff changeset
   132
     ARCH_FAMILY = $(ARCH)
02bb8761fcce Initial load
duke
parents:
diff changeset
   133
     LIBARCH     = i386
02bb8761fcce Initial load
duke
parents:
diff changeset
   134
     # Value of Java os.arch property
02bb8761fcce Initial load
duke
parents:
diff changeset
   135
     ARCHPROP    = x86
02bb8761fcce Initial load
duke
parents:
diff changeset
   136
  else
02bb8761fcce Initial load
duke
parents:
diff changeset
   137
     ifeq ($(ARCH), amd64)
02bb8761fcce Initial load
duke
parents:
diff changeset
   138
        ARCH_FAMILY = i586
02bb8761fcce Initial load
duke
parents:
diff changeset
   139
     else
02bb8761fcce Initial load
duke
parents:
diff changeset
   140
        ARCH_FAMILY = sparc
02bb8761fcce Initial load
duke
parents:
diff changeset
   141
     endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   142
     LIBARCH  = $(ARCH)
02bb8761fcce Initial load
duke
parents:
diff changeset
   143
     # Value of Java os.arch property
02bb8761fcce Initial load
duke
parents:
diff changeset
   144
     ARCHPROP = $(LIBARCH)
02bb8761fcce Initial load
duke
parents:
diff changeset
   145
  endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   146
  # The two LIBARCH names
02bb8761fcce Initial load
duke
parents:
diff changeset
   147
  ifeq ($(ARCH_FAMILY), sparc)
02bb8761fcce Initial load
duke
parents:
diff changeset
   148
    LIBARCH32 = sparc
02bb8761fcce Initial load
duke
parents:
diff changeset
   149
    LIBARCH64 = sparcv9
02bb8761fcce Initial load
duke
parents:
diff changeset
   150
  else
02bb8761fcce Initial load
duke
parents:
diff changeset
   151
    LIBARCH32 = i386
02bb8761fcce Initial load
duke
parents:
diff changeset
   152
    LIBARCH64 = amd64
02bb8761fcce Initial load
duke
parents:
diff changeset
   153
  endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   154
  # Suffix for file bundles used in previous release
02bb8761fcce Initial load
duke
parents:
diff changeset
   155
  BUNDLE_FILE_SUFFIX=.tar
02bb8761fcce Initial load
duke
parents:
diff changeset
   156
  OS_VENDOR = Sun Microsystems
02bb8761fcce Initial load
duke
parents:
diff changeset
   157
  # Required Solaris version
02bb8761fcce Initial load
duke
parents:
diff changeset
   158
  REQUIRED_OS_VERSION = 5.10
02bb8761fcce Initial load
duke
parents:
diff changeset
   159
  # Minimum disk space needed as determined by running 'du -sk' on 
02bb8761fcce Initial load
duke
parents:
diff changeset
   160
  #    a fully built workspace.
02bb8761fcce Initial load
duke
parents:
diff changeset
   161
  ifeq ($(ARCH_FAMILY), sparc)
02bb8761fcce Initial load
duke
parents:
diff changeset
   162
    REQUIRED_FREE_SPACE=1300000
02bb8761fcce Initial load
duke
parents:
diff changeset
   163
  else
02bb8761fcce Initial load
duke
parents:
diff changeset
   164
    REQUIRED_FREE_SPACE=1040000
02bb8761fcce Initial load
duke
parents:
diff changeset
   165
  endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   166
  # How much RAM does this machine have:
02bb8761fcce Initial load
duke
parents:
diff changeset
   167
  MB_OF_MEMORY=$(shell /etc/prtconf | fgrep 'Memory size:' | expand | cut -d' ' -f3)
02bb8761fcce Initial load
duke
parents:
diff changeset
   168
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   169
02bb8761fcce Initial load
duke
parents:
diff changeset
   170
# Platform settings specific to Linux
02bb8761fcce Initial load
duke
parents:
diff changeset
   171
ifeq ($(SYSTEM_UNAME), Linux)
02bb8761fcce Initial load
duke
parents:
diff changeset
   172
  PLATFORM = linux
02bb8761fcce Initial load
duke
parents:
diff changeset
   173
  OS_NAME = linux
02bb8761fcce Initial load
duke
parents:
diff changeset
   174
  OS_VERSION := $(shell uname -r)
02bb8761fcce Initial load
duke
parents:
diff changeset
   175
  # Arch and OS name/version
02bb8761fcce Initial load
duke
parents:
diff changeset
   176
  mach := $(shell uname -m)
02bb8761fcce Initial load
duke
parents:
diff changeset
   177
  archExpr = case "$(mach)" in \
02bb8761fcce Initial load
duke
parents:
diff changeset
   178
                i[3-9]86) \
02bb8761fcce Initial load
duke
parents:
diff changeset
   179
                    echo i586 \
02bb8761fcce Initial load
duke
parents:
diff changeset
   180
                    ;; \
02bb8761fcce Initial load
duke
parents:
diff changeset
   181
                ia64) \
02bb8761fcce Initial load
duke
parents:
diff changeset
   182
                    echo ia64 \
02bb8761fcce Initial load
duke
parents:
diff changeset
   183
                    ;; \
02bb8761fcce Initial load
duke
parents:
diff changeset
   184
                x86_64) \
02bb8761fcce Initial load
duke
parents:
diff changeset
   185
                    echo amd64 \
02bb8761fcce Initial load
duke
parents:
diff changeset
   186
                    ;; \
02bb8761fcce Initial load
duke
parents:
diff changeset
   187
                sparc*) \
02bb8761fcce Initial load
duke
parents:
diff changeset
   188
                    echo sparc \
02bb8761fcce Initial load
duke
parents:
diff changeset
   189
                    ;; \
02bb8761fcce Initial load
duke
parents:
diff changeset
   190
                *) \
02bb8761fcce Initial load
duke
parents:
diff changeset
   191
                    echo $(mach) \
02bb8761fcce Initial load
duke
parents:
diff changeset
   192
                    ;; \
02bb8761fcce Initial load
duke
parents:
diff changeset
   193
      esac
02bb8761fcce Initial load
duke
parents:
diff changeset
   194
  ARCH        := $(shell $(archExpr) )
02bb8761fcce Initial load
duke
parents:
diff changeset
   195
  ARCH_FAMILY := $(ARCH)
02bb8761fcce Initial load
duke
parents:
diff changeset
   196
02bb8761fcce Initial load
duke
parents:
diff changeset
   197
  # Linux builds may be 32-bit or 64-bit data model.
02bb8761fcce Initial load
duke
parents:
diff changeset
   198
  ifeq ($(ARCH), sparc)
02bb8761fcce Initial load
duke
parents:
diff changeset
   199
    # Linux sparc build can be either 32-bit or 64-bit.
02bb8761fcce Initial load
duke
parents:
diff changeset
   200
    #   Default to 32, but allow explicit setting to 32 or 64.
02bb8761fcce Initial load
duke
parents:
diff changeset
   201
    ifndef ARCH_DATA_MODEL
02bb8761fcce Initial load
duke
parents:
diff changeset
   202
      ARCH_DATA_MODEL=32
02bb8761fcce Initial load
duke
parents:
diff changeset
   203
    endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   204
    ifeq ($(ARCH_DATA_MODEL), 32)
02bb8761fcce Initial load
duke
parents:
diff changeset
   205
      ARCH=sparc
02bb8761fcce Initial load
duke
parents:
diff changeset
   206
    else
02bb8761fcce Initial load
duke
parents:
diff changeset
   207
      ARCH=sparcv9
02bb8761fcce Initial load
duke
parents:
diff changeset
   208
    endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   209
  else
02bb8761fcce Initial load
duke
parents:
diff changeset
   210
    # i586 is 32-bit, amd64 is 64-bit
02bb8761fcce Initial load
duke
parents:
diff changeset
   211
    ifndef ARCH_DATA_MODEL
02bb8761fcce Initial load
duke
parents:
diff changeset
   212
      ifeq ($(ARCH), i586)
02bb8761fcce Initial load
duke
parents:
diff changeset
   213
        ARCH_DATA_MODEL=32
02bb8761fcce Initial load
duke
parents:
diff changeset
   214
      else
02bb8761fcce Initial load
duke
parents:
diff changeset
   215
        ARCH_DATA_MODEL=64
02bb8761fcce Initial load
duke
parents:
diff changeset
   216
      endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   217
    endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   218
  endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   219
02bb8761fcce Initial load
duke
parents:
diff changeset
   220
  # Need to maintain the jre/lib/i386 location for 32-bit Intel
02bb8761fcce Initial load
duke
parents:
diff changeset
   221
  ifeq ($(ARCH), i586)
02bb8761fcce Initial load
duke
parents:
diff changeset
   222
    LIBARCH = i386
02bb8761fcce Initial load
duke
parents:
diff changeset
   223
  else
02bb8761fcce Initial load
duke
parents:
diff changeset
   224
    LIBARCH = $(ARCH)
02bb8761fcce Initial load
duke
parents:
diff changeset
   225
  endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   226
02bb8761fcce Initial load
duke
parents:
diff changeset
   227
  # Value of Java os.arch property
02bb8761fcce Initial load
duke
parents:
diff changeset
   228
  ARCHPROP  = $(LIBARCH)
02bb8761fcce Initial load
duke
parents:
diff changeset
   229
02bb8761fcce Initial load
duke
parents:
diff changeset
   230
  # Suffix for file bundles used in previous release
02bb8761fcce Initial load
duke
parents:
diff changeset
   231
  BUNDLE_FILE_SUFFIX=.tar.gz
02bb8761fcce Initial load
duke
parents:
diff changeset
   232
  # Minimum disk space needed as determined by running 'du -sk' on 
02bb8761fcce Initial load
duke
parents:
diff changeset
   233
  #    a fully built workspace.
02bb8761fcce Initial load
duke
parents:
diff changeset
   234
  REQUIRED_FREE_SPACE=1460000
02bb8761fcce Initial load
duke
parents:
diff changeset
   235
  LINUX_VERSION_INFO = /etc/redhat-release
02bb8761fcce Initial load
duke
parents:
diff changeset
   236
  OS_VENDOR = Red Hat
02bb8761fcce Initial load
duke
parents:
diff changeset
   237
  ifeq ($(ARCH_DATA_MODEL), 32)
02bb8761fcce Initial load
duke
parents:
diff changeset
   238
    REQUIRED_LINUX_VER = Advanced Server
02bb8761fcce Initial load
duke
parents:
diff changeset
   239
    REQUIRED_LINUX_FULLVER = Advanced Server release 2.1AS
02bb8761fcce Initial load
duke
parents:
diff changeset
   240
    REQUIRED_OS_VERSION = 2.4.9-e.3
02bb8761fcce Initial load
duke
parents:
diff changeset
   241
  else
02bb8761fcce Initial load
duke
parents:
diff changeset
   242
    ifeq ($(ARCH), amd64)
02bb8761fcce Initial load
duke
parents:
diff changeset
   243
      LINUX_VERSION_INFO = /etc/SuSE-release
02bb8761fcce Initial load
duke
parents:
diff changeset
   244
      OS_VENDOR = SuSE Enterprise
02bb8761fcce Initial load
duke
parents:
diff changeset
   245
      REQUIRED_LINUX_VER = 8.1
02bb8761fcce Initial load
duke
parents:
diff changeset
   246
      REQUIRED_LINUX_FULLVER = $(REQUIRED_LINUX_VER) SLSE AMD64
02bb8761fcce Initial load
duke
parents:
diff changeset
   247
      REQUIRED_OS_VERSION = 2.4.19-SMP
02bb8761fcce Initial load
duke
parents:
diff changeset
   248
    else
02bb8761fcce Initial load
duke
parents:
diff changeset
   249
      REQUIRED_LINUX_VER = Advanced Server
02bb8761fcce Initial load
duke
parents:
diff changeset
   250
      REQUIRED_LINUX_FULLVER = Advanced Server release 2.1AS 64 bit
02bb8761fcce Initial load
duke
parents:
diff changeset
   251
      REQUIRED_OS_VERSION = 2.4.19-SMP
02bb8761fcce Initial load
duke
parents:
diff changeset
   252
    endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   253
  endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   254
  # How much RAM does this machine have:
02bb8761fcce Initial load
duke
parents:
diff changeset
   255
  MB_OF_MEMORY := $(shell free -m | fgrep Mem: | sed -e 's@\ \ *@ @g' | cut -d' ' -f2)
02bb8761fcce Initial load
duke
parents:
diff changeset
   256
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   257
02bb8761fcce Initial load
duke
parents:
diff changeset
   258
# Windows with and without CYGWIN will be slightly different
02bb8761fcce Initial load
duke
parents:
diff changeset
   259
ifeq ($(SYSTEM_UNAME), Windows_NT)
02bb8761fcce Initial load
duke
parents:
diff changeset
   260
  PLATFORM = windows
02bb8761fcce Initial load
duke
parents:
diff changeset
   261
  OS_VERSION := $(shell uname -r)
02bb8761fcce Initial load
duke
parents:
diff changeset
   262
  WINDOWS_NT_VERSION_STRING=Windows_NT
02bb8761fcce Initial load
duke
parents:
diff changeset
   263
  REQUIRED_MKS_VER=6.1
02bb8761fcce Initial load
duke
parents:
diff changeset
   264
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   265
ifneq (,$(findstring CYGWIN,$(SYSTEM_UNAME)))
02bb8761fcce Initial load
duke
parents:
diff changeset
   266
  PLATFORM = windows
02bb8761fcce Initial load
duke
parents:
diff changeset
   267
  OS_VERSION := 5
02bb8761fcce Initial load
duke
parents:
diff changeset
   268
  USING_CYGWIN = true
02bb8761fcce Initial load
duke
parents:
diff changeset
   269
  export USING_CYGWIN
02bb8761fcce Initial load
duke
parents:
diff changeset
   270
  WINDOWS_NT_VERSION_STRING=CYGWIN_NT
02bb8761fcce Initial load
duke
parents:
diff changeset
   271
  REQUIRED_CYGWIN_VER=4.0
02bb8761fcce Initial load
duke
parents:
diff changeset
   272
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   273
02bb8761fcce Initial load
duke
parents:
diff changeset
   274
# Platform settings specific to Windows
02bb8761fcce Initial load
duke
parents:
diff changeset
   275
ifeq ($(PLATFORM), windows)
02bb8761fcce Initial load
duke
parents:
diff changeset
   276
  OS_NAME = nt
02bb8761fcce Initial load
duke
parents:
diff changeset
   277
  REQUIRED_OS_VERSION=5
02bb8761fcce Initial load
duke
parents:
diff changeset
   278
  # Windows builds default to the appropriate for the underlaying
02bb8761fcce Initial load
duke
parents:
diff changeset
   279
  # architecture.
02bb8761fcce Initial load
duke
parents:
diff changeset
   280
  # Temporary disk area
02bb8761fcce Initial load
duke
parents:
diff changeset
   281
  TEMP_DISK=C:/temp
02bb8761fcce Initial load
duke
parents:
diff changeset
   282
  # GNU Make or MKS overrides $(PROCESSOR_ARCHITECTURE) to always
02bb8761fcce Initial load
duke
parents:
diff changeset
   283
  # return "x86". Use the first word of $(PROCESSOR_IDENTIFIER) instead.
2823
80304d57bab0 6822374: Windows: detect X64 when PROCESSOR_IDENTIFIER contains EM64T or Intel64
ohair
parents: 4
diff changeset
   284
  PROC_ARCH:=$(word 1, $(PROCESSOR_IDENTIFIER))
80304d57bab0 6822374: Windows: detect X64 when PROCESSOR_IDENTIFIER contains EM64T or Intel64
ohair
parents: 4
diff changeset
   285
  PROC_ARCH:=$(subst x86,X86,$(PROC_ARCH))
80304d57bab0 6822374: Windows: detect X64 when PROCESSOR_IDENTIFIER contains EM64T or Intel64
ohair
parents: 4
diff changeset
   286
  PROC_ARCH:=$(subst x64,X64,$(PROC_ARCH))
80304d57bab0 6822374: Windows: detect X64 when PROCESSOR_IDENTIFIER contains EM64T or Intel64
ohair
parents: 4
diff changeset
   287
  PROC_ARCH:=$(subst intel64,X64,$(PROC_ARCH))
80304d57bab0 6822374: Windows: detect X64 when PROCESSOR_IDENTIFIER contains EM64T or Intel64
ohair
parents: 4
diff changeset
   288
  PROC_ARCH:=$(subst Intel64,X64,$(PROC_ARCH))
80304d57bab0 6822374: Windows: detect X64 when PROCESSOR_IDENTIFIER contains EM64T or Intel64
ohair
parents: 4
diff changeset
   289
  PROC_ARCH:=$(subst INTEL64,X64,$(PROC_ARCH))
80304d57bab0 6822374: Windows: detect X64 when PROCESSOR_IDENTIFIER contains EM64T or Intel64
ohair
parents: 4
diff changeset
   290
  PROC_ARCH:=$(subst em64t,X64,$(PROC_ARCH))
80304d57bab0 6822374: Windows: detect X64 when PROCESSOR_IDENTIFIER contains EM64T or Intel64
ohair
parents: 4
diff changeset
   291
  PROC_ARCH:=$(subst EM64T,X64,$(PROC_ARCH))
80304d57bab0 6822374: Windows: detect X64 when PROCESSOR_IDENTIFIER contains EM64T or Intel64
ohair
parents: 4
diff changeset
   292
  PROC_ARCH:=$(subst amd64,X64,$(PROC_ARCH))
80304d57bab0 6822374: Windows: detect X64 when PROCESSOR_IDENTIFIER contains EM64T or Intel64
ohair
parents: 4
diff changeset
   293
  PROC_ARCH:=$(subst AMD64,X64,$(PROC_ARCH))
80304d57bab0 6822374: Windows: detect X64 when PROCESSOR_IDENTIFIER contains EM64T or Intel64
ohair
parents: 4
diff changeset
   294
  PROC_ARCH:=$(subst ia64,IA64,$(PROC_ARCH))
4
02bb8761fcce Initial load
duke
parents:
diff changeset
   295
  ifndef ARCH_DATA_MODEL
2823
80304d57bab0 6822374: Windows: detect X64 when PROCESSOR_IDENTIFIER contains EM64T or Intel64
ohair
parents: 4
diff changeset
   296
    ifeq ($(PROC_ARCH),IA64)
4
02bb8761fcce Initial load
duke
parents:
diff changeset
   297
      ARCH_DATA_MODEL=64
02bb8761fcce Initial load
duke
parents:
diff changeset
   298
    else
2823
80304d57bab0 6822374: Windows: detect X64 when PROCESSOR_IDENTIFIER contains EM64T or Intel64
ohair
parents: 4
diff changeset
   299
      ifeq ($(PROC_ARCH),X64)
4
02bb8761fcce Initial load
duke
parents:
diff changeset
   300
        ARCH_DATA_MODEL=64
02bb8761fcce Initial load
duke
parents:
diff changeset
   301
      else
02bb8761fcce Initial load
duke
parents:
diff changeset
   302
        ARCH_DATA_MODEL=32
02bb8761fcce Initial load
duke
parents:
diff changeset
   303
      endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   304
    endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   305
  endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   306
  export ARCH_DATA_MODEL
02bb8761fcce Initial load
duke
parents:
diff changeset
   307
  # LIBARCH is used to preserve the jre/lib/i386 directory name for 32-bit intel
02bb8761fcce Initial load
duke
parents:
diff changeset
   308
  ARCH=i586
02bb8761fcce Initial load
duke
parents:
diff changeset
   309
  LIBARCH=i386
02bb8761fcce Initial load
duke
parents:
diff changeset
   310
  # Value of Java os.arch property
02bb8761fcce Initial load
duke
parents:
diff changeset
   311
  ARCHPROP=x86
02bb8761fcce Initial load
duke
parents:
diff changeset
   312
  REQUIRED_WINDOWS_NAME=Windows Professional 2000
02bb8761fcce Initial load
duke
parents:
diff changeset
   313
  REQUIRED_WINDOWS_VERSION=5 0 Service Pack 4
02bb8761fcce Initial load
duke
parents:
diff changeset
   314
  ifeq ($(ARCH_DATA_MODEL), 64)
02bb8761fcce Initial load
duke
parents:
diff changeset
   315
    # If the user wants to perform a cross compile build then they must
02bb8761fcce Initial load
duke
parents:
diff changeset
   316
    # - set ARCH_DATA_MODEL=64 and either
02bb8761fcce Initial load
duke
parents:
diff changeset
   317
    #      + set ARCH to ia64 or amd64, or
02bb8761fcce Initial load
duke
parents:
diff changeset
   318
    REQUIRED_WINDOWS_NAME=Windows Server 2003
02bb8761fcce Initial load
duke
parents:
diff changeset
   319
    REQUIRED_WINDOWS_VERSION=5 2 Service Pack 1
2823
80304d57bab0 6822374: Windows: detect X64 when PROCESSOR_IDENTIFIER contains EM64T or Intel64
ohair
parents: 4
diff changeset
   320
    ifeq ($(PROC_ARCH),X64)
4
02bb8761fcce Initial load
duke
parents:
diff changeset
   321
      ARCH=amd64
02bb8761fcce Initial load
duke
parents:
diff changeset
   322
    else
2823
80304d57bab0 6822374: Windows: detect X64 when PROCESSOR_IDENTIFIER contains EM64T or Intel64
ohair
parents: 4
diff changeset
   323
      ifeq ($(PROC_ARCH),IA64)
80304d57bab0 6822374: Windows: detect X64 when PROCESSOR_IDENTIFIER contains EM64T or Intel64
ohair
parents: 4
diff changeset
   324
        ARCH=ia64
80304d57bab0 6822374: Windows: detect X64 when PROCESSOR_IDENTIFIER contains EM64T or Intel64
ohair
parents: 4
diff changeset
   325
      endif
4
02bb8761fcce Initial load
duke
parents:
diff changeset
   326
    endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   327
    LIBARCH=$(ARCH)
02bb8761fcce Initial load
duke
parents:
diff changeset
   328
    # Value of Java os.arch property
02bb8761fcce Initial load
duke
parents:
diff changeset
   329
    ARCHPROP=$(LIBARCH)
02bb8761fcce Initial load
duke
parents:
diff changeset
   330
  endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   331
  ARCH_FAMILY = $(ARCH)
02bb8761fcce Initial load
duke
parents:
diff changeset
   332
  # Where is unwanted output to be delivered?
02bb8761fcce Initial load
duke
parents:
diff changeset
   333
  DEV_NULL = NUL
02bb8761fcce Initial load
duke
parents:
diff changeset
   334
  export DEV_NULL
02bb8761fcce Initial load
duke
parents:
diff changeset
   335
  # Classpath separator
02bb8761fcce Initial load
duke
parents:
diff changeset
   336
  CLASSPATH_SEPARATOR = ;
02bb8761fcce Initial load
duke
parents:
diff changeset
   337
  # The suffix used for object file (.o for unix .obj for windows)
02bb8761fcce Initial load
duke
parents:
diff changeset
   338
  OBJECT_SUFFIX = obj
02bb8761fcce Initial load
duke
parents:
diff changeset
   339
  # The suffix applied to executables (.exe for windows, nothing for solaris)
02bb8761fcce Initial load
duke
parents:
diff changeset
   340
  EXE_SUFFIX = .exe
02bb8761fcce Initial load
duke
parents:
diff changeset
   341
  # The prefix applied to library files (lib for solaris, nothing for windows)
02bb8761fcce Initial load
duke
parents:
diff changeset
   342
  LIB_PREFIX=
02bb8761fcce Initial load
duke
parents:
diff changeset
   343
  LIBRARY_SUFFIX = dll
02bb8761fcce Initial load
duke
parents:
diff changeset
   344
  LIB_SUFFIX     = lib
02bb8761fcce Initial load
duke
parents:
diff changeset
   345
  # User name determination (set _USER)
02bb8761fcce Initial load
duke
parents:
diff changeset
   346
  ifndef USER
02bb8761fcce Initial load
duke
parents:
diff changeset
   347
    ifdef USERNAME
02bb8761fcce Initial load
duke
parents:
diff changeset
   348
      _USER := $(USERNAME)
02bb8761fcce Initial load
duke
parents:
diff changeset
   349
    else
02bb8761fcce Initial load
duke
parents:
diff changeset
   350
      ifdef LOGNAME
02bb8761fcce Initial load
duke
parents:
diff changeset
   351
        _USER := $(LOGNAME)
02bb8761fcce Initial load
duke
parents:
diff changeset
   352
      else
02bb8761fcce Initial load
duke
parents:
diff changeset
   353
        _USER := $(shell id -un)
02bb8761fcce Initial load
duke
parents:
diff changeset
   354
      endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   355
    endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   356
  else
02bb8761fcce Initial load
duke
parents:
diff changeset
   357
    _USER:=$(USER)
02bb8761fcce Initial load
duke
parents:
diff changeset
   358
  endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   359
  # Location of client/server directories
02bb8761fcce Initial load
duke
parents:
diff changeset
   360
  ARCH_VM_SUBDIR=jre/bin
02bb8761fcce Initial load
duke
parents:
diff changeset
   361
  # Suffix for file bundles used in previous release
02bb8761fcce Initial load
duke
parents:
diff changeset
   362
  BUNDLE_FILE_SUFFIX=.tar
02bb8761fcce Initial load
duke
parents:
diff changeset
   363
  # Minimum disk space needed as determined by running 'du -sk' on 
02bb8761fcce Initial load
duke
parents:
diff changeset
   364
  #    a fully built workspace.
02bb8761fcce Initial load
duke
parents:
diff changeset
   365
  REQUIRED_FREE_SPACE=500000
02bb8761fcce Initial load
duke
parents:
diff changeset
   366
  OS_VENDOR = Microsoft
02bb8761fcce Initial load
duke
parents:
diff changeset
   367
  # How much RAM does this machine have:
3871
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   368
  ifndef MB_OF_MEMORY
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   369
    MB_OF_MEMORY := $(shell \
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   370
      if [ -f "C:/cygwin/bin/free.exe" ] ; then \
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   371
        ( C:/cygwin/bin/bash.exe -c "C:/cygwin/bin/free.exe -m" ) | \
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   372
	  grep Mem: | \
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   373
	  sed -e 's@\ \ *@ @g' | cut -d' ' -f2 ; \
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   374
      else \
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   375
        echo "512"; \
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   376
      fi)
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   377
    export MB_OF_MEMORY
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   378
  endif
4
02bb8761fcce Initial load
duke
parents:
diff changeset
   379
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   380
02bb8761fcce Initial load
duke
parents:
diff changeset
   381
# Machines with 512Mb or less of real memory are considered low memory
02bb8761fcce Initial load
duke
parents:
diff changeset
   382
#    build machines and adjustments will be made to prevent excessing
02bb8761fcce Initial load
duke
parents:
diff changeset
   383
#    system swapping during the build.
02bb8761fcce Initial load
duke
parents:
diff changeset
   384
#    If we don't know, assume 512. Subtract 128 from MB for VM MAX.
02bb8761fcce Initial load
duke
parents:
diff changeset
   385
#    Don't set VM max over 1024-128=896.
3871
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   386
ifndef MAX_VM_MEMORY
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   387
  ifneq ($(MB_OF_MEMORY),)
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   388
    LOW_MEMORY_MACHINE := $(shell \
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   389
      if [ $(MB_OF_MEMORY) -le 512 ] ; then \
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   390
        echo "true"; \
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   391
      else \
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   392
        echo "false"; \
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   393
      fi)
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   394
    MAX_VM_MEMORY := $(shell \
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   395
      if [ $(MB_OF_MEMORY) -le 1024 ] ; then \
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   396
        expr $(MB_OF_MEMORY) '-' 128 ; \
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   397
      else \
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   398
        echo "896"; \
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   399
      fi)
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   400
    MIN_VM_MEMORY := $(shell \
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   401
      if [ $(MAX_VM_MEMORY) -le 128 ] ; then \
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   402
        expr $(MAX_VM_MEMORY) '-' 8 ; \
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   403
      else \
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   404
        echo "128"; \
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   405
      fi)
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   406
  else
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   407
    MB_OF_MEMORY       := unknown
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   408
    LOW_MEMORY_MACHINE := true
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   409
    MAX_VM_MEMORY      := 384
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   410
    MIN_VM_MEMORY      := 128
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   411
  endif
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   412
  export MAX_VM_MEMORY
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   413
  export MIN_VM_MEMORY
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   414
  export LOW_MEMORY_MACHINE
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   415
  export MAX_VM_MEMORY
4
02bb8761fcce Initial load
duke
parents:
diff changeset
   416
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   417
02bb8761fcce Initial load
duke
parents:
diff changeset
   418
REQUIRED_ZIP_VER = 2.2
02bb8761fcce Initial load
duke
parents:
diff changeset
   419
REQUIRED_UNZIP_VER = 5.12
02bb8761fcce Initial load
duke
parents:
diff changeset
   420
REQUIRED_MAKE_VER = 3.78
02bb8761fcce Initial load
duke
parents:
diff changeset
   421
02bb8761fcce Initial load
duke
parents:
diff changeset
   422
# Unix type settings (same for all unix platforms)
02bb8761fcce Initial load
duke
parents:
diff changeset
   423
ifneq ($(PLATFORM), windows)
02bb8761fcce Initial load
duke
parents:
diff changeset
   424
  # Temporary disk area
02bb8761fcce Initial load
duke
parents:
diff changeset
   425
  TEMP_DISK=/tmp
02bb8761fcce Initial load
duke
parents:
diff changeset
   426
  # Where is unwanted output to be delivered?
02bb8761fcce Initial load
duke
parents:
diff changeset
   427
  DEV_NULL = /dev/null
02bb8761fcce Initial load
duke
parents:
diff changeset
   428
  export DEV_NULL
02bb8761fcce Initial load
duke
parents:
diff changeset
   429
  # Character used between entries in classpath 
02bb8761fcce Initial load
duke
parents:
diff changeset
   430
  CLASSPATH_SEPARATOR = :
02bb8761fcce Initial load
duke
parents:
diff changeset
   431
  # suffix used for object file (.o for unix .obj for windows)
02bb8761fcce Initial load
duke
parents:
diff changeset
   432
  OBJECT_SUFFIX = o
02bb8761fcce Initial load
duke
parents:
diff changeset
   433
  # The suffix applied to runtime libraries
02bb8761fcce Initial load
duke
parents:
diff changeset
   434
  LIBRARY_SUFFIX = so
02bb8761fcce Initial load
duke
parents:
diff changeset
   435
  # The suffix applied to link libraries
02bb8761fcce Initial load
duke
parents:
diff changeset
   436
  LIB_SUFFIX = so
02bb8761fcce Initial load
duke
parents:
diff changeset
   437
  # The suffix applied to executables (.exe for windows, nothing for solaris)
02bb8761fcce Initial load
duke
parents:
diff changeset
   438
  EXE_SUFFIX =
02bb8761fcce Initial load
duke
parents:
diff changeset
   439
  # The prefix applied to library files (lib for solaris, nothing for windows)
02bb8761fcce Initial load
duke
parents:
diff changeset
   440
  LIB_PREFIX = lib
02bb8761fcce Initial load
duke
parents:
diff changeset
   441
  # User name determination (set _USER)
02bb8761fcce Initial load
duke
parents:
diff changeset
   442
  ifndef USER
02bb8761fcce Initial load
duke
parents:
diff changeset
   443
    ifdef LOGNAME
02bb8761fcce Initial load
duke
parents:
diff changeset
   444
      _USER := $(LOGNAME)
02bb8761fcce Initial load
duke
parents:
diff changeset
   445
    else
02bb8761fcce Initial load
duke
parents:
diff changeset
   446
      _USER := $(shell logname)
02bb8761fcce Initial load
duke
parents:
diff changeset
   447
    endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   448
  else
02bb8761fcce Initial load
duke
parents:
diff changeset
   449
    _USER:=$(USER)
02bb8761fcce Initial load
duke
parents:
diff changeset
   450
  endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   451
  # Location of client/server directories
02bb8761fcce Initial load
duke
parents:
diff changeset
   452
  ARCH_VM_SUBDIR=jre/lib/$(LIBARCH)
02bb8761fcce Initial load
duke
parents:
diff changeset
   453
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   454
02bb8761fcce Initial load
duke
parents:
diff changeset
   455
# If blanks in the username, use the first 4 words and pack them together
02bb8761fcce Initial load
duke
parents:
diff changeset
   456
_USER1:=$(subst ', ,$(_USER))
02bb8761fcce Initial load
duke
parents:
diff changeset
   457
_USER2:=$(subst ", ,$(_USER1))
02bb8761fcce Initial load
duke
parents:
diff changeset
   458
USER:=$(word 1,$(_USER2))$(word 2,$(_USER2))$(word 3,$(_USER2))$(word 4,$(_USER2))
02bb8761fcce Initial load
duke
parents:
diff changeset
   459
export USER
02bb8761fcce Initial load
duke
parents:
diff changeset
   460
02bb8761fcce Initial load
duke
parents:
diff changeset
   461
export PLATFORM
02bb8761fcce Initial load
duke
parents:
diff changeset
   462
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   463