3208N/A# Copyright 1998-2007 Sun Microsystems, Inc. All Rights Reserved.
0N/A# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A# This code is free software; you can redistribute it
and/or modify it
0N/A# under the terms of the GNU General Public License version 2 only, as
0N/A# published by the Free Software Foundation.
0N/A# This code is distributed in the hope that it will be useful, but WITHOUT
0N/A# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A# version 2 for more details (a copy is included in the LICENSE file that
0N/A# accompanied this code).
0N/A# You should have received a copy of the GNU General Public License version
0N/A# 2 along with this work; if not, write to the Free Software Foundation,
0N/A# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
1472N/A# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
0N/A#
top.make is included in the Makefile in the build directories.
0N/A# It DOES NOT include the vm dependency info in order to be faster.
0N/A# It's main job is to implement the incremental form of make lists.
1123N/A# It assumes the following flags are set:
1123N/A# CFLAGS Platform_file, Src_Dirs, SYSDEFS, AOUT, Jvm_Obj_Files
2790N/A# -- D. Ungar (5/97) from a file by Bill Bush
0N/A# Don't override the built-in $(MAKE).
0N/A# Instead, use "gmake" (or "gnumake") from the command line. --Rose
0N/AGENERATED = ../generated
0N/APlat_File = $(Platform_file)
0N/ACDG = cd $(GENERATED);
0N/A# Pick up MakeDeps' sources and definitions
0N/A $(VM)/includeDB_gc_parallel \
0N/A $(VM)/includeDB_features
0N/A $(VM)/includeDB_compiler2
0N/AInclude_DBs = $(Include_DBs/$(TYPE))
0N/AIncremental_Lists =$(GENERATED)/$(Cached_db)
0N/A# list generation also creates $(GENERATED)/$(Cached_plat)
0N/AAD_Dir = $(GENERATED)/adfiles
0N/AADLC = $(AD_Dir)/adlc
0N/AAD_Spec = $(GAMMADIR)
/src/cpu/$(Platform_arch)/vm/$(Platform_arch).ad
0N/AAD_Names = ad_$(Platform_arch).hpp ad_$(Platform_arch).cpp
0N/AAD_Files = $(AD_Names:%=$(AD_Dir)/%)
2790N/AAD_Files_If_Required = $(AD_Files_If_Required/$(TYPE))
2790N/A# Wierd argument adjustment for "gnumake -j..."
2790N/Aadjust-mflags = $(GENERATED)/adjust-mflags
2790N/AMFLAGS-adjusted = -r `$(adjust-mflags) "$(MFLAGS)" "$(HOTSPOT_BUILD_JOBS)"`
2790N/A# default target: make makeDeps, update lists, make vm
2790N/A# done in stages to force sequential order with parallel make
1879N/Adefault: vm_build_preliminaries the_vm
2790N/A# This is an explicit dependency for the sake of parallel makes.
2790N/Avm_build_preliminaries: checks $(Incremental_Lists) $(AD_Files_If_Required) jvmti_stuff sa_stuff
0N/A @# We need a null action here, so implicit rules don't get consulted.
0N/A# make makeDeps: (and zap the cached db files to force a nonincremental run)
$(GENERATED)/$(MakeDepsClass): $(MakeDepsSources)
@echo Removing $(Incremental_Lists) to force regeneration.
@rm -f $(Incremental_Lists)
@$(CDG) echo >$(Cached_plat)
# make incremental_lists, if cached files out of date, run makeDeps
$(Incremental_Lists): $(Include_DBs) $(Plat_File) $(GENERATED)/$(MakeDepsClass)
$(CDG) cat $(Include_DBs) > includeDB
$(CDG) if [ ! -r incls ] ; then \
$(CDG) $(MakeDeps) diffs UnixPlatform $(Cached_plat) $(Cached_db) $(Plat_File) includeDB $(MakeDepsOptions)
$(CDG) cp includeDB $(Cached_db)
$(CDG) cp $(Plat_File) $(Cached_plat)
# symbolic target for command lines
lists: $(Incremental_Lists)
@: lists are now up to date
# make AD files as necessary
ad_stuff: $(Incremental_Lists) $(adjust-mflags)
# generate JVMTI files from the spec
jvmti_stuff: $(Incremental_Lists) $(adjust-mflags)
# generate SA jar files and native header
@$(MAKE) -f
sa.make $(MFLAGS-adjusted)
# and the VM: must use other makefile with dependencies included
# We have to go to great lengths to get control over the -jN argument
# to the recursive invocation of
vm.make. The problem is that gnumake
# resets -jN to -j1 for recursive runs. (How helpful.)
# Note that the user must specify the desired parallelism level via a
# command-line or environment variable name HOTSPOT_BUILD_JOBS.
the_vm: vm_build_preliminaries $(adjust-mflags)
@$(MAKE) -f
vm.make $(MFLAGS-adjusted)
# next rules support "make foo.[oi]"
# this should force everything to be rebuilt
rm -f $(GENERATED)/*.class
$(MAKE) $(MFLAGS) $(GENERATED)/$(MakeDepsClass)
# just in case it doesn't, this should do it
.PHONY: default vm_build_preliminaries
.PHONY: lists ad_stuff jvmti_stuff sa_stuff the_vm clean realclean
.PHONY: checks check_os_version install