1 | #
|
---|
2 | # Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
|
---|
3 | # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
---|
4 | #
|
---|
5 | # This code is free software; you can redistribute it and/or modify it
|
---|
6 | # under the terms of the GNU General Public License version 2 only, as
|
---|
7 | # published by the Free Software Foundation. Oracle designates this
|
---|
8 | # particular file as subject to the "Classpath" exception as provided
|
---|
9 | # by Oracle in the LICENSE file that accompanied this code.
|
---|
10 | #
|
---|
11 | # This code is distributed in the hope that it will be useful, but WITHOUT
|
---|
12 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
---|
13 | # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
---|
14 | # version 2 for more details (a copy is included in the LICENSE file that
|
---|
15 | # accompanied this code).
|
---|
16 | #
|
---|
17 | # You should have received a copy of the GNU General Public License version
|
---|
18 | # 2 along with this work; if not, write to the Free Software Foundation,
|
---|
19 | # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
---|
20 | #
|
---|
21 | # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
---|
22 | # or visit www.oracle.com if you need additional information or have any
|
---|
23 | # questions.
|
---|
24 | #
|
---|
25 |
|
---|
26 | #
|
---|
27 | # MSVC Compiler settings
|
---|
28 | #
|
---|
29 |
|
---|
30 | ifeq ($(PLATFORM), windows)
|
---|
31 | CC = $(COMPILER_PATH)cl
|
---|
32 | CPP = $(COMPILER_PATH)cl
|
---|
33 | CXX = $(COMPILER_PATH)cl
|
---|
34 | CCC = $(COMPILER_PATH)cl
|
---|
35 | LIBEXE = $(COMPILER_PATH)lib
|
---|
36 | LINK = $(COMPILER_PATH)link
|
---|
37 | RC = $(MSDEVTOOLS_PATH)rc
|
---|
38 | LINK32 = $(LINK)
|
---|
39 | RSC = $(RC)
|
---|
40 |
|
---|
41 | # Fill in unknown values
|
---|
42 | COMPILER_NAME=Unknown MSVC Compiler
|
---|
43 | COMPILER_VERSION=
|
---|
44 | REQUIRED_CC_VER=
|
---|
45 | REQUIRED_LINK_VER=
|
---|
46 |
|
---|
47 | # unset any GNU Make settings of MFLAGS and MAKEFLAGS which may mess up nmake
|
---|
48 | NMAKE = MFLAGS= MAKEFLAGS= $(COMPILER_PATH)nmake -nologo
|
---|
49 |
|
---|
50 | # SDK-64 and MSVC6 put REBASE.EXE in a different places - go figure...
|
---|
51 | ifeq ($(ARCH_DATA_MODEL), 32)
|
---|
52 | CC_VER := $(shell $(CC) 2>&1 | $(HEAD) -n 1 | $(NAWK) '{print $$8}')
|
---|
53 | LINK_VER := $(shell $(LINK) | $(HEAD) -n 1 | $(NAWK) '{print $$6}')
|
---|
54 | CC_TYPE := $(shell $(CC) 2>&1 | $(HEAD) -n 1 | $(NAWK) '{print $$5}')
|
---|
55 | CC_MAJORVER :=$(call MajorVersion,$(CC_VER))
|
---|
56 | REQUIRED_CCTYPE = Optimizing
|
---|
57 | REQUIRED_CC_VER = 13.10.3077
|
---|
58 | REQUIRED_LINK_VER = 7.10.3077
|
---|
59 | ifeq ($(CC_MAJORVER), 12)
|
---|
60 | # This should be: CC_VER=12.00.8168 LINK_VER=6.00.8447
|
---|
61 | COMPILER_NAME=Visual C++ 6.0 Professional + VC6-SP 3
|
---|
62 | COMPILER_VERSION=VC6
|
---|
63 | REBASE = $(COMPILER_PATH)rebase
|
---|
64 | MTL = $(COMPILER_PATH)midl
|
---|
65 | endif
|
---|
66 | ifeq ($(CC_MAJORVER), 13)
|
---|
67 | # This should be: CC_VER=13.10.3077 LINK_VER=7.10.3077
|
---|
68 | COMPILER_NAME=Visual Studio .NET 2003 Professional C++
|
---|
69 | COMPILER_VERSION=VS2003
|
---|
70 | REBASE = $(COMPILER_PATH)../../Common7/Tools/Bin/rebase
|
---|
71 | MTL = $(COMPILER_PATH)../../Common7/Tools/Bin/midl
|
---|
72 | ifndef COMPILER_PATH
|
---|
73 | COMPILER_PATH := $(error COMPILER_PATH cannot be empty here)
|
---|
74 | endif
|
---|
75 | endif
|
---|
76 | ifeq ($(CC_MAJORVER), 14)
|
---|
77 | # This should be: CC_VER=14.00.0000 LINK_VER=8.00.0000
|
---|
78 | # NOTE: This compiler has not been tried yet on 32bit systems
|
---|
79 | COMPILER_NAME=Visual Studio .NET 2005
|
---|
80 | COMPILER_VERSION=VS2005
|
---|
81 | REBASE = $(COMPILER_PATH)../../Common8/Tools/Bin/rebase
|
---|
82 | MTL = $(COMPILER_PATH)../../Common8/Tools/Bin/midl
|
---|
83 | ifndef COMPILER_PATH
|
---|
84 | COMPILER_PATH := $(error COMPILER_PATH cannot be empty here)
|
---|
85 | endif
|
---|
86 | endif
|
---|
87 | else
|
---|
88 | CC_VER := $(shell $(CC) 2>&1 | $(HEAD) -n 1 | $(NAWK) '{print $$7}')
|
---|
89 | LINK_VER := $(shell $(LINK) | $(HEAD) -n 1 | $(NAWK) '{print $$6}')
|
---|
90 | CC_TYPE := $(shell $(CC) 2>&1 | $(HEAD) -n 1 | $(NAWK) '{print $$4}')
|
---|
91 | CC_MAJORVER :=$(call MajorVersion,$(CC_VER))
|
---|
92 | CC_MINORVER :=$(call MinorVersion,$(CC_VER))
|
---|
93 | CC_MICROVER :=$(call MicroVersion,$(CC_VER))
|
---|
94 | ifeq ($(ARCH), ia64)
|
---|
95 | REQUIRED_CC_VER = 13.00.9337.7
|
---|
96 | REQUIRED_LINK_VER = 7.00.9337.7
|
---|
97 | endif
|
---|
98 | ifeq ($(ARCH), amd64)
|
---|
99 | REQUIRED_CC_VER = 14.00.40310.41
|
---|
100 | REQUIRED_LINK_VER = 8.00.40310.39
|
---|
101 | endif
|
---|
102 | ifeq ($(CC_MAJORVER), 13)
|
---|
103 | ifeq ($(ARCH), ia64)
|
---|
104 | # This should be: CC_VER=13.00.9337.7 LINK_VER=7.00.9337.7
|
---|
105 | COMPILER_NAME=Microsoft Platform SDK - November 2001 Edition
|
---|
106 | COMPILER_VERSION=VS2003
|
---|
107 | endif
|
---|
108 | endif
|
---|
109 | ifeq ($(CC_MAJORVER), 14)
|
---|
110 | ifeq ($(ARCH), amd64)
|
---|
111 | ifeq ($(CC_MICROVER), 30701)
|
---|
112 | # This should be: CC_VER=14.00.30701 LINK_VER=8.00.30701
|
---|
113 | # WARNING: it says 14, but it is such an early build it doesn't
|
---|
114 | # have all the VS2005 compiler option changes, so treat
|
---|
115 | # this like a VS2003 compiler.
|
---|
116 | COMPILER_NAME=Microsoft Platform SDK - February 2003 Edition
|
---|
117 | COMPILER_VERSION=VS2003
|
---|
118 | else
|
---|
119 | # This should be: CC_VER=14.00.40310.41 LINK_VER=8.00.40310.39
|
---|
120 | COMPILER_NAME=Microsoft Platform SDK - April 2005 Edition (3790.1830)
|
---|
121 | COMPILER_VERSION=VS2005
|
---|
122 | endif
|
---|
123 | endif
|
---|
124 | endif
|
---|
125 | # This will cause problems if ALT_COMPILER_PATH is defined to ""
|
---|
126 | # which is a directive to use the PATH.
|
---|
127 | REBASE = $(COMPILER_PATH)../REBASE
|
---|
128 | ifndef COMPILER_PATH
|
---|
129 | COMPILER_PATH := $(error COMPILER_PATH cannot be empty here)
|
---|
130 | endif
|
---|
131 | endif
|
---|
132 | ifndef COMPILER_VERSION
|
---|
133 | COMPILER_VERSION := $(error COMPILER_VERSION cannot be empty here)
|
---|
134 | endif
|
---|
135 | # Shared library generation flag
|
---|
136 | SHARED_LIBRARY_FLAG = -LD
|
---|
137 | endif
|
---|
138 |
|
---|