Compiler-msvc.gmk revision 168
0N/A#
0N/A# Copyright 2005-2006 Sun Microsystems, Inc. All Rights Reserved.
0N/A# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A#
0N/A# This code is free software; you can redistribute it and/or modify it
0N/A# under the terms of the GNU General Public License version 2 only, as
0N/A# published by the Free Software Foundation. Sun designates this
0N/A# particular file as subject to the "Classpath" exception as provided
0N/A# by Sun in the LICENSE file that accompanied this code.
0N/A#
0N/A# This code is distributed in the hope that it will be useful, but WITHOUT
0N/A# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A# version 2 for more details (a copy is included in the LICENSE file that
0N/A# accompanied this code).
0N/A#
0N/A# You should have received a copy of the GNU General Public License version
0N/A# 2 along with this work; if not, write to the Free Software Foundation,
0N/A# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A#
0N/A# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
0N/A# CA 95054 USA or visit www.sun.com if you need additional information or
0N/A# have any questions.
0N/A#
0N/A
0N/A#
0N/A# MSVC Compiler settings
0N/A#
0N/A
0N/Aifeq ($(PLATFORM), windows)
0N/A CC = $(COMPILER_PATH)cl
0N/A CPP = $(COMPILER_PATH)cl
0N/A CXX = $(COMPILER_PATH)cl
0N/A CCC = $(COMPILER_PATH)cl
0N/A LIBEXE = $(COMPILER_PATH)lib
0N/A LINK = $(COMPILER_PATH)link
0N/A RC = $(MSDEVTOOLS_PATH)rc
0N/A LINK32 = $(LINK)
0N/A RSC = $(RC)
0N/A
0N/A # Fill in unknown values
0N/A COMPILER_NAME=Unknown MSVC Compiler
0N/A COMPILER_VERSION=
0N/A REQUIRED_CC_VER=
0N/A REQUIRED_LINK_VER=
0N/A
0N/A # unset any GNU Make settings of MFLAGS and MAKEFLAGS which may mess up nmake
0N/A NMAKE = MFLAGS= MAKEFLAGS= $(COMPILER_PATH)nmake -nologo
0N/A
0N/A # Compiler version and type (Always get word after "Version")
0N/A CC_VER := $(shell $(CC) 2>&1 | $(HEAD) -n 1 | $(SED) 's/.*\(Version.*\)/\1/' | $(NAWK) '{print $$2}')
0N/A
0N/A # SDK-64 and MSVC6 put REBASE.EXE in a different places - go figure...
0N/A ifeq ($(ARCH_DATA_MODEL), 32)
0N/A LINK_VER := $(shell $(LINK) | $(HEAD) -n 1 | $(NAWK) '{print $$6}')
0N/A CC_MAJORVER :=$(call MajorVersion,$(CC_VER))
0N/A REQUIRED_CC_VER = 13.10.3077
0N/A REQUIRED_LINK_VER = 7.10.3077
0N/A ifeq ($(CC_MAJORVER), 12)
0N/A # This should be: CC_VER=12.00.8168 LINK_VER=6.00.8447
0N/A COMPILER_NAME=Visual C++ 6.0 Professional + VC6-SP 3
0N/A COMPILER_VERSION=VC6
0N/A REBASE = $(COMPILER_PATH)rebase
0N/A MTL = $(COMPILER_PATH)midl
0N/A endif
0N/A ifeq ($(CC_MAJORVER), 13)
0N/A # This should be: CC_VER=13.10.3077 LINK_VER=7.10.3077
0N/A COMPILER_NAME=Visual Studio .NET 2003 Professional C++
0N/A COMPILER_VERSION=VS2003
0N/A REBASE = $(COMPILER_PATH)../../Common7/Tools/Bin/rebase
0N/A MTL = $(COMPILER_PATH)../../Common7/Tools/Bin/midl
0N/A ifndef COMPILER_PATH
0N/A COMPILER_PATH := $(error COMPILER_PATH cannot be empty here)
0N/A endif
0N/A endif
0N/A ifeq ($(CC_MAJORVER), 14)
0N/A # This should be: CC_VER=14.00.0000 LINK_VER=8.00.0000
0N/A # NOTE: This compiler has not been tried yet on 32bit systems
0N/A COMPILER_NAME=Visual Studio .NET 2005
0N/A COMPILER_VERSION=VS2005
0N/A REBASE = $(COMPILER_PATH)../../Common8/Tools/Bin/rebase
0N/A MTL = $(COMPILER_PATH)../../Common8/Tools/Bin/midl
0N/A ifndef COMPILER_PATH
0N/A COMPILER_PATH := $(error COMPILER_PATH cannot be empty here)
0N/A endif
0N/A endif
0N/A else
0N/A LINK_VER := $(shell $(LINK) | $(HEAD) -n 1 | $(NAWK) '{print $$6}')
0N/A CC_MAJORVER :=$(call MajorVersion,$(CC_VER))
0N/A CC_MINORVER :=$(call MinorVersion,$(CC_VER))
0N/A CC_MICROVER :=$(call MicroVersion,$(CC_VER))
0N/A ifeq ($(ARCH), ia64)
0N/A REQUIRED_CC_VER = 13.00.9337.7
0N/A REQUIRED_LINK_VER = 7.00.9337.7
0N/A endif
0N/A ifeq ($(ARCH), amd64)
0N/A REQUIRED_CC_VER = 14.00.40310.41
0N/A REQUIRED_LINK_VER = 8.00.40310.39
0N/A endif
0N/A ifeq ($(CC_MAJORVER), 13)
0N/A ifeq ($(ARCH), ia64)
0N/A # This should be: CC_VER=13.00.9337.7 LINK_VER=7.00.9337.7
0N/A COMPILER_NAME=Microsoft Platform SDK - November 2001 Edition
0N/A COMPILER_VERSION=VS2003
0N/A endif
0N/A endif
0N/A ifeq ($(CC_MAJORVER), 14)
0N/A ifeq ($(ARCH), amd64)
0N/A ifeq ($(CC_MICROVER), 30701)
# This should be: CC_VER=14.00.30701 LINK_VER=8.00.30701
# WARNING: it says 14, but it is such an early build it doesn't
# have all the VS2005 compiler option changes, so treat
# this like a VS2003 compiler.
COMPILER_NAME=Microsoft Platform SDK - February 2003 Edition
COMPILER_VERSION=VS2003
else
# This should be: CC_VER=14.00.40310.41 LINK_VER=8.00.40310.39
COMPILER_NAME=Microsoft Platform SDK - April 2005 Edition (3790.1830)
COMPILER_VERSION=VS2005
endif
endif
endif
# This will cause problems if ALT_COMPILER_PATH is defined to ""
# which is a directive to use the PATH.
REBASE = $(COMPILER_PATH)../REBASE
ifndef COMPILER_PATH
COMPILER_PATH := $(error COMPILER_PATH cannot be empty here)
endif
endif
ifndef COMPILER_VERSION
COMPILER_VERSION := $(error COMPILER_VERSION cannot be empty here)
endif
# Shared library generation flag
SHARED_LIBRARY_FLAG = -LD
endif