jdk/make/launcher/Launcher-java.base.gmk
author katleman
Thu, 21 Aug 2014 14:16:14 -0700
changeset 25878 6d561031123e
parent 25859 3317bb8137f4
child 27565 729f9700483a
permissions -rw-r--r--
Added tag jdk9-b27 for changeset 98ce0879ab4c
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, \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    35
    $(JDK_OUTPUTDIR)/objs/jli_static.lib, $(JAVA_RC_FLAGS), \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    36
    $(JAVA_VERSION_INFO_RESOURCE), $(JDK_OUTPUTDIR)/objs/java_objs,true))
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    37
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    38
$(JDK_OUTPUTDIR)/bin$(OUTPUT_SUBDIR)/java$(EXE_SUFFIX): $(BUILD_LAUNCHER_java)
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    39
	$(MKDIR) -p $(@D)
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    40
	$(RM) $@
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    41
	$(CP) $(JDK_OUTPUTDIR)/objs/java_objs$(OUTPUT_SUBDIR)/java$(EXE_SUFFIX) $@
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    42
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    43
LAUNCHERS += $(JDK_OUTPUTDIR)/bin$(OUTPUT_SUBDIR)/java$(EXE_SUFFIX)
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, \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    48
      $(JDK_OUTPUTDIR)/objs/jli_static.lib, $(JAVA_RC_FLAGS), \
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 :=
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    60
BUILD_JEXEC_DST_DIR := $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)
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)
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    93
    BUILD_JEXEC_DST_DIR := $(JDK_OUTPUTDIR)/lib
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)), \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   114
      OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/jexec_obj, \
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
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   119
  LIBRARIES += $(BUILD_JEXEC)
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
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   127
BUILD_JSPAWNHELPER_DST_DIR := $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   128
LINK_JSPAWNHELPER_OBJECTS := $(JDK_OUTPUTDIR)/objs/libjava/childproc.o
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)
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   136
  BUILD_JSPAWNHELPER_DST_DIR := $(JDK_OUTPUTDIR)/lib
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), \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   152
      OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/jspawnhelper, \
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
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   158
  LIBRARIES += $(BUILD_JSPAWNHELPER)
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
################################################################################
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   162
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   163
java.base: $(LAUNCHERS) $(LIBRARIES)
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   164
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   165
all: java.base
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   166
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   167
.PHONY: all java.base