Tue, 06 Mar 2012 20:25:43 +0000
7113349: Initial changeset for Macosx port to jdk
Reviewed-by: jjh, alanb, dholmes, anthony, ohrstrom, ksrini, jrose, weijun, smarks
Contributed-by: Alan Bateman <alan.bateman@oracle.com>, Alexander Potochkin <alexander.potochkin@oracle.com>, Alexander Zuev <alexander.zuev@oracle.com>, Andrew Brygin <andrew.brygin@oracle.com>, Artem Ananiev <artem.ananiev@oracle.com>, Alex Strange <astrange@apple.com>, Bino George <bino@apple.com>, Christine Lu <christine.lu@oracle.com>, David Katleman <david.katleman@oracle.com>, David Durrence <david_durrence@apple.com>, Dmitry Cherepanov <dmitry.cherepanov@oracle.com>, Greg Lewis <glewis@eyesbeyond.com>, Kevin Miller <kevin_m_miller@apple.com>, Kurt Miller <kurt@intricatesoftware.com>, Landon Fuller <landonf@plausiblelabs.com>, Leonid Romanov <leonid.romanov@oracle.com>, Loefty Walkowiak <loefty@apple.com>, Mark Reinhold <mark.reinhold@oracle.com>, Naoto Sato <naoto.sato@oracle.com>, Philip Race <philip.race@oracle.com>, Roger Hoover <rhoover@apple.com>, Scott Kovatch <scott.kovatch@oracle.com>, Sergey ByloKhov <sergey.bylokhov@oracle.com>, Mike Swingler <swingler@apple.com>, Tomas Hurka <tomas.hurka@oracle.com>
duke@1 | 1 | # |
ohair@225 | 2 | # Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. |
duke@1 | 3 | # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
duke@1 | 4 | # |
duke@1 | 5 | # This code is free software; you can redistribute it and/or modify it |
duke@1 | 6 | # under the terms of the GNU General Public License version 2 only, as |
ohair@158 | 7 | # published by the Free Software Foundation. Oracle designates this |
duke@1 | 8 | # particular file as subject to the "Classpath" exception as provided |
ohair@158 | 9 | # by Oracle in the LICENSE file that accompanied this code. |
duke@1 | 10 | # |
duke@1 | 11 | # This code is distributed in the hope that it will be useful, but WITHOUT |
duke@1 | 12 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
duke@1 | 13 | # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
duke@1 | 14 | # version 2 for more details (a copy is included in the LICENSE file that |
duke@1 | 15 | # accompanied this code). |
duke@1 | 16 | # |
duke@1 | 17 | # You should have received a copy of the GNU General Public License version |
duke@1 | 18 | # 2 along with this work; if not, write to the Free Software Foundation, |
duke@1 | 19 | # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
duke@1 | 20 | # |
ohair@158 | 21 | # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
ohair@158 | 22 | # or visit www.oracle.com if you need additional information or have any |
ohair@158 | 23 | # questions. |
duke@1 | 24 | # |
duke@1 | 25 | |
duke@1 | 26 | # |
duke@1 | 27 | # Shared platform (OS/ARCH) variable settings for the JDK builds. |
duke@1 | 28 | # |
duke@1 | 29 | # Includes basic system requirements, versions of utilities required, |
duke@1 | 30 | # suffixes on files, and basic defaults attributed to the build platform. |
duke@1 | 31 | # |
duke@1 | 32 | |
duke@1 | 33 | # |
duke@1 | 34 | # Assumes some basic unix system utilities (e.g. uname) are in the search path |
duke@1 | 35 | # in order to figure out the system. |
duke@1 | 36 | # |
duke@1 | 37 | |
duke@1 | 38 | ifndef PLATFORM_SHARED |
duke@1 | 39 | |
duke@1 | 40 | PLATFORM_SHARED=done |
duke@1 | 41 | |
duke@1 | 42 | # Possible Input variables: |
duke@1 | 43 | # ARCH_DATA_MODEL 32 or 64, default to 32 |
duke@1 | 44 | # USER, LOGNAME user name (runs logname, or id if not set) |
duke@1 | 45 | # PROCESSOR_IDENTIFIER windows only: needed in environment |
duke@1 | 46 | # |
duke@1 | 47 | # (Also gets input by running the utilities uname, logname, isainfo, or id.) |
duke@1 | 48 | # |
duke@1 | 49 | # Variables set by this file: |
duke@1 | 50 | # SYSTEM_UNAME what 'uname' says this system is |
duke@1 | 51 | # USER login name of user (minus blanks) |
duke@1 | 52 | # PLATFORM windows, solaris, or linux |
duke@1 | 53 | # VARIANT OPT or DBG, OPT is the default |
duke@1 | 54 | # OS_NAME solaris, linux, or nt |
duke@1 | 55 | # OS_VERSION specific version of os, 5.10, 2.4.9-e.3, etc. |
duke@1 | 56 | # TEMP_DISK /tmp or C:/temp |
duke@1 | 57 | # ARCH_DATA_MODEL 32 or 64 |
duke@1 | 58 | # ARCH sparc, sparcv9, i586, amd64, or ia64 |
duke@1 | 59 | # ARCH_FAMILY sparc or i586 |
duke@1 | 60 | # ARCHPROP sparc or x86 |
duke@1 | 61 | # DEV_NULL destination of /dev/null, NUL or /dev/NULL |
duke@1 | 62 | # CLASSPATH_SEPARATOR separator in classpath, ; or : |
duke@1 | 63 | # BUNDLE_FILE_SUFFIX suffix for bundles: .tar or .tar.gz |
duke@1 | 64 | # ISA_DIR solaris only: /sparcv9 or /amd64 |
michaelm@340 | 65 | # REQUIRED_WINDOWS_NAME windows only: basic name of windows |
michaelm@340 | 66 | # REQUIRED_WINDOWS_VERSION windows only: specific version of windows |
duke@1 | 67 | # USING_CYGWIN windows only: true or false |
duke@1 | 68 | # WINDOWS_NT_VERSION_STRING windows only: long version name |
duke@1 | 69 | # REQUIRED_OS_VERSION required OS version, e.g. 5.10, 2.4 |
duke@1 | 70 | # REQUIRED_FREE_SPACE minimum disk space needed for outputdir |
duke@1 | 71 | # REQUIRED_ZIP_VER required version of zip |
duke@1 | 72 | # REQUIRED_UNZIP_VER required version of unzip |
duke@1 | 73 | # LINUX_VERSION_INFO linux only: location of linux release file |
duke@1 | 74 | # REQUIRED_LINUX_VER linux only: required version of linux |
duke@1 | 75 | # REQUIRED_LINUX_FULLVER linux only: required full version of linux |
duke@1 | 76 | |
ohair@114 | 77 | ifndef SYSTEM_UNAME |
ohair@114 | 78 | SYSTEM_UNAME := $(shell uname) |
ohair@114 | 79 | export SYSTEM_UNAME |
ohair@114 | 80 | endif |
duke@1 | 81 | |
duke@1 | 82 | # Normal boot jdk is previous release, but a hard requirement is a 1.5 boot |
duke@1 | 83 | REQUIRED_BOOT_VER = 1.5 |
duke@1 | 84 | |
duke@1 | 85 | # Don't define this unless it's not defined |
duke@1 | 86 | ifndef VARIANT |
duke@1 | 87 | VARIANT=OPT |
duke@1 | 88 | endif |
duke@1 | 89 | |
duke@1 | 90 | # Platform settings specific to Solaris |
duke@1 | 91 | ifeq ($(SYSTEM_UNAME), SunOS) |
duke@1 | 92 | PLATFORM = solaris |
duke@1 | 93 | OS_NAME = solaris |
duke@1 | 94 | OS_VERSION := $(shell uname -r) |
duke@1 | 95 | # Solaris sparc build can be either 32-bit or 64-bit. |
duke@1 | 96 | # Default to 32, but allow explicit setting to 32 or 64. |
duke@1 | 97 | ifndef ARCH_DATA_MODEL |
duke@1 | 98 | ARCH_DATA_MODEL=32 |
duke@1 | 99 | endif |
duke@1 | 100 | ifeq ($(ARCH_DATA_MODEL), 32) |
duke@1 | 101 | processor := $(shell uname -p) |
duke@1 | 102 | archExpr = case "$(processor)" in \ |
duke@1 | 103 | i[3-9]86) \ |
duke@1 | 104 | echo i586 \ |
duke@1 | 105 | ;; \ |
duke@1 | 106 | sparc*) \ |
duke@1 | 107 | echo sparc \ |
duke@1 | 108 | ;; \ |
duke@1 | 109 | *) \ |
duke@1 | 110 | echo $(processor) \ |
duke@1 | 111 | ;; \ |
duke@1 | 112 | esac |
duke@1 | 113 | ARCH := $(shell $(archExpr)) |
duke@1 | 114 | else |
duke@1 | 115 | ARCH := $(shell isainfo -n) |
duke@1 | 116 | # ISA_DIR is used to locate 64-bit specific libraries which are generally |
duke@1 | 117 | # in the same general place as other libraries under the ./$(ARCH) directory |
duke@1 | 118 | ISA_DIR = /$(ARCH) |
duke@1 | 119 | endif |
duke@1 | 120 | # Need to maintain the jre/lib/i386 location for 32-bit Intel |
duke@1 | 121 | ifeq ($(ARCH), i586) |
duke@1 | 122 | ARCH_FAMILY = $(ARCH) |
duke@1 | 123 | # Value of Java os.arch property |
duke@1 | 124 | ARCHPROP = x86 |
duke@1 | 125 | else |
duke@1 | 126 | ifeq ($(ARCH), amd64) |
duke@1 | 127 | ARCH_FAMILY = i586 |
duke@1 | 128 | else |
duke@1 | 129 | ARCH_FAMILY = sparc |
duke@1 | 130 | endif |
duke@1 | 131 | # Value of Java os.arch property |
ohair@194 | 132 | ARCHPROP = $(ARCH) |
duke@1 | 133 | endif |
duke@1 | 134 | # Suffix for file bundles used in previous release |
duke@1 | 135 | BUNDLE_FILE_SUFFIX=.tar |
duke@1 | 136 | # Required Solaris version |
duke@1 | 137 | REQUIRED_OS_VERSION = 5.10 |
michaelm@340 | 138 | # Minimum disk space needed as determined by running 'du -sk' on |
duke@1 | 139 | # a fully built workspace. |
duke@1 | 140 | ifeq ($(ARCH_FAMILY), sparc) |
duke@1 | 141 | REQUIRED_FREE_SPACE=1300000 |
duke@1 | 142 | else |
duke@1 | 143 | REQUIRED_FREE_SPACE=1040000 |
duke@1 | 144 | endif |
duke@1 | 145 | # How much RAM does this machine have: |
duke@1 | 146 | MB_OF_MEMORY=$(shell /etc/prtconf | fgrep 'Memory size:' | expand | cut -d' ' -f3) |
duke@1 | 147 | endif |
duke@1 | 148 | |
duke@1 | 149 | # Platform settings specific to Linux |
duke@1 | 150 | ifeq ($(SYSTEM_UNAME), Linux) |
duke@1 | 151 | PLATFORM = linux |
duke@1 | 152 | OS_NAME = linux |
duke@1 | 153 | OS_VERSION := $(shell uname -r) |
duke@1 | 154 | # Arch and OS name/version |
duke@1 | 155 | mach := $(shell uname -m) |
duke@1 | 156 | archExpr = case "$(mach)" in \ |
duke@1 | 157 | i[3-9]86) \ |
duke@1 | 158 | echo i586 \ |
duke@1 | 159 | ;; \ |
duke@1 | 160 | ia64) \ |
duke@1 | 161 | echo ia64 \ |
duke@1 | 162 | ;; \ |
duke@1 | 163 | x86_64) \ |
duke@1 | 164 | echo amd64 \ |
duke@1 | 165 | ;; \ |
duke@1 | 166 | sparc*) \ |
duke@1 | 167 | echo sparc \ |
duke@1 | 168 | ;; \ |
gbenson@129 | 169 | arm*) \ |
gbenson@129 | 170 | echo arm \ |
gbenson@129 | 171 | ;; \ |
duke@1 | 172 | *) \ |
duke@1 | 173 | echo $(mach) \ |
duke@1 | 174 | ;; \ |
duke@1 | 175 | esac |
duke@1 | 176 | ARCH := $(shell $(archExpr) ) |
duke@1 | 177 | ARCH_FAMILY := $(ARCH) |
duke@1 | 178 | |
duke@1 | 179 | # Linux builds may be 32-bit or 64-bit data model. |
duke@1 | 180 | ifeq ($(ARCH), sparc) |
duke@1 | 181 | # Linux sparc build can be either 32-bit or 64-bit. |
duke@1 | 182 | # Default to 32, but allow explicit setting to 32 or 64. |
duke@1 | 183 | ifndef ARCH_DATA_MODEL |
duke@1 | 184 | ARCH_DATA_MODEL=32 |
duke@1 | 185 | endif |
duke@1 | 186 | ifeq ($(ARCH_DATA_MODEL), 32) |
duke@1 | 187 | ARCH=sparc |
duke@1 | 188 | else |
duke@1 | 189 | ARCH=sparcv9 |
duke@1 | 190 | endif |
duke@1 | 191 | else |
duke@1 | 192 | # i586 is 32-bit, amd64 is 64-bit |
duke@1 | 193 | ifndef ARCH_DATA_MODEL |
duke@1 | 194 | ifeq ($(ARCH), i586) |
duke@1 | 195 | ARCH_DATA_MODEL=32 |
duke@1 | 196 | else |
duke@1 | 197 | ARCH_DATA_MODEL=64 |
duke@1 | 198 | endif |
duke@1 | 199 | endif |
duke@1 | 200 | endif |
duke@1 | 201 | |
duke@1 | 202 | ifeq ($(ARCH), i586) |
ohair@194 | 203 | ARCHPROP = i386 |
duke@1 | 204 | else |
ohair@194 | 205 | ARCHPROP = $(ARCH) |
duke@1 | 206 | endif |
duke@1 | 207 | |
duke@1 | 208 | # Suffix for file bundles used in previous release |
duke@1 | 209 | BUNDLE_FILE_SUFFIX=.tar.gz |
michaelm@340 | 210 | # Minimum disk space needed as determined by running 'du -sk' on |
duke@1 | 211 | # a fully built workspace. |
duke@1 | 212 | REQUIRED_FREE_SPACE=1460000 |
duke@1 | 213 | LINUX_VERSION_INFO = /etc/redhat-release |
duke@1 | 214 | ifeq ($(ARCH_DATA_MODEL), 32) |
duke@1 | 215 | REQUIRED_LINUX_VER = Advanced Server |
duke@1 | 216 | REQUIRED_LINUX_FULLVER = Advanced Server release 2.1AS |
duke@1 | 217 | REQUIRED_OS_VERSION = 2.4.9-e.3 |
duke@1 | 218 | else |
duke@1 | 219 | ifeq ($(ARCH), amd64) |
duke@1 | 220 | LINUX_VERSION_INFO = /etc/SuSE-release |
duke@1 | 221 | REQUIRED_LINUX_VER = 8.1 |
duke@1 | 222 | REQUIRED_LINUX_FULLVER = $(REQUIRED_LINUX_VER) SLSE AMD64 |
duke@1 | 223 | REQUIRED_OS_VERSION = 2.4.19-SMP |
duke@1 | 224 | else |
duke@1 | 225 | REQUIRED_LINUX_VER = Advanced Server |
duke@1 | 226 | REQUIRED_LINUX_FULLVER = Advanced Server release 2.1AS 64 bit |
duke@1 | 227 | REQUIRED_OS_VERSION = 2.4.19-SMP |
duke@1 | 228 | endif |
duke@1 | 229 | endif |
duke@1 | 230 | # How much RAM does this machine have: |
duke@1 | 231 | MB_OF_MEMORY := $(shell free -m | fgrep Mem: | sed -e 's@\ \ *@ @g' | cut -d' ' -f2) |
duke@1 | 232 | endif |
duke@1 | 233 | |
michaelm@340 | 234 | ifeq ($(SYSTEM_UNAME), FreeBSD) |
michaelm@340 | 235 | PLATFORM = bsd |
michaelm@340 | 236 | OS_NAME = freebsd |
michaelm@340 | 237 | OS_VENDOR = FreeBSD |
michaelm@340 | 238 | REQUIRED_OS_VERSION = 6.0 |
michaelm@340 | 239 | endif |
michaelm@340 | 240 | |
michaelm@340 | 241 | ifeq ($(SYSTEM_UNAME), Darwin) |
michaelm@340 | 242 | PLATFORM = bsd |
michaelm@340 | 243 | OS_NAME = darwin |
michaelm@340 | 244 | OS_VENDOR = Apple |
michaelm@340 | 245 | REQUIRED_OS_VERSION = 8.0 |
michaelm@340 | 246 | endif |
michaelm@340 | 247 | |
michaelm@340 | 248 | ifeq ($(SYSTEM_UNAME), NetBSD) |
michaelm@340 | 249 | PLATFORM = bsd |
michaelm@340 | 250 | OS_NAME = netbsd |
michaelm@340 | 251 | OS_VENDOR = NetBSD |
michaelm@340 | 252 | REQUIRED_OS_VERSION = 3.0 |
michaelm@340 | 253 | endif |
michaelm@340 | 254 | |
michaelm@340 | 255 | ifeq ($(SYSTEM_UNAME), OpenBSD) |
michaelm@340 | 256 | PLATFORM = bsd |
michaelm@340 | 257 | OS_NAME = openbsd |
michaelm@340 | 258 | OS_VENDOR = OpenBSD |
michaelm@340 | 259 | REQUIRED_OS_VERSION = 4.9 |
michaelm@340 | 260 | endif |
michaelm@340 | 261 | |
michaelm@340 | 262 | # Platform settings specific to BSD |
michaelm@340 | 263 | ifeq ($(PLATFORM), bsd) |
michaelm@340 | 264 | OS_VERSION := $(shell uname -r) |
michaelm@340 | 265 | # Arch and OS name/version |
michaelm@340 | 266 | mach := $(shell uname -m) |
michaelm@340 | 267 | archExpr = case "$(mach)" in \ |
michaelm@340 | 268 | i[3-9]86) \ |
michaelm@340 | 269 | echo i586 \ |
michaelm@340 | 270 | ;; \ |
michaelm@340 | 271 | sparc64) \ |
michaelm@340 | 272 | echo sparcv9 \ |
michaelm@340 | 273 | ;; \ |
michaelm@340 | 274 | sparc*) \ |
michaelm@340 | 275 | echo sparc \ |
michaelm@340 | 276 | ;; \ |
michaelm@340 | 277 | x86_64) \ |
michaelm@340 | 278 | echo amd64 \ |
michaelm@340 | 279 | ;; \ |
michaelm@340 | 280 | "Power Macintosh") \ |
michaelm@340 | 281 | echo ppc \ |
michaelm@340 | 282 | ;; \ |
michaelm@340 | 283 | *) \ |
michaelm@340 | 284 | echo $(mach) \ |
michaelm@340 | 285 | ;; \ |
michaelm@340 | 286 | esac |
michaelm@340 | 287 | ARCH := $(shell $(archExpr) ) |
michaelm@340 | 288 | ARCH_FAMILY := $(ARCH) |
michaelm@340 | 289 | |
michaelm@340 | 290 | # Darwin x86 builds are i386/amd64 universal. |
michaelm@340 | 291 | ifeq ($(SYSTEM_UNAME), Darwin) |
michaelm@340 | 292 | ifneq ($(ARCH), ppc) |
michaelm@340 | 293 | ARCH=universal |
michaelm@340 | 294 | endif |
michaelm@340 | 295 | endif |
michaelm@340 | 296 | |
michaelm@340 | 297 | # i586, sparc, and ppc are 32 bit, amd64 and sparc64 are 64 |
michaelm@340 | 298 | ifneq (,$(findstring $(ARCH), i586 sparc ppc universal)) |
michaelm@340 | 299 | ARCH_DATA_MODEL=32 |
michaelm@340 | 300 | else |
michaelm@340 | 301 | ARCH_DATA_MODEL=64 |
michaelm@340 | 302 | endif |
michaelm@340 | 303 | |
michaelm@340 | 304 | ifeq ($(ARCH), i586) |
michaelm@340 | 305 | LIBARCH = i386 |
michaelm@340 | 306 | else |
michaelm@340 | 307 | LIBARCH = $(ARCH) |
michaelm@340 | 308 | endif |
michaelm@340 | 309 | |
michaelm@340 | 310 | # Value of Java os.arch property |
michaelm@340 | 311 | ARCHPROP = $(LIBARCH) |
michaelm@340 | 312 | |
michaelm@340 | 313 | # Suffix for file bundles used in previous release |
michaelm@340 | 314 | BUNDLE_FILE_SUFFIX=.tar.gz |
michaelm@340 | 315 | # Minimum disk space needed as determined by running 'du -sk' on |
michaelm@340 | 316 | # a fully built workspace. |
michaelm@340 | 317 | REQUIRED_FREE_SPACE=1500000 |
michaelm@340 | 318 | # How much RAM does this machine have: |
michaelm@340 | 319 | ifeq ($(OS_VENDOR), OpenBSD) |
michaelm@340 | 320 | MB_OF_MEMORY=$(shell sysctl -n hw.physmem | awk '{print int($$NF / 1048576); }' ) |
michaelm@340 | 321 | else |
michaelm@340 | 322 | MB_OF_MEMORY=$(shell (sysctl -n hw.physmem64 2> /dev/null || sysctl -n hw.physmem) | awk '{print int($$NF / 1048576); }' ) |
michaelm@340 | 323 | endif |
michaelm@340 | 324 | endif |
michaelm@340 | 325 | |
duke@1 | 326 | # Windows with and without CYGWIN will be slightly different |
duke@1 | 327 | ifeq ($(SYSTEM_UNAME), Windows_NT) |
duke@1 | 328 | PLATFORM = windows |
duke@1 | 329 | OS_VERSION := $(shell uname -r) |
duke@1 | 330 | WINDOWS_NT_VERSION_STRING=Windows_NT |
duke@1 | 331 | REQUIRED_MKS_VER=6.1 |
duke@1 | 332 | endif |
duke@1 | 333 | ifneq (,$(findstring CYGWIN,$(SYSTEM_UNAME))) |
duke@1 | 334 | PLATFORM = windows |
duke@1 | 335 | OS_VERSION := 5 |
duke@1 | 336 | USING_CYGWIN = true |
duke@1 | 337 | export USING_CYGWIN |
duke@1 | 338 | WINDOWS_NT_VERSION_STRING=CYGWIN_NT |
duke@1 | 339 | REQUIRED_CYGWIN_VER=4.0 |
duke@1 | 340 | endif |
duke@1 | 341 | |
duke@1 | 342 | # Platform settings specific to Windows |
duke@1 | 343 | ifeq ($(PLATFORM), windows) |
duke@1 | 344 | OS_NAME = nt |
duke@1 | 345 | REQUIRED_OS_VERSION=5 |
duke@1 | 346 | # Windows builds default to the appropriate for the underlaying |
duke@1 | 347 | # architecture. |
duke@1 | 348 | # Temporary disk area |
duke@1 | 349 | TEMP_DISK=C:/temp |
duke@1 | 350 | # GNU Make or MKS overrides $(PROCESSOR_ARCHITECTURE) to always |
duke@1 | 351 | # return "x86". Use the first word of $(PROCESSOR_IDENTIFIER) instead. |
ohair@76 | 352 | PROC_ARCH:=$(word 1, $(PROCESSOR_IDENTIFIER)) |
ohair@76 | 353 | PROC_ARCH:=$(subst x86,X86,$(PROC_ARCH)) |
ohair@76 | 354 | PROC_ARCH:=$(subst x64,X64,$(PROC_ARCH)) |
ohair@76 | 355 | PROC_ARCH:=$(subst intel64,X64,$(PROC_ARCH)) |
ohair@76 | 356 | PROC_ARCH:=$(subst Intel64,X64,$(PROC_ARCH)) |
ohair@76 | 357 | PROC_ARCH:=$(subst INTEL64,X64,$(PROC_ARCH)) |
ohair@76 | 358 | PROC_ARCH:=$(subst em64t,X64,$(PROC_ARCH)) |
ohair@76 | 359 | PROC_ARCH:=$(subst EM64T,X64,$(PROC_ARCH)) |
ohair@76 | 360 | PROC_ARCH:=$(subst amd64,X64,$(PROC_ARCH)) |
ohair@76 | 361 | PROC_ARCH:=$(subst AMD64,X64,$(PROC_ARCH)) |
ohair@76 | 362 | PROC_ARCH:=$(subst ia64,IA64,$(PROC_ARCH)) |
duke@1 | 363 | ifndef ARCH_DATA_MODEL |
ohair@76 | 364 | ifeq ($(PROC_ARCH),IA64) |
duke@1 | 365 | ARCH_DATA_MODEL=64 |
duke@1 | 366 | else |
ohair@76 | 367 | ifeq ($(PROC_ARCH),X64) |
duke@1 | 368 | ARCH_DATA_MODEL=64 |
duke@1 | 369 | else |
duke@1 | 370 | ARCH_DATA_MODEL=32 |
duke@1 | 371 | endif |
duke@1 | 372 | endif |
duke@1 | 373 | endif |
duke@1 | 374 | export ARCH_DATA_MODEL |
duke@1 | 375 | ARCH=i586 |
duke@1 | 376 | # Value of Java os.arch property |
duke@1 | 377 | ARCHPROP=x86 |
duke@1 | 378 | REQUIRED_WINDOWS_NAME=Windows Professional 2000 |
duke@1 | 379 | REQUIRED_WINDOWS_VERSION=5 0 Service Pack 4 |
duke@1 | 380 | ifeq ($(ARCH_DATA_MODEL), 64) |
duke@1 | 381 | # If the user wants to perform a cross compile build then they must |
duke@1 | 382 | # - set ARCH_DATA_MODEL=64 and either |
duke@1 | 383 | # + set ARCH to ia64 or amd64, or |
duke@1 | 384 | REQUIRED_WINDOWS_NAME=Windows Server 2003 |
duke@1 | 385 | REQUIRED_WINDOWS_VERSION=5 2 Service Pack 1 |
ohair@76 | 386 | ifeq ($(PROC_ARCH),X64) |
duke@1 | 387 | ARCH=amd64 |
duke@1 | 388 | else |
ohair@76 | 389 | ifeq ($(PROC_ARCH),IA64) |
ohair@76 | 390 | ARCH=ia64 |
ohair@76 | 391 | endif |
duke@1 | 392 | endif |
duke@1 | 393 | # Value of Java os.arch property |
ohair@194 | 394 | ARCHPROP=$(ARCH) |
duke@1 | 395 | endif |
duke@1 | 396 | ARCH_FAMILY = $(ARCH) |
duke@1 | 397 | # Where is unwanted output to be delivered? |
prr@150 | 398 | ifeq ($(USING_CYGWIN),true) |
prr@150 | 399 | DEV_NULL = /dev/null |
prr@150 | 400 | else |
prr@150 | 401 | DEV_NULL = NUL |
prr@150 | 402 | endif |
duke@1 | 403 | export DEV_NULL |
duke@1 | 404 | # Classpath separator |
duke@1 | 405 | CLASSPATH_SEPARATOR = ; |
duke@1 | 406 | # User name determination (set _USER) |
duke@1 | 407 | ifndef USER |
duke@1 | 408 | ifdef USERNAME |
duke@1 | 409 | _USER := $(USERNAME) |
duke@1 | 410 | else |
duke@1 | 411 | ifdef LOGNAME |
duke@1 | 412 | _USER := $(LOGNAME) |
duke@1 | 413 | else |
duke@1 | 414 | _USER := $(shell id -un) |
duke@1 | 415 | endif |
duke@1 | 416 | endif |
duke@1 | 417 | else |
duke@1 | 418 | _USER:=$(USER) |
duke@1 | 419 | endif |
duke@1 | 420 | # Suffix for file bundles used in previous release |
duke@1 | 421 | BUNDLE_FILE_SUFFIX=.tar |
michaelm@340 | 422 | # Minimum disk space needed as determined by running 'du -sk' on |
duke@1 | 423 | # a fully built workspace. |
duke@1 | 424 | REQUIRED_FREE_SPACE=500000 |
duke@1 | 425 | # How much RAM does this machine have: |
ohair@114 | 426 | ifndef MB_OF_MEMORY |
ohair@114 | 427 | MB_OF_MEMORY := $(shell \ |
ohair@114 | 428 | if [ -f "C:/cygwin/bin/free.exe" ] ; then \ |
ohair@114 | 429 | ( C:/cygwin/bin/bash.exe -c "C:/cygwin/bin/free.exe -m" ) | \ |
michaelm@340 | 430 | grep Mem: | \ |
michaelm@340 | 431 | sed -e 's@\ \ *@ @g' | cut -d' ' -f2 ; \ |
ohair@114 | 432 | else \ |
ohair@114 | 433 | echo "512"; \ |
ohair@114 | 434 | fi) |
ohair@114 | 435 | export MB_OF_MEMORY |
ohair@114 | 436 | endif |
duke@1 | 437 | endif |
duke@1 | 438 | |
duke@1 | 439 | # Machines with 512Mb or less of real memory are considered low memory |
duke@1 | 440 | # build machines and adjustments will be made to prevent excessing |
duke@1 | 441 | # system swapping during the build. |
duke@1 | 442 | # If we don't know, assume 512. Subtract 128 from MB for VM MAX. |
duke@1 | 443 | # Don't set VM max over 1024-128=896. |
ohair@114 | 444 | ifndef MAX_VM_MEMORY |
ohair@114 | 445 | ifneq ($(MB_OF_MEMORY),) |
ohair@114 | 446 | LOW_MEMORY_MACHINE := $(shell \ |
ohair@114 | 447 | if [ $(MB_OF_MEMORY) -le 512 ] ; then \ |
ohair@114 | 448 | echo "true"; \ |
ohair@114 | 449 | else \ |
ohair@114 | 450 | echo "false"; \ |
ohair@114 | 451 | fi) |
ohair@114 | 452 | MAX_VM_MEMORY := $(shell \ |
ohair@114 | 453 | if [ $(MB_OF_MEMORY) -le 1024 ] ; then \ |
ohair@114 | 454 | expr $(MB_OF_MEMORY) '-' 128 ; \ |
ohair@114 | 455 | else \ |
ohair@114 | 456 | echo "896"; \ |
ohair@114 | 457 | fi) |
ohair@114 | 458 | MIN_VM_MEMORY := $(shell \ |
ohair@114 | 459 | if [ $(MAX_VM_MEMORY) -le 128 ] ; then \ |
ohair@114 | 460 | expr $(MAX_VM_MEMORY) '-' 8 ; \ |
ohair@114 | 461 | else \ |
ohair@114 | 462 | echo "128"; \ |
ohair@114 | 463 | fi) |
ohair@114 | 464 | else |
ohair@114 | 465 | MB_OF_MEMORY := unknown |
ohair@114 | 466 | LOW_MEMORY_MACHINE := true |
ohair@114 | 467 | MAX_VM_MEMORY := 384 |
ohair@114 | 468 | MIN_VM_MEMORY := 128 |
ohair@114 | 469 | endif |
ohair@114 | 470 | export MAX_VM_MEMORY |
ohair@114 | 471 | export MIN_VM_MEMORY |
ohair@114 | 472 | export LOW_MEMORY_MACHINE |
ohair@114 | 473 | export MAX_VM_MEMORY |
duke@1 | 474 | endif |
duke@1 | 475 | |
duke@1 | 476 | REQUIRED_ZIP_VER = 2.2 |
duke@1 | 477 | REQUIRED_UNZIP_VER = 5.12 |
ohair@225 | 478 | REQUIRED_MAKE_VER = 3.81 |
duke@1 | 479 | |
duke@1 | 480 | # Unix type settings (same for all unix platforms) |
duke@1 | 481 | ifneq ($(PLATFORM), windows) |
duke@1 | 482 | # Temporary disk area |
duke@1 | 483 | TEMP_DISK=/tmp |
duke@1 | 484 | # Where is unwanted output to be delivered? |
duke@1 | 485 | DEV_NULL = /dev/null |
duke@1 | 486 | export DEV_NULL |
michaelm@340 | 487 | # Character used between entries in classpath |
duke@1 | 488 | CLASSPATH_SEPARATOR = : |
duke@1 | 489 | # User name determination (set _USER) |
duke@1 | 490 | ifndef USER |
duke@1 | 491 | ifdef LOGNAME |
duke@1 | 492 | _USER := $(LOGNAME) |
duke@1 | 493 | else |
duke@1 | 494 | _USER := $(shell logname) |
duke@1 | 495 | endif |
duke@1 | 496 | else |
duke@1 | 497 | _USER:=$(USER) |
duke@1 | 498 | endif |
duke@1 | 499 | endif |
duke@1 | 500 | |
duke@1 | 501 | # If blanks in the username, use the first 4 words and pack them together |
duke@1 | 502 | _USER1:=$(subst ', ,$(_USER)) |
duke@1 | 503 | _USER2:=$(subst ", ,$(_USER1)) |
duke@1 | 504 | USER:=$(word 1,$(_USER2))$(word 2,$(_USER2))$(word 3,$(_USER2))$(word 4,$(_USER2)) |
duke@1 | 505 | export USER |
duke@1 | 506 | |
duke@1 | 507 | export PLATFORM |
duke@1 | 508 | endif |
duke@1 | 509 |