1 #
   2 # Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
   3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4 #
   5 # This code is free software; you can redistribute it and/or modify it
   6 # under the terms of the GNU General Public License version 2 only, as
   7 # published by the Free Software Foundation.  Oracle designates this
   8 # particular file as subject to the "Classpath" exception as provided
   9 # by Oracle in the LICENSE file that accompanied this code.
  10 #
  11 # This code is distributed in the hope that it will be useful, but WITHOUT
  12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14 # version 2 for more details (a copy is included in the LICENSE file that
  15 # accompanied this code).
  16 #
  17 # You should have received a copy of the GNU General Public License version
  18 # 2 along with this work; if not, write to the Free Software Foundation,
  19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20 #
  21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22 # or visit www.oracle.com if you need additional information or have any
  23 # questions.
  24 #
  25 
  26 # This must be the first rule
  27 default: all
  28 
  29 include $(SPEC)
  30 include MakeBase.gmk
  31 
  32 include JavaCompilation.gmk
  33 include SetupJavaCompilers.gmk
  34 
  35 TARGETS :=
  36 
  37 # Hook to include the corresponding custom file, if present.
  38 $(eval $(call IncludeCustomExtension, hotspot, CompileTools.gmk))
  39 
  40 ifeq ($(ENABLE_AOT), true)
  41   VM_CI_SRC_DIR := $(HOTSPOT_TOPDIR)/src/jdk.vm.ci/share/classes
  42 
  43   SRC_DIR := $(HOTSPOT_TOPDIR)/src/jdk.vm.compiler/share/classes
  44 
  45   ##############################################################################
  46   # Compile the annotation processors
  47   $(eval $(call SetupJavaCompilation, BUILD_VM_COMPILER_MATCH_PROCESSOR, \
  48       SETUP := GENERATE_OLDBYTECODE, \
  49       SRC := \
  50           $(SRC_DIR)/com.oracle.graal.compiler/src \
  51           $(SRC_DIR)/com.oracle.graal.compiler.common/src \
  52           $(SRC_DIR)/com.oracle.graal.compiler.match.processor/src \
  53           $(SRC_DIR)/com.oracle.graal.api.collections/src \
  54           $(SRC_DIR)/com.oracle.graal.api.replacements/src \
  55           $(SRC_DIR)/com.oracle.graal.asm/src \
  56           $(SRC_DIR)/com.oracle.graal.bytecode/src \
  57           $(SRC_DIR)/com.oracle.graal.code/src \
  58           $(SRC_DIR)/com.oracle.graal.debug/src \
  59           $(SRC_DIR)/com.oracle.graal.graph/src \
  60           $(SRC_DIR)/com.oracle.graal.lir/src \
  61           $(SRC_DIR)/com.oracle.graal.loop/src \
  62           $(SRC_DIR)/com.oracle.graal.loop.phases/src \
  63           $(SRC_DIR)/com.oracle.graal.nodeinfo/src \
  64           $(SRC_DIR)/com.oracle.graal.nodes/src \
  65           $(SRC_DIR)/com.oracle.graal.options/src \
  66           $(SRC_DIR)/com.oracle.graal.phases/src \
  67           $(SRC_DIR)/com.oracle.graal.phases.common/src \
  68           $(SRC_DIR)/com.oracle.graal.serviceprovider/src \
  69           $(SRC_DIR)/com.oracle.graal.virtual/src \
  70           $(VM_CI_SRC_DIR)/jdk.vm.ci.code/src \
  71           $(VM_CI_SRC_DIR)/jdk.vm.ci.common/src \
  72           $(VM_CI_SRC_DIR)/jdk.vm.ci.meta/src \
  73           $(VM_CI_SRC_DIR)/jdk.vm.ci.runtime/src \
  74           $(VM_CI_SRC_DIR)/jdk.vm.ci.services/src \
  75           , \
  76       EXCLUDE_FILES := $(EXCLUDE_FILES), \
  77       BIN := $(BUILDTOOLS_OUTPUTDIR)/jdk.vm.compiler.match.processor, \
  78       JAR := $(BUILDTOOLS_OUTPUTDIR)/jdk.vm.compiler.match.processor.jar, \
  79   ))
  80 
  81   TARGETS += $(BUILD_VM_COMPILER_MATCH_PROCESSOR)
  82 
  83   ##############################################################################
  84 
  85   $(eval $(call SetupJavaCompilation, BUILD_VM_COMPILER_NODEINFO_PROCESSOR, \
  86       SETUP := GENERATE_OLDBYTECODE, \
  87       SRC := \
  88           $(SRC_DIR)/com.oracle.graal.nodeinfo/src \
  89           $(SRC_DIR)/com.oracle.graal.nodeinfo.processor/src \
  90           , \
  91       BIN := $(BUILDTOOLS_OUTPUTDIR)/jdk.vm.compiler.nodeinfo.processor, \
  92       JAR := $(BUILDTOOLS_OUTPUTDIR)/jdk.vm.compiler.nodeinfo.processor.jar, \
  93   ))
  94 
  95   TARGETS += $(BUILD_VM_COMPILER_NODEINFO_PROCESSOR)
  96 
  97   ##############################################################################
  98 
  99   $(eval $(call SetupJavaCompilation, BUILD_VM_COMPILER_OPTIONS_PROCESSOR, \
 100       SETUP := GENERATE_OLDBYTECODE, \
 101       SRC := \
 102           $(SRC_DIR)/com.oracle.graal.options/src \
 103           $(SRC_DIR)/com.oracle.graal.options.processor/src \
 104           , \
 105       BIN := $(BUILDTOOLS_OUTPUTDIR)/jdk.vm.compiler.options.processor, \
 106       JAR := $(BUILDTOOLS_OUTPUTDIR)/jdk.vm.compiler.options.processor.jar, \
 107   ))
 108 
 109   TARGETS += $(BUILD_VM_COMPILER_OPTIONS_PROCESSOR)
 110 
 111   ##############################################################################
 112 
 113   $(eval $(call SetupJavaCompilation, BUILD_VM_COMPILER_REPLACEMENTS_VERIFIER, \
 114       SETUP := GENERATE_OLDBYTECODE, \
 115       SRC := \
 116           $(SRC_DIR)/com.oracle.graal.replacements.verifier/src \
 117           $(SRC_DIR)/com.oracle.graal.api.collections/src \
 118           $(SRC_DIR)/com.oracle.graal.api.replacements/src \
 119           $(SRC_DIR)/com.oracle.graal.code/src \
 120           $(SRC_DIR)/com.oracle.graal.compiler.common/src \
 121           $(SRC_DIR)/com.oracle.graal.debug/src \
 122           $(SRC_DIR)/com.oracle.graal.graph/src \
 123           $(SRC_DIR)/com.oracle.graal.nodeinfo/src \
 124           $(SRC_DIR)/com.oracle.graal.options/src \
 125           $(SRC_DIR)/com.oracle.graal.serviceprovider/src \
 126           $(VM_CI_SRC_DIR)/jdk.vm.ci.code/src \
 127           $(VM_CI_SRC_DIR)/jdk.vm.ci.common/src \
 128           $(VM_CI_SRC_DIR)/jdk.vm.ci.meta/src \
 129           $(VM_CI_SRC_DIR)/jdk.vm.ci.runtime/src \
 130           $(VM_CI_SRC_DIR)/jdk.vm.ci.services/src \
 131           , \
 132       EXCLUDE_FILES := $(EXCLUDE_FILES), \
 133       BIN := $(BUILDTOOLS_OUTPUTDIR)/jdk.vm.compiler.replacements.verifier, \
 134       JAR := $(BUILDTOOLS_OUTPUTDIR)/jdk.vm.compiler.replacements.verifier.jar, \
 135   ))
 136 
 137   TARGETS += $(BUILD_VM_COMPILER_REPLACEMENTS_VERIFIER)
 138 
 139   ##############################################################################
 140 
 141   $(eval $(call SetupJavaCompilation, BUILD_VM_COMPILER_SERVICEPROVIDER_PROCESSOR, \
 142       SETUP := GENERATE_OLDBYTECODE, \
 143       SRC := \
 144           $(SRC_DIR)/com.oracle.graal.serviceprovider/src \
 145           $(SRC_DIR)/com.oracle.graal.serviceprovider.processor/src \
 146           $(VM_CI_SRC_DIR)/jdk.vm.ci.services/src \
 147           , \
 148       EXCLUDE_FILES := $(EXCLUDE_FILES), \
 149       BIN := $(BUILDTOOLS_OUTPUTDIR)/jdk.vm.compiler.serviceprovider.processor, \
 150       JAR := $(BUILDTOOLS_OUTPUTDIR)/jdk.vm.compiler.serviceprovider.processor.jar, \
 151   ))
 152 
 153   TARGETS += $(BUILD_VM_COMPILER_SERVICEPROVIDER_PROCESSOR)
 154 
 155   ##############################################################################
 156 endif
 157 
 158 all: $(TARGETS)
 159 
 160 .PHONY: all