corba/make/common/shared/Platform.gmk
author tbell
Tue, 23 Oct 2012 10:10:39 -0700
changeset 14095 ab1fb3836ddb
parent 12898 3526c8817fe6
permissions -rw-r--r--
7152336: Enable builds on Windows with MinGW/MSYS Summary: Minimal makefile changes to enable building OpenJDK using MSYS on Windows7 Reviewed-by: ohair, tbell Contributed-by: volker.simonis@gmail.com
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4
02bb8761fcce Initial load
duke
parents:
diff changeset
     1
#
12566
fcf023e9e287 7130404: [macosx] "os.arch" value should be "x86_64" for compatibility with Apple JDK6
jmelvin
parents: 12061
diff changeset
     2
# Copyright (c) 1997, 2012, Oracle and/or its affiliates. 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
5555
b2b5ed3f0d0d 6943119: Rebrand source copyright notices
ohair
parents: 5385
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
4
02bb8761fcce Initial load
duke
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
5555
b2b5ed3f0d0d 6943119: Rebrand source copyright notices
ohair
parents: 5385
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
4
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
#
5555
b2b5ed3f0d0d 6943119: Rebrand source copyright notices
ohair
parents: 5385
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
b2b5ed3f0d0d 6943119: Rebrand source copyright notices
ohair
parents: 5385
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
b2b5ed3f0d0d 6943119: Rebrand source copyright notices
ohair
parents: 5385
diff changeset
    23
# questions.
4
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
#     TEMP_DISK                   /tmp or C:/temp
02bb8761fcce Initial load
duke
parents:
diff changeset
    57
#     ARCH_DATA_MODEL             32 or 64
02bb8761fcce Initial load
duke
parents:
diff changeset
    58
#     ARCH                        sparc, sparcv9, i586, amd64, or ia64
02bb8761fcce Initial load
duke
parents:
diff changeset
    59
#     ARCH_FAMILY                 sparc or i586
02bb8761fcce Initial load
duke
parents:
diff changeset
    60
#     ARCHPROP                    sparc or x86
02bb8761fcce Initial load
duke
parents:
diff changeset
    61
#     DEV_NULL                    destination of /dev/null, NUL or /dev/NULL
02bb8761fcce Initial load
duke
parents:
diff changeset
    62
#     CLASSPATH_SEPARATOR         separator in classpath, ; or :
02bb8761fcce Initial load
duke
parents:
diff changeset
    63
#     BUNDLE_FILE_SUFFIX          suffix for bundles: .tar or .tar.gz
02bb8761fcce Initial load
duke
parents:
diff changeset
    64
#     ISA_DIR                     solaris only: /sparcv9 or /amd64
12061
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
    65
#     REQUIRED_WINDOWS_NAME       windows only: basic name of windows
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
    66
#     REQUIRED_WINDOWS_VERSION    windows only: specific version of windows
4
02bb8761fcce Initial load
duke
parents:
diff changeset
    67
#     USING_CYGWIN                windows only: true or false
14095
ab1fb3836ddb 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 12898
diff changeset
    68
#     USING_MSYS                  windows only: true or false
ab1fb3836ddb 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 12898
diff changeset
    69
#     USING_MKS                   windows only: true or false
4
02bb8761fcce Initial load
duke
parents:
diff changeset
    70
#     WINDOWS_NT_VERSION_STRING   windows only: long version name
02bb8761fcce Initial load
duke
parents:
diff changeset
    71
#     REQUIRED_OS_VERSION         required OS version, e.g. 5.10, 2.4
02bb8761fcce Initial load
duke
parents:
diff changeset
    72
#     REQUIRED_FREE_SPACE         minimum disk space needed for outputdir
02bb8761fcce Initial load
duke
parents:
diff changeset
    73
#     REQUIRED_ZIP_VER            required version of zip
02bb8761fcce Initial load
duke
parents:
diff changeset
    74
#     REQUIRED_UNZIP_VER          required version of unzip
02bb8761fcce Initial load
duke
parents:
diff changeset
    75
#     LINUX_VERSION_INFO          linux only: location of linux release file
02bb8761fcce Initial load
duke
parents:
diff changeset
    76
#     REQUIRED_LINUX_VER          linux only: required version of linux
02bb8761fcce Initial load
duke
parents:
diff changeset
    77
#     REQUIRED_LINUX_FULLVER      linux only: required full version of linux
02bb8761fcce Initial load
duke
parents:
diff changeset
    78
3871
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
    79
ifndef SYSTEM_UNAME
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
    80
  SYSTEM_UNAME := $(shell uname)
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
    81
  export SYSTEM_UNAME
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
    82
endif
4
02bb8761fcce Initial load
duke
parents:
diff changeset
    83
02bb8761fcce Initial load
duke
parents:
diff changeset
    84
# Normal boot jdk is previous release, but a hard requirement is a 1.5 boot
02bb8761fcce Initial load
duke
parents:
diff changeset
    85
REQUIRED_BOOT_VER = 1.5
02bb8761fcce Initial load
duke
parents:
diff changeset
    86
02bb8761fcce Initial load
duke
parents:
diff changeset
    87
# Don't define this unless it's not defined
02bb8761fcce Initial load
duke
parents:
diff changeset
    88
ifndef VARIANT
02bb8761fcce Initial load
duke
parents:
diff changeset
    89
  VARIANT=OPT
02bb8761fcce Initial load
duke
parents:
diff changeset
    90
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
    91
02bb8761fcce Initial load
duke
parents:
diff changeset
    92
# Platform settings specific to Solaris
02bb8761fcce Initial load
duke
parents:
diff changeset
    93
ifeq ($(SYSTEM_UNAME), SunOS)
02bb8761fcce Initial load
duke
parents:
diff changeset
    94
  PLATFORM = solaris
02bb8761fcce Initial load
duke
parents:
diff changeset
    95
  OS_NAME = solaris
02bb8761fcce Initial load
duke
parents:
diff changeset
    96
  OS_VERSION := $(shell uname -r)
02bb8761fcce Initial load
duke
parents:
diff changeset
    97
  # Solaris sparc build can be either 32-bit or 64-bit.
02bb8761fcce Initial load
duke
parents:
diff changeset
    98
  #   Default to 32, but allow explicit setting to 32 or 64.
02bb8761fcce Initial load
duke
parents:
diff changeset
    99
  ifndef ARCH_DATA_MODEL
02bb8761fcce Initial load
duke
parents:
diff changeset
   100
    ARCH_DATA_MODEL=32
02bb8761fcce Initial load
duke
parents:
diff changeset
   101
  endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   102
  ifeq ($(ARCH_DATA_MODEL), 32)
02bb8761fcce Initial load
duke
parents:
diff changeset
   103
    processor := $(shell uname -p)
02bb8761fcce Initial load
duke
parents:
diff changeset
   104
    archExpr = case "$(processor)" in  \
02bb8761fcce Initial load
duke
parents:
diff changeset
   105
                i[3-9]86) \
02bb8761fcce Initial load
duke
parents:
diff changeset
   106
                    echo i586 \
02bb8761fcce Initial load
duke
parents:
diff changeset
   107
                    ;; \
02bb8761fcce Initial load
duke
parents:
diff changeset
   108
                sparc*)  \
02bb8761fcce Initial load
duke
parents:
diff changeset
   109
                    echo sparc \
02bb8761fcce Initial load
duke
parents:
diff changeset
   110
                    ;; \
02bb8761fcce Initial load
duke
parents:
diff changeset
   111
                *) \
02bb8761fcce Initial load
duke
parents:
diff changeset
   112
                    echo $(processor)  \
02bb8761fcce Initial load
duke
parents:
diff changeset
   113
                    ;; \
02bb8761fcce Initial load
duke
parents:
diff changeset
   114
        esac
02bb8761fcce Initial load
duke
parents:
diff changeset
   115
    ARCH        := $(shell $(archExpr))
02bb8761fcce Initial load
duke
parents:
diff changeset
   116
  else
02bb8761fcce Initial load
duke
parents:
diff changeset
   117
    ARCH := $(shell isainfo -n)
02bb8761fcce Initial load
duke
parents:
diff changeset
   118
    # ISA_DIR is used to locate 64-bit specific libraries which are generally
02bb8761fcce Initial load
duke
parents:
diff changeset
   119
    # in the same general place as other libraries under the ./$(ARCH) directory
02bb8761fcce Initial load
duke
parents:
diff changeset
   120
    ISA_DIR = /$(ARCH)
02bb8761fcce Initial load
duke
parents:
diff changeset
   121
  endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   122
  # Need to maintain the jre/lib/i386 location for 32-bit Intel
02bb8761fcce Initial load
duke
parents:
diff changeset
   123
  ifeq ($(ARCH), i586)
02bb8761fcce Initial load
duke
parents:
diff changeset
   124
     ARCH_FAMILY = $(ARCH)
02bb8761fcce Initial load
duke
parents:
diff changeset
   125
     # Value of Java os.arch property
02bb8761fcce Initial load
duke
parents:
diff changeset
   126
     ARCHPROP    = x86
02bb8761fcce Initial load
duke
parents:
diff changeset
   127
  else
02bb8761fcce Initial load
duke
parents:
diff changeset
   128
     ifeq ($(ARCH), amd64)
02bb8761fcce Initial load
duke
parents:
diff changeset
   129
        ARCH_FAMILY = i586
02bb8761fcce Initial load
duke
parents:
diff changeset
   130
     else
02bb8761fcce Initial load
duke
parents:
diff changeset
   131
        ARCH_FAMILY = sparc
02bb8761fcce Initial load
duke
parents:
diff changeset
   132
     endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   133
     # Value of Java os.arch property
6551
476ed8653670 6981043: Clean out all native code makefile logic from corba repository
ohair
parents: 5560
diff changeset
   134
     ARCHPROP = $(ARCH)
4
02bb8761fcce Initial load
duke
parents:
diff changeset
   135
  endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   136
  # Suffix for file bundles used in previous release
02bb8761fcce Initial load
duke
parents:
diff changeset
   137
  BUNDLE_FILE_SUFFIX=.tar
02bb8761fcce Initial load
duke
parents:
diff changeset
   138
  # Required Solaris version
02bb8761fcce Initial load
duke
parents:
diff changeset
   139
  REQUIRED_OS_VERSION = 5.10
12061
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   140
  # Minimum disk space needed as determined by running 'du -sk' on
4
02bb8761fcce Initial load
duke
parents:
diff changeset
   141
  #    a fully built workspace.
02bb8761fcce Initial load
duke
parents:
diff changeset
   142
  ifeq ($(ARCH_FAMILY), sparc)
02bb8761fcce Initial load
duke
parents:
diff changeset
   143
    REQUIRED_FREE_SPACE=1300000
02bb8761fcce Initial load
duke
parents:
diff changeset
   144
  else
02bb8761fcce Initial load
duke
parents:
diff changeset
   145
    REQUIRED_FREE_SPACE=1040000
02bb8761fcce Initial load
duke
parents:
diff changeset
   146
  endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   147
  # How much RAM does this machine have:
12898
3526c8817fe6 7176691: prtconf: devinfo facility not available in corba building
ohair
parents: 12566
diff changeset
   148
  MB_OF_MEMORY:=$(shell /usr/sbin/prtconf 2>/dev/null | fgrep 'Memory size:' | expand | cut -d' ' -f3)
4
02bb8761fcce Initial load
duke
parents:
diff changeset
   149
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   150
02bb8761fcce Initial load
duke
parents:
diff changeset
   151
# Platform settings specific to Linux
02bb8761fcce Initial load
duke
parents:
diff changeset
   152
ifeq ($(SYSTEM_UNAME), Linux)
02bb8761fcce Initial load
duke
parents:
diff changeset
   153
  PLATFORM = linux
02bb8761fcce Initial load
duke
parents:
diff changeset
   154
  OS_NAME = linux
02bb8761fcce Initial load
duke
parents:
diff changeset
   155
  OS_VERSION := $(shell uname -r)
02bb8761fcce Initial load
duke
parents:
diff changeset
   156
  # Arch and OS name/version
02bb8761fcce Initial load
duke
parents:
diff changeset
   157
  mach := $(shell uname -m)
02bb8761fcce Initial load
duke
parents:
diff changeset
   158
  archExpr = case "$(mach)" in \
02bb8761fcce Initial load
duke
parents:
diff changeset
   159
                i[3-9]86) \
02bb8761fcce Initial load
duke
parents:
diff changeset
   160
                    echo i586 \
02bb8761fcce Initial load
duke
parents:
diff changeset
   161
                    ;; \
02bb8761fcce Initial load
duke
parents:
diff changeset
   162
                ia64) \
02bb8761fcce Initial load
duke
parents:
diff changeset
   163
                    echo ia64 \
02bb8761fcce Initial load
duke
parents:
diff changeset
   164
                    ;; \
02bb8761fcce Initial load
duke
parents:
diff changeset
   165
                x86_64) \
02bb8761fcce Initial load
duke
parents:
diff changeset
   166
                    echo amd64 \
02bb8761fcce Initial load
duke
parents:
diff changeset
   167
                    ;; \
02bb8761fcce Initial load
duke
parents:
diff changeset
   168
                sparc*) \
02bb8761fcce Initial load
duke
parents:
diff changeset
   169
                    echo sparc \
02bb8761fcce Initial load
duke
parents:
diff changeset
   170
                    ;; \
4290
1258c05e707a 6903453: Zero build on ARM and IA-64
gbenson
parents: 3871
diff changeset
   171
                arm*) \
1258c05e707a 6903453: Zero build on ARM and IA-64
gbenson
parents: 3871
diff changeset
   172
                    echo arm \
1258c05e707a 6903453: Zero build on ARM and IA-64
gbenson
parents: 3871
diff changeset
   173
                    ;; \
4
02bb8761fcce Initial load
duke
parents:
diff changeset
   174
                *) \
02bb8761fcce Initial load
duke
parents:
diff changeset
   175
                    echo $(mach) \
02bb8761fcce Initial load
duke
parents:
diff changeset
   176
                    ;; \
02bb8761fcce Initial load
duke
parents:
diff changeset
   177
      esac
02bb8761fcce Initial load
duke
parents:
diff changeset
   178
  ARCH        := $(shell $(archExpr) )
02bb8761fcce Initial load
duke
parents:
diff changeset
   179
  ARCH_FAMILY := $(ARCH)
02bb8761fcce Initial load
duke
parents:
diff changeset
   180
02bb8761fcce Initial load
duke
parents:
diff changeset
   181
  # Linux builds may be 32-bit or 64-bit data model.
02bb8761fcce Initial load
duke
parents:
diff changeset
   182
  ifeq ($(ARCH), sparc)
02bb8761fcce Initial load
duke
parents:
diff changeset
   183
    # Linux sparc build can be either 32-bit or 64-bit.
02bb8761fcce Initial load
duke
parents:
diff changeset
   184
    #   Default to 32, but allow explicit setting to 32 or 64.
02bb8761fcce Initial load
duke
parents:
diff changeset
   185
    ifndef ARCH_DATA_MODEL
02bb8761fcce Initial load
duke
parents:
diff changeset
   186
      ARCH_DATA_MODEL=32
02bb8761fcce Initial load
duke
parents:
diff changeset
   187
    endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   188
    ifeq ($(ARCH_DATA_MODEL), 32)
02bb8761fcce Initial load
duke
parents:
diff changeset
   189
      ARCH=sparc
02bb8761fcce Initial load
duke
parents:
diff changeset
   190
    else
02bb8761fcce Initial load
duke
parents:
diff changeset
   191
      ARCH=sparcv9
02bb8761fcce Initial load
duke
parents:
diff changeset
   192
    endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   193
  else
02bb8761fcce Initial load
duke
parents:
diff changeset
   194
    # i586 is 32-bit, amd64 is 64-bit
02bb8761fcce Initial load
duke
parents:
diff changeset
   195
    ifndef ARCH_DATA_MODEL
02bb8761fcce Initial load
duke
parents:
diff changeset
   196
      ifeq ($(ARCH), i586)
02bb8761fcce Initial load
duke
parents:
diff changeset
   197
        ARCH_DATA_MODEL=32
02bb8761fcce Initial load
duke
parents:
diff changeset
   198
      else
02bb8761fcce Initial load
duke
parents:
diff changeset
   199
        ARCH_DATA_MODEL=64
02bb8761fcce Initial load
duke
parents:
diff changeset
   200
      endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   201
    endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   202
  endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   203
02bb8761fcce Initial load
duke
parents:
diff changeset
   204
  ifeq ($(ARCH), i586)
6551
476ed8653670 6981043: Clean out all native code makefile logic from corba repository
ohair
parents: 5560
diff changeset
   205
    ARCHPROP = i386
4
02bb8761fcce Initial load
duke
parents:
diff changeset
   206
  else
6551
476ed8653670 6981043: Clean out all native code makefile logic from corba repository
ohair
parents: 5560
diff changeset
   207
    ARCHPROP = $(ARCH)
4
02bb8761fcce Initial load
duke
parents:
diff changeset
   208
  endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   209
02bb8761fcce Initial load
duke
parents:
diff changeset
   210
  # Suffix for file bundles used in previous release
02bb8761fcce Initial load
duke
parents:
diff changeset
   211
  BUNDLE_FILE_SUFFIX=.tar.gz
12061
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   212
  # Minimum disk space needed as determined by running 'du -sk' on
4
02bb8761fcce Initial load
duke
parents:
diff changeset
   213
  #    a fully built workspace.
02bb8761fcce Initial load
duke
parents:
diff changeset
   214
  REQUIRED_FREE_SPACE=1460000
02bb8761fcce Initial load
duke
parents:
diff changeset
   215
  LINUX_VERSION_INFO = /etc/redhat-release
02bb8761fcce Initial load
duke
parents:
diff changeset
   216
  ifeq ($(ARCH_DATA_MODEL), 32)
02bb8761fcce Initial load
duke
parents:
diff changeset
   217
    REQUIRED_LINUX_VER = Advanced Server
02bb8761fcce Initial load
duke
parents:
diff changeset
   218
    REQUIRED_LINUX_FULLVER = Advanced Server release 2.1AS
02bb8761fcce Initial load
duke
parents:
diff changeset
   219
    REQUIRED_OS_VERSION = 2.4.9-e.3
02bb8761fcce Initial load
duke
parents:
diff changeset
   220
  else
02bb8761fcce Initial load
duke
parents:
diff changeset
   221
    ifeq ($(ARCH), amd64)
02bb8761fcce Initial load
duke
parents:
diff changeset
   222
      LINUX_VERSION_INFO = /etc/SuSE-release
02bb8761fcce Initial load
duke
parents:
diff changeset
   223
      REQUIRED_LINUX_VER = 8.1
02bb8761fcce Initial load
duke
parents:
diff changeset
   224
      REQUIRED_LINUX_FULLVER = $(REQUIRED_LINUX_VER) SLSE AMD64
02bb8761fcce Initial load
duke
parents:
diff changeset
   225
      REQUIRED_OS_VERSION = 2.4.19-SMP
02bb8761fcce Initial load
duke
parents:
diff changeset
   226
    else
02bb8761fcce Initial load
duke
parents:
diff changeset
   227
      REQUIRED_LINUX_VER = Advanced Server
02bb8761fcce Initial load
duke
parents:
diff changeset
   228
      REQUIRED_LINUX_FULLVER = Advanced Server release 2.1AS 64 bit
02bb8761fcce Initial load
duke
parents:
diff changeset
   229
      REQUIRED_OS_VERSION = 2.4.19-SMP
02bb8761fcce Initial load
duke
parents:
diff changeset
   230
    endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   231
  endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   232
  # How much RAM does this machine have:
02bb8761fcce Initial load
duke
parents:
diff changeset
   233
  MB_OF_MEMORY := $(shell free -m | fgrep Mem: | sed -e 's@\ \ *@ @g' | cut -d' ' -f2)
02bb8761fcce Initial load
duke
parents:
diff changeset
   234
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   235
12061
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   236
ifeq ($(SYSTEM_UNAME), FreeBSD)
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   237
  PLATFORM = bsd
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   238
  OS_NAME = freebsd
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   239
  OS_VENDOR = FreeBSD
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   240
  REQUIRED_OS_VERSION = 6.0
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   241
endif
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   242
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   243
ifeq ($(SYSTEM_UNAME), Darwin)
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   244
  PLATFORM = bsd
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   245
  OS_NAME = darwin
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   246
  OS_VENDOR = Apple
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   247
  REQUIRED_OS_VERSION = 8.0
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   248
endif
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   249
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   250
ifeq ($(SYSTEM_UNAME), NetBSD)
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   251
  PLATFORM = bsd
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   252
  OS_NAME = netbsd
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   253
  OS_VENDOR = NetBSD
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   254
  REQUIRED_OS_VERSION = 3.0
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   255
endif
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   256
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   257
ifeq ($(SYSTEM_UNAME), OpenBSD)
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   258
  PLATFORM = bsd
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   259
  OS_NAME = openbsd
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   260
  OS_VENDOR = OpenBSD
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   261
  REQUIRED_OS_VERSION = 4.9
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   262
endif
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   263
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   264
# Platform settings specific to BSD
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   265
ifeq ($(PLATFORM), bsd)
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   266
  OS_VERSION := $(shell uname -r)
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   267
  # Arch and OS name/version
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   268
  mach := $(shell uname -m)
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   269
  archExpr = case "$(mach)" in \
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   270
                i[3-9]86) \
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   271
                    echo i586 \
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   272
                    ;; \
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   273
                sparc64) \
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   274
                    echo sparcv9 \
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   275
                    ;; \
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   276
                sparc*) \
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   277
                    echo sparc \
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   278
                    ;; \
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   279
                x86_64) \
12566
fcf023e9e287 7130404: [macosx] "os.arch" value should be "x86_64" for compatibility with Apple JDK6
jmelvin
parents: 12061
diff changeset
   280
                    echo x86_64 \
12061
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   281
                    ;; \
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   282
                "Power Macintosh") \
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   283
                    echo ppc \
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   284
                    ;; \
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   285
                *) \
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   286
                    echo $(mach) \
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   287
                    ;; \
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   288
      esac
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   289
  ARCH        := $(shell $(archExpr) )
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   290
  ARCH_FAMILY := $(ARCH)
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   291
12566
fcf023e9e287 7130404: [macosx] "os.arch" value should be "x86_64" for compatibility with Apple JDK6
jmelvin
parents: 12061
diff changeset
   292
  # Darwin builds are currently universal but only include 64-bit
fcf023e9e287 7130404: [macosx] "os.arch" value should be "x86_64" for compatibility with Apple JDK6
jmelvin
parents: 12061
diff changeset
   293
  # 
fcf023e9e287 7130404: [macosx] "os.arch" value should be "x86_64" for compatibility with Apple JDK6
jmelvin
parents: 12061
diff changeset
   294
  # ifeq ($(SYSTEM_UNAME), Darwin)
fcf023e9e287 7130404: [macosx] "os.arch" value should be "x86_64" for compatibility with Apple JDK6
jmelvin
parents: 12061
diff changeset
   295
  #  ifneq ($(ARCH), ppc)
fcf023e9e287 7130404: [macosx] "os.arch" value should be "x86_64" for compatibility with Apple JDK6
jmelvin
parents: 12061
diff changeset
   296
  #    ARCH=universal
fcf023e9e287 7130404: [macosx] "os.arch" value should be "x86_64" for compatibility with Apple JDK6
jmelvin
parents: 12061
diff changeset
   297
  #  endif
fcf023e9e287 7130404: [macosx] "os.arch" value should be "x86_64" for compatibility with Apple JDK6
jmelvin
parents: 12061
diff changeset
   298
  # endif
12061
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   299
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   300
  # i586, sparc, and ppc are 32 bit, amd64 and sparc64 are 64
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   301
  ifneq (,$(findstring $(ARCH), i586 sparc ppc universal))
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   302
    ARCH_DATA_MODEL=32
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   303
  else
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   304
    ARCH_DATA_MODEL=64
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   305
  endif
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   306
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   307
  ifeq ($(ARCH), i586)
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   308
    LIBARCH = i386
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   309
  else
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   310
    LIBARCH = $(ARCH)
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   311
  endif
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   312
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   313
  # Value of Java os.arch property
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   314
  ARCHPROP  = $(LIBARCH)
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   315
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   316
  # Suffix for file bundles used in previous release
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   317
  BUNDLE_FILE_SUFFIX=.tar.gz
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   318
  # Minimum disk space needed as determined by running 'du -sk' on
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   319
  #    a fully built workspace.
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   320
  REQUIRED_FREE_SPACE=1500000
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   321
  # How much RAM does this machine have:
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   322
  ifeq ($(OS_VENDOR), OpenBSD)
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   323
    MB_OF_MEMORY=$(shell sysctl -n hw.physmem | awk '{print int($$NF / 1048576); }' )
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   324
  else
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   325
    MB_OF_MEMORY=$(shell (sysctl -n hw.physmem64 2> /dev/null || sysctl -n hw.physmem) | awk '{print int($$NF / 1048576); }' )
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   326
  endif
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   327
endif
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   328
4
02bb8761fcce Initial load
duke
parents:
diff changeset
   329
# Windows with and without CYGWIN will be slightly different
02bb8761fcce Initial load
duke
parents:
diff changeset
   330
ifeq ($(SYSTEM_UNAME), Windows_NT)
02bb8761fcce Initial load
duke
parents:
diff changeset
   331
  PLATFORM = windows
14095
ab1fb3836ddb 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 12898
diff changeset
   332
  USING_MKS = true
ab1fb3836ddb 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 12898
diff changeset
   333
  export USING_MKS
4
02bb8761fcce Initial load
duke
parents:
diff changeset
   334
  OS_VERSION := $(shell uname -r)
02bb8761fcce Initial load
duke
parents:
diff changeset
   335
  WINDOWS_NT_VERSION_STRING=Windows_NT
02bb8761fcce Initial load
duke
parents:
diff changeset
   336
  REQUIRED_MKS_VER=6.1
02bb8761fcce Initial load
duke
parents:
diff changeset
   337
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   338
ifneq (,$(findstring CYGWIN,$(SYSTEM_UNAME)))
02bb8761fcce Initial load
duke
parents:
diff changeset
   339
  PLATFORM = windows
02bb8761fcce Initial load
duke
parents:
diff changeset
   340
  OS_VERSION := 5
02bb8761fcce Initial load
duke
parents:
diff changeset
   341
  USING_CYGWIN = true
02bb8761fcce Initial load
duke
parents:
diff changeset
   342
  export USING_CYGWIN
02bb8761fcce Initial load
duke
parents:
diff changeset
   343
  WINDOWS_NT_VERSION_STRING=CYGWIN_NT
02bb8761fcce Initial load
duke
parents:
diff changeset
   344
  REQUIRED_CYGWIN_VER=4.0
02bb8761fcce Initial load
duke
parents:
diff changeset
   345
endif
14095
ab1fb3836ddb 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 12898
diff changeset
   346
ifneq (,$(findstring MINGW,$(SYSTEM_UNAME)))
ab1fb3836ddb 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 12898
diff changeset
   347
  PLATFORM = windows
ab1fb3836ddb 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 12898
diff changeset
   348
  USING_MSYS = true
ab1fb3836ddb 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 12898
diff changeset
   349
  export USING_MSYS
ab1fb3836ddb 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 12898
diff changeset
   350
endif
4
02bb8761fcce Initial load
duke
parents:
diff changeset
   351
02bb8761fcce Initial load
duke
parents:
diff changeset
   352
# Platform settings specific to Windows
02bb8761fcce Initial load
duke
parents:
diff changeset
   353
ifeq ($(PLATFORM), windows)
02bb8761fcce Initial load
duke
parents:
diff changeset
   354
  OS_NAME = nt
02bb8761fcce Initial load
duke
parents:
diff changeset
   355
  REQUIRED_OS_VERSION=5
02bb8761fcce Initial load
duke
parents:
diff changeset
   356
  # Windows builds default to the appropriate for the underlaying
02bb8761fcce Initial load
duke
parents:
diff changeset
   357
  # architecture.
02bb8761fcce Initial load
duke
parents:
diff changeset
   358
  # Temporary disk area
02bb8761fcce Initial load
duke
parents:
diff changeset
   359
  TEMP_DISK=C:/temp
02bb8761fcce Initial load
duke
parents:
diff changeset
   360
  # GNU Make or MKS overrides $(PROCESSOR_ARCHITECTURE) to always
02bb8761fcce Initial load
duke
parents:
diff changeset
   361
  # 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
   362
  PROC_ARCH:=$(word 1, $(PROCESSOR_IDENTIFIER))
80304d57bab0 6822374: Windows: detect X64 when PROCESSOR_IDENTIFIER contains EM64T or Intel64
ohair
parents: 4
diff changeset
   363
  PROC_ARCH:=$(subst x86,X86,$(PROC_ARCH))
80304d57bab0 6822374: Windows: detect X64 when PROCESSOR_IDENTIFIER contains EM64T or Intel64
ohair
parents: 4
diff changeset
   364
  PROC_ARCH:=$(subst x64,X64,$(PROC_ARCH))
80304d57bab0 6822374: Windows: detect X64 when PROCESSOR_IDENTIFIER contains EM64T or Intel64
ohair
parents: 4
diff changeset
   365
  PROC_ARCH:=$(subst intel64,X64,$(PROC_ARCH))
80304d57bab0 6822374: Windows: detect X64 when PROCESSOR_IDENTIFIER contains EM64T or Intel64
ohair
parents: 4
diff changeset
   366
  PROC_ARCH:=$(subst Intel64,X64,$(PROC_ARCH))
80304d57bab0 6822374: Windows: detect X64 when PROCESSOR_IDENTIFIER contains EM64T or Intel64
ohair
parents: 4
diff changeset
   367
  PROC_ARCH:=$(subst INTEL64,X64,$(PROC_ARCH))
80304d57bab0 6822374: Windows: detect X64 when PROCESSOR_IDENTIFIER contains EM64T or Intel64
ohair
parents: 4
diff changeset
   368
  PROC_ARCH:=$(subst em64t,X64,$(PROC_ARCH))
80304d57bab0 6822374: Windows: detect X64 when PROCESSOR_IDENTIFIER contains EM64T or Intel64
ohair
parents: 4
diff changeset
   369
  PROC_ARCH:=$(subst EM64T,X64,$(PROC_ARCH))
80304d57bab0 6822374: Windows: detect X64 when PROCESSOR_IDENTIFIER contains EM64T or Intel64
ohair
parents: 4
diff changeset
   370
  PROC_ARCH:=$(subst amd64,X64,$(PROC_ARCH))
80304d57bab0 6822374: Windows: detect X64 when PROCESSOR_IDENTIFIER contains EM64T or Intel64
ohair
parents: 4
diff changeset
   371
  PROC_ARCH:=$(subst AMD64,X64,$(PROC_ARCH))
80304d57bab0 6822374: Windows: detect X64 when PROCESSOR_IDENTIFIER contains EM64T or Intel64
ohair
parents: 4
diff changeset
   372
  PROC_ARCH:=$(subst ia64,IA64,$(PROC_ARCH))
4
02bb8761fcce Initial load
duke
parents:
diff changeset
   373
  ifndef ARCH_DATA_MODEL
2823
80304d57bab0 6822374: Windows: detect X64 when PROCESSOR_IDENTIFIER contains EM64T or Intel64
ohair
parents: 4
diff changeset
   374
    ifeq ($(PROC_ARCH),IA64)
4
02bb8761fcce Initial load
duke
parents:
diff changeset
   375
      ARCH_DATA_MODEL=64
02bb8761fcce Initial load
duke
parents:
diff changeset
   376
    else
2823
80304d57bab0 6822374: Windows: detect X64 when PROCESSOR_IDENTIFIER contains EM64T or Intel64
ohair
parents: 4
diff changeset
   377
      ifeq ($(PROC_ARCH),X64)
4
02bb8761fcce Initial load
duke
parents:
diff changeset
   378
        ARCH_DATA_MODEL=64
02bb8761fcce Initial load
duke
parents:
diff changeset
   379
      else
02bb8761fcce Initial load
duke
parents:
diff changeset
   380
        ARCH_DATA_MODEL=32
02bb8761fcce Initial load
duke
parents:
diff changeset
   381
      endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   382
    endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   383
  endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   384
  export ARCH_DATA_MODEL
02bb8761fcce Initial load
duke
parents:
diff changeset
   385
  ARCH=i586
02bb8761fcce Initial load
duke
parents:
diff changeset
   386
  # Value of Java os.arch property
02bb8761fcce Initial load
duke
parents:
diff changeset
   387
  ARCHPROP=x86
02bb8761fcce Initial load
duke
parents:
diff changeset
   388
  REQUIRED_WINDOWS_NAME=Windows Professional 2000
02bb8761fcce Initial load
duke
parents:
diff changeset
   389
  REQUIRED_WINDOWS_VERSION=5 0 Service Pack 4
02bb8761fcce Initial load
duke
parents:
diff changeset
   390
  ifeq ($(ARCH_DATA_MODEL), 64)
02bb8761fcce Initial load
duke
parents:
diff changeset
   391
    # If the user wants to perform a cross compile build then they must
02bb8761fcce Initial load
duke
parents:
diff changeset
   392
    # - set ARCH_DATA_MODEL=64 and either
02bb8761fcce Initial load
duke
parents:
diff changeset
   393
    #      + set ARCH to ia64 or amd64, or
02bb8761fcce Initial load
duke
parents:
diff changeset
   394
    REQUIRED_WINDOWS_NAME=Windows Server 2003
02bb8761fcce Initial load
duke
parents:
diff changeset
   395
    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
   396
    ifeq ($(PROC_ARCH),X64)
4
02bb8761fcce Initial load
duke
parents:
diff changeset
   397
      ARCH=amd64
02bb8761fcce Initial load
duke
parents:
diff changeset
   398
    else
2823
80304d57bab0 6822374: Windows: detect X64 when PROCESSOR_IDENTIFIER contains EM64T or Intel64
ohair
parents: 4
diff changeset
   399
      ifeq ($(PROC_ARCH),IA64)
80304d57bab0 6822374: Windows: detect X64 when PROCESSOR_IDENTIFIER contains EM64T or Intel64
ohair
parents: 4
diff changeset
   400
        ARCH=ia64
80304d57bab0 6822374: Windows: detect X64 when PROCESSOR_IDENTIFIER contains EM64T or Intel64
ohair
parents: 4
diff changeset
   401
      endif
4
02bb8761fcce Initial load
duke
parents:
diff changeset
   402
    endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   403
    # Value of Java os.arch property
6551
476ed8653670 6981043: Clean out all native code makefile logic from corba repository
ohair
parents: 5560
diff changeset
   404
    ARCHPROP=$(ARCH)
4
02bb8761fcce Initial load
duke
parents:
diff changeset
   405
  endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   406
  ARCH_FAMILY = $(ARCH)
02bb8761fcce Initial load
duke
parents:
diff changeset
   407
  # Where is unwanted output to be delivered?
5385
8308e15f228e 6931180: Migration to recent versions of MS Platform SDK
prr
parents: 4290
diff changeset
   408
  ifeq ($(USING_CYGWIN),true)
8308e15f228e 6931180: Migration to recent versions of MS Platform SDK
prr
parents: 4290
diff changeset
   409
    DEV_NULL = /dev/null
8308e15f228e 6931180: Migration to recent versions of MS Platform SDK
prr
parents: 4290
diff changeset
   410
  else
8308e15f228e 6931180: Migration to recent versions of MS Platform SDK
prr
parents: 4290
diff changeset
   411
    DEV_NULL = NUL
8308e15f228e 6931180: Migration to recent versions of MS Platform SDK
prr
parents: 4290
diff changeset
   412
  endif
4
02bb8761fcce Initial load
duke
parents:
diff changeset
   413
  export DEV_NULL
02bb8761fcce Initial load
duke
parents:
diff changeset
   414
  # Classpath separator
02bb8761fcce Initial load
duke
parents:
diff changeset
   415
  CLASSPATH_SEPARATOR = ;
02bb8761fcce Initial load
duke
parents:
diff changeset
   416
  # User name determination (set _USER)
02bb8761fcce Initial load
duke
parents:
diff changeset
   417
  ifndef USER
02bb8761fcce Initial load
duke
parents:
diff changeset
   418
    ifdef USERNAME
02bb8761fcce Initial load
duke
parents:
diff changeset
   419
      _USER := $(USERNAME)
02bb8761fcce Initial load
duke
parents:
diff changeset
   420
    else
02bb8761fcce Initial load
duke
parents:
diff changeset
   421
      ifdef LOGNAME
02bb8761fcce Initial load
duke
parents:
diff changeset
   422
        _USER := $(LOGNAME)
02bb8761fcce Initial load
duke
parents:
diff changeset
   423
      else
02bb8761fcce Initial load
duke
parents:
diff changeset
   424
        _USER := $(shell id -un)
02bb8761fcce Initial load
duke
parents:
diff changeset
   425
      endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   426
    endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   427
  else
02bb8761fcce Initial load
duke
parents:
diff changeset
   428
    _USER:=$(USER)
02bb8761fcce Initial load
duke
parents:
diff changeset
   429
  endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   430
  # Suffix for file bundles used in previous release
02bb8761fcce Initial load
duke
parents:
diff changeset
   431
  BUNDLE_FILE_SUFFIX=.tar
12061
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   432
  # Minimum disk space needed as determined by running 'du -sk' on
4
02bb8761fcce Initial load
duke
parents:
diff changeset
   433
  #    a fully built workspace.
02bb8761fcce Initial load
duke
parents:
diff changeset
   434
  REQUIRED_FREE_SPACE=500000
02bb8761fcce Initial load
duke
parents:
diff changeset
   435
  # 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
   436
  ifndef MB_OF_MEMORY
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   437
    MB_OF_MEMORY := $(shell \
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   438
      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
   439
        ( C:/cygwin/bin/bash.exe -c "C:/cygwin/bin/free.exe -m" ) | \
12061
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   440
          grep Mem: | \
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   441
          sed -e 's@\ \ *@ @g' | cut -d' ' -f2 ; \
3871
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   442
      else \
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   443
        echo "512"; \
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   444
      fi)
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   445
    export MB_OF_MEMORY
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   446
  endif
4
02bb8761fcce Initial load
duke
parents:
diff changeset
   447
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   448
02bb8761fcce Initial load
duke
parents:
diff changeset
   449
# Machines with 512Mb or less of real memory are considered low memory
02bb8761fcce Initial load
duke
parents:
diff changeset
   450
#    build machines and adjustments will be made to prevent excessing
02bb8761fcce Initial load
duke
parents:
diff changeset
   451
#    system swapping during the build.
02bb8761fcce Initial load
duke
parents:
diff changeset
   452
#    If we don't know, assume 512. Subtract 128 from MB for VM MAX.
02bb8761fcce Initial load
duke
parents:
diff changeset
   453
#    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
   454
ifndef MAX_VM_MEMORY
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   455
  ifneq ($(MB_OF_MEMORY),)
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   456
    LOW_MEMORY_MACHINE := $(shell \
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   457
      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
   458
        echo "true"; \
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   459
      else \
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   460
        echo "false"; \
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   461
      fi)
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   462
    MAX_VM_MEMORY := $(shell \
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   463
      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
   464
        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
   465
      else \
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   466
        echo "896"; \
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   467
      fi)
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   468
    MIN_VM_MEMORY := $(shell \
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   469
      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
   470
        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
   471
      else \
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   472
        echo "128"; \
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   473
      fi)
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   474
  else
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   475
    MB_OF_MEMORY       := unknown
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   476
    LOW_MEMORY_MACHINE := true
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   477
    MAX_VM_MEMORY      := 384
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   478
    MIN_VM_MEMORY      := 128
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   479
  endif
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   480
  export MAX_VM_MEMORY
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   481
  export MIN_VM_MEMORY
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   482
  export LOW_MEMORY_MACHINE
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   483
  export MAX_VM_MEMORY
4
02bb8761fcce Initial load
duke
parents:
diff changeset
   484
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   485
02bb8761fcce Initial load
duke
parents:
diff changeset
   486
REQUIRED_ZIP_VER = 2.2
02bb8761fcce Initial load
duke
parents:
diff changeset
   487
REQUIRED_UNZIP_VER = 5.12
7578
670662dc2a25 6909026: Change GNU make version requirement to 3.81
ohair
parents: 6551
diff changeset
   488
REQUIRED_MAKE_VER = 3.81
4
02bb8761fcce Initial load
duke
parents:
diff changeset
   489
02bb8761fcce Initial load
duke
parents:
diff changeset
   490
# Unix type settings (same for all unix platforms)
02bb8761fcce Initial load
duke
parents:
diff changeset
   491
ifneq ($(PLATFORM), windows)
02bb8761fcce Initial load
duke
parents:
diff changeset
   492
  # Temporary disk area
02bb8761fcce Initial load
duke
parents:
diff changeset
   493
  TEMP_DISK=/tmp
02bb8761fcce Initial load
duke
parents:
diff changeset
   494
  # Where is unwanted output to be delivered?
02bb8761fcce Initial load
duke
parents:
diff changeset
   495
  DEV_NULL = /dev/null
02bb8761fcce Initial load
duke
parents:
diff changeset
   496
  export DEV_NULL
12061
902aeaf97ec5 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 7578
diff changeset
   497
  # Character used between entries in classpath
4
02bb8761fcce Initial load
duke
parents:
diff changeset
   498
  CLASSPATH_SEPARATOR = :
02bb8761fcce Initial load
duke
parents:
diff changeset
   499
  # User name determination (set _USER)
02bb8761fcce Initial load
duke
parents:
diff changeset
   500
  ifndef USER
02bb8761fcce Initial load
duke
parents:
diff changeset
   501
    ifdef LOGNAME
02bb8761fcce Initial load
duke
parents:
diff changeset
   502
      _USER := $(LOGNAME)
02bb8761fcce Initial load
duke
parents:
diff changeset
   503
    else
02bb8761fcce Initial load
duke
parents:
diff changeset
   504
      _USER := $(shell logname)
02bb8761fcce Initial load
duke
parents:
diff changeset
   505
    endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   506
  else
02bb8761fcce Initial load
duke
parents:
diff changeset
   507
    _USER:=$(USER)
02bb8761fcce Initial load
duke
parents:
diff changeset
   508
  endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   509
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   510
02bb8761fcce Initial load
duke
parents:
diff changeset
   511
# If blanks in the username, use the first 4 words and pack them together
02bb8761fcce Initial load
duke
parents:
diff changeset
   512
_USER1:=$(subst ', ,$(_USER))
02bb8761fcce Initial load
duke
parents:
diff changeset
   513
_USER2:=$(subst ", ,$(_USER1))
02bb8761fcce Initial load
duke
parents:
diff changeset
   514
USER:=$(word 1,$(_USER2))$(word 2,$(_USER2))$(word 3,$(_USER2))$(word 4,$(_USER2))
02bb8761fcce Initial load
duke
parents:
diff changeset
   515
export USER
02bb8761fcce Initial load
duke
parents:
diff changeset
   516
02bb8761fcce Initial load
duke
parents:
diff changeset
   517
export PLATFORM
02bb8761fcce Initial load
duke
parents:
diff changeset
   518
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   519