annotate make/windows/README @ 91:a294fd0c4b38

6583644: Move all managed/SCCS files out of 'build' into 'make' directory Summary: Moved makefiles out of build and build/closed into make/ Reviewed-by: kvn, ohair
author kamg
date Wed, 09 Apr 2008 14:22:48 -0400
parents build/windows/README@a61af66fc99e
children c18cbe5936b8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a61af66fc99e Initial load
duke
parents:
diff changeset
1 Copyright (c) 2007 Sun Microsystems, Inc. All Rights Reserved.
a61af66fc99e Initial load
duke
parents:
diff changeset
2 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
a61af66fc99e Initial load
duke
parents:
diff changeset
3
a61af66fc99e Initial load
duke
parents:
diff changeset
4 This code is free software; you can redistribute it and/or modify it
a61af66fc99e Initial load
duke
parents:
diff changeset
5 under the terms of the GNU General Public License version 2 only, as
a61af66fc99e Initial load
duke
parents:
diff changeset
6 published by the Free Software Foundation.
a61af66fc99e Initial load
duke
parents:
diff changeset
7
a61af66fc99e Initial load
duke
parents:
diff changeset
8 This code is distributed in the hope that it will be useful, but WITHOUT
a61af66fc99e Initial load
duke
parents:
diff changeset
9 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
a61af66fc99e Initial load
duke
parents:
diff changeset
10 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
a61af66fc99e Initial load
duke
parents:
diff changeset
11 version 2 for more details (a copy is included in the LICENSE file that
a61af66fc99e Initial load
duke
parents:
diff changeset
12 accompanied this code).
a61af66fc99e Initial load
duke
parents:
diff changeset
13
a61af66fc99e Initial load
duke
parents:
diff changeset
14 You should have received a copy of the GNU General Public License version
a61af66fc99e Initial load
duke
parents:
diff changeset
15 2 along with this work; if not, write to the Free Software Foundation,
a61af66fc99e Initial load
duke
parents:
diff changeset
16 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
a61af66fc99e Initial load
duke
parents:
diff changeset
17
a61af66fc99e Initial load
duke
parents:
diff changeset
18 Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
a61af66fc99e Initial load
duke
parents:
diff changeset
19 CA 95054 USA or visit www.sun.com if you need additional information or
a61af66fc99e Initial load
duke
parents:
diff changeset
20 have any questions.
a61af66fc99e Initial load
duke
parents:
diff changeset
21
a61af66fc99e Initial load
duke
parents:
diff changeset
22 ________________________________________________________________________________
a61af66fc99e Initial load
duke
parents:
diff changeset
23
a61af66fc99e Initial load
duke
parents:
diff changeset
24 __Introduction__________________________________________________________________
a61af66fc99e Initial load
duke
parents:
diff changeset
25
a61af66fc99e Initial load
duke
parents:
diff changeset
26 This readme file should provide all the information needed to build
a61af66fc99e Initial load
duke
parents:
diff changeset
27 the HotSpot VM for Windows 95/Windows NT from its teamware workspace.
a61af66fc99e Initial load
duke
parents:
diff changeset
28 It is intended as a starting point for people who want to learn how
a61af66fc99e Initial load
duke
parents:
diff changeset
29 to work with the current HotSpot source workspace and who need to
a61af66fc99e Initial load
duke
parents:
diff changeset
30 build the VM locally. It is not intended as a tutorial for licensees.
a61af66fc99e Initial load
duke
parents:
diff changeset
31
a61af66fc99e Initial load
duke
parents:
diff changeset
32 Last update: 03/28/05
a61af66fc99e Initial load
duke
parents:
diff changeset
33
a61af66fc99e Initial load
duke
parents:
diff changeset
34
a61af66fc99e Initial load
duke
parents:
diff changeset
35 __Platform______________________________________________________________________
a61af66fc99e Initial load
duke
parents:
diff changeset
36
a61af66fc99e Initial load
duke
parents:
diff changeset
37 The VM builds under the following platforms:
a61af66fc99e Initial load
duke
parents:
diff changeset
38 - Windows NT 4.0 on Intel x486 or greater
a61af66fc99e Initial load
duke
parents:
diff changeset
39 - x486 PC (or greater), 32MByte or more
a61af66fc99e Initial load
duke
parents:
diff changeset
40
a61af66fc99e Initial load
duke
parents:
diff changeset
41
a61af66fc99e Initial load
duke
parents:
diff changeset
42 __Tools_________________________________________________________________________
a61af66fc99e Initial load
duke
parents:
diff changeset
43
a61af66fc99e Initial load
duke
parents:
diff changeset
44 For building/testing the following tools need to be available:
a61af66fc99e Initial load
duke
parents:
diff changeset
45 - Microsoft Visual C++ 6.0 (with nmake version 1.62.7022 or greater)
a61af66fc99e Initial load
duke
parents:
diff changeset
46 - MKS Toolkit 6.1 or greater
a61af66fc99e Initial load
duke
parents:
diff changeset
47 see: /net/reinstall/export/vol0/pc-archive/software/mks6.1 (NFS)
a61af66fc99e Initial load
duke
parents:
diff changeset
48 or: \\reinstall\pc-archive\software\mks6.1 (NT)
a61af66fc99e Initial load
duke
parents:
diff changeset
49
a61af66fc99e Initial load
duke
parents:
diff changeset
50
a61af66fc99e Initial load
duke
parents:
diff changeset
51 __JDK___________________________________________________________________________
a61af66fc99e Initial load
duke
parents:
diff changeset
52
a61af66fc99e Initial load
duke
parents:
diff changeset
53 The workspace works with the following version of the JDK:
a61af66fc99e Initial load
duke
parents:
diff changeset
54 (NOTE: these are out of date)
a61af66fc99e Initial load
duke
parents:
diff changeset
55 - JDK1.2FCS "V" build
a61af66fc99e Initial load
duke
parents:
diff changeset
56 see: /usr/local/java/jdk1.2/win32
a61af66fc99e Initial load
duke
parents:
diff changeset
57
a61af66fc99e Initial load
duke
parents:
diff changeset
58 and the following version(s) of HotJava:
a61af66fc99e Initial load
duke
parents:
diff changeset
59 - hjb1.1.4
a61af66fc99e Initial load
duke
parents:
diff changeset
60 - hjb1.1.5
a61af66fc99e Initial load
duke
parents:
diff changeset
61 see /usr/local/java/hjb1.1.x/win32
a61af66fc99e Initial load
duke
parents:
diff changeset
62
a61af66fc99e Initial load
duke
parents:
diff changeset
63
a61af66fc99e Initial load
duke
parents:
diff changeset
64 __Environment variables_________________________________________________________
a61af66fc99e Initial load
duke
parents:
diff changeset
65
a61af66fc99e Initial load
duke
parents:
diff changeset
66 The following environment variables need to be set up for the IDE
a61af66fc99e Initial load
duke
parents:
diff changeset
67 build process. For batch builds these do not need to be set.
a61af66fc99e Initial load
duke
parents:
diff changeset
68
a61af66fc99e Initial load
duke
parents:
diff changeset
69 HotSpotMksHome points to the (NFS or PC-local) directory where the MKS
a61af66fc99e Initial load
duke
parents:
diff changeset
70 executables (like sh.exe and grep.exe) are installed
a61af66fc99e Initial load
duke
parents:
diff changeset
71
a61af66fc99e Initial load
duke
parents:
diff changeset
72 Optionally you may set the following variables in your environment and they
a61af66fc99e Initial load
duke
parents:
diff changeset
73 will be picked up by the create.bat script used to generate the vm.vcproj files.
a61af66fc99e Initial load
duke
parents:
diff changeset
74 See the section on building within MS Developer Studio for more details.
a61af66fc99e Initial load
duke
parents:
diff changeset
75
a61af66fc99e Initial load
duke
parents:
diff changeset
76 HotSpotWorkSpace points to the (NFS) directory where the workspace is located
a61af66fc99e Initial load
duke
parents:
diff changeset
77 HotSpotBuildSpace points to the (PC-local) directory where the vm is built
a61af66fc99e Initial load
duke
parents:
diff changeset
78 HotSpotReleaseBinDest points to the (NFS or PC-local) directory where the product DLL is
a61af66fc99e Initial load
duke
parents:
diff changeset
79 written
a61af66fc99e Initial load
duke
parents:
diff changeset
80 HotSpotDebugBinDest points to the (NFS or PC-local) directory where the debug DLL is
a61af66fc99e Initial load
duke
parents:
diff changeset
81 written
a61af66fc99e Initial load
duke
parents:
diff changeset
82
a61af66fc99e Initial load
duke
parents:
diff changeset
83 NOTE: For both batch and IDE builds, java and javac must be in your
a61af66fc99e Initial load
duke
parents:
diff changeset
84 PATH, and the versions found by default must work. (If this turns out
a61af66fc99e Initial load
duke
parents:
diff changeset
85 to be a problem, we can define HotSpotJava and HotSpotJavaC for
a61af66fc99e Initial load
duke
parents:
diff changeset
86 bootstrapping...)
a61af66fc99e Initial load
duke
parents:
diff changeset
87
a61af66fc99e Initial load
duke
parents:
diff changeset
88 __Building the JVM from the command line________________________________________
a61af66fc99e Initial load
duke
parents:
diff changeset
89
a61af66fc99e Initial load
duke
parents:
diff changeset
90 1) choose a directory in which you want to build the vm
a61af66fc99e Initial load
duke
parents:
diff changeset
91 (the build process will create a subdirectory)
a61af66fc99e Initial load
duke
parents:
diff changeset
92
a61af66fc99e Initial load
duke
parents:
diff changeset
93 2) To build the 'core' version (debug || optimized)
a61af66fc99e Initial load
duke
parents:
diff changeset
94 %HotSpotWorkSpace%\build\windows\build <flavor> core %HotSpotWorkSpace% <jdk_dir>
a61af66fc99e Initial load
duke
parents:
diff changeset
95 To build the 'compiler2' version (debug || optimized)
a61af66fc99e Initial load
duke
parents:
diff changeset
96 %HotSpotWorkSpace%\build\windows\build <flavor> compiler2 %HotSpotWorkSpace% <jdk_dir>
a61af66fc99e Initial load
duke
parents:
diff changeset
97
a61af66fc99e Initial load
duke
parents:
diff changeset
98 where <jdk_dir> is a full path to a JDK in which bin/java and
a61af66fc99e Initial load
duke
parents:
diff changeset
99 bin/javac are present and working.
a61af66fc99e Initial load
duke
parents:
diff changeset
100
a61af66fc99e Initial load
duke
parents:
diff changeset
101 3) If you have problems with building, first try:
a61af66fc99e Initial load
duke
parents:
diff changeset
102 vcvars32 <CR> (sets path for VC++)
a61af66fc99e Initial load
duke
parents:
diff changeset
103
a61af66fc99e Initial load
duke
parents:
diff changeset
104 4) In addition to jvm.dll, the Serviceability Agent (SA) based JDI connector
a61af66fc99e Initial load
duke
parents:
diff changeset
105 and command line tools are built if dbgeng.h and dbgeng.lib
a61af66fc99e Initial load
duke
parents:
diff changeset
106 can be located, and BUILD_WIN_SA=1 is specified. We look for dbgeng.h here:
a61af66fc99e Initial load
duke
parents:
diff changeset
107 $(MSVCDIR)\PlatformSDK\Include
a61af66fc99e Initial load
duke
parents:
diff changeset
108 $(SYSTEMROOT)\..\Program Files\Microsoft SDK\include
a61af66fc99e Initial load
duke
parents:
diff changeset
109
a61af66fc99e Initial load
duke
parents:
diff changeset
110 The first directory is part of Visual Studio VC .NET 2003.
a61af66fc99e Initial load
duke
parents:
diff changeset
111 The second is used on Windows-amd64.
a61af66fc99e Initial load
duke
parents:
diff changeset
112
a61af66fc99e Initial load
duke
parents:
diff changeset
113
a61af66fc99e Initial load
duke
parents:
diff changeset
114 __Building the JVM from within MS Developer Studio______________________________
a61af66fc99e Initial load
duke
parents:
diff changeset
115
a61af66fc99e Initial load
duke
parents:
diff changeset
116 0) Set environment variables as described above
a61af66fc99e Initial load
duke
parents:
diff changeset
117
a61af66fc99e Initial load
duke
parents:
diff changeset
118 1) Run the following script:
a61af66fc99e Initial load
duke
parents:
diff changeset
119 %HotSpotWorkSpace%\build\windows\create <type> { <workspace> <buildspace> <productbindest> <debugbindest> }
a61af66fc99e Initial load
duke
parents:
diff changeset
120 where type is one of core, compiler1, compiler2. If you leave off the
a61af66fc99e Initial load
duke
parents:
diff changeset
121 "<workspace> <buildspace> <productbindest> <debugbindest>" part, the script expects to find their
a61af66fc99e Initial load
duke
parents:
diff changeset
122 values in the HotSpotWorkSpace, HotSpotBuildSpace, HotSpotReleaseBinDest, and HotSpotDebugBinDest environment
a61af66fc99e Initial load
duke
parents:
diff changeset
123 variables. The resulting vm.vcproj does not depend on these values in the environment.
a61af66fc99e Initial load
duke
parents:
diff changeset
124
a61af66fc99e Initial load
duke
parents:
diff changeset
125 This will populate the build space with the appropriate makefiles
a61af66fc99e Initial load
duke
parents:
diff changeset
126 and run nmake in it. This builds and runs makedeps, which now
a61af66fc99e Initial load
duke
parents:
diff changeset
127 generates the appropriate vm.vcproj into the build space. It also
a61af66fc99e Initial load
duke
parents:
diff changeset
128 builds and runs adlc.
a61af66fc99e Initial load
duke
parents:
diff changeset
129
a61af66fc99e Initial load
duke
parents:
diff changeset
130 To regenerate the .incl and .dsp files after changing the include
a61af66fc99e Initial load
duke
parents:
diff changeset
131 databases, just run nmake in the build space.
a61af66fc99e Initial load
duke
parents:
diff changeset
132
a61af66fc99e Initial load
duke
parents:
diff changeset
133 The build process now relies on java and javac. For the IDE builds,
a61af66fc99e Initial load
duke
parents:
diff changeset
134 the full path to a JDK (in which bin/java and bin/javac are present
a61af66fc99e Initial load
duke
parents:
diff changeset
135 and working) can be specified either explicitly with the
a61af66fc99e Initial load
duke
parents:
diff changeset
136 ALT_BOOTDIR environment variable (like the JDK build process), via
a61af66fc99e Initial load
duke
parents:
diff changeset
137 the JDK build's default BOOTDIR environment variable, via JAVA_HOME,
a61af66fc99e Initial load
duke
parents:
diff changeset
138 or implicitly via the PATH.
a61af66fc99e Initial load
duke
parents:
diff changeset
139
a61af66fc99e Initial load
duke
parents:
diff changeset
140 (Note that there are now many more command line options to MakeDeps
a61af66fc99e Initial load
duke
parents:
diff changeset
141 on the Windows platform than before. These have been bundled into
a61af66fc99e Initial load
duke
parents:
diff changeset
142 makefiles/makedeps.make, but it is still necessary to keep this in
a61af66fc99e Initial load
duke
parents:
diff changeset
143 sync with the batch makefiles, in vm/generated.)
a61af66fc99e Initial load
duke
parents:
diff changeset
144
a61af66fc99e Initial load
duke
parents:
diff changeset
145 If you have problems with building (i.e,. finding nmake), first try:
a61af66fc99e Initial load
duke
parents:
diff changeset
146 vcvars32 <CR> (sets path for VC++)
a61af66fc99e Initial load
duke
parents:
diff changeset
147
a61af66fc99e Initial load
duke
parents:
diff changeset
148 2) Double-click the vm.vcproj file in the %HotSpotBuildSpace% directory
a61af66fc99e Initial load
duke
parents:
diff changeset
149 to open MS Developer Studio.
a61af66fc99e Initial load
duke
parents:
diff changeset
150
a61af66fc99e Initial load
duke
parents:
diff changeset
151 3) build desired or all versions:
a61af66fc99e Initial load
duke
parents:
diff changeset
152 menu Build -> Batch Build... -> Build (or Rebuild All)
a61af66fc99e Initial load
duke
parents:
diff changeset
153
a61af66fc99e Initial load
duke
parents:
diff changeset
154 4) jvm.dll is in the %HotSpotReleaseBinDest% or %HotSpotDebugBinDest% directory
a61af66fc99e Initial load
duke
parents:
diff changeset
155 depending on which configuration you built (release or debug).
a61af66fc99e Initial load
duke
parents:
diff changeset
156
a61af66fc99e Initial load
duke
parents:
diff changeset
157 Note: do not edit any of the files (especially the vm.vcproj file) in the
a61af66fc99e Initial load
duke
parents:
diff changeset
158 build space, since they are all either autogenerated or copied from
a61af66fc99e Initial load
duke
parents:
diff changeset
159 the work space. If necessary, modify the original Makefiles in
a61af66fc99e Initial load
duke
parents:
diff changeset
160 %HotSpotWorkSpace%\build\windows\projectfiles, or the shared
a61af66fc99e Initial load
duke
parents:
diff changeset
161 makedeps arguments in
a61af66fc99e Initial load
duke
parents:
diff changeset
162 %HotSpotWorkSpace%\build\windows\makefiles\makedeps.make.
a61af66fc99e Initial load
duke
parents:
diff changeset
163
a61af66fc99e Initial load
duke
parents:
diff changeset
164 Note that it appears that some options set in the IDE (for example,
a61af66fc99e Initial load
duke
parents:
diff changeset
165 the default executable) show up not in the .dsp file, but in the .opt
a61af66fc99e Initial load
duke
parents:
diff changeset
166 file, so the automatic regeneration of the .dsp file should not
a61af66fc99e Initial load
duke
parents:
diff changeset
167 destroy the project settings. However, makedeps.make should be edited
a61af66fc99e Initial load
duke
parents:
diff changeset
168 to supply per-file compiler options.
a61af66fc99e Initial load
duke
parents:
diff changeset
169
a61af66fc99e Initial load
duke
parents:
diff changeset
170 To build adlc from within the IDE for debugging purposes:
a61af66fc99e Initial load
duke
parents:
diff changeset
171
a61af66fc99e Initial load
duke
parents:
diff changeset
172 1) in MS Developer Studio, open ADLCompiler.dsw:
a61af66fc99e Initial load
duke
parents:
diff changeset
173 menu File -> Open Workspace...
a61af66fc99e Initial load
duke
parents:
diff changeset
174 select & double-click ADLCompiler.dsw
a61af66fc99e Initial load
duke
parents:
diff changeset
175
a61af66fc99e Initial load
duke
parents:
diff changeset
176 2) rebuild all (debug mode is enough)
a61af66fc99e Initial load
duke
parents:
diff changeset
177 menu Build -> Rebuild All (make sure Win32 Debug version is selected)
a61af66fc99e Initial load
duke
parents:
diff changeset
178
a61af66fc99e Initial load
duke
parents:
diff changeset
179
a61af66fc99e Initial load
duke
parents:
diff changeset
180 __Testing the VM________________________________________________________________
a61af66fc99e Initial load
duke
parents:
diff changeset
181
a61af66fc99e Initial load
duke
parents:
diff changeset
182 To test the VM using the Tonga Testsuite, use testlook. testlook is a very
a61af66fc99e Initial load
duke
parents:
diff changeset
183 simple testing framework on top of Tonga which allows us to use one (Tonga)
a61af66fc99e Initial load
duke
parents:
diff changeset
184 test file, that can be extended with attributes.
a61af66fc99e Initial load
duke
parents:
diff changeset
185
a61af66fc99e Initial load
duke
parents:
diff changeset
186 1) copy %HotSpotWorkSpace%\test\testlook.bat onto PC (preferably
a61af66fc99e Initial load
duke
parents:
diff changeset
187 %HotSpotBuildSpace%\bin, which should ideally be in the path)
a61af66fc99e Initial load
duke
parents:
diff changeset
188
a61af66fc99e Initial load
duke
parents:
diff changeset
189 2) run testlook <cr> or testlook help <cr> for details
a61af66fc99e Initial load
duke
parents:
diff changeset
190
a61af66fc99e Initial load
duke
parents:
diff changeset
191 3) to run testlook you need to have Tonga mounted:
a61af66fc99e Initial load
duke
parents:
diff changeset
192 net use T: \\tapas\export1\psqe
a61af66fc99e Initial load
duke
parents:
diff changeset
193
a61af66fc99e Initial load
duke
parents:
diff changeset
194
a61af66fc99e Initial load
duke
parents:
diff changeset
195 __HotJava under HotSpot_________________________________________________________
a61af66fc99e Initial load
duke
parents:
diff changeset
196
a61af66fc99e Initial load
duke
parents:
diff changeset
197 To run HotJava, use the .bat file %HotSpotWorkSpace%\test\h.bat. Copy
a61af66fc99e Initial load
duke
parents:
diff changeset
198 it into %HotSpotBuildSpace%/<flavor> (which ideally is in the path) and run
a61af66fc99e Initial load
duke
parents:
diff changeset
199 HotJava: h java <flags> (e.g., h java_g -Xint).
a61af66fc99e Initial load
duke
parents:
diff changeset
200
a61af66fc99e Initial load
duke
parents:
diff changeset
201
a61af66fc99e Initial load
duke
parents:
diff changeset
202 __Preferred directory setup under Windows NT____________________________________
a61af66fc99e Initial load
duke
parents:
diff changeset
203
a61af66fc99e Initial load
duke
parents:
diff changeset
204 Within the HotSpot group we are using the following directory setup:
a61af66fc99e Initial load
duke
parents:
diff changeset
205
a61af66fc99e Initial load
duke
parents:
diff changeset
206 D:\jdk1.2 - where we install the JDK
a61af66fc99e Initial load
duke
parents:
diff changeset
207
a61af66fc99e Initial load
duke
parents:
diff changeset
208 The following drives are mounted for testing/putbacks/etc.:
a61af66fc99e Initial load
duke
parents:
diff changeset
209
a61af66fc99e Initial load
duke
parents:
diff changeset
210 net use T: \\tapas\export1\psqe
a61af66fc99e Initial load
duke
parents:
diff changeset
211 net use Y: \\rschmidt\GammaBase
a61af66fc99e Initial load
duke
parents:
diff changeset
212 net use Z: \\animorphic\animorphic