make/common/shared/Platform.gmk

changeset 340
f7718662741d
parent 225
39e071e5adaf
child 354
c6c0b1047985
equal deleted inserted replaced
337:2082eb35d49a 340:f7718662741d
60 # ARCHPROP sparc or x86 60 # ARCHPROP sparc or x86
61 # DEV_NULL destination of /dev/null, NUL or /dev/NULL 61 # DEV_NULL destination of /dev/null, NUL or /dev/NULL
62 # CLASSPATH_SEPARATOR separator in classpath, ; or : 62 # CLASSPATH_SEPARATOR separator in classpath, ; or :
63 # BUNDLE_FILE_SUFFIX suffix for bundles: .tar or .tar.gz 63 # BUNDLE_FILE_SUFFIX suffix for bundles: .tar or .tar.gz
64 # ISA_DIR solaris only: /sparcv9 or /amd64 64 # ISA_DIR solaris only: /sparcv9 or /amd64
65 # REQUIRED_WINDOWS_NAME windows only: basic name of windows 65 # REQUIRED_WINDOWS_NAME windows only: basic name of windows
66 # REQUIRED_WINDOWS_VERSION windows only: specific version of windows 66 # REQUIRED_WINDOWS_VERSION windows only: specific version of windows
67 # USING_CYGWIN windows only: true or false 67 # USING_CYGWIN windows only: true or false
68 # WINDOWS_NT_VERSION_STRING windows only: long version name 68 # WINDOWS_NT_VERSION_STRING windows only: long version name
69 # REQUIRED_OS_VERSION required OS version, e.g. 5.10, 2.4 69 # REQUIRED_OS_VERSION required OS version, e.g. 5.10, 2.4
70 # REQUIRED_FREE_SPACE minimum disk space needed for outputdir 70 # REQUIRED_FREE_SPACE minimum disk space needed for outputdir
71 # REQUIRED_ZIP_VER required version of zip 71 # REQUIRED_ZIP_VER required version of zip
133 endif 133 endif
134 # Suffix for file bundles used in previous release 134 # Suffix for file bundles used in previous release
135 BUNDLE_FILE_SUFFIX=.tar 135 BUNDLE_FILE_SUFFIX=.tar
136 # Required Solaris version 136 # Required Solaris version
137 REQUIRED_OS_VERSION = 5.10 137 REQUIRED_OS_VERSION = 5.10
138 # Minimum disk space needed as determined by running 'du -sk' on 138 # Minimum disk space needed as determined by running 'du -sk' on
139 # a fully built workspace. 139 # a fully built workspace.
140 ifeq ($(ARCH_FAMILY), sparc) 140 ifeq ($(ARCH_FAMILY), sparc)
141 REQUIRED_FREE_SPACE=1300000 141 REQUIRED_FREE_SPACE=1300000
142 else 142 else
143 REQUIRED_FREE_SPACE=1040000 143 REQUIRED_FREE_SPACE=1040000
205 ARCHPROP = $(ARCH) 205 ARCHPROP = $(ARCH)
206 endif 206 endif
207 207
208 # Suffix for file bundles used in previous release 208 # Suffix for file bundles used in previous release
209 BUNDLE_FILE_SUFFIX=.tar.gz 209 BUNDLE_FILE_SUFFIX=.tar.gz
210 # Minimum disk space needed as determined by running 'du -sk' on 210 # Minimum disk space needed as determined by running 'du -sk' on
211 # a fully built workspace. 211 # a fully built workspace.
212 REQUIRED_FREE_SPACE=1460000 212 REQUIRED_FREE_SPACE=1460000
213 LINUX_VERSION_INFO = /etc/redhat-release 213 LINUX_VERSION_INFO = /etc/redhat-release
214 ifeq ($(ARCH_DATA_MODEL), 32) 214 ifeq ($(ARCH_DATA_MODEL), 32)
215 REQUIRED_LINUX_VER = Advanced Server 215 REQUIRED_LINUX_VER = Advanced Server
227 REQUIRED_OS_VERSION = 2.4.19-SMP 227 REQUIRED_OS_VERSION = 2.4.19-SMP
228 endif 228 endif
229 endif 229 endif
230 # How much RAM does this machine have: 230 # How much RAM does this machine have:
231 MB_OF_MEMORY := $(shell free -m | fgrep Mem: | sed -e 's@\ \ *@ @g' | cut -d' ' -f2) 231 MB_OF_MEMORY := $(shell free -m | fgrep Mem: | sed -e 's@\ \ *@ @g' | cut -d' ' -f2)
232 endif
233
234 ifeq ($(SYSTEM_UNAME), FreeBSD)
235 PLATFORM = bsd
236 OS_NAME = freebsd
237 OS_VENDOR = FreeBSD
238 REQUIRED_OS_VERSION = 6.0
239 endif
240
241 ifeq ($(SYSTEM_UNAME), Darwin)
242 PLATFORM = bsd
243 OS_NAME = darwin
244 OS_VENDOR = Apple
245 REQUIRED_OS_VERSION = 8.0
246 endif
247
248 ifeq ($(SYSTEM_UNAME), NetBSD)
249 PLATFORM = bsd
250 OS_NAME = netbsd
251 OS_VENDOR = NetBSD
252 REQUIRED_OS_VERSION = 3.0
253 endif
254
255 ifeq ($(SYSTEM_UNAME), OpenBSD)
256 PLATFORM = bsd
257 OS_NAME = openbsd
258 OS_VENDOR = OpenBSD
259 REQUIRED_OS_VERSION = 4.9
260 endif
261
262 # Platform settings specific to BSD
263 ifeq ($(PLATFORM), bsd)
264 OS_VERSION := $(shell uname -r)
265 # Arch and OS name/version
266 mach := $(shell uname -m)
267 archExpr = case "$(mach)" in \
268 i[3-9]86) \
269 echo i586 \
270 ;; \
271 sparc64) \
272 echo sparcv9 \
273 ;; \
274 sparc*) \
275 echo sparc \
276 ;; \
277 x86_64) \
278 echo amd64 \
279 ;; \
280 "Power Macintosh") \
281 echo ppc \
282 ;; \
283 *) \
284 echo $(mach) \
285 ;; \
286 esac
287 ARCH := $(shell $(archExpr) )
288 ARCH_FAMILY := $(ARCH)
289
290 # Darwin x86 builds are i386/amd64 universal.
291 ifeq ($(SYSTEM_UNAME), Darwin)
292 ifneq ($(ARCH), ppc)
293 ARCH=universal
294 endif
295 endif
296
297 # i586, sparc, and ppc are 32 bit, amd64 and sparc64 are 64
298 ifneq (,$(findstring $(ARCH), i586 sparc ppc universal))
299 ARCH_DATA_MODEL=32
300 else
301 ARCH_DATA_MODEL=64
302 endif
303
304 ifeq ($(ARCH), i586)
305 LIBARCH = i386
306 else
307 LIBARCH = $(ARCH)
308 endif
309
310 # Value of Java os.arch property
311 ARCHPROP = $(LIBARCH)
312
313 # Suffix for file bundles used in previous release
314 BUNDLE_FILE_SUFFIX=.tar.gz
315 # Minimum disk space needed as determined by running 'du -sk' on
316 # a fully built workspace.
317 REQUIRED_FREE_SPACE=1500000
318 # How much RAM does this machine have:
319 ifeq ($(OS_VENDOR), OpenBSD)
320 MB_OF_MEMORY=$(shell sysctl -n hw.physmem | awk '{print int($$NF / 1048576); }' )
321 else
322 MB_OF_MEMORY=$(shell (sysctl -n hw.physmem64 2> /dev/null || sysctl -n hw.physmem) | awk '{print int($$NF / 1048576); }' )
323 endif
232 endif 324 endif
233 325
234 # Windows with and without CYGWIN will be slightly different 326 # Windows with and without CYGWIN will be slightly different
235 ifeq ($(SYSTEM_UNAME), Windows_NT) 327 ifeq ($(SYSTEM_UNAME), Windows_NT)
236 PLATFORM = windows 328 PLATFORM = windows
325 else 417 else
326 _USER:=$(USER) 418 _USER:=$(USER)
327 endif 419 endif
328 # Suffix for file bundles used in previous release 420 # Suffix for file bundles used in previous release
329 BUNDLE_FILE_SUFFIX=.tar 421 BUNDLE_FILE_SUFFIX=.tar
330 # Minimum disk space needed as determined by running 'du -sk' on 422 # Minimum disk space needed as determined by running 'du -sk' on
331 # a fully built workspace. 423 # a fully built workspace.
332 REQUIRED_FREE_SPACE=500000 424 REQUIRED_FREE_SPACE=500000
333 # How much RAM does this machine have: 425 # How much RAM does this machine have:
334 ifndef MB_OF_MEMORY 426 ifndef MB_OF_MEMORY
335 MB_OF_MEMORY := $(shell \ 427 MB_OF_MEMORY := $(shell \
336 if [ -f "C:/cygwin/bin/free.exe" ] ; then \ 428 if [ -f "C:/cygwin/bin/free.exe" ] ; then \
337 ( C:/cygwin/bin/bash.exe -c "C:/cygwin/bin/free.exe -m" ) | \ 429 ( C:/cygwin/bin/bash.exe -c "C:/cygwin/bin/free.exe -m" ) | \
338 grep Mem: | \ 430 grep Mem: | \
339 sed -e 's@\ \ *@ @g' | cut -d' ' -f2 ; \ 431 sed -e 's@\ \ *@ @g' | cut -d' ' -f2 ; \
340 else \ 432 else \
341 echo "512"; \ 433 echo "512"; \
342 fi) 434 fi)
343 export MB_OF_MEMORY 435 export MB_OF_MEMORY
344 endif 436 endif
390 # Temporary disk area 482 # Temporary disk area
391 TEMP_DISK=/tmp 483 TEMP_DISK=/tmp
392 # Where is unwanted output to be delivered? 484 # Where is unwanted output to be delivered?
393 DEV_NULL = /dev/null 485 DEV_NULL = /dev/null
394 export DEV_NULL 486 export DEV_NULL
395 # Character used between entries in classpath 487 # Character used between entries in classpath
396 CLASSPATH_SEPARATOR = : 488 CLASSPATH_SEPARATOR = :
397 # User name determination (set _USER) 489 # User name determination (set _USER)
398 ifndef USER 490 ifndef USER
399 ifdef LOGNAME 491 ifdef LOGNAME
400 _USER := $(LOGNAME) 492 _USER := $(LOGNAME)

mercurial