author | duke |
Wed, 05 Jul 2017 16:48:18 +0200 | |
changeset 2092 | b86b8d6d48bd |
parent 1776 | 33e9405ab91b |
child 2158 | 68869a085470 |
permissions | -rw-r--r-- |
2 | 1 |
# |
715 | 2 |
# Copyright 2005-2008 Sun Microsystems, Inc. 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 |
|
7 |
# published by the Free Software Foundation. Sun designates this |
|
8 |
# particular file as subject to the "Classpath" exception as provided |
|
9 |
# by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, |
|
22 |
# CA 95054 USA or visit www.sun.com if you need additional information or |
|
23 |
# have any 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 |
||
308
33a1639d64a5
6482134: JDK 6 build error on Windows, Visual Studio .NET on Japanese locale
ohair
parents:
2
diff
changeset
|
50 |
# 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
|
51 |
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
|
52 |
|
2 | 53 |
# SDK-64 and MSVC6 put REBASE.EXE in a different places - go figure... |
54 |
ifeq ($(ARCH_DATA_MODEL), 32) |
|
55 |
LINK_VER := $(shell $(LINK) | $(HEAD) -n 1 | $(NAWK) '{print $$6}') |
|
56 |
CC_MAJORVER :=$(call MajorVersion,$(CC_VER)) |
|
57 |
ifeq ($(CC_MAJORVER), 13) |
|
58 |
# This should be: CC_VER=13.10.3077 LINK_VER=7.10.3077 |
|
1776
33e9405ab91b
6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents:
715
diff
changeset
|
59 |
REQUIRED_CC_VER = 13.10.3077 |
33e9405ab91b
6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents:
715
diff
changeset
|
60 |
REQUIRED_LINK_VER = 7.10.3077 |
2 | 61 |
COMPILER_NAME=Visual Studio .NET 2003 Professional C++ |
62 |
COMPILER_VERSION=VS2003 |
|
63 |
REBASE = $(COMPILER_PATH)../../Common7/Tools/Bin/rebase |
|
64 |
MTL = $(COMPILER_PATH)../../Common7/Tools/Bin/midl |
|
65 |
ifndef COMPILER_PATH |
|
66 |
COMPILER_PATH := $(error COMPILER_PATH cannot be empty here) |
|
67 |
endif |
|
68 |
endif |
|
69 |
ifeq ($(CC_MAJORVER), 14) |
|
1776
33e9405ab91b
6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents:
715
diff
changeset
|
70 |
# This should be: CC_VER=14.00.50727.42 LINK_VER=8.00.50727.42 |
33e9405ab91b
6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents:
715
diff
changeset
|
71 |
REQUIRED_CC_VER = 14.00.50727.42 |
33e9405ab91b
6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents:
715
diff
changeset
|
72 |
REQUIRED_LINK_VER = 8.00.50727.42 |
33e9405ab91b
6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents:
715
diff
changeset
|
73 |
COMPILER_NAME=Visual Studio 8 |
2 | 74 |
COMPILER_VERSION=VS2005 |
75 |
REBASE = $(COMPILER_PATH)../../Common8/Tools/Bin/rebase |
|
76 |
MTL = $(COMPILER_PATH)../../Common8/Tools/Bin/midl |
|
1776
33e9405ab91b
6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents:
715
diff
changeset
|
77 |
MT = $(MSDEVTOOLS_PATH)mt |
33e9405ab91b
6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents:
715
diff
changeset
|
78 |
ifndef COMPILER_PATH |
33e9405ab91b
6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents:
715
diff
changeset
|
79 |
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
|
80 |
endif |
33e9405ab91b
6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents:
715
diff
changeset
|
81 |
endif |
33e9405ab91b
6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents:
715
diff
changeset
|
82 |
ifeq ($(CC_MAJORVER), 15) |
33e9405ab91b
6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents:
715
diff
changeset
|
83 |
# This should be: CC_VER=15.00.21022.08 LINK_VER=9.00.21022.08 |
33e9405ab91b
6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents:
715
diff
changeset
|
84 |
REQUIRED_CC_VER = 15.00.21022.08 |
33e9405ab91b
6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents:
715
diff
changeset
|
85 |
REQUIRED_LINK_VER = 9.00.21022.08 |
33e9405ab91b
6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents:
715
diff
changeset
|
86 |
COMPILER_NAME=Visual Studio 9 |
33e9405ab91b
6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents:
715
diff
changeset
|
87 |
COMPILER_VERSION=VS2008 |
33e9405ab91b
6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents:
715
diff
changeset
|
88 |
#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
|
89 |
REBASE = $(MSDEVTOOLS_PATH)/rebase |
33e9405ab91b
6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents:
715
diff
changeset
|
90 |
MTL = $(MSDEVTOOLS_PATH)/midl.exe |
33e9405ab91b
6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents:
715
diff
changeset
|
91 |
MT = $(MSDEVTOOLS_PATH)mt |
2 | 92 |
ifndef COMPILER_PATH |
93 |
COMPILER_PATH := $(error COMPILER_PATH cannot be empty here) |
|
94 |
endif |
|
95 |
endif |
|
96 |
else |
|
1776
33e9405ab91b
6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents:
715
diff
changeset
|
97 |
# else ARCH_DATA_MODEL is 64 |
2 | 98 |
LINK_VER := $(shell $(LINK) | $(HEAD) -n 1 | $(NAWK) '{print $$6}') |
99 |
CC_MAJORVER :=$(call MajorVersion,$(CC_VER)) |
|
100 |
CC_MINORVER :=$(call MinorVersion,$(CC_VER)) |
|
101 |
CC_MICROVER :=$(call MicroVersion,$(CC_VER)) |
|
102 |
ifeq ($(ARCH), ia64) |
|
103 |
REQUIRED_CC_VER = 13.00.9337.7 |
|
104 |
REQUIRED_LINK_VER = 7.00.9337.7 |
|
105 |
endif |
|
106 |
ifeq ($(ARCH), amd64) |
|
107 |
REQUIRED_CC_VER = 14.00.40310.41 |
|
108 |
REQUIRED_LINK_VER = 8.00.40310.39 |
|
109 |
endif |
|
110 |
ifeq ($(CC_MAJORVER), 13) |
|
111 |
ifeq ($(ARCH), ia64) |
|
112 |
# This should be: CC_VER=13.00.9337.7 LINK_VER=7.00.9337.7 |
|
113 |
COMPILER_NAME=Microsoft Platform SDK - November 2001 Edition |
|
114 |
COMPILER_VERSION=VS2003 |
|
115 |
endif |
|
116 |
endif |
|
117 |
ifeq ($(CC_MAJORVER), 14) |
|
118 |
ifeq ($(ARCH), amd64) |
|
119 |
ifeq ($(CC_MICROVER), 30701) |
|
120 |
# This should be: CC_VER=14.00.30701 LINK_VER=8.00.30701 |
|
121 |
# WARNING: it says 14, but it is such an early build it doesn't |
|
122 |
# have all the VS2005 compiler option changes, so treat |
|
123 |
# this like a VS2003 compiler. |
|
124 |
COMPILER_NAME=Microsoft Platform SDK - February 2003 Edition |
|
125 |
COMPILER_VERSION=VS2003 |
|
126 |
else |
|
127 |
# This should be: CC_VER=14.00.40310.41 LINK_VER=8.00.40310.39 |
|
128 |
COMPILER_NAME=Microsoft Platform SDK - April 2005 Edition (3790.1830) |
|
129 |
COMPILER_VERSION=VS2005 |
|
130 |
endif |
|
131 |
endif |
|
132 |
endif |
|
133 |
# This will cause problems if ALT_COMPILER_PATH is defined to "" |
|
134 |
# which is a directive to use the PATH. |
|
135 |
REBASE = $(COMPILER_PATH)../REBASE |
|
136 |
ifndef COMPILER_PATH |
|
137 |
COMPILER_PATH := $(error COMPILER_PATH cannot be empty here) |
|
138 |
endif |
|
139 |
endif |
|
140 |
ifndef COMPILER_VERSION |
|
141 |
COMPILER_VERSION := $(error COMPILER_VERSION cannot be empty here) |
|
142 |
endif |
|
143 |
# Shared library generation flag |
|
144 |
SHARED_LIBRARY_FLAG = -LD |
|
145 |
endif |
|
146 |