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