Path: blob/aarch64-shenandoah-jdk8u272-b10/hotspot/make/aix/makefiles/top.make
32284 views
#1# Copyright (c) 1999, 2020, 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, 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.make4243TOPDIR = $(shell echo `pwd`)44GENERATED = $(TOPDIR)/../generated45VM = $(GAMMADIR)/src/share/vm46Plat_File = $(Platform_file)47CDG = cd $(GENERATED);4849ifneq ($(USE_PRECOMPILED_HEADER),0)50UpdatePCH = $(MAKE) -f vm.make $(PRECOMPILED_HEADER) $(MFLAGS)51else52UpdatePCH = \# precompiled header is not used53endif5455Cached_plat = $(GENERATED)/platform.current5657AD_Dir = $(GENERATED)/adfiles58ADLC = $(AD_Dir)/adlc59AD_Spec = $(call altsrc-replace,$(HS_COMMON_SRC)/cpu/$(Platform_arch)/vm/$(Platform_arch_model).ad)60AD_Src = $(call altsrc-replace,$(HS_COMMON_SRC)/share/vm/adlc)61AD_Names = ad_$(Platform_arch_model).hpp ad_$(Platform_arch_model).cpp62AD_Files = $(AD_Names:%=$(AD_Dir)/%)6364# AD_Files_If_Required/COMPILER1 = ad_stuff65AD_Files_If_Required/COMPILER2 = ad_stuff66AD_Files_If_Required/TIERED = ad_stuff67AD_Files_If_Required = $(AD_Files_If_Required/$(TYPE))6869# Wierd argument adjustment for "gnumake -j..."70adjust-mflags = $(GENERATED)/adjust-mflags71MFLAGS-adjusted = -r `$(adjust-mflags) "$(MFLAGS)" "$(HOTSPOT_BUILD_JOBS)"`727374# default target: update lists, make vm75# done in stages to force sequential order with parallel make76#7778default: vm_build_preliminaries the_vm79@echo All done.8081# This is an explicit dependency for the sake of parallel makes.82vm_build_preliminaries: checks $(Cached_plat) $(AD_Files_If_Required) jfr_stuff jvmti_stuff sa_stuff83@# We need a null action here, so implicit rules don't get consulted.8485$(Cached_plat): $(Plat_File)86$(CDG) cp $(Plat_File) $(Cached_plat)8788# make AD files as necessary89ad_stuff: $(Cached_plat) $(adjust-mflags)90@$(MAKE) -f adlc.make $(MFLAGS-adjusted)9192# generate JVMTI files from the spec93jvmti_stuff: $(Cached_plat) $(adjust-mflags)94@$(MAKE) -f jvmti.make $(MFLAGS-adjusted)9596# generate JFR files97jfr_stuff: $(Cached_plat) $(adjust-mflags)98@$(MAKE) -f jfr.make $(MFLAGS-adjusted)99100# generate SA jar files and native header101sa_stuff:102@$(MAKE) -f sa.make $(MFLAGS-adjusted)103104# and the VM: must use other makefile with dependencies included105106# We have to go to great lengths to get control over the -jN argument107# to the recursive invocation of vm.make. The problem is that gnumake108# resets -jN to -j1 for recursive runs. (How helpful.)109# Note that the user must specify the desired parallelism level via a110# command-line or environment variable name HOTSPOT_BUILD_JOBS.111$(adjust-mflags): $(GAMMADIR)/make/$(Platform_os_family)/makefiles/adjust-mflags.sh112@+rm -f $@ $@+113@+cat $< > $@+114@+chmod +x $@+115@+mv $@+ $@116117the_vm: vm_build_preliminaries $(adjust-mflags)118@$(UpdatePCH)119@$(MAKE) -f vm.make $(MFLAGS-adjusted)120121install gamma: the_vm122@$(MAKE) -f vm.make $@123124# next rules support "make foo.[ois]"125126%.o %.i %.s:127$(UpdatePCH)128$(MAKE) -f vm.make $(MFLAGS) $@129#$(MAKE) -f vm.make $@130131# this should force everything to be rebuilt132clean:133rm -f $(GENERATED)/*.class134$(MAKE) -f vm.make $(MFLAGS) clean135136# just in case it doesn't, this should do it137realclean:138$(MAKE) -f vm.make $(MFLAGS) clean139rm -fr $(GENERATED)140141.PHONY: default vm_build_preliminaries142.PHONY: lists ad_stuff jvmti_stuff sa_stuff the_vm clean realclean143.PHONY: checks check_os_version install144145146