author | ohair |
Tue, 07 Sep 2010 15:51:45 -0700 | |
changeset 6410 | 42a9ca2788e9 |
parent 5506 | 202f599c92aa |
child 7665 | bc5dbdc44e1e |
permissions | -rw-r--r-- |
2 | 1 |
# |
5506 | 2 |
# Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved. |
2 | 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 |
|
5506 | 7 |
# published by the Free Software Foundation. Oracle designates this |
2 | 8 |
# particular file as subject to the "Classpath" exception as provided |
5506 | 9 |
# by Oracle in the LICENSE file that accompanied this code. |
2 | 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 |
# |
|
5506 | 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. |
|
2 | 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 |
|
3111
fefdeafb7ab9
6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7
herrick
parents:
2186
diff
changeset
|
38 |
RSC = $(MSDEVTOOLS_PATH)rc |
2 | 39 |
LINK32 = $(LINK) |
40 |
||
41 |
# Fill in unknown values |
|
42 |
COMPILER_NAME=Unknown MSVC Compiler |
|
43 |
COMPILER_VERSION= |
|
44 |
||
45 |
# unset any GNU Make settings of MFLAGS and MAKEFLAGS which may mess up nmake |
|
46 |
NMAKE = MFLAGS= MAKEFLAGS= $(COMPILER_PATH)nmake -nologo |
|
47 |
||
308
33a1639d64a5
6482134: JDK 6 build error on Windows, Visual Studio .NET on Japanese locale
ohair
parents:
2
diff
changeset
|
48 |
# Compiler version and type (Always get word after "Version") |
33a1639d64a5
6482134: JDK 6 build error on Windows, Visual Studio .NET on Japanese locale
ohair
parents:
2
diff
changeset
|
49 |
CC_VER := $(shell $(CC) 2>&1 | $(HEAD) -n 1 | $(SED) 's/.*\(Version.*\)/\1/' | $(NAWK) '{print $$2}') |
33a1639d64a5
6482134: JDK 6 build error on Windows, Visual Studio .NET on Japanese locale
ohair
parents:
2
diff
changeset
|
50 |
|
2 | 51 |
# SDK-64 and MSVC6 put REBASE.EXE in a different places - go figure... |
52 |
ifeq ($(ARCH_DATA_MODEL), 32) |
|
53 |
LINK_VER := $(shell $(LINK) | $(HEAD) -n 1 | $(NAWK) '{print $$6}') |
|
54 |
CC_MAJORVER :=$(call MajorVersion,$(CC_VER)) |
|
55 |
ifeq ($(CC_MAJORVER), 13) |
|
56 |
# This should be: CC_VER=13.10.3077 LINK_VER=7.10.3077 |
|
57 |
COMPILER_NAME=Visual Studio .NET 2003 Professional C++ |
|
58 |
COMPILER_VERSION=VS2003 |
|
59 |
REBASE = $(COMPILER_PATH)../../Common7/Tools/Bin/rebase |
|
60 |
MTL = $(COMPILER_PATH)../../Common7/Tools/Bin/midl |
|
61 |
ifndef COMPILER_PATH |
|
62 |
COMPILER_PATH := $(error COMPILER_PATH cannot be empty here) |
|
63 |
endif |
|
64 |
endif |
|
65 |
ifeq ($(CC_MAJORVER), 14) |
|
1776
33e9405ab91b
6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents:
715
diff
changeset
|
66 |
COMPILER_NAME=Visual Studio 8 |
2 | 67 |
COMPILER_VERSION=VS2005 |
68 |
REBASE = $(COMPILER_PATH)../../Common8/Tools/Bin/rebase |
|
69 |
MTL = $(COMPILER_PATH)../../Common8/Tools/Bin/midl |
|
5381
d6d64a42ff51
6931180: Migration to recent versions of MS Platform SDK
prr
parents:
3111
diff
changeset
|
70 |
MT = $(MSDEVTOOLS_PATH)/mt |
1776
33e9405ab91b
6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents:
715
diff
changeset
|
71 |
ifndef COMPILER_PATH |
33e9405ab91b
6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents:
715
diff
changeset
|
72 |
COMPILER_PATH := $(error COMPILER_PATH cannot be empty here) |
33e9405ab91b
6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents:
715
diff
changeset
|
73 |
endif |
33e9405ab91b
6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents:
715
diff
changeset
|
74 |
endif |
33e9405ab91b
6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents:
715
diff
changeset
|
75 |
ifeq ($(CC_MAJORVER), 15) |
33e9405ab91b
6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents:
715
diff
changeset
|
76 |
COMPILER_NAME=Visual Studio 9 |
33e9405ab91b
6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents:
715
diff
changeset
|
77 |
COMPILER_VERSION=VS2008 |
33e9405ab91b
6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents:
715
diff
changeset
|
78 |
#rebase and midl moved out of Visual Studio into the SDK: |
33e9405ab91b
6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents:
715
diff
changeset
|
79 |
REBASE = $(MSDEVTOOLS_PATH)/rebase |
33e9405ab91b
6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents:
715
diff
changeset
|
80 |
MTL = $(MSDEVTOOLS_PATH)/midl.exe |
33e9405ab91b
6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents:
715
diff
changeset
|
81 |
MT = $(MSDEVTOOLS_PATH)mt |
2 | 82 |
ifndef COMPILER_PATH |
83 |
COMPILER_PATH := $(error COMPILER_PATH cannot be empty here) |
|
84 |
endif |
|
85 |
endif |
|
5381
d6d64a42ff51
6931180: Migration to recent versions of MS Platform SDK
prr
parents:
3111
diff
changeset
|
86 |
ifeq ($(CC_MAJORVER), 16) |
d6d64a42ff51
6931180: Migration to recent versions of MS Platform SDK
prr
parents:
3111
diff
changeset
|
87 |
COMPILER_NAME=Visual Studio 10 |
d6d64a42ff51
6931180: Migration to recent versions of MS Platform SDK
prr
parents:
3111
diff
changeset
|
88 |
COMPILER_VERSION=VS2010 |
d6d64a42ff51
6931180: Migration to recent versions of MS Platform SDK
prr
parents:
3111
diff
changeset
|
89 |
#rebase and midl moved out of Visual Studio into the SDK: |
d6d64a42ff51
6931180: Migration to recent versions of MS Platform SDK
prr
parents:
3111
diff
changeset
|
90 |
REBASE = $(MSDEVTOOLS_PATH)/rebase |
d6d64a42ff51
6931180: Migration to recent versions of MS Platform SDK
prr
parents:
3111
diff
changeset
|
91 |
MTL = $(MSDEVTOOLS_PATH)/midl.exe |
d6d64a42ff51
6931180: Migration to recent versions of MS Platform SDK
prr
parents:
3111
diff
changeset
|
92 |
MT = $(MSDEVTOOLS_PATH)mt |
d6d64a42ff51
6931180: Migration to recent versions of MS Platform SDK
prr
parents:
3111
diff
changeset
|
93 |
ifndef COMPILER_PATH |
d6d64a42ff51
6931180: Migration to recent versions of MS Platform SDK
prr
parents:
3111
diff
changeset
|
94 |
COMPILER_PATH := $(error COMPILER_PATH cannot be empty here) |
d6d64a42ff51
6931180: Migration to recent versions of MS Platform SDK
prr
parents:
3111
diff
changeset
|
95 |
endif |
d6d64a42ff51
6931180: Migration to recent versions of MS Platform SDK
prr
parents:
3111
diff
changeset
|
96 |
endif |
2 | 97 |
else |
1776
33e9405ab91b
6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents:
715
diff
changeset
|
98 |
# else ARCH_DATA_MODEL is 64 |
2 | 99 |
LINK_VER := $(shell $(LINK) | $(HEAD) -n 1 | $(NAWK) '{print $$6}') |
100 |
CC_MAJORVER :=$(call MajorVersion,$(CC_VER)) |
|
101 |
CC_MINORVER :=$(call MinorVersion,$(CC_VER)) |
|
102 |
CC_MICROVER :=$(call MicroVersion,$(CC_VER)) |
|
103 |
ifeq ($(CC_MAJORVER), 13) |
|
104 |
ifeq ($(ARCH), ia64) |
|
105 |
# This should be: CC_VER=13.00.9337.7 LINK_VER=7.00.9337.7 |
|
106 |
COMPILER_NAME=Microsoft Platform SDK - November 2001 Edition |
|
107 |
COMPILER_VERSION=VS2003 |
|
108 |
endif |
|
109 |
endif |
|
110 |
ifeq ($(CC_MAJORVER), 14) |
|
111 |
ifeq ($(ARCH), amd64) |
|
3111
fefdeafb7ab9
6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7
herrick
parents:
2186
diff
changeset
|
112 |
#rebase and midl moved out of Visual Studio into the SDK: |
fefdeafb7ab9
6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7
herrick
parents:
2186
diff
changeset
|
113 |
REBASE = $(MSDEVTOOLS_PATH)/rebase |
fefdeafb7ab9
6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7
herrick
parents:
2186
diff
changeset
|
114 |
MTL = $(MSDEVTOOLS_PATH)/midl.exe |
2 | 115 |
ifeq ($(CC_MICROVER), 30701) |
116 |
# This should be: CC_VER=14.00.30701 LINK_VER=8.00.30701 |
|
117 |
# WARNING: it says 14, but it is such an early build it doesn't |
|
118 |
# have all the VS2005 compiler option changes, so treat |
|
119 |
# this like a VS2003 compiler. |
|
120 |
COMPILER_NAME=Microsoft Platform SDK - February 2003 Edition |
|
121 |
COMPILER_VERSION=VS2003 |
|
122 |
else |
|
123 |
# This should be: CC_VER=14.00.40310.41 LINK_VER=8.00.40310.39 |
|
124 |
COMPILER_NAME=Microsoft Platform SDK - April 2005 Edition (3790.1830) |
|
125 |
COMPILER_VERSION=VS2005 |
|
126 |
endif |
|
3111
fefdeafb7ab9
6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7
herrick
parents:
2186
diff
changeset
|
127 |
else |
fefdeafb7ab9
6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7
herrick
parents:
2186
diff
changeset
|
128 |
REBASE = $(COMPILER_PATH)../rebase |
2 | 129 |
endif |
130 |
endif |
|
2186
53da56fa3bf9
6816311: Changes to allow builds with latest Windows SDK 6.1 on 64bit Windows 2003
ohair
parents:
2158
diff
changeset
|
131 |
ifeq ($(CC_MAJORVER), 15) |
53da56fa3bf9
6816311: Changes to allow builds with latest Windows SDK 6.1 on 64bit Windows 2003
ohair
parents:
2158
diff
changeset
|
132 |
COMPILER_NAME=Microsoft Windows SDK with Visual Studio 9 (6001.18000.367) |
53da56fa3bf9
6816311: Changes to allow builds with latest Windows SDK 6.1 on 64bit Windows 2003
ohair
parents:
2158
diff
changeset
|
133 |
COMPILER_VERSION=VS2008 |
53da56fa3bf9
6816311: Changes to allow builds with latest Windows SDK 6.1 on 64bit Windows 2003
ohair
parents:
2158
diff
changeset
|
134 |
RC = $(MSSDK61)/Bin/X64/rc.exe |
53da56fa3bf9
6816311: Changes to allow builds with latest Windows SDK 6.1 on 64bit Windows 2003
ohair
parents:
2158
diff
changeset
|
135 |
MT = $(MSSDK61)/Bin/X64/mt.exe |
5381
d6d64a42ff51
6931180: Migration to recent versions of MS Platform SDK
prr
parents:
3111
diff
changeset
|
136 |
MTL = $(MSSDK61)/Bin/X64/midl.exe |
d6d64a42ff51
6931180: Migration to recent versions of MS Platform SDK
prr
parents:
3111
diff
changeset
|
137 |
endif |
d6d64a42ff51
6931180: Migration to recent versions of MS Platform SDK
prr
parents:
3111
diff
changeset
|
138 |
ifeq ($(CC_MAJORVER), 16) |
d6d64a42ff51
6931180: Migration to recent versions of MS Platform SDK
prr
parents:
3111
diff
changeset
|
139 |
COMPILER_NAME=Microsoft Visual Studio 10 (16.00.30319.01) |
d6d64a42ff51
6931180: Migration to recent versions of MS Platform SDK
prr
parents:
3111
diff
changeset
|
140 |
COMPILER_VERSION=VS2010 |
d6d64a42ff51
6931180: Migration to recent versions of MS Platform SDK
prr
parents:
3111
diff
changeset
|
141 |
RC = $(MSDEVTOOLS_PATH)/Bin/x64/rc.exe |
d6d64a42ff51
6931180: Migration to recent versions of MS Platform SDK
prr
parents:
3111
diff
changeset
|
142 |
RSC = $(MSDEVTOOLS_PATH)/Bin/x64/rc.exe |
d6d64a42ff51
6931180: Migration to recent versions of MS Platform SDK
prr
parents:
3111
diff
changeset
|
143 |
MT = $(MSDEVTOOLS_PATH)/Bin/x64/mt.exe |
d6d64a42ff51
6931180: Migration to recent versions of MS Platform SDK
prr
parents:
3111
diff
changeset
|
144 |
MTL = $(MSDEVTOOLS_PATH)/Bin/X64/midl.exe |
2186
53da56fa3bf9
6816311: Changes to allow builds with latest Windows SDK 6.1 on 64bit Windows 2003
ohair
parents:
2158
diff
changeset
|
145 |
endif |
2 | 146 |
# This will cause problems if ALT_COMPILER_PATH is defined to "" |
147 |
# which is a directive to use the PATH. |
|
148 |
ifndef COMPILER_PATH |
|
149 |
COMPILER_PATH := $(error COMPILER_PATH cannot be empty here) |
|
150 |
endif |
|
151 |
endif |
|
152 |
ifndef COMPILER_VERSION |
|
153 |
COMPILER_VERSION := $(error COMPILER_VERSION cannot be empty here) |
|
154 |
endif |
|
155 |
# Shared library generation flag |
|
156 |
SHARED_LIBRARY_FLAG = -LD |
|
157 |
endif |
|
158 |