< prev index next >

make/launcher/LauncherCommon.gmk

Print this page


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


 166   endif
 167 
 168   # The linker on older SuSE distros (e.g. on SLES 10) complains with:
 169   # "Invalid version tag `SUNWprivate_1.1'. Only anonymous version tag is allowed in executable."
 170   # if feeded with a version script which contains named tags.
 171   ifeq ($(USING_BROKEN_SUSE_LD),yes)
 172     ifneq ($(wildcard $(TOPDIR)/make/mapfiles/launchers/mapfile-$(OPENJDK_TARGET_CPU).anonymous), )
 173       $1_MAPFILE := $(TOPDIR)/make/mapfiles/launchers/mapfile-$(OPENJDK_TARGET_CPU).anonymous
 174     else
 175       $1_MAPFILE :=
 176     endif
 177   else
 178     ifneq ($(wildcard $(TOPDIR)/make/mapfiles/launchers/mapfile-$(OPENJDK_TARGET_CPU)), )
 179       $1_MAPFILE := $(TOPDIR)/make/mapfiles/launchers/mapfile-$(OPENJDK_TARGET_CPU)
 180     else
 181       $1_MAPFILE :=
 182     endif
 183   endif
 184 
 185   $$(eval $$(call SetupNativeCompilation, BUILD_LAUNCHER_$1, \


 186       EXTRA_FILES := $(LAUNCHER_SRC)/main.c, \
 187       OPTIMIZATION := $$($1_OPTIMIZATION), \
 188       CFLAGS := $$($1_CFLAGS) \
 189           $(LAUNCHER_CFLAGS) \
 190           $(VERSION_CFLAGS) \
 191           -DLAUNCHER_NAME='"$(LAUNCHER_NAME)"' \
 192           -DPROGNAME='"$1"' \
 193           $$($1_CFLAGS), \
 194       CFLAGS_linux := -fPIC, \
 195       CFLAGS_solaris := -KPIC -DHAVE_GETHRTIME, \
 196       CFLAGS_windows := $$($1_CFLAGS_windows), \
 197       LDFLAGS := $$(LDFLAGS_JDKEXE) \
 198           $$(ORIGIN_ARG) \
 199           $$($1_LDFLAGS), \
 200       LDFLAGS_linux := \
 201           -L$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/jli, \
 202       LDFLAGS_solaris := $$($1_LDFLAGS_solaris) \
 203           -L$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/jli, \
 204       MAPFILE := $$($1_MAPFILE), \
 205       LIBS := $(JDKEXE_LIBS) $$($1_LIBS), \
 206       LIBS_unix := $$($1_LIBS_unix), \
 207       LIBS_linux := -lpthread -ljli $(LIBDL) -lc, \
 208       LIBS_solaris := -ljli -lthread $(LIBDL) -lc, \
 209       LIBS_windows := $$($1_WINDOWS_JLI_LIB) \
 210           $(SUPPORT_OUTPUTDIR)/native/java.base/libjava/java.lib advapi32.lib \
 211           $$($1_LIBS_windows), \
 212       OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/$1_objs, \
 213       OUTPUT_DIR := $$($1_OUTPUT_DIR), \
 214       PROGRAM := $1, \
 215       VERSIONINFO_RESOURCE := $$($1_VERSION_INFO_RESOURCE), \
 216       RC_FLAGS := $$(RC_FLAGS) \
 217           -D "JDK_FNAME=$1$(EXE_SUFFIX)" \
 218           -D "JDK_INTERNAL_NAME=$1" \
 219           -D "JDK_FTYPE=0x1L" \
 220           $$($1_RC_FLAGS), \
 221       MANIFEST := $(JAVA_MANIFEST), \
 222       MANIFEST_VERSION := $(VERSION_NUMBER_FOUR_POSITIONS), \
 223       CODESIGN := $$($1_CODESIGN), \
 224   ))
 225 
 226   $1 += $$(BUILD_LAUNCHER_$1)
 227   TARGETS += $$($1)
 228 
 229   ifneq (,$(filter $(OPENJDK_TARGET_OS), macosx aix))
 230     $$(BUILD_LAUNCHER_$1): $(SUPPORT_OUTPUTDIR)/native/java.base/libjli_static.a
 231   endif
 232 
 233   ifeq ($(OPENJDK_TARGET_OS), windows)
 234     $$(BUILD_LAUNCHER_$1): $(SUPPORT_OUTPUTDIR)/native/java.base/libjava/java.lib \
   1 #
   2 # Copyright (c) 2011, 2018, 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


 166   endif
 167 
 168   # The linker on older SuSE distros (e.g. on SLES 10) complains with:
 169   # "Invalid version tag `SUNWprivate_1.1'. Only anonymous version tag is allowed in executable."
 170   # if feeded with a version script which contains named tags.
 171   ifeq ($(USING_BROKEN_SUSE_LD),yes)
 172     ifneq ($(wildcard $(TOPDIR)/make/mapfiles/launchers/mapfile-$(OPENJDK_TARGET_CPU).anonymous), )
 173       $1_MAPFILE := $(TOPDIR)/make/mapfiles/launchers/mapfile-$(OPENJDK_TARGET_CPU).anonymous
 174     else
 175       $1_MAPFILE :=
 176     endif
 177   else
 178     ifneq ($(wildcard $(TOPDIR)/make/mapfiles/launchers/mapfile-$(OPENJDK_TARGET_CPU)), )
 179       $1_MAPFILE := $(TOPDIR)/make/mapfiles/launchers/mapfile-$(OPENJDK_TARGET_CPU)
 180     else
 181       $1_MAPFILE :=
 182     endif
 183   endif
 184 
 185   $$(eval $$(call SetupNativeCompilation, BUILD_LAUNCHER_$1, \
 186       NAME := $1, \
 187       TYPE := EXECUTABLE, \
 188       EXTRA_FILES := $(LAUNCHER_SRC)/main.c, \
 189       OPTIMIZATION := $$($1_OPTIMIZATION), \
 190       CFLAGS := $$($1_CFLAGS) \
 191           $(LAUNCHER_CFLAGS) \
 192           $(VERSION_CFLAGS) \
 193           -DLAUNCHER_NAME='"$(LAUNCHER_NAME)"' \
 194           -DPROGNAME='"$1"' \
 195           $$($1_CFLAGS), \
 196       CFLAGS_linux := -fPIC, \
 197       CFLAGS_solaris := -KPIC -DHAVE_GETHRTIME, \
 198       CFLAGS_windows := $$($1_CFLAGS_windows), \
 199       LDFLAGS := $$(LDFLAGS_JDKEXE) \
 200           $$(ORIGIN_ARG) \
 201           $$($1_LDFLAGS), \
 202       LDFLAGS_linux := \
 203           -L$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/jli, \
 204       LDFLAGS_solaris := $$($1_LDFLAGS_solaris) \
 205           -L$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/jli, \
 206       MAPFILE := $$($1_MAPFILE), \
 207       LIBS := $(JDKEXE_LIBS) $$($1_LIBS), \
 208       LIBS_unix := $$($1_LIBS_unix), \
 209       LIBS_linux := -lpthread -ljli $(LIBDL) -lc, \
 210       LIBS_solaris := -ljli -lthread $(LIBDL) -lc, \
 211       LIBS_windows := $$($1_WINDOWS_JLI_LIB) \
 212           $(SUPPORT_OUTPUTDIR)/native/java.base/libjava/java.lib advapi32.lib \
 213           $$($1_LIBS_windows), \
 214       OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/$1_objs, \
 215       OUTPUT_DIR := $$($1_OUTPUT_DIR), \

 216       VERSIONINFO_RESOURCE := $$($1_VERSION_INFO_RESOURCE), \
 217       RC_FLAGS := $$(RC_FLAGS) \
 218           -D "JDK_FNAME=$1$(EXE_SUFFIX)" \
 219           -D "JDK_INTERNAL_NAME=$1" \
 220           -D "JDK_FTYPE=0x1L" \
 221           $$($1_RC_FLAGS), \
 222       MANIFEST := $(JAVA_MANIFEST), \
 223       MANIFEST_VERSION := $(VERSION_NUMBER_FOUR_POSITIONS), \
 224       CODESIGN := $$($1_CODESIGN), \
 225   ))
 226 
 227   $1 += $$(BUILD_LAUNCHER_$1)
 228   TARGETS += $$($1)
 229 
 230   ifneq (,$(filter $(OPENJDK_TARGET_OS), macosx aix))
 231     $$(BUILD_LAUNCHER_$1): $(SUPPORT_OUTPUTDIR)/native/java.base/libjli_static.a
 232   endif
 233 
 234   ifeq ($(OPENJDK_TARGET_OS), windows)
 235     $$(BUILD_LAUNCHER_$1): $(SUPPORT_OUTPUTDIR)/native/java.base/libjava/java.lib \
< prev index next >