jdk/make/launcher/Launcher-java.base.gmk
author chegar
Wed, 03 Dec 2014 14:22:58 +0000
changeset 27565 729f9700483a
parent 25859 3317bb8137f4
child 29931 64e274ed6567
permissions -rw-r--r--
8049367: Modular Run-Time Images Reviewed-by: chegar, dfuchs, ihse, joehw, mullan, psandoz, wetmore Contributed-by: alan.bateman@oracle.com, alex.buckley@oracle.com, bradford.wetmore@oracle.com, chris.hegarty@oracle.com, erik.joelsson@oracle.com, james.laskey@oracle.com, jonathan.gibbons@oracle.com, karen.kinnear@oracle.com, magnus.ihse.bursie@oracle.com, mandy.chung@oracle.com, mark.reinhold@oracle.com, paul.sandoz@oracle.com, sundararajan.athijegannathan@oracle.com
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
     1
#
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
     2
# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
     4
#
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    10
#
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    15
# accompanied this code).
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    16
#
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    20
#
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    23
# questions.
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    24
#
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    25
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    26
include LauncherCommon.gmk
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    27
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    28
################################################################################
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    29
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    30
# On windows, the debuginfo files get the same name as for java.dll. Build
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    31
# into another dir and copy selectively so debuginfo for java.dll isn't
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    32
# overwritten.
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    33
$(eval $(call SetupLauncher,java, \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    34
    -DEXPAND_CLASSPATH_WILDCARDS,,,user32.lib comctl32.lib, \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    35
    $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/jli_static.lib, $(JAVA_RC_FLAGS), \
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    36
    $(JAVA_VERSION_INFO_RESOURCE), $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/java_objs,true))
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    37
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    38
$(SUPPORT_OUTPUTDIR)/modules_cmds/java.base/java$(EXE_SUFFIX): $(BUILD_LAUNCHER_java)
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    39
	$(MKDIR) -p $(@D)
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    40
	$(RM) $@
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    41
	$(CP) $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/java_objs$(OUTPUT_SUBDIR)/java$(EXE_SUFFIX) $@
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    42
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    43
TARGETS += $(SUPPORT_OUTPUTDIR)/modules_cmds/java.base/java$(EXE_SUFFIX)
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    44
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    45
ifeq ($(OPENJDK_TARGET_OS), windows)
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    46
  $(eval $(call SetupLauncher,javaw, \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    47
      -DJAVAW -DEXPAND_CLASSPATH_WILDCARDS,,,user32.lib comctl32.lib, \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    48
      $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/jli_static.lib, $(JAVA_RC_FLAGS), \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    49
      $(JAVA_VERSION_INFO_RESOURCE),,true))
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    50
endif
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    51
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    52
$(eval $(call SetupLauncher,keytool, \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    53
    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.security.tools.keytool.Main"$(COMMA) }'))
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    54
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    55
################################################################################
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    56
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    57
BUILD_JEXEC :=
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    58
BUILD_JEXEC_SRC :=
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    59
BUILD_JEXEC_INC :=
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    60
BUILD_JEXEC_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base$(OPENJDK_TARGET_CPU_LIBDIR)
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    61
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    62
#
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    63
# UNHANDLED:
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    64
# - COMPILE_APPROACH = normal
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    65
#
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    66
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    67
#
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    68
# jdk/make/java/Makefile
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    69
#
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    70
ifeq ($(OPENJDK_TARGET_OS), solaris)
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    71
  ifeq ($(OPENJDK_TARGET_CPU_BITS), 32)
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    72
    BUILD_JEXEC := 1
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    73
  endif
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    74
endif
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    75
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    76
ifeq ($(OPENJDK_TARGET_OS), linux)
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    77
  BUILD_JEXEC := 1
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    78
endif # OPENJDK_TARGET_OS
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    79
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    80
#
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    81
# jdk/make/java/jexec/Makefile
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    82
#
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    83
ifeq ($(BUILD_JEXEC), 1)
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    84
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    85
  ifeq ($(OPENJDK_TARGET_OS), windows)
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    86
  else ifeq ($(OPENJDK_TARGET_OS), macosx)
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    87
    BUILD_JEXEC_SRC := $(JDK_TOPDIR)/src/java.base/macosx/native/launcher
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    88
  else
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    89
    BUILD_JEXEC_SRC := $(JDK_TOPDIR)/src/java.base/unix/native/launcher
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    90
  endif
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    91
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    92
  ifeq ($(OPENJDK_TARGET_OS), linux)
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    93
    BUILD_JEXEC_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    94
    BUILD_JEXEC_INC += -I$(JDK_TOPDIR)/src/java.base/share/native/libjli
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    95
  endif
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    96
endif
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    97
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    98
#
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    99
# Note that the two Makefile's seems to contradict each other,
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   100
# and that src/macosx/bin/jexec.c seems unused
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   101
#
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   102
ifneq ($(BUILD_JEXEC_SRC), )
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   103
  $(eval $(call SetupNativeCompilation,BUILD_JEXEC, \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   104
      SRC := $(BUILD_JEXEC_SRC), \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   105
      INCLUDE_FILES := jexec.c, \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   106
      LANG := C, \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   107
      OPTIMIZATION := LOW, \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   108
      CFLAGS := $(CFLAGS_JDKEXE) \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   109
          $(BUILD_JEXEC_INC), \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   110
      CFLAGS_linux := -fPIC, \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   111
      CFLAGS_solaris := -KPIC, \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   112
      LDFLAGS := $(LDFLAGS_JDKEXE) \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   113
          $(call SET_SHARED_LIBRARY_NAME,$(LIBRARY_PREFIX)$(SHARED_LIBRARY_SUFFIX)), \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   114
      OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/jexec_obj, \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   115
      OUTPUT_DIR := $(BUILD_JEXEC_DST_DIR), \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   116
      DEBUG_SYMBOLS := true, \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   117
      PROGRAM := jexec))
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   118
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   119
  TARGETS += $(BUILD_JEXEC)
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   120
endif
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   121
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   122
################################################################################
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   123
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   124
BUILD_JSPAWNHELPER :=
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   125
BUILD_JSPAWNHELPER_SRC := $(JDK_TOPDIR)/src/java.base/unix/native/jspawnhelper
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   126
JSPAWNHELPER_CFLAGS := -I$(JDK_TOPDIR)/src/java.base/unix/native/libjava
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   127
BUILD_JSPAWNHELPER_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base$(OPENJDK_TARGET_CPU_LIBDIR)
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   128
LINK_JSPAWNHELPER_OBJECTS := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjava/childproc.o
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   129
LINK_JSPAWNHELPER_FLAGS :=
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   130
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   131
ifneq ($(findstring $(OPENJDK_TARGET_OS), macosx solaris aix), )
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   132
  BUILD_JSPAWNHELPER := 1
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   133
endif
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   134
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   135
ifeq ($(OPENJDK_TARGET_OS), macosx)
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   136
  BUILD_JSPAWNHELPER_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   137
endif
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   138
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   139
ifeq ($(OPENJDK_TARGET_CPU_BITS), 64)
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   140
  LINK_JSPAWNHELPER_FLAGS += $(COMPILER_TARGET_BITS_FLAG)64
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   141
endif
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   142
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   143
ifeq ($(BUILD_JSPAWNHELPER), 1)
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   144
  $(eval $(call SetupNativeCompilation,BUILD_JSPAWNHELPER, \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   145
      SRC := $(BUILD_JSPAWNHELPER_SRC), \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   146
      INCLUDE_FILES := jspawnhelper.c, \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   147
      LANG := C, \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   148
      OPTIMIZATION := LOW, \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   149
      CFLAGS := $(CFLAGS_JDKEXE) $(JSPAWNHELPER_CFLAGS), \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   150
      LDFLAGS := $(LDFLAGS_JDKEXE) $(LINK_JSPAWNHELPER_FLAGS), \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   151
      LDFLAGS_SUFFIX := $(LINK_JSPAWNHELPER_OBJECTS), \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   152
      OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/jspawnhelper, \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   153
      OUTPUT_DIR := $(BUILD_JSPAWNHELPER_DST_DIR), \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   154
      PROGRAM := jspawnhelper))
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   155
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   156
  $(BUILD_JSPAWNHELPER): $(LINK_JSPAWNHELPER_OBJECTS)
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   157
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   158
  TARGETS += $(BUILD_JSPAWNHELPER)
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   159
endif
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   160
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   161
################################################################################