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 ($(INCLUDE_GRAAL), true)
  41   VM_CI_SRC_DIR := $(TOPDIR)/src/jdk.internal.vm.ci/share/classes
  42 
  43   SRC_DIR := $(TOPDIR)/src/jdk.internal.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)/org.graalvm.compiler.processor/src \
  51           $(SRC_DIR)/org.graalvm.compiler.core.match.processor/src \
  52           , \
  53       EXCLUDE_FILES := $(EXCLUDE_FILES), \
  54       BIN := $(BUILDTOOLS_OUTPUTDIR)/jdk.vm.compiler.match.processor, \
  55       JAR := $(BUILDTOOLS_OUTPUTDIR)/jdk.vm.compiler.match.processor.jar, \
  56   ))
  57 
  58   TARGETS += $(BUILD_VM_COMPILER_MATCH_PROCESSOR)
  59 
  60   ##############################################################################
  61 
  62   $(eval $(call SetupJavaCompilation, BUILD_VM_COMPILER_NODEINFO_PROCESSOR, \
  63       SETUP := GENERATE_OLDBYTECODE, \
  64       SRC := \
  65           $(SRC_DIR)/org.graalvm.compiler.processor/src \
  66           $(SRC_DIR)/org.graalvm.compiler.nodeinfo.processor/src \
  67           , \
  68       BIN := $(BUILDTOOLS_OUTPUTDIR)/jdk.vm.compiler.nodeinfo.processor, \
  69       JAR := $(BUILDTOOLS_OUTPUTDIR)/jdk.vm.compiler.nodeinfo.processor.jar, \
  70   ))
  71 
  72   TARGETS += $(BUILD_VM_COMPILER_NODEINFO_PROCESSOR)
  73 
  74   ##############################################################################
  75 
  76   $(eval $(call SetupJavaCompilation, BUILD_VM_COMPILER_OPTIONS_PROCESSOR, \
  77       SETUP := GENERATE_OLDBYTECODE, \
  78       SRC := \
  79           $(SRC_DIR)/org.graalvm.compiler.processor/src \
  80           $(SRC_DIR)/org.graalvm.compiler.options.processor/src \
  81           , \
  82       BIN := $(BUILDTOOLS_OUTPUTDIR)/jdk.vm.compiler.options.processor, \
  83       JAR := $(BUILDTOOLS_OUTPUTDIR)/jdk.vm.compiler.options.processor.jar, \
  84   ))
  85 
  86   TARGETS += $(BUILD_VM_COMPILER_OPTIONS_PROCESSOR)
  87 
  88   ##############################################################################
  89 
  90   $(eval $(call SetupJavaCompilation, BUILD_VM_COMPILER_REPLACEMENTS_PROCESSOR, \
  91       SETUP := GENERATE_OLDBYTECODE, \
  92       SRC := \
  93           $(SRC_DIR)/org.graalvm.compiler.processor/src \
  94           $(SRC_DIR)/org.graalvm.compiler.replacements.processor/src \
  95           , \
  96       EXCLUDE_FILES := $(EXCLUDE_FILES), \
  97       BIN := $(BUILDTOOLS_OUTPUTDIR)/jdk.vm.compiler.replacements.verifier, \
  98       JAR := $(BUILDTOOLS_OUTPUTDIR)/jdk.vm.compiler.replacements.verifier.jar, \
  99   ))
 100 
 101   TARGETS += $(BUILD_VM_COMPILER_REPLACEMENTS_PROCESSOR)
 102 
 103   ##############################################################################
 104 
 105   $(eval $(call SetupJavaCompilation, BUILD_VM_COMPILER_SERVICEPROVIDER_PROCESSOR, \
 106       SETUP := GENERATE_OLDBYTECODE, \
 107       SRC := \
 108           $(SRC_DIR)/org.graalvm.compiler.processor/src \
 109           $(SRC_DIR)/org.graalvm.compiler.serviceprovider.processor/src \
 110           , \
 111       EXCLUDE_FILES := $(EXCLUDE_FILES), \
 112       BIN := $(BUILDTOOLS_OUTPUTDIR)/jdk.vm.compiler.serviceprovider.processor, \
 113       JAR := $(BUILDTOOLS_OUTPUTDIR)/jdk.vm.compiler.serviceprovider.processor.jar, \
 114   ))
 115 
 116   TARGETS += $(BUILD_VM_COMPILER_SERVICEPROVIDER_PROCESSOR)
 117 
 118   ##############################################################################
 119 endif
 120 
 121 all: $(TARGETS)
 122 
 123 .PHONY: all