corba/make/common/shared/Compiler-msvc.gmk
changeset 1347 1b32e0d45be0
parent 4 02bb8761fcce
child 1642 fc350fcb122a
--- a/corba/make/common/shared/Compiler-msvc.gmk	Wed Jul 05 16:42:03 2017 +0200
+++ b/corba/make/common/shared/Compiler-msvc.gmk	Wed Oct 15 21:24:26 2008 -0700
@@ -47,24 +47,17 @@
   # unset any GNU Make settings of MFLAGS and MAKEFLAGS which may mess up nmake
   NMAKE          = MFLAGS= MAKEFLAGS= $(COMPILER_PATH)nmake -nologo
 
+  # Compiler version and type (Always get word after "Version")
+  CC_VER  := $(shell $(CC) 2>&1 | $(HEAD) -n 1 | $(SED) 's/.*\(Version.*\)/\1/' | $(NAWK) '{print $$2}')
+  
   # SDK-64 and MSVC6 put REBASE.EXE in a different places - go figure...
   ifeq ($(ARCH_DATA_MODEL), 32)
-    CC_VER  := $(shell $(CC) 2>&1 | $(HEAD) -n 1 | $(NAWK) '{print $$8}')
     LINK_VER := $(shell $(LINK) | $(HEAD) -n 1 | $(NAWK) '{print $$6}')
-    CC_TYPE := $(shell $(CC) 2>&1 | $(HEAD) -n 1 | $(NAWK) '{print $$5}')
     CC_MAJORVER :=$(call MajorVersion,$(CC_VER))
-    REQUIRED_CCTYPE = Optimizing
-    REQUIRED_CC_VER = 13.10.3077
-    REQUIRED_LINK_VER = 7.10.3077
-    ifeq ($(CC_MAJORVER), 12)
-      # This should be: CC_VER=12.00.8168 LINK_VER=6.00.8447
-      COMPILER_NAME=Visual C++ 6.0 Professional + VC6-SP 3
-      COMPILER_VERSION=VC6
-      REBASE     = $(COMPILER_PATH)rebase
-      MTL        = $(COMPILER_PATH)midl
-    endif
     ifeq ($(CC_MAJORVER), 13)
       # This should be: CC_VER=13.10.3077 LINK_VER=7.10.3077
+      REQUIRED_CC_VER = 13.10.3077
+      REQUIRED_LINK_VER = 7.10.3077
       COMPILER_NAME=Visual Studio .NET 2003 Professional C++
       COMPILER_VERSION=VS2003
       REBASE     = $(COMPILER_PATH)../../Common7/Tools/Bin/rebase
@@ -74,9 +67,10 @@
       endif
     endif
     ifeq ($(CC_MAJORVER), 14)
-      # This should be: CC_VER=14.00.0000 LINK_VER=8.00.0000
-      # NOTE: This compiler has not been tried yet on 32bit systems
-      COMPILER_NAME=Visual Studio .NET 2005
+      # This should be: CC_VER=14.00.50727.42 LINK_VER=8.00.50727.42
+      REQUIRED_CC_VER = 14.00.50727.42
+      REQUIRED_LINK_VER = 8.00.50727.42
+      COMPILER_NAME=Visual Studio 8
       COMPILER_VERSION=VS2005
       REBASE     = $(COMPILER_PATH)../../Common8/Tools/Bin/rebase
       MTL        = $(COMPILER_PATH)../../Common8/Tools/Bin/midl
@@ -84,10 +78,22 @@
 	COMPILER_PATH := $(error COMPILER_PATH cannot be empty here)
       endif
     endif
+    ifeq ($(CC_MAJORVER), 15)
+      # This should be: CC_VER=15.00.21022.08 LINK_VER=9.00.21022.08
+      REQUIRED_CC_VER = 15.00.21022.08
+      REQUIRED_LINK_VER = 9.00.21022.08
+      COMPILER_NAME=Visual Studio 9
+      COMPILER_VERSION=VS2008
+      #rebase and midl moved out of Visual Studio into the SDK:
+      REBASE     = $(MSDEVTOOLS_PATH)/rebase
+      MTL        = $(MSDEVTOOLS_PATH)/midl.exe
+      ifndef COMPILER_PATH
+	COMPILER_PATH := $(error COMPILER_PATH cannot be empty here)
+      endif
+    endif
   else
-    CC_VER := $(shell $(CC) 2>&1 | $(HEAD) -n 1 | $(NAWK) '{print $$7}')
+    # else ARCH_DATA_MODEL is 64
     LINK_VER := $(shell $(LINK) | $(HEAD) -n 1 | $(NAWK) '{print $$6}')
-    CC_TYPE := $(shell $(CC) 2>&1 | $(HEAD) -n 1 | $(NAWK) '{print $$4}')
     CC_MAJORVER :=$(call MajorVersion,$(CC_VER))
     CC_MINORVER :=$(call MinorVersion,$(CC_VER))
     CC_MICROVER :=$(call MicroVersion,$(CC_VER))