2007-12-01 00:00:00 +00:00
|
|
|
#
|
2014-07-14 18:24:08 +00:00
|
|
|
# Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
|
2007-12-01 00:00:00 +00:00
|
|
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
|
|
#
|
|
|
|
# This code is free software; you can redistribute it and/or modify it
|
|
|
|
# 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.
|
|
|
|
#
|
2010-05-28 02:08:38 +00:00
|
|
|
# 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.
|
2014-07-14 18:24:08 +00:00
|
|
|
#
|
2007-12-01 00:00:00 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
# top.make is included in the Makefile in the build directories.
|
|
|
|
# It DOES NOT include the vm dependency info in order to be faster.
|
2009-09-12 11:50:07 +00:00
|
|
|
# Its main job is to implement the incremental form of make lists.
|
2007-12-01 00:00:00 +00:00
|
|
|
# It also:
|
|
|
|
# -builds and runs adlc via adlc.make
|
|
|
|
# -generates JVMTI source and docs via jvmti.make (JSR-163)
|
|
|
|
|
|
|
|
# It assumes the following flags are set:
|
2010-11-23 21:22:55 +00:00
|
|
|
# CFLAGS Platform_file, Src_Dirs_I, Src_Dirs_V, SYSDEFS, AOUT, Jvm_Obj_Files
|
2007-12-01 00:00:00 +00:00
|
|
|
|
|
|
|
# -- D. Ungar (5/97) from a file by Bill Bush
|
|
|
|
|
|
|
|
# Don't override the built-in $(MAKE).
|
|
|
|
# Instead, use "gmake" (or "gnumake") from the command line. --Rose
|
|
|
|
#MAKE = gmake
|
|
|
|
|
2011-02-08 22:20:45 +00:00
|
|
|
include $(GAMMADIR)/make/altsrc.make
|
|
|
|
|
2007-12-01 00:00:00 +00:00
|
|
|
GENERATED = ../generated
|
|
|
|
VM = $(GAMMADIR)/src/share/vm
|
|
|
|
Plat_File = $(Platform_file)
|
2014-07-14 18:24:08 +00:00
|
|
|
CDG = cd $(GENERATED);
|
2007-12-01 00:00:00 +00:00
|
|
|
|
2010-11-23 21:22:55 +00:00
|
|
|
Cached_plat = $(GENERATED)/platform.current
|
2007-12-01 00:00:00 +00:00
|
|
|
|
|
|
|
AD_Dir = $(GENERATED)/adfiles
|
|
|
|
ADLC = $(AD_Dir)/adlc
|
2011-02-08 22:20:45 +00:00
|
|
|
AD_Spec = $(call altsrc-replace,$(HS_COMMON_SRC)/cpu/$(Platform_arch)/vm/$(Platform_arch_model).ad)
|
|
|
|
AD_Src = $(call altsrc-replace,$(HS_COMMON_SRC)/share/vm/adlc)
|
2008-11-13 22:50:04 +00:00
|
|
|
AD_Names = ad_$(Platform_arch_model).hpp ad_$(Platform_arch_model).cpp
|
2007-12-01 00:00:00 +00:00
|
|
|
AD_Files = $(AD_Names:%=$(AD_Dir)/%)
|
|
|
|
|
|
|
|
# AD_Files_If_Required/COMPILER1 = ad_stuff
|
|
|
|
AD_Files_If_Required/COMPILER2 = ad_stuff
|
|
|
|
AD_Files_If_Required/TIERED = ad_stuff
|
|
|
|
AD_Files_If_Required = $(AD_Files_If_Required/$(TYPE))
|
|
|
|
|
|
|
|
# Wierd argument adjustment for "gnumake -j..."
|
|
|
|
adjust-mflags = $(GENERATED)/adjust-mflags
|
2014-08-28 09:59:04 +00:00
|
|
|
# If SPEC is set, it's from configure and it's already controlling concurrency
|
|
|
|
# for us. Skip setting -j with HOTSPOT_BUILD_JOBS.
|
|
|
|
ifeq ($(SPEC), )
|
|
|
|
MFLAGS-adjusted = -r `$(adjust-mflags) "$(MFLAGS)" "$(HOTSPOT_BUILD_JOBS)"`
|
|
|
|
else
|
|
|
|
MFLAGS-adjusted = -r $(MFLAGS)
|
|
|
|
endif
|
2007-12-01 00:00:00 +00:00
|
|
|
|
|
|
|
|
2010-11-23 21:22:55 +00:00
|
|
|
# default target: update lists, make vm
|
2007-12-01 00:00:00 +00:00
|
|
|
# done in stages to force sequential order with parallel make
|
|
|
|
#
|
|
|
|
|
|
|
|
default: vm_build_preliminaries the_vm
|
|
|
|
@echo All done.
|
|
|
|
|
|
|
|
# This is an explicit dependency for the sake of parallel makes.
|
2015-11-24 11:18:25 +00:00
|
|
|
vm_build_preliminaries: checks $(Cached_plat) $(AD_Files_If_Required) jvmti_stuff trace_stuff dtrace_stuff
|
2007-12-01 00:00:00 +00:00
|
|
|
@# We need a null action here, so implicit rules don't get consulted.
|
|
|
|
|
2010-11-23 21:22:55 +00:00
|
|
|
$(Cached_plat): $(Plat_File)
|
2014-07-14 18:24:08 +00:00
|
|
|
$(CDG) $(CP) $(Plat_File) $(Cached_plat)
|
2007-12-01 00:00:00 +00:00
|
|
|
|
|
|
|
# make AD files as necessary
|
2010-11-23 21:22:55 +00:00
|
|
|
ad_stuff: $(Cached_plat) $(adjust-mflags)
|
2007-12-01 00:00:00 +00:00
|
|
|
@$(MAKE) -f adlc.make $(MFLAGS-adjusted)
|
|
|
|
|
|
|
|
# generate JVMTI files from the spec
|
2010-11-23 21:22:55 +00:00
|
|
|
jvmti_stuff: $(Cached_plat) $(adjust-mflags)
|
2007-12-01 00:00:00 +00:00
|
|
|
@$(MAKE) -f jvmti.make $(MFLAGS-adjusted)
|
|
|
|
|
2014-07-14 18:24:08 +00:00
|
|
|
# generate trace files
|
2013-06-10 09:30:51 +00:00
|
|
|
trace_stuff: jvmti_stuff $(Cached_plat) $(adjust-mflags)
|
|
|
|
@$(MAKE) -f trace.make $(MFLAGS-adjusted)
|
|
|
|
|
2014-01-16 19:14:21 +00:00
|
|
|
dtrace_stuff: $(Cached_plat) $(adjust-mflags)
|
|
|
|
@$(MAKE) -f dtrace.make dtrace_gen_headers $(MFLAGS-adjusted) GENERATED=$(GENERATED)
|
|
|
|
|
2007-12-01 00:00:00 +00:00
|
|
|
# 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.
|
2008-04-09 18:22:48 +00:00
|
|
|
$(adjust-mflags): $(GAMMADIR)/make/$(Platform_os_family)/makefiles/adjust-mflags.sh
|
2007-12-01 00:00:00 +00:00
|
|
|
@+rm -f $@ $@+
|
|
|
|
@+cat $< > $@+
|
|
|
|
@+chmod +x $@+
|
|
|
|
@+mv $@+ $@
|
|
|
|
|
|
|
|
the_vm: vm_build_preliminaries $(adjust-mflags)
|
|
|
|
@$(MAKE) -f vm.make $(MFLAGS-adjusted)
|
|
|
|
|
2014-02-10 20:38:34 +00:00
|
|
|
install: the_vm
|
2012-02-13 12:30:59 +00:00
|
|
|
@$(MAKE) -f vm.make $@
|
2007-12-01 00:00:00 +00:00
|
|
|
|
|
|
|
# next rules support "make foo.[oi]"
|
|
|
|
|
|
|
|
%.o %.i %.s:
|
|
|
|
$(MAKE) -f vm.make $(MFLAGS) $@
|
|
|
|
#$(MAKE) -f vm.make $@
|
|
|
|
|
|
|
|
# this should force everything to be rebuilt
|
2014-07-14 18:24:08 +00:00
|
|
|
clean:
|
2007-12-01 00:00:00 +00:00
|
|
|
rm -f $(GENERATED)/*.class
|
|
|
|
$(MAKE) -f vm.make $(MFLAGS) clean
|
|
|
|
|
|
|
|
# just in case it doesn't, this should do it
|
|
|
|
realclean:
|
|
|
|
$(MAKE) -f vm.make $(MFLAGS) clean
|
|
|
|
rm -fr $(GENERATED)
|
|
|
|
|
|
|
|
.PHONY: default vm_build_preliminaries
|
2015-11-24 11:18:25 +00:00
|
|
|
.PHONY: lists ad_stuff jvmti_stuff trace_stuff the_vm clean realclean
|
2007-12-01 00:00:00 +00:00
|
|
|
.PHONY: checks check_os_version install
|
2014-08-28 09:59:04 +00:00
|
|
|
|
|
|
|
.NOTPARALLEL:
|