68 # BUNDLE_FILE_SUFFIX suffix for bundles: .tar or .tar.gz |
68 # BUNDLE_FILE_SUFFIX suffix for bundles: .tar or .tar.gz |
69 # ISA_DIR solaris only: /sparcv9 or /amd64 |
69 # ISA_DIR solaris only: /sparcv9 or /amd64 |
70 # LIBARCH32 solaris only: sparc or i386 |
70 # LIBARCH32 solaris only: sparc or i386 |
71 # LIBARCH64 solaris only: sparcv9 or amd64 |
71 # LIBARCH64 solaris only: sparcv9 or amd64 |
72 # USING_CYGWIN windows only: true or false |
72 # USING_CYGWIN windows only: true or false |
|
73 # USING_MSYS windows only: true or false |
|
74 # USING_MKS windows only: true or false |
73 # ISHIELD_TEMP_MIN windows only: minimum disk space in temp area |
75 # ISHIELD_TEMP_MIN windows only: minimum disk space in temp area |
74 |
76 |
75 # Only run uname once in this make session. |
77 # Only run uname once in this make session. |
76 ifndef SYSTEM_UNAME |
78 ifndef SYSTEM_UNAME |
77 SYSTEM_UNAME := $(shell uname) |
79 SYSTEM_UNAME := $(shell uname) |
315 # Only run "cygpath /" once in this make session. |
319 # Only run "cygpath /" once in this make session. |
316 ifndef CYGWIN_HOME |
320 ifndef CYGWIN_HOME |
317 CYGWIN_HOME := $(shell $(CYGPATH_CMD) /) |
321 CYGWIN_HOME := $(shell $(CYGPATH_CMD) /) |
318 export CYGWIN_HOME |
322 export CYGWIN_HOME |
319 endif |
323 endif |
|
324 endif |
|
325 ifneq (,$(findstring MINGW,$(SYSTEM_UNAME))) |
|
326 PLATFORM = windows |
|
327 USING_MSYS = true |
|
328 export USING_MSYS |
320 endif |
329 endif |
321 |
330 |
322 # Platform settings specific to Windows |
331 # Platform settings specific to Windows |
323 ifeq ($(PLATFORM), windows) |
332 ifeq ($(PLATFORM), windows) |
324 # Windows builds default to the appropriate for the underlaying |
333 # Windows builds default to the appropriate for the underlaying |
393 # Value of Java os.arch property |
402 # Value of Java os.arch property |
394 ARCHPROP=x86 |
403 ARCHPROP=x86 |
395 endif |
404 endif |
396 ARCH_FAMILY = $(ARCH) |
405 ARCH_FAMILY = $(ARCH) |
397 # Where is unwanted output to be delivered? |
406 # Where is unwanted output to be delivered? |
398 # MKS uses the special file "NUL", cygwin uses the customary unix file. |
407 # MKS uses the special file "NUL"; Cygwin and MinGW/MSYS use the |
399 ifeq ($(USING_CYGWIN),true) |
408 # customary unix file. |
|
409 ifeq ($(USING_MKS),true) |
|
410 DEV_NULL = NUL |
|
411 else |
400 DEV_NULL = /dev/null |
412 DEV_NULL = /dev/null |
401 else |
|
402 DEV_NULL = NUL |
|
403 endif |
413 endif |
404 export DEV_NULL |
414 export DEV_NULL |
405 # Classpath separator |
415 # Classpath separator |
406 CLASSPATH_SEPARATOR = ; |
416 CLASSPATH_SEPARATOR = ; |
407 # The suffix used for object file (.o for unix .obj for windows) |
417 # The suffix used for object file (.o for unix .obj for windows) |
438 ifeq ($(USING_CYGWIN),true) |
448 ifeq ($(USING_CYGWIN),true) |
439 # CYGWIN has the 'free' utility |
449 # CYGWIN has the 'free' utility |
440 _MB_OF_MEMORY := \ |
450 _MB_OF_MEMORY := \ |
441 $(shell free -m | grep Mem: | awk '{print $$2;}' ) |
451 $(shell free -m | grep Mem: | awk '{print $$2;}' ) |
442 else |
452 else |
443 # Windows 2000 has the mem utility, but two memory areas |
453 # Windows XP and higher has the systeminfo utility |
444 # extended memory is what is beyond 1024M |
454 _MB_OF_MEMORY := \ |
445 _B_OF_EXT_MEMORY := \ |
455 $(shell systeminfo 2> $(DEV_NULL) | \ |
446 $(shell mem 2> $(DEV_NULL) | \ |
456 grep 'Total Physical Memory:' | \ |
447 grep 'total contiguous extended memory' | awk '{print $$1;}') |
457 awk '{print $$4;}' | sed -e 's@,@@') |
448 ifeq ($(_B_OF_EXT_MEMORY),) |
|
449 _B_OF_MEMORY := \ |
|
450 $(shell mem 2> $(DEV_NULL) | \ |
|
451 grep 'total conventional memory' | awk '{print $$1;}') |
|
452 else |
|
453 _B_OF_MEMORY := \ |
|
454 $(shell expr 1048576 '+' $(_B_OF_EXT_MEMORY) 2> $(DEV_NULL)) |
|
455 endif |
|
456 ifeq ($(_B_OF_MEMORY),) |
|
457 # Windows 2003 has the systeminfo utility use it if mem doesn't work |
|
458 _MB_OF_MEMORY := \ |
|
459 $(shell systeminfo 2> $(DEV_NULL) | \ |
|
460 grep 'Total Physical Memory:' | \ |
|
461 awk '{print $$4;}' | sed -e 's@,@@') |
|
462 else |
|
463 _MB_OF_MEMORY := $(shell expr $(_B_OF_MEMORY) '/' 1024 2> $(DEV_NULL)) |
|
464 endif |
|
465 endif |
458 endif |
466 ifeq ($(shell expr $(_MB_OF_MEMORY) '+' 0 2> $(DEV_NULL)), $(_MB_OF_MEMORY)) |
459 ifeq ($(shell expr $(_MB_OF_MEMORY) '+' 0 2> $(DEV_NULL)), $(_MB_OF_MEMORY)) |
467 MB_OF_MEMORY := $(_MB_OF_MEMORY) |
460 MB_OF_MEMORY := $(_MB_OF_MEMORY) |
468 else |
461 else |
469 MB_OF_MEMORY := 512 |
462 MB_OF_MEMORY := 512 |