Path: blob/aarch64-shenandoah-jdk8u272-b10/hotspot/make/solaris/makefiles/top.make
32284 views
#1# Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.2# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3#4# This code is free software; you can redistribute it and/or modify it5# under the terms of the GNU General Public License version 2 only, as6# published by the Free Software Foundation.7#8# This code is distributed in the hope that it will be useful, but WITHOUT9# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11# version 2 for more details (a copy is included in the LICENSE file that12# accompanied this code).13#14# You should have received a copy of the GNU General Public License version15# 2 along with this work; if not, write to the Free Software Foundation,16# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.17#18# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA19# or visit www.oracle.com if you need additional information or have any20# questions.21#22#2324# top.make is included in the Makefile in the build directories.25# It DOES NOT include the vm dependency info in order to be faster.26# Its main job is to implement the incremental form of make lists.27# It also:28# -builds and runs adlc via adlc.make29# -generates JVMTI source and docs via jvmti.make (JSR-163)30# -generate sa-jdi.jar (JDI binding to core files)3132# It assumes the following flags are set:33# CFLAGS Platform_file, Src_Dirs_I, Src_Dirs_V, SYSDEFS, AOUT, Jvm_Obj_Files3435# -- D. Ungar (5/97) from a file by Bill Bush3637# Don't override the built-in $(MAKE).38# Instead, use "gmake" (or "gnumake") from the command line. --Rose39#MAKE = gmake4041include $(GAMMADIR)/make/altsrc.make4243GENERATED = ../generated44VM = $(GAMMADIR)/src/share/vm45Plat_File = $(Platform_file)46CDG = cd $(GENERATED);4748Cached_plat = $(GENERATED)/platform.current4950AD_Dir = $(GENERATED)/adfiles51ADLC = $(AD_Dir)/adlc52AD_Spec = $(call altsrc-replace,$(HS_COMMON_SRC)/cpu/$(Platform_arch)/vm/$(Platform_arch_model).ad)53AD_Src = $(call altsrc-replace,$(HS_COMMON_SRC)/share/vm/adlc)54AD_Names = ad_$(Platform_arch_model).hpp ad_$(Platform_arch_model).cpp55AD_Files = $(AD_Names:%=$(AD_Dir)/%)5657# AD_Files_If_Required/COMPILER1 = ad_stuff58AD_Files_If_Required/COMPILER2 = ad_stuff59AD_Files_If_Required/TIERED = ad_stuff60AD_Files_If_Required = $(AD_Files_If_Required/$(TYPE))6162# Wierd argument adjustment for "gnumake -j..."63adjust-mflags = $(GENERATED)/adjust-mflags64MFLAGS-adjusted = -r `$(adjust-mflags) "$(MFLAGS)" "$(HOTSPOT_BUILD_JOBS)"`656667# default target: update lists, make vm68# done in stages to force sequential order with parallel make69#7071default: vm_build_preliminaries the_vm72@echo All done.7374# This is an explicit dependency for the sake of parallel makes.75vm_build_preliminaries: checks $(Cached_plat) $(AD_Files_If_Required) jvmti_stuff jfr_stuff sa_stuff76@# We need a null action here, so implicit rules don't get consulted.7778$(Cached_plat): $(Plat_File)79$(CDG) cp $(Plat_File) $(Cached_plat)8081# make AD files as necessary82ad_stuff: $(Cached_plat) $(adjust-mflags)83@$(MAKE) -f adlc.make $(MFLAGS-adjusted)8485# generate JVMTI files from the spec86jvmti_stuff: $(Cached_plat) $(adjust-mflags)87@$(MAKE) -f jvmti.make $(MFLAGS-adjusted)8889# generate JFR files90jfr_stuff: $(Cached_plat) $(adjust-mflags)91@$(MAKE) -f jfr.make $(MFLAGS-adjusted)9293# generate SA jar files and native header94sa_stuff:95@$(MAKE) -f sa.make $(MFLAGS-adjusted)9697# and the VM: must use other makefile with dependencies included9899# We have to go to great lengths to get control over the -jN argument100# to the recursive invocation of vm.make. The problem is that gnumake101# resets -jN to -j1 for recursive runs. (How helpful.)102# Note that the user must specify the desired parallelism level via a103# command-line or environment variable name HOTSPOT_BUILD_JOBS.104$(adjust-mflags): $(GAMMADIR)/make/$(Platform_os_family)/makefiles/adjust-mflags.sh105@+rm -f $@ $@+106@+cat $< > $@+107@+chmod +x $@+108@+mv $@+ $@109110the_vm: vm_build_preliminaries $(adjust-mflags)111@$(MAKE) -f vm.make $(MFLAGS-adjusted)112113install gamma: the_vm114@$(MAKE) -f vm.make $@115116# next rules support "make foo.[oi]"117118%.o %.i %.s:119$(MAKE) -f vm.make $(MFLAGS) $@120#$(MAKE) -f vm.make $@121122# this should force everything to be rebuilt123clean:124rm -f $(GENERATED)/*.class125$(MAKE) -f vm.make $(MFLAGS) clean126127# just in case it doesn't, this should do it128realclean:129$(MAKE) -f vm.make $(MFLAGS) clean130rm -fr $(GENERATED)131132.PHONY: default vm_build_preliminaries133.PHONY: lists ad_stuff jvmti_stuff trace_stuff sa_stuff the_vm clean realclean134.PHONY: checks check_os_version install135136137