Index: /trunk/openjdk/hotspot/make/os2/makefiles/adlc.make
===================================================================
--- /trunk/openjdk/hotspot/make/os2/makefiles/adlc.make	(revision 44)
+++ /trunk/openjdk/hotspot/make/os2/makefiles/adlc.make	(revision 45)
@@ -33,20 +33,20 @@
 endif
 
-CXX_INCLUDE_DIRS=\
-  -I "../generated"                          \
-  -I "$(WorkSpace)/src/share/vm/compiler"    \
-  -I "$(WorkSpace)/src/share/vm/code"        \
-  -I "$(WorkSpace)/src/share/vm/interpreter" \
-  -I "$(WorkSpace)/src/share/vm/classfile"   \
-  -I "$(WorkSpace)/src/share/vm/asm"         \
-  -I "$(WorkSpace)/src/share/vm/memory"      \
-  -I "$(WorkSpace)/src/share/vm/oops"        \
-  -I "$(WorkSpace)/src/share/vm/prims"       \
-  -I "$(WorkSpace)/src/share/vm/runtime"     \
-  -I "$(WorkSpace)/src/share/vm/utilities"   \
-  -I "$(WorkSpace)/src/share/vm/libadt"      \
-  -I "$(WorkSpace)/src/share/vm/opto"        \
-  -I "$(WorkSpace)/src/os/windows/vm"          \
-  -I "$(WorkSpace)/src/cpu/$(Platform_arch)/vm"
+CPP_INCLUDE_DIRS=\
+  -I'../generated'                          \
+  -I'$(WorkSpace)/src/share/vm/compiler'    \
+  -I'$(WorkSpace)/src/share/vm/code'        \
+  -I'$(WorkSpace)/src/share/vm/interpreter' \
+  -I'$(WorkSpace)/src/share/vm/classfile'   \
+  -I'$(WorkSpace)/src/share/vm/asm'         \
+  -I'$(WorkSpace)/src/share/vm/memory'      \
+  -I'$(WorkSpace)/src/share/vm/oops'        \
+  -I'$(WorkSpace)/src/share/vm/prims'       \
+  -I'$(WorkSpace)/src/share/vm/runtime'     \
+  -I'$(WorkSpace)/src/share/vm/utilities'   \
+  -I'$(WorkSpace)/src/share/vm/libadt'      \
+  -I'$(WorkSpace)/src/share/vm/opto'        \
+  -I'$(WorkSpace)/src/os/windows/vm'          \
+  -I'$(WorkSpace)/src/cpu/$(Platform_arch)/vm'
 
 # NOTE! If you add any files here, you must also update GENERATED_NAMES_IN_INCL
@@ -71,5 +71,5 @@
 
 %.obj: %.cpp
-	$(CXX) $(CXX_FLAGS) $(CXX_INCLUDE_DIRS) -c $< -o $@
+	$(CXX) $(CPP_INCLUDE_DIRS) $(CXX_FLAGS) -c $< -o $@
 
 adlc.exe: main.obj adlparse.obj archDesc.obj arena.obj dfa.obj dict2.obj filebuff.obj \
Index: /trunk/openjdk/hotspot/make/os2/makefiles/compile.make
===================================================================
--- /trunk/openjdk/hotspot/make/os2/makefiles/compile.make	(revision 44)
+++ /trunk/openjdk/hotspot/make/os2/makefiles/compile.make	(revision 45)
@@ -26,9 +26,9 @@
 CXX = g++
 
-CXX_FLAGS = -Zomf -march=i486 -mtune=generic
+CXX_FLAGS = $(CPP_FLAGS) -Zomf -march=i486 -mtune=generic
 
 # Based on BUILDARCH we add some flags and select the default compiler name
 ifeq ($(BUILDARCH),i486)
-CXX_FLAGS += -DIA32
+CPP_FLAGS += -DIA32
 endif
 
@@ -59,2 +59,12 @@
  #comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib \
  #uuid.lib Wsock32.lib winmm.lib
+
+IMPLIB = emximp
+
+# Odin SDK
+
+CPP_FLAGS += -D__WIN32OS2__ -D__i386__ -DSTRICT
+CPP_FLAGS += -I$(ALT_ODINSDK_PATH)/include/Win -I$(ALT_ODINSDK_PATH)/include
+
+LINK_FLAGS  += -L$(ALT_ODINSDK_PATH)/lib -L$(ALT_ODINSDK_PATH)/lib/Release \
+			   -lkernel32.lib -luser32.lib
Index: /trunk/openjdk/hotspot/make/os2/makefiles/product.make
===================================================================
--- /trunk/openjdk/hotspot/make/os2/makefiles/product.make	(revision 45)
+++ /trunk/openjdk/hotspot/make/os2/makefiles/product.make	(revision 45)
@@ -0,0 +1,59 @@
+#
+# Copyright 2005-2008 Sun Microsystems, Inc.  All Rights Reserved.
+# 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.
+#
+# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+# CA 95054 USA or visit www.sun.com if you need additional information or
+# have any questions.
+#
+#
+
+HS_INTERNAL_NAME = jvm
+HS_FNAME = $(HS_INTERNAL_NAME).dll
+AOUT = $(HS_FNAME)
+GENERATED = ../generated
+
+default:: _build_pch_file.obj $(AOUT) checkAndBuildSA
+
+include ../local.make
+include $(WorkSpace)/make/os2/makefiles/compile.make
+
+CXX_FLAGS += $(PRODUCT_OPT_OPTION)
+
+RELEASE =
+
+include $(WorkSpace)/make/os2/makefiles/vm.make
+include local.make
+
+include $(GENERATED)/Dependencies
+
+HS_BUILD_ID = $(HS_BUILD_VER)
+
+# Kernel doesn't need exported vtbl symbols.
+ifeq ($(Variant), kernel)
+$(AOUT): $(Res_Files) $(Obj_Files) $(Def_File)
+	$(LINK) -o $@ $(Obj_Files) $(Res_Files)
+	$(IMPLIB) -o $(basaename $@).lib $@
+else
+$(AOUT): $(Res_Files) $(Obj_Files)
+	sh $(WorkSpace)/make/os2/build_vm_def.sh
+	$(LINK) -o $@ vm.def $(Obj_Files) $(Res_Files)
+	$(IMPLIB) -o $(basename $@).lib $@
+endif
+
+include $(WorkSpace)/make/os2/makefiles/shared.make
+include $(WorkSpace)/make/os2/makefiles/sa.make
Index: /trunk/openjdk/hotspot/make/os2/makefiles/shared.make
===================================================================
--- /trunk/openjdk/hotspot/make/os2/makefiles/shared.make	(revision 44)
+++ /trunk/openjdk/hotspot/make/os2/makefiles/shared.make	(revision 45)
@@ -61,3 +61,5 @@
 endif
 
+MAKEFILE := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
+
 FORCE:
Index: /trunk/openjdk/hotspot/make/os2/makefiles/vm.make
===================================================================
--- /trunk/openjdk/hotspot/make/os2/makefiles/vm.make	(revision 45)
+++ /trunk/openjdk/hotspot/make/os2/makefiles/vm.make	(revision 45)
@@ -0,0 +1,164 @@
+#
+# Copyright 1997-2009 Sun Microsystems, Inc.  All Rights Reserved.
+# 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.
+#
+# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+# CA 95054 USA or visit www.sun.com if you need additional information or
+# have any questions.
+#
+#
+
+ifdef RELEASE
+ifdef DEVELOP
+CPP_FLAGS += -DDEBUG
+else
+CPP_FLAGS += -DPRODUCT
+endif
+else
+CPP_FLAGS += -DASSERT
+endif
+
+ifeq ($(Variant), core)
+# No need to define anything, CORE is defined as !COMPILER1 && !COMPILER2
+endif
+
+ifeq ($(Variant), kernel)
+CPP_FLAGS += -DKERNEL
+endif
+
+ifeq ($(Variant), compiler1)
+CPP_FLAGS += -DCOMPILER1
+endif
+
+ifeq ($(Variant), compiler2)
+CPP_FLAGS += -DCOMPILER2
+endif
+
+ifeq ($(Variant), tiered)
+CPP_FLAGS += -DCOMPILER1 -DCOMPILER2
+endif
+
+ifeq ($(BUILDARCH), i486)
+HOTSPOT_LIB_ARCH = i386
+else
+HOTSPOT_LIB_ARCH = $(BUILDARCH)
+endif
+
+# The following variables are defined in the generated local.make file.
+CPP_FLAGS += -D'HOTSPOT_RELEASE_VERSION="$(HS_BUILD_VER)"'
+CPP_FLAGS += -D'JRE_RELEASE_VERSION="$(JRE_RELEASE_VER)"'
+CPP_FLAGS += -D'HOTSPOT_LIB_ARCH="$(HOTSPOT_LIB_ARCH)"'
+CPP_FLAGS += -D'HOTSPOT_BUILD_TARGET="$(BUILD_FLAVOR)"'
+CPP_FLAGS += -D'HOTSPOT_BUILD_USER="$(BuildUser)"'
+CPP_FLAGS += -D'HOTSPOT_VM_DISTRO="$(HOTSPOT_VM_DISTRO)"'
+
+CPP_FLAGS += -DOS2
+
+# Must specify this for sharedRuntimeTrig.cpp
+CPP_FLAGS += -DVM_LITTLE_ENDIAN
+
+# Define that so jni.h is on correct side
+CPP_FLAGS += -D_JNI_IMPLEMENTATION_
+
+ifeq ($(Variant), kernel)
+AGCT_EXPORT=
+else
+AGCT_EXPORT=AsyncGetCallTrace
+endif
+
+Def_File = vm.def
+$(Def_File): $(MAKEFILE)
+	@echo 'EXPORTS ;$(MAKEFILE)     \
+  JNI_GetDefaultJavaVMInitArgs      \
+  JNI_CreateJavaVM                  \
+  JVM_FindClassFromBootLoader       \
+  JNI_GetCreatedJavaVMs             \
+  jio_snprintf                      \
+  jio_printf                        \
+  jio_fprintf                       \
+  jio_vfprintf                      \
+  jio_vsnprintf                     \
+  $(AGCT_EXPORT)                    \
+  JVM_GetVersionInfo                \
+  JVM_GetThreadStateNames           \
+  JVM_GetThreadStateValues          \
+  JVM_InitAgentProperties           \
+' > $(Def_File)
+
+LINK_FLAGS += -Zdll
+
+Src_Dirs = \
+  ../generated                          \
+  ../generated/incls                    \
+  ../generated/jvmtifiles               \
+  $(WorkSpace)/src/share/vm/c1          \
+  $(WorkSpace)/src/share/vm/compiler    \
+  $(WorkSpace)/src/share/vm/code        \
+  $(WorkSpace)/src/share/vm/interpreter \
+  $(WorkSpace)/src/share/vm/ci          \
+  $(WorkSpace)/src/share/vm/classfile   \
+  $(WorkSpace)/src/share/vm/gc_implementation/parallelScavenge\
+  $(WorkSpace)/src/share/vm/gc_implementation/shared\
+  $(WorkSpace)/src/share/vm/gc_implementation/parNew\
+  $(WorkSpace)/src/share/vm/gc_implementation/concurrentMarkSweep\
+  $(WorkSpace)/src/share/vm/gc_implementation/g1\
+  $(WorkSpace)/src/share/vm/gc_interface\
+  $(WorkSpace)/src/share/vm/asm         \
+  $(WorkSpace)/src/share/vm/memory      \
+  $(WorkSpace)/src/share/vm/oops        \
+  $(WorkSpace)/src/share/vm/prims       \
+  $(WorkSpace)/src/share/vm/runtime     \
+  $(WorkSpace)/src/share/vm/services    \
+  $(WorkSpace)/src/share/vm/utilities   \
+  $(WorkSpace)/src/share/vm/libadt      \
+  $(WorkSpace)/src/share/vm/opto        \
+  $(WorkSpace)/src/os/windows/vm          \
+  $(WorkSpace)/src/os_cpu/windows_$(Platform_arch)\vm \
+  $(WorkSpace)/src/cpu/$(Platform_arch)/vm \
+  $(WorkSpace)/src/share/vm/opto
+
+# @todo PCH once GCC 4 for OS/2 supports it well
+CPP_FLAGS += # PCH output: "vm.pch" PCH sources: "incls/_precompiled.incl"
+
+# Where to find the include files for the virtual machine
+CPP_FLAGS += $(Src_Dirs:%=-I'%')
+
+# Where to find the source code for the virtual machine
+VPATH += $(Src_Dirs:%=%;)
+
+# Special case files not using precompiled header files.
+
+c1_RInfo_$(Platform_arch).obj: $(WorkSpace)/src/cpu/$(Platform_arch)/vm/c1_RInfo_$(Platform_arch).cpp
+os_windows.obj: $(WorkSpace)\src\os\windows\vm\os_windows.cpp
+os_windows_$(Platform_arch).obj: $(WorkSpace)\src\os_cpu\windows_$(Platform_arch)\vm\os_windows_$(Platform_arch).cpp
+osThread_windows.obj: $(WorkSpace)\src\os\windows\vm\osThread_windows.cpp
+conditionVar_windows.obj: $(WorkSpace)\src\os\windows\vm\conditionVar_windows.cpp
+getThread_windows_$(Platform_arch).obj: $(WorkSpace)\src\os_cpu\windows_$(Platform_arch)\vm\getThread_windows_$(Platform_arch).cpp
+opcodes.obj: $(WorkSpace)\src\share\vm\opto\opcodes.cpp
+bytecodeInterpreter.obj: $(WorkSpace)\src\share\vm\interpreter\bytecodeInterpreter.cpp
+bytecodeInterpreterWithChecks.obj: ..\generated\jvmtifiles\bytecodeInterpreterWithChecks.cpp
+
+# Default rules for the Virtual Machine
+%.obj: %.cpp
+	$(CXX) $(CXX_FLAGS) -c $< -o $@
+
+default::
+
+# @todo PCH once GCC 4 for OS/2 supports it well
+_build_pch_file.obj:
+	@#echo '#include "incls/_precompiled.incl"' > ../generated/_build_pch_file.cpp
+	@#$(CXX) $(CXX_FLAGS) PCH output: "vm.pch", PCH sources (create mode): "incls/_precompiled.incl" -c ../generated/_build_pch_file.cpp -o $@
