vm.make 13.1 KB
Newer Older
D
duke 已提交
1
#
2
# Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
D
duke 已提交
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
19 20 21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
D
duke 已提交
22 23 24 25 26 27
#  
#

# Resource file containing VERSIONINFO
Res_Files=.\version.res

28 29
!include ..\generated\objfiles.make

30 31 32
COMMONSRC=$(WorkSpace)\src
ALTSRC=$(WorkSpace)\src\closed

D
duke 已提交
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
!ifdef RELEASE 
!ifdef DEVELOP
CPP_FLAGS=$(CPP_FLAGS) /D "DEBUG"
!else
CPP_FLAGS=$(CPP_FLAGS) /D "PRODUCT"
!endif
!else
CPP_FLAGS=$(CPP_FLAGS) /D "ASSERT"
!endif

!if "$(Variant)" == "core"
# No need to define anything, CORE is defined as !COMPILER1 && !COMPILER2
!endif

!if "$(Variant)" == "kernel"
CPP_FLAGS=$(CPP_FLAGS) /D "KERNEL"
!endif

!if "$(Variant)" == "compiler1"
CPP_FLAGS=$(CPP_FLAGS) /D "COMPILER1"
!endif

!if "$(Variant)" == "compiler2"
CPP_FLAGS=$(CPP_FLAGS) /D "COMPILER2"
!endif

!if "$(Variant)" == "tiered"
CPP_FLAGS=$(CPP_FLAGS) /D "COMPILER1" /D "COMPILER2"
!endif

63 64 65 66 67 68
!if "$(BUILDARCH)" == "i486"
HOTSPOT_LIB_ARCH=i386
!else
HOTSPOT_LIB_ARCH=$(BUILDARCH)
!endif

D
duke 已提交
69 70 71
# The following variables are defined in the generated local.make file.
CPP_FLAGS=$(CPP_FLAGS) /D "HOTSPOT_RELEASE_VERSION=\"$(HS_BUILD_VER)\""
CPP_FLAGS=$(CPP_FLAGS) /D "JRE_RELEASE_VERSION=\"$(JRE_RELEASE_VER)\""
72
CPP_FLAGS=$(CPP_FLAGS) /D "HOTSPOT_LIB_ARCH=\"$(HOTSPOT_LIB_ARCH)\""
D
duke 已提交
73 74 75 76
CPP_FLAGS=$(CPP_FLAGS) /D "HOTSPOT_BUILD_TARGET=\"$(BUILD_FLAVOR)\""
CPP_FLAGS=$(CPP_FLAGS) /D "HOTSPOT_BUILD_USER=\"$(BuildUser)\""
CPP_FLAGS=$(CPP_FLAGS) /D "HOTSPOT_VM_DISTRO=\"$(HOTSPOT_VM_DISTRO)\""

77
CPP_FLAGS=$(CPP_FLAGS) $(CPP_INCLUDE_DIRS)
D
duke 已提交
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98

# Define that so jni.h is on correct side
CPP_FLAGS=$(CPP_FLAGS) /D "_JNI_IMPLEMENTATION_"

!if "$(BUILDARCH)" == "ia64"
STACK_SIZE="/STACK:1048576,262144"
!else
STACK_SIZE=
!endif

!if "$(BUILDARCH)" == "ia64"
# AsyncGetCallTrace is not supported on IA64 yet
AGCT_EXPORT=
!else
!if "$(Variant)" == "kernel"
AGCT_EXPORT=
!else
AGCT_EXPORT=/export:AsyncGetCallTrace
!endif
!endif

99 100
# If you modify exports below please do the corresponding changes in
# src/share/tools/ProjectCreator/WinGammaPlatformVC7.java 
101 102 103 104 105 106 107 108 109 110 111 112 113 114
LINK_FLAGS=$(LINK_FLAGS) $(STACK_SIZE) /subsystem:windows /dll /base:0x8000000 \
  /export:JNI_GetDefaultJavaVMInitArgs       \
  /export:JNI_CreateJavaVM                   \
  /export:JVM_FindClassFromBootLoader        \
  /export:JNI_GetCreatedJavaVMs              \
  /export:jio_snprintf                       \
  /export:jio_printf                         \
  /export:jio_fprintf                        \
  /export:jio_vfprintf                       \
  /export:jio_vsnprintf                      \
  $(AGCT_EXPORT)                             \
  /export:JVM_GetVersionInfo                 \
  /export:JVM_GetThreadStateNames            \
  /export:JVM_GetThreadStateValues           \
D
duke 已提交
115 116
  /export:JVM_InitAgentProperties

117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140
CPP_INCLUDE_DIRS=/I "..\generated"

!if exists($(ALTSRC)\share\vm)
CPP_INCLUDE_DIRS=$(CPP_INCLUDE_DIRS) /I "$(ALTSRC)\share\vm"
!endif

!if exists($(ALTSRC)\os\windows\vm)
CPP_INCLUDE_DIRS=$(CPP_INCLUDE_DIRS) /I "$(ALTSRC)\os\windows\vm"
!endif

!if exists($(ALTSRC)\os_cpu\windows_$(Platform_arch)\vm)
CPP_INCLUDE_DIRS=$(CPP_INCLUDE_DIRS) /I "$(ALTSRC)\os_cpu\windows_$(Platform_arch)\vm"
!endif

!if exists($(ALTSRC)\cpu\$(Platform_arch)\vm)
CPP_INCLUDE_DIRS=$(CPP_INCLUDE_DIRS) /I "$(ALTSRC)\cpu\$(Platform_arch)\vm"
!endif

CPP_INCLUDE_DIRS=$(CPP_INCLUDE_DIRS) \
  /I "$(COMMONSRC)\share\vm" \
  /I "$(COMMONSRC)\share\vm\prims" \
  /I "$(COMMONSRC)\os\windows\vm" \
  /I "$(COMMONSRC)\os_cpu\windows_$(Platform_arch)\vm" \
  /I "$(COMMONSRC)\cpu\$(Platform_arch)\vm"
D
duke 已提交
141

142 143 144
CPP_DONT_USE_PCH=/D DONT_USE_PRECOMPILED_HEADER

!if "$(USE_PRECOMPILED_HEADER)" != "0"
145
CPP_USE_PCH=/Fp"vm.pch" /Yu"precompiled.hpp"
146 147 148
!else
CPP_USE_PCH=$(CPP_DONT_USE_PCH)
!endif
D
duke 已提交
149

150
# Where to find the source code for the virtual machine (is this used?)
151 152
VM_PATH=../generated
VM_PATH=$(VM_PATH);../generated/adfiles
D
duke 已提交
153 154 155 156 157 158 159 160 161 162 163
VM_PATH=$(VM_PATH);../generated/jvmtifiles
VM_PATH=$(VM_PATH);$(WorkSpace)/src/share/vm/c1
VM_PATH=$(VM_PATH);$(WorkSpace)/src/share/vm/compiler
VM_PATH=$(VM_PATH);$(WorkSpace)/src/share/vm/code
VM_PATH=$(VM_PATH);$(WorkSpace)/src/share/vm/interpreter
VM_PATH=$(VM_PATH);$(WorkSpace)/src/share/vm/ci
VM_PATH=$(VM_PATH);$(WorkSpace)/src/share/vm/classfile
VM_PATH=$(VM_PATH);$(WorkSpace)/src/share/vm/gc_implementation/parallelScavenge
VM_PATH=$(VM_PATH);$(WorkSpace)/src/share/vm/gc_implementation/shared
VM_PATH=$(VM_PATH);$(WorkSpace)/src/share/vm/gc_implementation/parNew
VM_PATH=$(VM_PATH);$(WorkSpace)/src/share/vm/gc_implementation/concurrentMarkSweep
164
VM_PATH=$(VM_PATH);$(WorkSpace)/src/share/vm/gc_implementation/g1
D
duke 已提交
165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183
VM_PATH=$(VM_PATH);$(WorkSpace)/src/share/vm/gc_interface
VM_PATH=$(VM_PATH);$(WorkSpace)/src/share/vm/asm
VM_PATH=$(VM_PATH);$(WorkSpace)/src/share/vm/memory
VM_PATH=$(VM_PATH);$(WorkSpace)/src/share/vm/oops
VM_PATH=$(VM_PATH);$(WorkSpace)/src/share/vm/prims
VM_PATH=$(VM_PATH);$(WorkSpace)/src/share/vm/runtime
VM_PATH=$(VM_PATH);$(WorkSpace)/src/share/vm/services
VM_PATH=$(VM_PATH);$(WorkSpace)/src/share/vm/utilities
VM_PATH=$(VM_PATH);$(WorkSpace)/src/share/vm/libadt
VM_PATH=$(VM_PATH);$(WorkSpace)/src/os/windows/vm
VM_PATH=$(VM_PATH);$(WorkSpace)/src/os_cpu/windows_$(Platform_arch)/vm
VM_PATH=$(VM_PATH);$(WorkSpace)/src/cpu/$(Platform_arch)/vm
VM_PATH=$(VM_PATH);$(WorkSpace)/src/share/vm/opto

VM_PATH={$(VM_PATH)}

# Special case files not using precompiled header files.

c1_RInfo_$(Platform_arch).obj: $(WorkSpace)\src\cpu\$(Platform_arch)\vm\c1_RInfo_$(Platform_arch).cpp 
184
	 $(CPP) $(CPP_FLAGS) $(CPP_DONT_USE_PCH) /c $(WorkSpace)\src\cpu\$(Platform_arch)\vm\c1_RInfo_$(Platform_arch).cpp
D
duke 已提交
185 186

os_windows.obj: $(WorkSpace)\src\os\windows\vm\os_windows.cpp
187
        $(CPP) $(CPP_FLAGS) $(CPP_DONT_USE_PCH) /c $(WorkSpace)\src\os\windows\vm\os_windows.cpp
D
duke 已提交
188 189

os_windows_$(Platform_arch).obj: $(WorkSpace)\src\os_cpu\windows_$(Platform_arch)\vm\os_windows_$(Platform_arch).cpp
190
        $(CPP) $(CPP_FLAGS) $(CPP_DONT_USE_PCH) /c $(WorkSpace)\src\os_cpu\windows_$(Platform_arch)\vm\os_windows_$(Platform_arch).cpp
D
duke 已提交
191 192

osThread_windows.obj: $(WorkSpace)\src\os\windows\vm\osThread_windows.cpp
193
        $(CPP) $(CPP_FLAGS) $(CPP_DONT_USE_PCH) /c $(WorkSpace)\src\os\windows\vm\osThread_windows.cpp
D
duke 已提交
194 195

conditionVar_windows.obj: $(WorkSpace)\src\os\windows\vm\conditionVar_windows.cpp
196
        $(CPP) $(CPP_FLAGS) $(CPP_DONT_USE_PCH) /c $(WorkSpace)\src\os\windows\vm\conditionVar_windows.cpp
D
duke 已提交
197 198

getThread_windows_$(Platform_arch).obj: $(WorkSpace)\src\os_cpu\windows_$(Platform_arch)\vm\getThread_windows_$(Platform_arch).cpp
199
        $(CPP) $(CPP_FLAGS) $(CPP_DONT_USE_PCH) /c $(WorkSpace)\src\os_cpu\windows_$(Platform_arch)\vm\getThread_windows_$(Platform_arch).cpp
D
duke 已提交
200 201

opcodes.obj: $(WorkSpace)\src\share\vm\opto\opcodes.cpp
202
        $(CPP) $(CPP_FLAGS) $(CPP_DONT_USE_PCH) /c $(WorkSpace)\src\share\vm\opto\opcodes.cpp
D
duke 已提交
203 204

bytecodeInterpreter.obj: $(WorkSpace)\src\share\vm\interpreter\bytecodeInterpreter.cpp
205
        $(CPP) $(CPP_FLAGS) $(CPP_DONT_USE_PCH) /c $(WorkSpace)\src\share\vm\interpreter\bytecodeInterpreter.cpp
D
duke 已提交
206 207

bytecodeInterpreterWithChecks.obj: ..\generated\jvmtifiles\bytecodeInterpreterWithChecks.cpp
208
        $(CPP) $(CPP_FLAGS) $(CPP_DONT_USE_PCH) /c ..\generated\jvmtifiles\bytecodeInterpreterWithChecks.cpp
D
duke 已提交
209 210

# Default rules for the Virtual Machine
211
{$(COMMONSRC)\share\vm\c1}.cpp.obj::
D
duke 已提交
212 213
        $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<

214
{$(COMMONSRC)\share\vm\compiler}.cpp.obj::
D
duke 已提交
215 216
        $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<

217
{$(COMMONSRC)\share\vm\code}.cpp.obj::
D
duke 已提交
218 219
        $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<

220
{$(COMMONSRC)\share\vm\interpreter}.cpp.obj::
D
duke 已提交
221 222
        $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<

223
{$(COMMONSRC)\share\vm\ci}.cpp.obj::
D
duke 已提交
224 225
        $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<

226
{$(COMMONSRC)\share\vm\classfile}.cpp.obj::
D
duke 已提交
227 228
        $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<

229
{$(COMMONSRC)\share\vm\gc_implementation\parallelScavenge}.cpp.obj::
D
duke 已提交
230 231
        $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<

232
{$(COMMONSRC)\share\vm\gc_implementation\shared}.cpp.obj::
D
duke 已提交
233 234
        $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<

235
{$(COMMONSRC)\share\vm\gc_implementation\parNew}.cpp.obj::
D
duke 已提交
236 237
        $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<

238
{$(COMMONSRC)\share\vm\gc_implementation\concurrentMarkSweep}.cpp.obj::
D
duke 已提交
239 240
        $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<

241
{$(COMMONSRC)\share\vm\gc_implementation\g1}.cpp.obj::
242 243
        $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<

244
{$(COMMONSRC)\share\vm\gc_interface}.cpp.obj::
D
duke 已提交
245 246
        $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<

247
{$(COMMONSRC)\share\vm\asm}.cpp.obj::
D
duke 已提交
248 249
        $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<

250
{$(COMMONSRC)\share\vm\memory}.cpp.obj::
D
duke 已提交
251 252
        $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<

253
{$(COMMONSRC)\share\vm\oops}.cpp.obj::
D
duke 已提交
254 255
        $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<

256
{$(COMMONSRC)\share\vm\prims}.cpp.obj::
D
duke 已提交
257 258
        $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<

259
{$(COMMONSRC)\share\vm\runtime}.cpp.obj::
D
duke 已提交
260 261
        $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<

262
{$(COMMONSRC)\share\vm\services}.cpp.obj::
D
duke 已提交
263 264
        $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<

265
{$(COMMONSRC)\share\vm\utilities}.cpp.obj::
D
duke 已提交
266 267
        $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<

268
{$(COMMONSRC)\share\vm\libadt}.cpp.obj::
D
duke 已提交
269 270
        $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<

271
{$(COMMONSRC)\share\vm\opto}.cpp.obj::
D
duke 已提交
272 273
        $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<

274
{$(COMMONSRC)\os\windows\vm}.cpp.obj::
D
duke 已提交
275 276 277 278
        $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<

# This guy should remain a single colon rule because
# otherwise we can't specify the output filename.
279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355
{$(COMMONSRC)\os\windows\vm}.rc.res:
        @$(RC) $(RC_FLAGS) /fo"$@" $<

{$(COMMONSRC)\cpu\$(Platform_arch)\vm}.cpp.obj::
        $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<

{$(COMMONSRC)\os_cpu\windows_$(Platform_arch)\vm}.cpp.obj::
        $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<

{$(ALTSRC)\share\vm\c1}.cpp.obj::
        $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<

{$(ALTSRC)\share\vm\compiler}.cpp.obj::
        $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<

{$(ALTSRC)\share\vm\code}.cpp.obj::
        $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<

{$(ALTSRC)\share\vm\interpreter}.cpp.obj::
        $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<

{$(ALTSRC)\share\vm\ci}.cpp.obj::
        $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<

{$(ALTSRC)\share\vm\classfile}.cpp.obj::
        $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<

{$(ALTSRC)\share\vm\gc_implementation\parallelScavenge}.cpp.obj::
        $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<

{$(ALTSRC)\share\vm\gc_implementation\shared}.cpp.obj::
        $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<

{$(ALTSRC)\share\vm\gc_implementation\parNew}.cpp.obj::
        $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<

{$(ALTSRC)\share\vm\gc_implementation\concurrentMarkSweep}.cpp.obj::
        $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<

{$(ALTSRC)\share\vm\gc_implementation\g1}.cpp.obj::
        $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<

{$(ALTSRC)\share\vm\gc_interface}.cpp.obj::
        $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<

{$(ALTSRC)\share\vm\asm}.cpp.obj::
        $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<

{$(ALTSRC)\share\vm\memory}.cpp.obj::
        $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<

{$(ALTSRC)\share\vm\oops}.cpp.obj::
        $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<

{$(ALTSRC)\share\vm\prims}.cpp.obj::
        $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<

{$(ALTSRC)\share\vm\runtime}.cpp.obj::
        $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<

{$(ALTSRC)\share\vm\services}.cpp.obj::
        $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<

{$(ALTSRC)\share\vm\utilities}.cpp.obj::
        $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<

{$(ALTSRC)\share\vm\libadt}.cpp.obj::
        $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<

{$(ALTSRC)\share\vm\opto}.cpp.obj::
        $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<

{$(ALTSRC)\os\windows\vm}.cpp.obj::
        $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<

# otherwise we can't specify the output filename.
{$(ALTSRC)\os\windows\vm}.rc.res:
D
duke 已提交
356 357
        @$(RC) $(RC_FLAGS) /fo"$@" $<

358
{$(ALTSRC)\cpu\$(Platform_arch)\vm}.cpp.obj::
D
duke 已提交
359 360
        $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<

361
{$(ALTSRC)\os_cpu\windows_$(Platform_arch)\vm}.cpp.obj::
D
duke 已提交
362 363 364 365 366
        $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<

{..\generated\incls}.cpp.obj::
        $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<

367 368 369
{..\generated\adfiles}.cpp.obj::
        $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<

D
duke 已提交
370 371 372 373 374 375
{..\generated\jvmtifiles}.cpp.obj::
        $(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<

default::

_build_pch_file.obj:
376 377
        @echo #include "precompiled.hpp" > ../generated/_build_pch_file.cpp
        $(CPP) $(CPP_FLAGS) /Fp"vm.pch" /Yc"precompiled.hpp" /c ../generated/_build_pch_file.cpp