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 # These include files are currently being copied from the jdk repository for
  27 # historical reasons. Disable copying from here until this has been cleaned up.
  28 # The files in hotspot differ slightly from the corresponding files in jdk.
  29 # See JDK-8167078.
  30 
  31 INCLUDE_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_include/$(MODULE)
  32 
  33 ################################################################################
  34 # Copy platform-independent .h files
  35 $(eval $(call SetupCopyFiles, COPY_INCLUDE_FILES, \
  36     SRC := $(TOPDIR)/src/hotspot/share, \
  37     DEST := $(INCLUDE_DST_DIR), \
  38     FLATTEN := true, \
  39     FILES := prims/jni.h code/jvmticmlr.h \
  40 ))
  41 
  42 #TARGETS += $(COPY_INCLUDE_FILES)
  43 
  44 ################################################################################
  45 # Copy jni_md.h
  46 
  47 # This might have been defined in a custom extension
  48 JNI_MD_H_SRC ?= $(TOPDIR)/src/hotspot/cpu/$(HOTSPOT_TARGET_CPU_ARCH)/jni_$(HOTSPOT_TARGET_CPU_ARCH).h
  49 
  50 ifeq ($(OPENJDK_TARGET_OS), macosx)
  51   # NOTE: This should most likely be darwin, but the old hotspot build uses bsd
  52   JNI_MD_SUBDIR := bsd
  53 else ifeq ($(OPENJDK_TARGET_OS), windows)
  54   JNI_MD_SUBDIR := win32
  55 else
  56   JNI_MD_SUBDIR := $(OPENJDK_TARGET_OS)
  57 endif
  58 
  59 # SetupCopyFiles is not used here since it's non-trivial to copy a single
  60 # file with a different target name.
  61 $(INCLUDE_DST_DIR)/$(JNI_MD_SUBDIR)/jni_md.h: $(JNI_MD_H_SRC)
  62         $(call LogInfo, Copying hotspot/dist/include/$(JNI_MD_SUBDIR)/jni_md.h)
  63         $(install-file)
  64 
  65 #TARGETS += $(INCLUDE_DST_DIR)/$(JNI_MD_SUBDIR)/jni_md.h
  66 
  67 ################################################################################
  68 # Optionally copy libffi.so.? into the the image
  69 
  70 ifeq ($(ENABLE_LIBFFI_BUNDLING), true)
  71   $(eval $(call SetupCopyFiles, COPY_LIBFFI, \
  72       FILES := $(LIBFFI_LIB_FILE), \
  73       DEST := $(call FindLibDirForModule, $(MODULE)), \
  74       FLATTEN := true, \
  75       MACRO := install-file-nolink, \
  76   ))
  77 
  78   TARGETS += $(COPY_LIBFFI)
  79 endif
  80 
  81 ################################################################################