jdk/make/launcher/Launcher-jdk.pack200.gmk
author sla
Thu, 30 Apr 2015 09:50:10 +0200
changeset 30661 0685e2924fc6
parent 29591 51244d1ddffc
child 29879 eede785c4e0d
permissions -rw-r--r--
8076473: Remove the jhat code and update makefiles Reviewed-by: alanb, erikj, sspitsyn
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
     1
#
29374
f031a666744a 8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents: 29368
diff changeset
     2
# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
25859
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
$(eval $(call SetupLauncher,pack200, \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    29
    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.java.util.jar.pack.Driver"$(COMMA) }'))
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    30
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    31
################################################################################
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    32
# The order of the object files on the link command line affects the size of the resulting
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    33
# binary (at least on linux) which causes the size to differ between old and new build.
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    34
29368
be944a521c76 8074428: Move pack200, unpack200, libpack200 to jdk.pack200
mchung
parents: 28962
diff changeset
    35
UNPACKEXE_SRC := $(JDK_TOPDIR)/src/jdk.pack200/share/native/common-unpack \
be944a521c76 8074428: Move pack200, unpack200, libpack200 to jdk.pack200
mchung
parents: 28962
diff changeset
    36
    $(JDK_TOPDIR)/src/jdk.pack200/share/native/unpack200
be944a521c76 8074428: Move pack200, unpack200, libpack200 to jdk.pack200
mchung
parents: 28962
diff changeset
    37
UNPACKEXE_CFLAGS := -I$(JDK_TOPDIR)/src/jdk.pack200/share/native/common-unpack \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    38
    -I$(JDK_TOPDIR)/src/java.base/share/native/libjava \
27736
8c9bd4be4a86 8058631: Rename posix to unix in build system to match file name changes
ihse
parents: 25859
diff changeset
    39
    -I$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libjava
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    40
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    41
ifeq ($(USE_EXTERNAL_LIBZ), true)
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    42
  UNPACKEXE_CFLAGS += -DSYSTEM_ZLIB
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    43
  UNPACKEXE_ZIPOBJS := -lz
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    44
else
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    45
  UNPACKEXE_CFLAGS += -I$(JDK_TOPDIR)/src/java.base/share/native/libzip/zlib-1.2.8
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    46
  UNPACKEXE_ZIPOBJS := $(SUPPORT_OUTPUTDIR)/native/java.base/libzip/zcrc32$(OBJ_SUFFIX) \
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    47
      $(SUPPORT_OUTPUTDIR)/native/java.base/libzip/deflate$(OBJ_SUFFIX) \
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    48
      $(SUPPORT_OUTPUTDIR)/native/java.base/libzip/trees$(OBJ_SUFFIX) \
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    49
      $(SUPPORT_OUTPUTDIR)/native/java.base/libzip/zadler32$(OBJ_SUFFIX) \
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    50
      $(SUPPORT_OUTPUTDIR)/native/java.base/libzip/compress$(OBJ_SUFFIX) \
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    51
      $(SUPPORT_OUTPUTDIR)/native/java.base/libzip/zutil$(OBJ_SUFFIX) \
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    52
      $(SUPPORT_OUTPUTDIR)/native/java.base/libzip/inflate$(OBJ_SUFFIX) \
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    53
      $(SUPPORT_OUTPUTDIR)/native/java.base/libzip/infback$(OBJ_SUFFIX) \
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    54
      $(SUPPORT_OUTPUTDIR)/native/java.base/libzip/inftrees$(OBJ_SUFFIX) \
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    55
      $(SUPPORT_OUTPUTDIR)/native/java.base/libzip/inffast$(OBJ_SUFFIX)
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    56
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    57
endif
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    58
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    59
UNPACKEXE_LANG := C
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    60
ifeq ($(OPENJDK_TARGET_OS), solaris)
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    61
  UNPACKEXE_LANG := C++
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    62
endif
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    63
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    64
# The linker on older SuSE distros (e.g. on SLES 10) complains with:
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    65
# "Invalid version tag `SUNWprivate_1.1'. Only anonymous version tag is allowed in executable."
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    66
# if feeded with a version script which contains named tags.
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    67
ifeq ($(USING_BROKEN_SUSE_LD), yes)
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    68
  UNPACK_MAPFILE = $(JDK_TOPDIR)/make/mapfiles/libunpack/mapfile-vers-unpack200.anonymous
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    69
else
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    70
  UNPACK_MAPFILE = $(JDK_TOPDIR)/make/mapfiles/libunpack/mapfile-vers-unpack200
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    71
endif
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    72
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    73
$(eval $(call SetupNativeCompilation,BUILD_UNPACKEXE, \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    74
    SRC := $(UNPACKEXE_SRC), \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    75
    LANG := $(UNPACKEXE_LANG), \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    76
    OPTIMIZATION := LOW, \
28846
b96683be2713 8071329: Stop exporting INCLUDE and LIB when building on windows
erikj
parents: 27799
diff changeset
    77
    CFLAGS := $(UNPACKEXE_CFLAGS) $(CXXFLAGS_JDKEXE) -DFULL, \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    78
    CFLAGS_release := -DPRODUCT, \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    79
    CFLAGS_linux := -fPIC, \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    80
    CFLAGS_solaris := -KPIC, \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    81
    CFLAGS_macosx := -fPIC, \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    82
    MAPFILE := $(UNPACK_MAPFILE),\
28846
b96683be2713 8071329: Stop exporting INCLUDE and LIB when building on windows
erikj
parents: 27799
diff changeset
    83
    LDFLAGS := $(UNPACKEXE_ZIPOBJS) \
b96683be2713 8071329: Stop exporting INCLUDE and LIB when building on windows
erikj
parents: 27799
diff changeset
    84
        $(LDFLAGS_JDKEXE) $(LDFLAGS_CXX_JDK) \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    85
        $(call SET_SHARED_LIBRARY_NAME,$(LIBRARY_PREFIX)unpack$(SHARED_LIBRARY_SUFFIX)) \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    86
        $(call SET_SHARED_LIBRARY_ORIGIN), \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    87
    LDFLAGS_linux := -lc, \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    88
    LDFLAGS_solaris := $(UNPACKEXE_LDFLAGS_solaris) -lc, \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    89
    LDFLAGS_SUFFIX := $(LIBCXX), \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    90
    OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/unpackexe$(OUTPUT_SUBDIR), \
28846
b96683be2713 8071329: Stop exporting INCLUDE and LIB when building on windows
erikj
parents: 27799
diff changeset
    91
    OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/modules_cmds/$(MODULE), \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    92
    PROGRAM := unpack200, \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    93
    VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    94
    RC_FLAGS := $(RC_FLAGS) \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    95
        -D "JDK_FNAME=unpack200.exe" \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    96
        -D "JDK_INTERNAL_NAME=unpack200" \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    97
        -D "JDK_FTYPE=0x1L", \
28846
b96683be2713 8071329: Stop exporting INCLUDE and LIB when building on windows
erikj
parents: 27799
diff changeset
    98
    DEBUG_SYMBOLS := true, \
29368
be944a521c76 8074428: Move pack200, unpack200, libpack200 to jdk.pack200
mchung
parents: 28962
diff changeset
    99
    MANIFEST := $(JDK_TOPDIR)/src/jdk.pack200/windows/native/unpack200/unpack200_proto.exe.manifest))
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   100
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   101
ifneq ($(USE_EXTERNAL_LIBZ), true)
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   102
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   103
  $(BUILD_UNPACKEXE): $(UNPACKEXE_ZIPOBJS)
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   104
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   105
endif
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   106
28846
b96683be2713 8071329: Stop exporting INCLUDE and LIB when building on windows
erikj
parents: 27799
diff changeset
   107
TARGETS += $(BUILD_UNPACKEXE)
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   108
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   109
################################################################################