annotate make/launcher/Launcher-java.base.gmk @ 13506:b6bd1a9bf016

8145596: Enable debug symbols for all libraries Reviewed-by: erikj
author ihse
date Wed, 20 Jan 2016 09:54:13 +0100
parents dc90094c0d66
children c029ee7fc04a
rev   line source
chegar@10444 1 #
ihse@12977 2 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
chegar@10444 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
chegar@10444 4 #
chegar@10444 5 # This code is free software; you can redistribute it and/or modify it
chegar@10444 6 # under the terms of the GNU General Public License version 2 only, as
chegar@10444 7 # published by the Free Software Foundation. Oracle designates this
chegar@10444 8 # particular file as subject to the "Classpath" exception as provided
chegar@10444 9 # by Oracle in the LICENSE file that accompanied this code.
chegar@10444 10 #
chegar@10444 11 # This code is distributed in the hope that it will be useful, but WITHOUT
chegar@10444 12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
chegar@10444 13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
chegar@10444 14 # version 2 for more details (a copy is included in the LICENSE file that
chegar@10444 15 # accompanied this code).
chegar@10444 16 #
chegar@10444 17 # You should have received a copy of the GNU General Public License version
chegar@10444 18 # 2 along with this work; if not, write to the Free Software Foundation,
chegar@10444 19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
chegar@10444 20 #
chegar@10444 21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
chegar@10444 22 # or visit www.oracle.com if you need additional information or have any
chegar@10444 23 # questions.
chegar@10444 24 #
chegar@10444 25
chegar@10444 26 include LauncherCommon.gmk
chegar@10444 27
ihse@13013 28 JAVA_RC_FLAGS += -i $(JDK_TOPDIR)/src/java.base/windows/native/common
ihse@13013 29 ifdef OPENJDK
ihse@13013 30 JAVA_RC_FLAGS += -i "$(JDK_TOPDIR)/src/java.base/windows/native/launcher/icons"
ihse@13013 31 else
ihse@13013 32 JAVA_RC_FLAGS += -i "$(JDK_TOPDIR)/src/closed/java.base/windows/native/launcher/icons"
ihse@13013 33 endif
ihse@13013 34
chegar@10444 35 ################################################################################
chegar@10444 36
chegar@10444 37 # On windows, the debuginfo files get the same name as for java.dll. Build
chegar@10444 38 # into another dir and copy selectively so debuginfo for java.dll isn't
chegar@10444 39 # overwritten.
ihse@13013 40 $(eval $(call SetupBuildLauncher, java, \
ihse@13013 41 CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS -DENABLE_ARG_FILES, \
ihse@13013 42 LDFLAGS_solaris := -R$(OPENWIN_HOME)/lib$(OPENJDK_TARGET_CPU_ISADIR), \
ihse@13013 43 LIBS_windows := user32.lib comctl32.lib, \
ihse@13013 44 RC_FLAGS := $(JAVA_RC_FLAGS), \
ihse@13013 45 VERSION_INFO_RESOURCE := $(JAVA_VERSION_INFO_RESOURCE), \
ihse@13013 46 OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/java_objs, \
ihse@13013 47 OPTIMIZATION := HIGH, \
ihse@13013 48 WINDOWS_STATIC_LINK := true, \
ihse@13013 49 NO_JAVA_MS := true, \
ihse@13013 50 ))
chegar@10444 51
chegar@10967 52 $(SUPPORT_OUTPUTDIR)/modules_cmds/java.base/java$(EXE_SUFFIX): $(BUILD_LAUNCHER_java)
chegar@10444 53 $(MKDIR) -p $(@D)
chegar@10444 54 $(RM) $@
ihse@13013 55 $(CP) $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/java_objs/java$(EXE_SUFFIX) $@
chegar@10444 56
chegar@10967 57 TARGETS += $(SUPPORT_OUTPUTDIR)/modules_cmds/java.base/java$(EXE_SUFFIX)
chegar@10444 58
chegar@10444 59 ifeq ($(OPENJDK_TARGET_OS), windows)
ihse@13013 60 $(eval $(call SetupBuildLauncher, javaw, \
ihse@13013 61 CFLAGS := -DJAVAW -DEXPAND_CLASSPATH_WILDCARDS -DENABLE_ARG_FILES, \
ihse@13013 62 LIBS_windows := user32.lib comctl32.lib, \
ihse@13013 63 RC_FLAGS := $(JAVA_RC_FLAGS), \
ihse@13013 64 VERSION_INFO_RESOURCE := $(JAVA_VERSION_INFO_RESOURCE), \
ihse@13013 65 WINDOWS_STATIC_LINK := true, \
ihse@13013 66 NO_JAVA_MS := true, \
ihse@13013 67 ))
chegar@10444 68 endif
chegar@10444 69
ihse@13013 70 $(eval $(call SetupBuildLauncher, keytool, \
ihse@13013 71 MAIN_CLASS := sun.security.tools.keytool.Main, \
ihse@13013 72 ))
chegar@10444 73
chegar@10444 74 ################################################################################
chegar@10444 75
chegar@10444 76 BUILD_JEXEC :=
chegar@10444 77 BUILD_JEXEC_SRC :=
chegar@10444 78 BUILD_JEXEC_INC :=
chegar@10967 79 BUILD_JEXEC_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base$(OPENJDK_TARGET_CPU_LIBDIR)
chegar@10444 80
chegar@10444 81 #
chegar@10444 82 # UNHANDLED:
chegar@10444 83 # - COMPILE_APPROACH = normal
chegar@10444 84 #
chegar@10444 85
chegar@10444 86 #
chegar@10444 87 # jdk/make/java/Makefile
chegar@10444 88 #
chegar@10444 89 ifeq ($(OPENJDK_TARGET_OS), solaris)
chegar@10444 90 ifeq ($(OPENJDK_TARGET_CPU_BITS), 32)
chegar@10444 91 BUILD_JEXEC := 1
chegar@10444 92 endif
chegar@10444 93 endif
chegar@10444 94
chegar@10444 95 ifeq ($(OPENJDK_TARGET_OS), linux)
chegar@10444 96 BUILD_JEXEC := 1
chegar@10444 97 endif # OPENJDK_TARGET_OS
chegar@10444 98
chegar@10444 99 #
chegar@10444 100 # jdk/make/java/jexec/Makefile
chegar@10444 101 #
chegar@10444 102 ifeq ($(BUILD_JEXEC), 1)
chegar@10444 103
chegar@10444 104 ifeq ($(OPENJDK_TARGET_OS), windows)
chegar@10444 105 else ifeq ($(OPENJDK_TARGET_OS), macosx)
chegar@10444 106 BUILD_JEXEC_SRC := $(JDK_TOPDIR)/src/java.base/macosx/native/launcher
chegar@10444 107 else
chegar@10444 108 BUILD_JEXEC_SRC := $(JDK_TOPDIR)/src/java.base/unix/native/launcher
chegar@10444 109 endif
chegar@10444 110
chegar@10444 111 ifeq ($(OPENJDK_TARGET_OS), linux)
chegar@10967 112 BUILD_JEXEC_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base
chegar@10444 113 BUILD_JEXEC_INC += -I$(JDK_TOPDIR)/src/java.base/share/native/libjli
chegar@10444 114 endif
chegar@10444 115 endif
chegar@10444 116
chegar@10444 117 #
chegar@10444 118 # Note that the two Makefile's seems to contradict each other,
chegar@10444 119 # and that src/macosx/bin/jexec.c seems unused
chegar@10444 120 #
chegar@10444 121 ifneq ($(BUILD_JEXEC_SRC), )
chegar@10444 122 $(eval $(call SetupNativeCompilation,BUILD_JEXEC, \
chegar@10444 123 SRC := $(BUILD_JEXEC_SRC), \
chegar@10444 124 INCLUDE_FILES := jexec.c, \
chegar@10444 125 OPTIMIZATION := LOW, \
chegar@10444 126 CFLAGS := $(CFLAGS_JDKEXE) \
chegar@10444 127 $(BUILD_JEXEC_INC), \
chegar@10444 128 CFLAGS_linux := -fPIC, \
chegar@10444 129 CFLAGS_solaris := -KPIC, \
ihse@13311 130 LDFLAGS := $(LDFLAGS_JDKEXE), \
chegar@10967 131 OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/jexec_obj, \
chegar@10444 132 OUTPUT_DIR := $(BUILD_JEXEC_DST_DIR), \
chegar@10444 133 PROGRAM := jexec))
chegar@10444 134
chegar@10967 135 TARGETS += $(BUILD_JEXEC)
chegar@10444 136 endif
chegar@10444 137
chegar@10444 138 ################################################################################
chegar@10444 139
chegar@10444 140 BUILD_JSPAWNHELPER :=
chegar@10444 141 BUILD_JSPAWNHELPER_SRC := $(JDK_TOPDIR)/src/java.base/unix/native/jspawnhelper
chegar@10444 142 JSPAWNHELPER_CFLAGS := -I$(JDK_TOPDIR)/src/java.base/unix/native/libjava
chegar@10967 143 BUILD_JSPAWNHELPER_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base$(OPENJDK_TARGET_CPU_LIBDIR)
chegar@10967 144 LINK_JSPAWNHELPER_OBJECTS := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjava/childproc.o
ihse@12977 145 BUILD_JSPAWNHELPER_LDFLAGS :=
chegar@10444 146
chegar@10444 147 ifneq ($(findstring $(OPENJDK_TARGET_OS), macosx solaris aix), )
chegar@10444 148 BUILD_JSPAWNHELPER := 1
chegar@10444 149 endif
chegar@10444 150
chegar@10444 151 ifeq ($(OPENJDK_TARGET_OS), macosx)
chegar@10967 152 BUILD_JSPAWNHELPER_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base
chegar@10444 153 endif
chegar@10444 154
chegar@10444 155 ifeq ($(OPENJDK_TARGET_CPU_BITS), 64)
ihse@12977 156 BUILD_JSPAWNHELPER_LDFLAGS += $(COMPILER_TARGET_BITS_FLAG)64
chegar@10444 157 endif
chegar@10444 158
chegar@10444 159 ifeq ($(BUILD_JSPAWNHELPER), 1)
chegar@10444 160 $(eval $(call SetupNativeCompilation,BUILD_JSPAWNHELPER, \
chegar@10444 161 SRC := $(BUILD_JSPAWNHELPER_SRC), \
chegar@10444 162 INCLUDE_FILES := jspawnhelper.c, \
chegar@10444 163 OPTIMIZATION := LOW, \
chegar@10444 164 CFLAGS := $(CFLAGS_JDKEXE) $(JSPAWNHELPER_CFLAGS), \
ihse@12977 165 LDFLAGS := $(LDFLAGS_JDKEXE) $(BUILD_JSPAWNHELPER_LDFLAGS), \
ihse@12977 166 LIBS := $(LINK_JSPAWNHELPER_OBJECTS), \
chegar@10967 167 OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/jspawnhelper, \
chegar@10444 168 OUTPUT_DIR := $(BUILD_JSPAWNHELPER_DST_DIR), \
chegar@10444 169 PROGRAM := jspawnhelper))
chegar@10444 170
chegar@10444 171 $(BUILD_JSPAWNHELPER): $(LINK_JSPAWNHELPER_OBJECTS)
chegar@10444 172
chegar@10967 173 TARGETS += $(BUILD_JSPAWNHELPER)
chegar@10444 174 endif
chegar@10444 175
chegar@10444 176 ################################################################################