author | martin |
Mon, 07 Dec 2009 15:32:26 -0800 | |
changeset 4354 | 3a70dde80b3b |
parent 3871 | 3d528461f61d |
child 5385 | 8308e15f228e |
permissions | -rw-r--r-- |
4 | 1 |
# |
2192 | 2 |
# Copyright 2005-2009 Sun Microsystems, Inc. All Rights Reserved. |
4 | 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 |
||
1347 | 50 |
# Compiler version and type (Always get word after "Version") |
3871
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
2200
diff
changeset
|
51 |
ifndef CC_VER |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
2200
diff
changeset
|
52 |
CC_VER := $(shell $(CC) 2>&1 | $(HEAD) -n 1 | $(SED) 's/.*\(Version.*\)/\1/' | $(NAWK) '{print $$2}') |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
2200
diff
changeset
|
53 |
export CC_VER |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
2200
diff
changeset
|
54 |
endif |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
2200
diff
changeset
|
55 |
|
4 | 56 |
# SDK-64 and MSVC6 put REBASE.EXE in a different places - go figure... |
57 |
ifeq ($(ARCH_DATA_MODEL), 32) |
|
3871
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
2200
diff
changeset
|
58 |
ifndef LINK_VER |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
2200
diff
changeset
|
59 |
LINK_VER := $(shell $(LINK) | $(HEAD) -n 1 | $(NAWK) '{print $$6}') |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
2200
diff
changeset
|
60 |
export LINK_VER |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
2200
diff
changeset
|
61 |
endif |
4 | 62 |
CC_MAJORVER :=$(call MajorVersion,$(CC_VER)) |
63 |
ifeq ($(CC_MAJORVER), 13) |
|
64 |
# This should be: CC_VER=13.10.3077 LINK_VER=7.10.3077 |
|
1347 | 65 |
REQUIRED_CC_VER = 13.10.3077 |
66 |
REQUIRED_LINK_VER = 7.10.3077 |
|
4 | 67 |
COMPILER_NAME=Visual Studio .NET 2003 Professional C++ |
68 |
COMPILER_VERSION=VS2003 |
|
69 |
REBASE = $(COMPILER_PATH)../../Common7/Tools/Bin/rebase |
|
70 |
MTL = $(COMPILER_PATH)../../Common7/Tools/Bin/midl |
|
71 |
ifndef COMPILER_PATH |
|
72 |
COMPILER_PATH := $(error COMPILER_PATH cannot be empty here) |
|
73 |
endif |
|
74 |
endif |
|
75 |
ifeq ($(CC_MAJORVER), 14) |
|
1347 | 76 |
# This should be: CC_VER=14.00.50727.42 LINK_VER=8.00.50727.42 |
77 |
REQUIRED_CC_VER = 14.00.50727.42 |
|
78 |
REQUIRED_LINK_VER = 8.00.50727.42 |
|
79 |
COMPILER_NAME=Visual Studio 8 |
|
4 | 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 |
|
1347 | 87 |
ifeq ($(CC_MAJORVER), 15) |
88 |
# This should be: CC_VER=15.00.21022.08 LINK_VER=9.00.21022.08 |
|
89 |
REQUIRED_CC_VER = 15.00.21022.08 |
|
90 |
REQUIRED_LINK_VER = 9.00.21022.08 |
|
91 |
COMPILER_NAME=Visual Studio 9 |
|
92 |
COMPILER_VERSION=VS2008 |
|
93 |
#rebase and midl moved out of Visual Studio into the SDK: |
|
94 |
REBASE = $(MSDEVTOOLS_PATH)/rebase |
|
95 |
MTL = $(MSDEVTOOLS_PATH)/midl.exe |
|
96 |
ifndef COMPILER_PATH |
|
97 |
COMPILER_PATH := $(error COMPILER_PATH cannot be empty here) |
|
98 |
endif |
|
99 |
endif |
|
4 | 100 |
else |
1347 | 101 |
# else ARCH_DATA_MODEL is 64 |
3871
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
2200
diff
changeset
|
102 |
ifndef LINK_VER |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
2200
diff
changeset
|
103 |
LINK_VER := $(shell $(LINK) | $(HEAD) -n 1 | $(NAWK) '{print $$6}') |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
2200
diff
changeset
|
104 |
export LINK_VER |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
2200
diff
changeset
|
105 |
endif |
4 | 106 |
CC_MAJORVER :=$(call MajorVersion,$(CC_VER)) |
107 |
CC_MINORVER :=$(call MinorVersion,$(CC_VER)) |
|
108 |
CC_MICROVER :=$(call MicroVersion,$(CC_VER)) |
|
109 |
ifeq ($(ARCH), ia64) |
|
110 |
REQUIRED_CC_VER = 13.00.9337.7 |
|
111 |
REQUIRED_LINK_VER = 7.00.9337.7 |
|
112 |
endif |
|
113 |
ifeq ($(ARCH), amd64) |
|
114 |
REQUIRED_CC_VER = 14.00.40310.41 |
|
115 |
REQUIRED_LINK_VER = 8.00.40310.39 |
|
116 |
endif |
|
117 |
ifeq ($(CC_MAJORVER), 13) |
|
118 |
ifeq ($(ARCH), ia64) |
|
119 |
# This should be: CC_VER=13.00.9337.7 LINK_VER=7.00.9337.7 |
|
120 |
COMPILER_NAME=Microsoft Platform SDK - November 2001 Edition |
|
121 |
COMPILER_VERSION=VS2003 |
|
122 |
endif |
|
123 |
endif |
|
124 |
ifeq ($(CC_MAJORVER), 14) |
|
125 |
ifeq ($(ARCH), amd64) |
|
126 |
ifeq ($(CC_MICROVER), 30701) |
|
127 |
# This should be: CC_VER=14.00.30701 LINK_VER=8.00.30701 |
|
128 |
# WARNING: it says 14, but it is such an early build it doesn't |
|
129 |
# have all the VS2005 compiler option changes, so treat |
|
130 |
# this like a VS2003 compiler. |
|
131 |
COMPILER_NAME=Microsoft Platform SDK - February 2003 Edition |
|
132 |
COMPILER_VERSION=VS2003 |
|
133 |
else |
|
134 |
# This should be: CC_VER=14.00.40310.41 LINK_VER=8.00.40310.39 |
|
135 |
COMPILER_NAME=Microsoft Platform SDK - April 2005 Edition (3790.1830) |
|
136 |
COMPILER_VERSION=VS2005 |
|
137 |
endif |
|
138 |
endif |
|
139 |
endif |
|
2200
69f669804c0a
6816311: Changes to allow builds with latest Windows SDK 6.1 on 64bit Windows 2003
ohair
parents:
2192
diff
changeset
|
140 |
ifeq ($(CC_MAJORVER), 15) |
69f669804c0a
6816311: Changes to allow builds with latest Windows SDK 6.1 on 64bit Windows 2003
ohair
parents:
2192
diff
changeset
|
141 |
# This should be: CC_VER=15.00.21022.8 LINK_VER=9.00.21022.8 |
69f669804c0a
6816311: Changes to allow builds with latest Windows SDK 6.1 on 64bit Windows 2003
ohair
parents:
2192
diff
changeset
|
142 |
REQUIRED_CC_VER = 15.00.21022.8 |
69f669804c0a
6816311: Changes to allow builds with latest Windows SDK 6.1 on 64bit Windows 2003
ohair
parents:
2192
diff
changeset
|
143 |
REQUIRED_LINK_VER = 9.00.21022.8 |
69f669804c0a
6816311: Changes to allow builds with latest Windows SDK 6.1 on 64bit Windows 2003
ohair
parents:
2192
diff
changeset
|
144 |
COMPILER_NAME=Windows SDK 6.1 Visual Studio 9 |
69f669804c0a
6816311: Changes to allow builds with latest Windows SDK 6.1 on 64bit Windows 2003
ohair
parents:
2192
diff
changeset
|
145 |
COMPILER_VERSION=VS2008 |
69f669804c0a
6816311: Changes to allow builds with latest Windows SDK 6.1 on 64bit Windows 2003
ohair
parents:
2192
diff
changeset
|
146 |
RC = $(MSSDK61)/bin/x64/rc |
69f669804c0a
6816311: Changes to allow builds with latest Windows SDK 6.1 on 64bit Windows 2003
ohair
parents:
2192
diff
changeset
|
147 |
REBASE = $(MSSDK61/bin/x64/rebase |
69f669804c0a
6816311: Changes to allow builds with latest Windows SDK 6.1 on 64bit Windows 2003
ohair
parents:
2192
diff
changeset
|
148 |
else |
69f669804c0a
6816311: Changes to allow builds with latest Windows SDK 6.1 on 64bit Windows 2003
ohair
parents:
2192
diff
changeset
|
149 |
# This will cause problems if ALT_COMPILER_PATH is defined to "" |
69f669804c0a
6816311: Changes to allow builds with latest Windows SDK 6.1 on 64bit Windows 2003
ohair
parents:
2192
diff
changeset
|
150 |
# which is a directive to use the PATH. |
69f669804c0a
6816311: Changes to allow builds with latest Windows SDK 6.1 on 64bit Windows 2003
ohair
parents:
2192
diff
changeset
|
151 |
REBASE = $(COMPILER_PATH)../REBASE |
69f669804c0a
6816311: Changes to allow builds with latest Windows SDK 6.1 on 64bit Windows 2003
ohair
parents:
2192
diff
changeset
|
152 |
endif |
4 | 153 |
ifndef COMPILER_PATH |
154 |
COMPILER_PATH := $(error COMPILER_PATH cannot be empty here) |
|
155 |
endif |
|
156 |
endif |
|
157 |
ifndef COMPILER_VERSION |
|
158 |
COMPILER_VERSION := $(error COMPILER_VERSION cannot be empty here) |
|
159 |
endif |
|
160 |
# Shared library generation flag |
|
161 |
SHARED_LIBRARY_FLAG = -LD |
|
162 |
endif |
|
163 |