duke@435: Copyright (c) 2007 Sun Microsystems, Inc. All Rights Reserved. duke@435: DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. duke@435: duke@435: This code is free software; you can redistribute it and/or modify it duke@435: under the terms of the GNU General Public License version 2 only, as duke@435: published by the Free Software Foundation. duke@435: duke@435: This code is distributed in the hope that it will be useful, but WITHOUT duke@435: ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or duke@435: FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License duke@435: version 2 for more details (a copy is included in the LICENSE file that duke@435: accompanied this code). duke@435: duke@435: You should have received a copy of the GNU General Public License version duke@435: 2 along with this work; if not, write to the Free Software Foundation, duke@435: Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. duke@435: duke@435: Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, duke@435: CA 95054 USA or visit www.sun.com if you need additional information or duke@435: have any questions. duke@435: duke@435: ________________________________________________________________________________ duke@435: duke@435: __Introduction__________________________________________________________________ duke@435: duke@435: This readme file should provide all the information needed to build duke@435: the HotSpot VM for Windows 95/Windows NT from its teamware workspace. duke@435: It is intended as a starting point for people who want to learn how duke@435: to work with the current HotSpot source workspace and who need to duke@435: build the VM locally. It is not intended as a tutorial for licensees. duke@435: duke@435: Last update: 03/28/05 duke@435: duke@435: duke@435: __Platform______________________________________________________________________ duke@435: duke@435: The VM builds under the following platforms: duke@435: - Windows NT 4.0 on Intel x486 or greater duke@435: - x486 PC (or greater), 32MByte or more duke@435: duke@435: duke@435: __Tools_________________________________________________________________________ duke@435: duke@435: For building/testing the following tools need to be available: duke@435: - Microsoft Visual C++ 6.0 (with nmake version 1.62.7022 or greater) duke@435: - MKS Toolkit 6.1 or greater duke@435: see: /net/reinstall/export/vol0/pc-archive/software/mks6.1 (NFS) duke@435: or: \\reinstall\pc-archive\software\mks6.1 (NT) duke@435: duke@435: duke@435: __JDK___________________________________________________________________________ duke@435: duke@435: The workspace works with the following version of the JDK: duke@435: (NOTE: these are out of date) duke@435: - JDK1.2FCS "V" build duke@435: see: /usr/local/java/jdk1.2/win32 duke@435: duke@435: and the following version(s) of HotJava: duke@435: - hjb1.1.4 duke@435: - hjb1.1.5 duke@435: see /usr/local/java/hjb1.1.x/win32 duke@435: duke@435: duke@435: __Environment variables_________________________________________________________ duke@435: duke@435: The following environment variables need to be set up for the IDE duke@435: build process. For batch builds these do not need to be set. duke@435: duke@435: HotSpotMksHome points to the (NFS or PC-local) directory where the MKS duke@435: executables (like sh.exe and grep.exe) are installed duke@435: duke@435: Optionally you may set the following variables in your environment and they duke@435: will be picked up by the create.bat script used to generate the vm.vcproj files. duke@435: See the section on building within MS Developer Studio for more details. duke@435: duke@435: HotSpotWorkSpace points to the (NFS) directory where the workspace is located duke@435: HotSpotBuildSpace points to the (PC-local) directory where the vm is built duke@435: HotSpotReleaseBinDest points to the (NFS or PC-local) directory where the product DLL is duke@435: written duke@435: HotSpotDebugBinDest points to the (NFS or PC-local) directory where the debug DLL is duke@435: written duke@435: duke@435: NOTE: For both batch and IDE builds, java and javac must be in your duke@435: PATH, and the versions found by default must work. (If this turns out duke@435: to be a problem, we can define HotSpotJava and HotSpotJavaC for duke@435: bootstrapping...) duke@435: duke@435: __Building the JVM from the command line________________________________________ duke@435: duke@435: 1) choose a directory in which you want to build the vm duke@435: (the build process will create a subdirectory) duke@435: duke@435: 2) To build the 'core' version (debug || optimized) duke@435: %HotSpotWorkSpace%\build\windows\build core %HotSpotWorkSpace% duke@435: To build the 'compiler2' version (debug || optimized) duke@435: %HotSpotWorkSpace%\build\windows\build compiler2 %HotSpotWorkSpace% duke@435: duke@435: where is a full path to a JDK in which bin/java and duke@435: bin/javac are present and working. duke@435: duke@435: 3) If you have problems with building, first try: duke@435: vcvars32 (sets path for VC++) duke@435: duke@435: 4) In addition to jvm.dll, the Serviceability Agent (SA) based JDI connector duke@435: and command line tools are built if dbgeng.h and dbgeng.lib duke@435: can be located, and BUILD_WIN_SA=1 is specified. We look for dbgeng.h here: duke@435: $(MSVCDIR)\PlatformSDK\Include duke@435: $(SYSTEMROOT)\..\Program Files\Microsoft SDK\include duke@435: duke@435: The first directory is part of Visual Studio VC .NET 2003. duke@435: The second is used on Windows-amd64. duke@435: duke@435: duke@435: __Building the JVM from within MS Developer Studio______________________________ duke@435: duke@435: 0) Set environment variables as described above duke@435: duke@435: 1) Run the following script: duke@435: %HotSpotWorkSpace%\build\windows\create { } duke@435: where type is one of core, compiler1, compiler2. If you leave off the duke@435: " " part, the script expects to find their duke@435: values in the HotSpotWorkSpace, HotSpotBuildSpace, HotSpotReleaseBinDest, and HotSpotDebugBinDest environment duke@435: variables. The resulting vm.vcproj does not depend on these values in the environment. duke@435: duke@435: This will populate the build space with the appropriate makefiles duke@435: and run nmake in it. This builds and runs makedeps, which now duke@435: generates the appropriate vm.vcproj into the build space. It also duke@435: builds and runs adlc. duke@435: duke@435: To regenerate the .incl and .dsp files after changing the include duke@435: databases, just run nmake in the build space. duke@435: duke@435: The build process now relies on java and javac. For the IDE builds, duke@435: the full path to a JDK (in which bin/java and bin/javac are present duke@435: and working) can be specified either explicitly with the duke@435: ALT_BOOTDIR environment variable (like the JDK build process), via duke@435: the JDK build's default BOOTDIR environment variable, via JAVA_HOME, duke@435: or implicitly via the PATH. duke@435: duke@435: (Note that there are now many more command line options to MakeDeps duke@435: on the Windows platform than before. These have been bundled into duke@435: makefiles/makedeps.make, but it is still necessary to keep this in duke@435: sync with the batch makefiles, in vm/generated.) duke@435: duke@435: If you have problems with building (i.e,. finding nmake), first try: duke@435: vcvars32 (sets path for VC++) duke@435: duke@435: 2) Double-click the vm.vcproj file in the %HotSpotBuildSpace% directory duke@435: to open MS Developer Studio. duke@435: duke@435: 3) build desired or all versions: duke@435: menu Build -> Batch Build... -> Build (or Rebuild All) duke@435: duke@435: 4) jvm.dll is in the %HotSpotReleaseBinDest% or %HotSpotDebugBinDest% directory duke@435: depending on which configuration you built (release or debug). duke@435: duke@435: Note: do not edit any of the files (especially the vm.vcproj file) in the duke@435: build space, since they are all either autogenerated or copied from duke@435: the work space. If necessary, modify the original Makefiles in duke@435: %HotSpotWorkSpace%\build\windows\projectfiles, or the shared duke@435: makedeps arguments in duke@435: %HotSpotWorkSpace%\build\windows\makefiles\makedeps.make. duke@435: duke@435: Note that it appears that some options set in the IDE (for example, duke@435: the default executable) show up not in the .dsp file, but in the .opt duke@435: file, so the automatic regeneration of the .dsp file should not duke@435: destroy the project settings. However, makedeps.make should be edited duke@435: to supply per-file compiler options. duke@435: duke@435: To build adlc from within the IDE for debugging purposes: duke@435: duke@435: 1) in MS Developer Studio, open ADLCompiler.dsw: duke@435: menu File -> Open Workspace... duke@435: select & double-click ADLCompiler.dsw duke@435: duke@435: 2) rebuild all (debug mode is enough) duke@435: menu Build -> Rebuild All (make sure Win32 Debug version is selected) duke@435: duke@435: duke@435: __Testing the VM________________________________________________________________ duke@435: duke@435: To test the VM using the Tonga Testsuite, use testlook. testlook is a very duke@435: simple testing framework on top of Tonga which allows us to use one (Tonga) duke@435: test file, that can be extended with attributes. duke@435: duke@435: 1) copy %HotSpotWorkSpace%\test\testlook.bat onto PC (preferably duke@435: %HotSpotBuildSpace%\bin, which should ideally be in the path) duke@435: duke@435: 2) run testlook or testlook help for details duke@435: duke@435: 3) to run testlook you need to have Tonga mounted: duke@435: net use T: \\tapas\export1\psqe duke@435: duke@435: duke@435: __HotJava under HotSpot_________________________________________________________ duke@435: duke@435: To run HotJava, use the .bat file %HotSpotWorkSpace%\test\h.bat. Copy duke@435: it into %HotSpotBuildSpace%/ (which ideally is in the path) and run duke@435: HotJava: h java (e.g., h java_g -Xint). duke@435: duke@435: duke@435: __Preferred directory setup under Windows NT____________________________________ duke@435: duke@435: Within the HotSpot group we are using the following directory setup: duke@435: duke@435: D:\jdk1.2 - where we install the JDK duke@435: duke@435: The following drives are mounted for testing/putbacks/etc.: duke@435: duke@435: net use T: \\tapas\export1\psqe duke@435: net use Y: \\rschmidt\GammaBase duke@435: net use Z: \\animorphic\animorphic