1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/make/common/shared/Compiler-msvc.gmk Sat Dec 01 00:00:00 2007 +0000 1.3 @@ -0,0 +1,138 @@ 1.4 +# 1.5 +# Copyright 2005-2006 Sun Microsystems, Inc. All Rights Reserved. 1.6 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.7 +# 1.8 +# This code is free software; you can redistribute it and/or modify it 1.9 +# under the terms of the GNU General Public License version 2 only, as 1.10 +# published by the Free Software Foundation. Sun designates this 1.11 +# particular file as subject to the "Classpath" exception as provided 1.12 +# by Sun in the LICENSE file that accompanied this code. 1.13 +# 1.14 +# This code is distributed in the hope that it will be useful, but WITHOUT 1.15 +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 1.16 +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1.17 +# version 2 for more details (a copy is included in the LICENSE file that 1.18 +# accompanied this code). 1.19 +# 1.20 +# You should have received a copy of the GNU General Public License version 1.21 +# 2 along with this work; if not, write to the Free Software Foundation, 1.22 +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1.23 +# 1.24 +# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 1.25 +# CA 95054 USA or visit www.sun.com if you need additional information or 1.26 +# have any questions. 1.27 +# 1.28 + 1.29 +# 1.30 +# MSVC Compiler settings 1.31 +# 1.32 + 1.33 +ifeq ($(PLATFORM), windows) 1.34 + CC = $(COMPILER_PATH)cl 1.35 + CPP = $(COMPILER_PATH)cl 1.36 + CXX = $(COMPILER_PATH)cl 1.37 + CCC = $(COMPILER_PATH)cl 1.38 + LIBEXE = $(COMPILER_PATH)lib 1.39 + LINK = $(COMPILER_PATH)link 1.40 + RC = $(MSDEVTOOLS_PATH)rc 1.41 + LINK32 = $(LINK) 1.42 + RSC = $(RC) 1.43 + 1.44 + # Fill in unknown values 1.45 + COMPILER_NAME=Unknown MSVC Compiler 1.46 + COMPILER_VERSION= 1.47 + REQUIRED_CC_VER= 1.48 + REQUIRED_LINK_VER= 1.49 + 1.50 + # unset any GNU Make settings of MFLAGS and MAKEFLAGS which may mess up nmake 1.51 + NMAKE = MFLAGS= MAKEFLAGS= $(COMPILER_PATH)nmake -nologo 1.52 + 1.53 + # SDK-64 and MSVC6 put REBASE.EXE in a different places - go figure... 1.54 + ifeq ($(ARCH_DATA_MODEL), 32) 1.55 + CC_VER := $(shell $(CC) 2>&1 | $(HEAD) -n 1 | $(NAWK) '{print $$8}') 1.56 + LINK_VER := $(shell $(LINK) | $(HEAD) -n 1 | $(NAWK) '{print $$6}') 1.57 + CC_TYPE := $(shell $(CC) 2>&1 | $(HEAD) -n 1 | $(NAWK) '{print $$5}') 1.58 + CC_MAJORVER :=$(call MajorVersion,$(CC_VER)) 1.59 + REQUIRED_CCTYPE = Optimizing 1.60 + REQUIRED_CC_VER = 13.10.3077 1.61 + REQUIRED_LINK_VER = 7.10.3077 1.62 + ifeq ($(CC_MAJORVER), 12) 1.63 + # This should be: CC_VER=12.00.8168 LINK_VER=6.00.8447 1.64 + COMPILER_NAME=Visual C++ 6.0 Professional + VC6-SP 3 1.65 + COMPILER_VERSION=VC6 1.66 + REBASE = $(COMPILER_PATH)rebase 1.67 + MTL = $(COMPILER_PATH)midl 1.68 + endif 1.69 + ifeq ($(CC_MAJORVER), 13) 1.70 + # This should be: CC_VER=13.10.3077 LINK_VER=7.10.3077 1.71 + COMPILER_NAME=Visual Studio .NET 2003 Professional C++ 1.72 + COMPILER_VERSION=VS2003 1.73 + REBASE = $(COMPILER_PATH)../../Common7/Tools/Bin/rebase 1.74 + MTL = $(COMPILER_PATH)../../Common7/Tools/Bin/midl 1.75 + ifndef COMPILER_PATH 1.76 + COMPILER_PATH := $(error COMPILER_PATH cannot be empty here) 1.77 + endif 1.78 + endif 1.79 + ifeq ($(CC_MAJORVER), 14) 1.80 + # This should be: CC_VER=14.00.0000 LINK_VER=8.00.0000 1.81 + # NOTE: This compiler has not been tried yet on 32bit systems 1.82 + COMPILER_NAME=Visual Studio .NET 2005 1.83 + COMPILER_VERSION=VS2005 1.84 + REBASE = $(COMPILER_PATH)../../Common8/Tools/Bin/rebase 1.85 + MTL = $(COMPILER_PATH)../../Common8/Tools/Bin/midl 1.86 + ifndef COMPILER_PATH 1.87 + COMPILER_PATH := $(error COMPILER_PATH cannot be empty here) 1.88 + endif 1.89 + endif 1.90 + else 1.91 + CC_VER := $(shell $(CC) 2>&1 | $(HEAD) -n 1 | $(NAWK) '{print $$7}') 1.92 + LINK_VER := $(shell $(LINK) | $(HEAD) -n 1 | $(NAWK) '{print $$6}') 1.93 + CC_TYPE := $(shell $(CC) 2>&1 | $(HEAD) -n 1 | $(NAWK) '{print $$4}') 1.94 + CC_MAJORVER :=$(call MajorVersion,$(CC_VER)) 1.95 + CC_MINORVER :=$(call MinorVersion,$(CC_VER)) 1.96 + CC_MICROVER :=$(call MicroVersion,$(CC_VER)) 1.97 + ifeq ($(ARCH), ia64) 1.98 + REQUIRED_CC_VER = 13.00.9337.7 1.99 + REQUIRED_LINK_VER = 7.00.9337.7 1.100 + endif 1.101 + ifeq ($(ARCH), amd64) 1.102 + REQUIRED_CC_VER = 14.00.40310.41 1.103 + REQUIRED_LINK_VER = 8.00.40310.39 1.104 + endif 1.105 + ifeq ($(CC_MAJORVER), 13) 1.106 + ifeq ($(ARCH), ia64) 1.107 + # This should be: CC_VER=13.00.9337.7 LINK_VER=7.00.9337.7 1.108 + COMPILER_NAME=Microsoft Platform SDK - November 2001 Edition 1.109 + COMPILER_VERSION=VS2003 1.110 + endif 1.111 + endif 1.112 + ifeq ($(CC_MAJORVER), 14) 1.113 + ifeq ($(ARCH), amd64) 1.114 + ifeq ($(CC_MICROVER), 30701) 1.115 + # This should be: CC_VER=14.00.30701 LINK_VER=8.00.30701 1.116 + # WARNING: it says 14, but it is such an early build it doesn't 1.117 + # have all the VS2005 compiler option changes, so treat 1.118 + # this like a VS2003 compiler. 1.119 + COMPILER_NAME=Microsoft Platform SDK - February 2003 Edition 1.120 + COMPILER_VERSION=VS2003 1.121 + else 1.122 + # This should be: CC_VER=14.00.40310.41 LINK_VER=8.00.40310.39 1.123 + COMPILER_NAME=Microsoft Platform SDK - April 2005 Edition (3790.1830) 1.124 + COMPILER_VERSION=VS2005 1.125 + endif 1.126 + endif 1.127 + endif 1.128 + # This will cause problems if ALT_COMPILER_PATH is defined to "" 1.129 + # which is a directive to use the PATH. 1.130 + REBASE = $(COMPILER_PATH)../REBASE 1.131 + ifndef COMPILER_PATH 1.132 + COMPILER_PATH := $(error COMPILER_PATH cannot be empty here) 1.133 + endif 1.134 + endif 1.135 + ifndef COMPILER_VERSION 1.136 + COMPILER_VERSION := $(error COMPILER_VERSION cannot be empty here) 1.137 + endif 1.138 + # Shared library generation flag 1.139 + SHARED_LIBRARY_FLAG = -LD 1.140 +endif 1.141 +