#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
#
# Top level gnumake file for hotspot builds
#
# Default is to build the both product images and construct an export dir.
# The default export directory name is `pwd`/export-$(PLATFORM).
#
# Use: 'gnumake help' for more information.
#
# This makefile uses the default settings for where to find compilers and
# tools, and obeys the ALT_* variable settings used by the other JDK
# workspaces.
#
# LP64=1 or ARCH_DATA_MODEL=64 for 64bit build
#
# ALT_SLASH_JAVA Location of /java or J:
# ALT_BOOTDIR Previous JDK home directory for javac compiler
# ALT_OUTPUTDIR Output directory to use for hotspot build
# ALT_EXPORT_PATH Directory to export hotspot build to
# ALT_JDK_IMPORT_PATH Current JDK build (only for create_jdk rules)
# ALT_JDK_TARGET_IMPORT_PATH Current JDK build when cross-compiling
# ALT_BUILD_WIN_SA Building SA on Windows is disabled by default.
# Set ALT_BUILD_WIN_SA=1 to enable building SA on
# Windows.
# Version strings and numbers:
# JDK_VERSION Current JDK version (e.g. 1.6.0)
# PREVIOUS_JDK_VERSION Previous (bootdir) JDK version (e.g. 1.5.0)
# FULL_VERSION Full version string to use (e.g. "1.6.0-ea-b42")
#
# Version strings and numbers especially needed on Windows:
# COOKED_JDK_UPDATE_VERSION Just the update release number (e.g. 02)
# COOKED_BUILD_NUMBER Just the build number (e.g. 42)
# JDK_MKTG_VERSION Marketing JDK version (e.g. 6.0)
# JDK_MAJOR_VERSION Major number for version (e.g. 1) always 1?
# JDK_MINOR_VERSION Minor number for version (e.g. 6)
# JDK_MICRO_VERSION Micro number for version (e.g. 0)
#
# Default is build both product fastdebug and create export area
# Allow to build HotSpot in local directory from sources specified by GAMMADIR.
else
else
# JDK directory list
else
else
# Do everything
# Build or export docs
docs:
else
# We specify 'BUILD_FLAVOR=product' so that the proper
# ENABLE_FULL_DEBUG_SYMBOLS value is used.
$(MAKE) -f $(ABS_OS_MAKEFILE) \
# Build variation of hotspot
$(C1_VM_TARGETS):
$(C2_VM_TARGETS):
$(ZERO_VM_TARGETS):
$(SHARK_VM_TARGETS):
# Build compiler1 (client) rule, different for platforms
$(NMAKE) -f $(ABS_OS_MAKEFILE) \
WorkSpace=$(ABS_GAMMADIR) \
BootStrapDir=$(ABS_BOOTDIR) \
else
else
$(MAKE) -f $(ABS_OS_MAKEFILE) \
else
# Build compiler2 (server) rule, different for platforms
$(NMAKE) -f $(ABS_OS_MAKEFILE) \
WorkSpace=$(ABS_GAMMADIR) \
BootStrapDir=$(ABS_BOOTDIR) \
else
$(MAKE) -f $(ABS_OS_MAKEFILE) \
$(MAKE) -f $(ABS_OS_MAKEFILE) \
$(MAKE) -f $(ABS_OS_MAKEFILE) \
# Export file rule
EXPORT_SUBDIR=/$(@:export_%=%) \
EXPORT_SUBDIR=/$(@:export_%=%) \
EXPORT_SUBDIR=/$(@:export_%=%) \
# Export file copy rules
# Bin files (windows)
# Get jvm.lib
# Other libraries (like SA)
# Client files always come from C1 area
# Server files always come from C2 area
# Shared Library
# Jar file (sa-jdi.jar)
# export jfr.h
ifeq ($JFR_EXISTS,1)
else
# Doc files (jvmti.html)
# Xusage file
#
# Clean rules
#
$(RM) -r $(EXPORT_PATH)
$(RM) -r $(JDK_IMAGE_DIR)
#
# Create JDK and place this build into it
#
$(RM) -r $(JDK_IMAGE_DIR)
$(MKDIR) -p $(JDK_IMAGE_DIR)
$(RM) -r $(JDK_IMAGE_DIR)
$(MKDIR) -p $(JDK_IMAGE_DIR)
if [ -d $(JDK_IMPORT_PATH)/fastdebug ] ; then \
else \
fi
if [ -d $(JDK_IMPORT_PATH)/debug ] ; then \
elif [ -d $(JDK_IMPORT_PATH)/fastdebug ] ; then \
else \
fi
#
# Check target
#
#
# Help target
#
# Intro help message
@$(ECHO) \
"Makefile for the Hotspot workspace."
@$(ECHO) \
"Default behavior is to build and create an export area for the j2se builds."
# Target help
@$(ECHO) "help: This help message"
@$(ECHO) "all: Same as: all_product all_fastdebug"
@$(ECHO) "world: Same as: all create_jdk"
@$(ECHO) "all_product: Same as: product product1 export_product"
@$(ECHO) "all_fastdebug: Same as: fastdebug fastdebug1 export_fastdebug"
@$(ECHO) "all_debug: Same as: jvmg jvmg1 export_debug"
@$(ECHO) "all_optimized: Same as: optimized optimized1 export_optimized"
@$(ECHO) "clean: Clean all areas"
@$(ECHO) "export_product: Export product files to EXPORT_PATH"
@$(ECHO) "export_fastdebug: Export fastdebug files to EXPORT_PATH"
@$(ECHO) "export_debug: Export debug files to EXPORT_PATH"
@$(ECHO) "export_optimized: Export optimized files to EXPORT_PATH"
@$(ECHO) "create_jdk: Create JDK image, export all files into it"
@$(ECHO) "update_jdk: Update JDK image with fresh exported files"
@$(ECHO) " "
@$(ECHO) "Others targets are:"
# Variable help (only common ones used by this workspace)
@$(ECHO) "--- Common Variables ---"
@$(ECHO) " "
@$(ECHO) "--- Make Arguments ---"
# One line descriptions for the variables
# Make variables to print out (description and value)
BOOTDIR \
# Make variables that should refer to directories that exist
BOOTDIR \
# For pattern rules below, so all are treated the same
# Complete variable check
# Pattern rule for printing out a variable
%.printval:
# Pattern rule for checking to see if a variable with a directory exists
%.checkdir:
@if [ ! -d $($*) ] ; then \
fi
# Pattern rule for checking to see if a variable with a file exists
%.checkfil:
@if [ ! -f $($*) ] ; then \
fi
# Misc notes on help
@$(ECHO) \
"--- Notes --- "
@$(ECHO) \
"- JDK_IMPORT_PATH must refer to a compatible build, not all past promoted"
@$(ECHO) \
" builds or previous release JDK builds will work."
@$(ECHO) \
"- The fastest builds have been when the workspace and the BOOTDIR are on"
@$(ECHO) \
" local disk."
@$(ECHO) \
"--- Examples --- "
@$(ECHO) \
@$(ECHO) \
@$(ECHO) \
@$(ECHO) \
# Universal build support
# JPRT rule to build this workspace