make/aix/makefiles/top.make

changeset 0
f90c822e73f8
child 9907
35063c223567
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/make/aix/makefiles/top.make	Wed Apr 27 01:25:04 2016 +0800
     1.3 @@ -0,0 +1,144 @@
     1.4 +#
     1.5 +# Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
     1.6 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.7 +#
     1.8 +# This code is free software; you can redistribute it and/or modify it
     1.9 +# under the terms of the GNU General Public License version 2 only, as
    1.10 +# published by the Free Software Foundation.
    1.11 +#
    1.12 +# This code is distributed in the hope that it will be useful, but WITHOUT
    1.13 +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    1.14 +# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    1.15 +# version 2 for more details (a copy is included in the LICENSE file that
    1.16 +# accompanied this code).
    1.17 +#
    1.18 +# You should have received a copy of the GNU General Public License version
    1.19 +# 2 along with this work; if not, write to the Free Software Foundation,
    1.20 +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1.21 +#
    1.22 +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    1.23 +# or visit www.oracle.com if you need additional information or have any
    1.24 +# questions.
    1.25 +#  
    1.26 +#
    1.27 +
    1.28 +# top.make is included in the Makefile in the build directories.
    1.29 +# It DOES NOT include the vm dependency info in order to be faster.
    1.30 +# Its main job is to implement the incremental form of make lists.
    1.31 +# It also:
    1.32 +#   -builds and runs adlc via adlc.make
    1.33 +#   -generates JVMTI source and docs via jvmti.make (JSR-163)
    1.34 +#   -generate sa-jdi.jar (JDI binding to core files)
    1.35 +
    1.36 +# It assumes the following flags are set:
    1.37 +# CFLAGS Platform_file, Src_Dirs_I, Src_Dirs_V, SYSDEFS, AOUT, Obj_Files
    1.38 +
    1.39 +# -- D. Ungar (5/97) from a file by Bill Bush
    1.40 +
    1.41 +# Don't override the built-in $(MAKE).
    1.42 +# Instead, use "gmake" (or "gnumake") from the command line.  --Rose
    1.43 +#MAKE = gmake
    1.44 +
    1.45 +include $(GAMMADIR)/make/altsrc.make
    1.46 +
    1.47 +TOPDIR      = $(shell echo `pwd`)
    1.48 +GENERATED   = $(TOPDIR)/../generated
    1.49 +VM          = $(GAMMADIR)/src/share/vm
    1.50 +Plat_File   = $(Platform_file)
    1.51 +CDG         = cd $(GENERATED); 
    1.52 +
    1.53 +ifneq ($(USE_PRECOMPILED_HEADER),0)
    1.54 +UpdatePCH = $(MAKE) -f vm.make $(PRECOMPILED_HEADER) $(MFLAGS) 
    1.55 +else
    1.56 +UpdatePCH = \# precompiled header is not used
    1.57 +endif
    1.58 +
    1.59 +Cached_plat = $(GENERATED)/platform.current
    1.60 +
    1.61 +AD_Dir   = $(GENERATED)/adfiles
    1.62 +ADLC     = $(AD_Dir)/adlc
    1.63 +AD_Spec  = $(call altsrc-replace,$(HS_COMMON_SRC)/cpu/$(Platform_arch)/vm/$(Platform_arch_model).ad)
    1.64 +AD_Src   = $(call altsrc-replace,$(HS_COMMON_SRC)/share/vm/adlc)
    1.65 +AD_Names = ad_$(Platform_arch_model).hpp ad_$(Platform_arch_model).cpp
    1.66 +AD_Files = $(AD_Names:%=$(AD_Dir)/%)
    1.67 +
    1.68 +# AD_Files_If_Required/COMPILER1 = ad_stuff
    1.69 +AD_Files_If_Required/COMPILER2 = ad_stuff
    1.70 +AD_Files_If_Required/TIERED = ad_stuff
    1.71 +AD_Files_If_Required = $(AD_Files_If_Required/$(TYPE))
    1.72 +
    1.73 +# Wierd argument adjustment for "gnumake -j..."
    1.74 +adjust-mflags   = $(GENERATED)/adjust-mflags
    1.75 +MFLAGS-adjusted = -r `$(adjust-mflags) "$(MFLAGS)" "$(HOTSPOT_BUILD_JOBS)"`
    1.76 +
    1.77 +
    1.78 +# default target: update lists, make vm
    1.79 +# done in stages to force sequential order with parallel make
    1.80 +#
    1.81 +
    1.82 +default: vm_build_preliminaries the_vm
    1.83 +	@echo All done.
    1.84 +
    1.85 +# This is an explicit dependency for the sake of parallel makes.
    1.86 +vm_build_preliminaries:  checks $(Cached_plat) $(AD_Files_If_Required) trace_stuff jvmti_stuff sa_stuff
    1.87 +	@# We need a null action here, so implicit rules don't get consulted.
    1.88 +
    1.89 +$(Cached_plat): $(Plat_File)
    1.90 +	$(CDG) cp $(Plat_File) $(Cached_plat)
    1.91 +
    1.92 +# make AD files as necessary
    1.93 +ad_stuff: $(Cached_plat) $(adjust-mflags)
    1.94 +	@$(MAKE) -f adlc.make $(MFLAGS-adjusted)
    1.95 +
    1.96 +# generate JVMTI files from the spec
    1.97 +jvmti_stuff: $(Cached_plat) $(adjust-mflags)
    1.98 +	@$(MAKE) -f jvmti.make $(MFLAGS-adjusted)
    1.99 +
   1.100 +# generate trace files
   1.101 +trace_stuff: jvmti_stuff $(Cached_plat) $(adjust-mflags)
   1.102 +	@$(MAKE) -f trace.make $(MFLAGS-adjusted)
   1.103 +
   1.104 +# generate SA jar files and native header
   1.105 +sa_stuff:
   1.106 +	@$(MAKE) -f sa.make $(MFLAGS-adjusted)
   1.107 +
   1.108 +# and the VM: must use other makefile with dependencies included
   1.109 +
   1.110 +# We have to go to great lengths to get control over the -jN argument
   1.111 +# to the recursive invocation of vm.make.  The problem is that gnumake
   1.112 +# resets -jN to -j1 for recursive runs.  (How helpful.)
   1.113 +# Note that the user must specify the desired parallelism level via a
   1.114 +# command-line or environment variable name HOTSPOT_BUILD_JOBS.
   1.115 +$(adjust-mflags): $(GAMMADIR)/make/$(Platform_os_family)/makefiles/adjust-mflags.sh
   1.116 +	@+rm -f $@ $@+
   1.117 +	@+cat $< > $@+
   1.118 +	@+chmod +x $@+
   1.119 +	@+mv $@+ $@
   1.120 +
   1.121 +the_vm: vm_build_preliminaries $(adjust-mflags)
   1.122 +	@$(UpdatePCH)
   1.123 +	@$(MAKE) -f vm.make $(MFLAGS-adjusted)
   1.124 +
   1.125 +install gamma: the_vm
   1.126 +	@$(MAKE) -f vm.make $@
   1.127 +
   1.128 +# next rules support "make foo.[ois]"
   1.129 +
   1.130 +%.o %.i %.s:
   1.131 +	$(UpdatePCH) 
   1.132 +	$(MAKE) -f vm.make $(MFLAGS) $@
   1.133 +	#$(MAKE) -f vm.make $@
   1.134 +
   1.135 +# this should force everything to be rebuilt
   1.136 +clean: 
   1.137 +	rm -f $(GENERATED)/*.class
   1.138 +	$(MAKE) -f vm.make $(MFLAGS) clean
   1.139 +
   1.140 +# just in case it doesn't, this should do it
   1.141 +realclean:
   1.142 +	$(MAKE) -f vm.make $(MFLAGS) clean
   1.143 +	rm -fr $(GENERATED)
   1.144 +
   1.145 +.PHONY: default vm_build_preliminaries
   1.146 +.PHONY: lists ad_stuff jvmti_stuff sa_stuff the_vm clean realclean
   1.147 +.PHONY: checks check_os_version install

mercurial