< prev index next >

make/Import.gmk

Print this page
rev 12879 : 8136556: Add the ability to perform static builds of MacOSX x64 binaries
Reviewed-by: ihse, bdelsart, gadams, lfoltan, rriggs, hseigel, twisti
   1 #
   2 # Copyright (c) 2012, 2014, 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


  28 include $(SPEC)
  29 include MakeBase.gmk
  30 
  31 ################################################################################
  32 
  33 # Put the libraries here. Different locations for different target OS types.
  34 ifneq ($(OPENJDK_TARGET_OS), windows)
  35   HOTSPOT_LIB_DIR := $(HOTSPOT_DIST)/lib$(OPENJDK_TARGET_CPU_LIBDIR)
  36   BASE_INSTALL_LIBRARIES_HERE := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base$(OPENJDK_TARGET_CPU_LIBDIR)
  37   SA_INSTALL_LIBRARIES_HERE := $(SUPPORT_OUTPUTDIR)/modules_libs/jdk.hotspot.agent$(OPENJDK_TARGET_CPU_LIBDIR)
  38 else
  39   HOTSPOT_LIB_DIR := $(HOTSPOT_DIST)/bin
  40   BASE_INSTALL_LIBRARIES_HERE := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base
  41   SA_INSTALL_LIBRARIES_HERE := $(SUPPORT_OUTPUTDIR)/modules_libs/jdk.hotspot.agent
  42 endif
  43 
  44 ################################################################################
  45 #
  46 # Import hotspot
  47 #








  48 HOTSPOT_BASE_IMPORT_FILES := \
  49     $(addprefix $(LIBRARY_PREFIX), jvm.* jsig.* jvm_db.* jvm_dtrace.*) \
  50     Xusage.txt \
  51     #
  52 
  53 HOTSPOT_SA_IMPORT_FILES := \
  54     $(addprefix $(LIBRARY_PREFIX), saproc.* sawindbg.*) \
  55     #
  56 
  57 $(eval $(call SetupCopyFiles,COPY_HOTSPOT_BASE, \
  58     SRC := $(HOTSPOT_LIB_DIR), \
  59     DEST := $(BASE_INSTALL_LIBRARIES_HERE), \
  60     FILES := $(shell $(FIND) $(HOTSPOT_LIB_DIR) -type f  \
  61         -a \( -name DUMMY $(addprefix -o$(SPACE)-name$(SPACE), $(HOTSPOT_BASE_IMPORT_FILES)) \) )))
  62 
  63 ifeq ($(OPENJDK_TARGET_OS), windows)
  64   $(eval $(call SetupCopyFiles,COPY_HOTSPOT_BASE_JVMLIB, \
  65       SRC := $(HOTSPOT_DIST)/lib, \
  66       DEST := $(BASE_INSTALL_LIBRARIES_HERE), \
  67       FILES := $(wildcard $(HOTSPOT_DIST)/lib/*.lib)))
  68 endif
  69 
  70 BASE_TARGETS := $(COPY_HOTSPOT_BASE) $(COPY_HOTSPOT_BASE_JVMLIB)
  71 
  72 $(eval $(call SetupCopyFiles,COPY_HOTSPOT_SA, \
  73     SRC := $(HOTSPOT_LIB_DIR), \
  74     DEST := $(SA_INSTALL_LIBRARIES_HERE), \
  75     FILES := $(shell $(FIND) $(HOTSPOT_LIB_DIR) -type f  \
  76         -a \( -name DUMMY $(addprefix -o$(SPACE)-name$(SPACE), $(HOTSPOT_SA_IMPORT_FILES)) \) )))
  77 
  78 SA_TARGETS := $(COPY_HOTSPOT_SA)
  79 
  80 ################################################################################
  81 
  82 ifeq ($(OPENJDK_TARGET_OS), macosx)

  83   JSIG_DEBUGINFO := $(strip $(wildcard $(HOTSPOT_DIST)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjsig$(SHARED_LIBRARY_SUFFIX).dSYM) \
  84       $(wildcard $(HOTSPOT_DIST)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjsig.diz) )
  85 else
  86   JSIG_DEBUGINFO := $(strip $(wildcard $(HOTSPOT_DIST)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjsig.debuginfo) \
  87       $(wildcard $(HOTSPOT_DIST)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjsig.diz) )
  88 endif
  89 
  90 ifneq ($(OPENJDK_TARGET_OS), windows)
  91   ifeq ($(JVM_VARIANT_SERVER), true)
  92     BASE_TARGETS += $(BASE_INSTALL_LIBRARIES_HERE)/server/$(LIBRARY_PREFIX)jsig$(SHARED_LIBRARY_SUFFIX)
  93     ifneq (, $(JSIG_DEBUGINFO))
  94       BASE_TARGETS += $(BASE_INSTALL_LIBRARIES_HERE)/server/$(foreach I,$(JSIG_DEBUGINFO),$(notdir $I))
  95     endif
  96   endif
  97   ifeq ($(JVM_VARIANT_CLIENT), true)
  98     BASE_TARGETS += $(BASE_INSTALL_LIBRARIES_HERE)/client/$(LIBRARY_PREFIX)jsig$(SHARED_LIBRARY_SUFFIX)
  99     ifneq (, $(JSIG_DEBUGINFO))
 100       BASE_TARGETS += $(BASE_INSTALL_LIBRARIES_HERE)/client/$(foreach I,$(JSIG_DEBUGINFO),$(notdir $I))
 101     endif
 102   endif
 103   ifneq ($(OPENJDK_TARGET_OS), macosx)
 104     ifeq ($(JVM_VARIANT_MINIMAL1), true)
 105       BASE_TARGETS += $(BASE_INSTALL_LIBRARIES_HERE)/minimal/$(LIBRARY_PREFIX)jsig$(SHARED_LIBRARY_SUFFIX)
 106       ifneq (,$(JSIG_DEBUGINFO))
 107         BASE_TARGETS += $(BASE_INSTALL_LIBRARIES_HERE)/minimal/$(foreach I,$(JSIG_DEBUGINFO),$(notdir $I))

 108       endif
 109     endif
 110   endif
 111 endif
 112 
 113 $(BASE_INSTALL_LIBRARIES_HERE)/server/%$(SHARED_LIBRARY_SUFFIX): $(BASE_INSTALL_LIBRARIES_HERE)/%$(SHARED_LIBRARY_SUFFIX)
 114         $(MKDIR) -p $(@D)
 115         $(RM) $@
 116         $(LN) -s ../$(@F) $@
 117 
 118 ifeq ($(OPENJDK_TARGET_OS), macosx)
 119   $(BASE_INSTALL_LIBRARIES_HERE)/server/%.dSYM : $(BASE_INSTALL_LIBRARIES_HERE)/%.dSYM
 120         $(MKDIR) -p $(@D)
 121         $(RM) $@
 122         $(LN) -s ../$(@F) $@
 123 
 124   $(BASE_INSTALL_LIBRARIES_HERE)/server/%.diz : $(BASE_INSTALL_LIBRARIES_HERE)/%.diz
 125         $(MKDIR) -p $(@D)
 126         $(RM) $@
 127         $(RM) $@.tmp $(basename $@)$(SHARED_LIBRARY_SUFFIX).dSYM


   1 #
   2 # Copyright (c) 2012, 2015, 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


  28 include $(SPEC)
  29 include MakeBase.gmk
  30 
  31 ################################################################################
  32 
  33 # Put the libraries here. Different locations for different target OS types.
  34 ifneq ($(OPENJDK_TARGET_OS), windows)
  35   HOTSPOT_LIB_DIR := $(HOTSPOT_DIST)/lib$(OPENJDK_TARGET_CPU_LIBDIR)
  36   BASE_INSTALL_LIBRARIES_HERE := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base$(OPENJDK_TARGET_CPU_LIBDIR)
  37   SA_INSTALL_LIBRARIES_HERE := $(SUPPORT_OUTPUTDIR)/modules_libs/jdk.hotspot.agent$(OPENJDK_TARGET_CPU_LIBDIR)
  38 else
  39   HOTSPOT_LIB_DIR := $(HOTSPOT_DIST)/bin
  40   BASE_INSTALL_LIBRARIES_HERE := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base
  41   SA_INSTALL_LIBRARIES_HERE := $(SUPPORT_OUTPUTDIR)/modules_libs/jdk.hotspot.agent
  42 endif
  43 
  44 ################################################################################
  45 #
  46 # Import hotspot
  47 #
  48 
  49 # Don't import jsig library for static builds
  50 ifneq ($(STATIC_BUILD), true)
  51   JSIG_IMPORT = jsig.*
  52 else
  53   JSIG_IMPORT = 
  54 endif
  55 
  56 HOTSPOT_BASE_IMPORT_FILES := \
  57     $(addprefix $(LIBRARY_PREFIX), jvm.* $(JSIG_IMPORT) jvm_db.* jvm_dtrace.*) \
  58     Xusage.txt \
  59     #
  60 
  61 HOTSPOT_SA_IMPORT_FILES := \
  62     $(addprefix $(LIBRARY_PREFIX), saproc.* sawindbg.*) \
  63     #
  64 
  65 $(eval $(call SetupCopyFiles,COPY_HOTSPOT_BASE, \
  66     SRC := $(HOTSPOT_LIB_DIR), \
  67     DEST := $(BASE_INSTALL_LIBRARIES_HERE), \
  68     FILES := $(shell $(FIND) $(HOTSPOT_LIB_DIR) -type f  \
  69         -a \( -name DUMMY $(addprefix -o$(SPACE)-name$(SPACE), $(HOTSPOT_BASE_IMPORT_FILES)) \) )))
  70 
  71 ifeq ($(OPENJDK_TARGET_OS), windows)
  72   $(eval $(call SetupCopyFiles,COPY_HOTSPOT_BASE_JVMLIB, \
  73       SRC := $(HOTSPOT_DIST)/lib, \
  74       DEST := $(BASE_INSTALL_LIBRARIES_HERE), \
  75       FILES := $(wildcard $(HOTSPOT_DIST)/lib/*.lib)))
  76 endif
  77 
  78 BASE_TARGETS := $(COPY_HOTSPOT_BASE) $(COPY_HOTSPOT_BASE_JVMLIB)
  79 
  80 $(eval $(call SetupCopyFiles,COPY_HOTSPOT_SA, \
  81     SRC := $(HOTSPOT_LIB_DIR), \
  82     DEST := $(SA_INSTALL_LIBRARIES_HERE), \
  83     FILES := $(shell $(FIND) $(HOTSPOT_LIB_DIR) -type f  \
  84         -a \( -name DUMMY $(addprefix -o$(SPACE)-name$(SPACE), $(HOTSPOT_SA_IMPORT_FILES)) \) )))
  85 
  86 SA_TARGETS := $(COPY_HOTSPOT_SA)
  87 
  88 ################################################################################
  89 
  90 ifneq ($(STATIC_BUILD), true)
  91   ifeq ($(OPENJDK_TARGET_OS), macosx)
  92     JSIG_DEBUGINFO := $(strip $(wildcard $(HOTSPOT_DIST)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjsig$(SHARED_LIBRARY_SUFFIX).dSYM) \
  93         $(wildcard $(HOTSPOT_DIST)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjsig.diz) )
  94   else
  95     JSIG_DEBUGINFO := $(strip $(wildcard $(HOTSPOT_DIST)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjsig.debuginfo) \
  96         $(wildcard $(HOTSPOT_DIST)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjsig.diz) )
  97   endif
  98 
  99   ifneq ($(OPENJDK_TARGET_OS), windows)
 100     ifeq ($(JVM_VARIANT_SERVER), true)
 101       BASE_TARGETS += $(BASE_INSTALL_LIBRARIES_HERE)/server/$(LIBRARY_PREFIX)jsig$(SHARED_LIBRARY_SUFFIX)
 102       ifneq (, $(JSIG_DEBUGINFO))
 103         BASE_TARGETS += $(BASE_INSTALL_LIBRARIES_HERE)/server/$(foreach I,$(JSIG_DEBUGINFO),$(notdir $I))
 104       endif
 105     endif
 106     ifeq ($(JVM_VARIANT_CLIENT), true)
 107       BASE_TARGETS += $(BASE_INSTALL_LIBRARIES_HERE)/client/$(LIBRARY_PREFIX)jsig$(SHARED_LIBRARY_SUFFIX)
 108       ifneq (, $(JSIG_DEBUGINFO))
 109         BASE_TARGETS += $(BASE_INSTALL_LIBRARIES_HERE)/client/$(foreach I,$(JSIG_DEBUGINFO),$(notdir $I))
 110       endif
 111     endif
 112     ifneq ($(OPENJDK_TARGET_OS), macosx)
 113       ifeq ($(JVM_VARIANT_MINIMAL1), true)
 114         BASE_TARGETS += $(BASE_INSTALL_LIBRARIES_HERE)/minimal/$(LIBRARY_PREFIX)jsig$(SHARED_LIBRARY_SUFFIX)
 115         ifneq (,$(JSIG_DEBUGINFO))
 116           BASE_TARGETS += $(BASE_INSTALL_LIBRARIES_HERE)/minimal/$(foreach I,$(JSIG_DEBUGINFO),$(notdir $I))
 117         endif
 118       endif
 119     endif
 120   endif
 121 endif
 122 
 123 $(BASE_INSTALL_LIBRARIES_HERE)/server/%$(SHARED_LIBRARY_SUFFIX): $(BASE_INSTALL_LIBRARIES_HERE)/%$(SHARED_LIBRARY_SUFFIX)
 124         $(MKDIR) -p $(@D)
 125         $(RM) $@
 126         $(LN) -s ../$(@F) $@
 127 
 128 ifeq ($(OPENJDK_TARGET_OS), macosx)
 129   $(BASE_INSTALL_LIBRARIES_HERE)/server/%.dSYM : $(BASE_INSTALL_LIBRARIES_HERE)/%.dSYM
 130         $(MKDIR) -p $(@D)
 131         $(RM) $@
 132         $(LN) -s ../$(@F) $@
 133 
 134   $(BASE_INSTALL_LIBRARIES_HERE)/server/%.diz : $(BASE_INSTALL_LIBRARIES_HERE)/%.diz
 135         $(MKDIR) -p $(@D)
 136         $(RM) $@
 137         $(RM) $@.tmp $(basename $@)$(SHARED_LIBRARY_SUFFIX).dSYM


< prev index next >