2796N/A#
2796N/A# Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
2796N/A# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2796N/A#
2796N/A# This code is free software; you can redistribute it and/or modify it
2796N/A# under the terms of the GNU General Public License version 2 only, as
2796N/A# published by the Free Software Foundation.
2796N/A#
2796N/A# This code is distributed in the hope that it will be useful, but WITHOUT
2796N/A# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2796N/A# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
2796N/A# version 2 for more details (a copy is included in the LICENSE file that
2796N/A# accompanied this code).
2796N/A#
2796N/A# You should have received a copy of the GNU General Public License version
2796N/A# 2 along with this work; if not, write to the Free Software Foundation,
2796N/A# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2796N/A#
2796N/A# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2796N/A# or visit www.oracle.com if you need additional information or have any
2796N/A# questions.
2796N/A#
2796N/A#
2796N/A
2796N/A# top.make is included in the Makefile in the build directories.
2796N/A# It DOES NOT include the vm dependency info in order to be faster.
2796N/A# Its main job is to implement the incremental form of make lists.
2796N/A# It also:
2796N/A# -builds and runs adlc via adlc.make
2796N/A# -generates JVMTI source and docs via jvmti.make (JSR-163)
2796N/A# -generate sa-jdi.jar (JDI binding to core files)
2796N/A
2796N/A# It assumes the following flags are set:
2796N/A# CFLAGS Platform_file, Src_Dirs_I, Src_Dirs_V, SYSDEFS, AOUT, Obj_Files
2796N/A
2796N/A# -- D. Ungar (5/97) from a file by Bill Bush
2796N/A
2796N/A# Don't override the built-in $(MAKE).
2796N/A# Instead, use "gmake" (or "gnumake") from the command line. --Rose
2796N/A#MAKE = gmake
2796N/A
2796N/Ainclude $(GAMMADIR)/make/altsrc.make
2796N/A
2796N/ATOPDIR = $(shell echo `pwd`)
2796N/AGENERATED = $(TOPDIR)/../generated
2796N/AVM = $(GAMMADIR)/src/share/vm
2796N/APlat_File = $(Platform_file)
2796N/ACDG = cd $(GENERATED);
2796N/A
2972N/Aifneq ($(USE_PRECOMPILED_HEADER),0)
2972N/AUpdatePCH = $(MAKE) -f vm.make $(PRECOMPILED_HEADER) $(MFLAGS)
2796N/Aelse
2972N/AUpdatePCH = \# precompiled header is not used
2796N/Aendif
2796N/A
2796N/ACached_plat = $(GENERATED)/platform.current
2796N/A
2796N/AAD_Dir = $(GENERATED)/adfiles
2796N/AADLC = $(AD_Dir)/adlc
2796N/AAD_Spec = $(call altsrc-replace,$(HS_COMMON_SRC)/cpu/$(Platform_arch)/vm/$(Platform_arch_model).ad)
2796N/AAD_Src = $(call altsrc-replace,$(HS_COMMON_SRC)/share/vm/adlc)
2796N/AAD_Names = ad_$(Platform_arch_model).hpp ad_$(Platform_arch_model).cpp
2796N/AAD_Files = $(AD_Names:%=$(AD_Dir)/%)
2796N/A
2796N/A# AD_Files_If_Required/COMPILER1 = ad_stuff
2796N/AAD_Files_If_Required/COMPILER2 = ad_stuff
2796N/AAD_Files_If_Required/TIERED = ad_stuff
2796N/AAD_Files_If_Required = $(AD_Files_If_Required/$(TYPE))
2796N/A
2796N/A# Wierd argument adjustment for "gnumake -j..."
2796N/Aadjust-mflags = $(GENERATED)/adjust-mflags
2796N/AMFLAGS-adjusted = -r `$(adjust-mflags) "$(MFLAGS)" "$(HOTSPOT_BUILD_JOBS)"`
2796N/A
2796N/A
2796N/A# default target: update lists, make vm
2796N/A# done in stages to force sequential order with parallel make
2796N/A#
2796N/A
2796N/Adefault: vm_build_preliminaries the_vm
2796N/A @echo All done.
2796N/A
2796N/A# This is an explicit dependency for the sake of parallel makes.
4141N/Avm_build_preliminaries: checks $(Cached_plat) $(AD_Files_If_Required) jvmti_stuff trace_stuff sa_stuff dtrace_stuff
2796N/A @# We need a null action here, so implicit rules don't get consulted.
2796N/A
2796N/A$(Cached_plat): $(Plat_File)
2796N/A $(CDG) cp $(Plat_File) $(Cached_plat)
2796N/A
2796N/A# make AD files as necessary
2796N/Aad_stuff: $(Cached_plat) $(adjust-mflags)
2796N/A @$(MAKE) -f adlc.make $(MFLAGS-adjusted)
2796N/A
2796N/A# generate JVMTI files from the spec
2796N/Ajvmti_stuff: $(Cached_plat) $(adjust-mflags)
2796N/A @$(MAKE) -f jvmti.make $(MFLAGS-adjusted)
2796N/A
4141N/A# generate trace files
4141N/Atrace_stuff: jvmti_stuff $(Cached_plat) $(adjust-mflags)
4141N/A @$(MAKE) -f trace.make $(MFLAGS-adjusted)
4141N/A
2842N/Aifeq ($(OS_VENDOR), Darwin)
2842N/A# generate dtrace header files
2842N/Adtrace_stuff: $(Cached_plat) $(adjust-mflags)
2842N/A @$(MAKE) -f dtrace.make dtrace_stuff $(MFLAGS-adjusted) GENERATED=$(GENERATED)
2842N/Aelse
2842N/Adtrace_stuff:
2842N/A @# We need a null action here, so implicit rules don't get consulted.
2842N/Aendif
2842N/A
2796N/A# generate SA jar files and native header
2796N/Asa_stuff:
2796N/A @$(MAKE) -f sa.make $(MFLAGS-adjusted)
2796N/A
2796N/A# and the VM: must use other makefile with dependencies included
2796N/A
2796N/A# We have to go to great lengths to get control over the -jN argument
2796N/A# to the recursive invocation of vm.make. The problem is that gnumake
2796N/A# resets -jN to -j1 for recursive runs. (How helpful.)
2796N/A# Note that the user must specify the desired parallelism level via a
2796N/A# command-line or environment variable name HOTSPOT_BUILD_JOBS.
2796N/A$(adjust-mflags): $(GAMMADIR)/make/$(Platform_os_family)/makefiles/adjust-mflags.sh
2796N/A @+rm -f $@ $@+
2796N/A @+cat $< > $@+
2796N/A @+chmod +x $@+
2796N/A @+mv $@+ $@
2796N/A
2796N/Athe_vm: vm_build_preliminaries $(adjust-mflags)
2796N/A @$(UpdatePCH)
2796N/A @$(MAKE) -f vm.make $(MFLAGS-adjusted)
2796N/A
3229N/Ainstall gamma: the_vm
3229N/A @$(MAKE) -f vm.make $@
2796N/A
2796N/A# next rules support "make foo.[ois]"
2796N/A
2796N/A%.o %.i %.s:
2796N/A $(UpdatePCH)
2796N/A $(MAKE) -f vm.make $(MFLAGS) $@
2796N/A #$(MAKE) -f vm.make $@
2796N/A
2796N/A# this should force everything to be rebuilt
2796N/Aclean:
2796N/A rm -f $(GENERATED)/*.class
2796N/A $(MAKE) -f vm.make $(MFLAGS) clean
2796N/A
2796N/A# just in case it doesn't, this should do it
2796N/Arealclean:
2796N/A $(MAKE) -f vm.make $(MFLAGS) clean
2796N/A rm -fr $(GENERATED)
2796N/A
2796N/A.PHONY: default vm_build_preliminaries
2796N/A.PHONY: lists ad_stuff jvmti_stuff sa_stuff the_vm clean realclean
2796N/A.PHONY: checks check_os_version install