jdk/make/lib/Lib-jdk.runtime.gmk
author chegar
Sun, 17 Aug 2014 15:54:13 +0100
changeset 25859 3317bb8137f4
child 27736 8c9bd4be4a86
child 27565 729f9700483a
permissions -rw-r--r--
8054834: Modular Source Code Reviewed-by: alanb, chegar, ihse, mduigou Contributed-by: alan.bateman@oracle.com, alex.buckley@oracle.com, chris.hegarty@oracle.com, erik.joelsson@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
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, 2013, 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 LibCommon.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
$(eval $(call SetupNativeCompilation,BUILD_LIBUNPACK, \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    31
    LIBRARY := unpack, \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    32
    OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    33
    SRC := $(JDK_TOPDIR)/src/jdk.runtime/share/native/libunpack \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    34
        $(JDK_TOPDIR)/src/jdk.runtime/share/native/common-unpack, \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    35
    LANG := C++, \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    36
    OPTIMIZATION := LOW, \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    37
    CFLAGS := $(CXXFLAGS_JDKLIB) \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    38
        -DNO_ZLIB -DUNPACK_JNI -DFULL \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    39
        -I$(JDK_OUTPUTDIR)/gensrc_headers/java.base \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    40
        -I$(JDK_TOPDIR)/src/jdk.runtime/share/native/common-unpack \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    41
        $(LIBJAVA_HEADER_FLAGS), \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    42
    CFLAGS_release := -DPRODUCT, \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    43
    MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libunpack/mapfile-vers, \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    44
    LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    45
        $(call SET_SHARED_LIBRARY_ORIGIN), \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    46
    LDFLAGS_windows := -map:$(JDK_OUTPUTDIR)/objs/unpack.map -debug \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    47
        jvm.lib $(WIN_JAVA_LIB), \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    48
    LDFLAGS_SUFFIX_posix := -ljvm $(LIBCXX) -ljava -lc, \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    49
    OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libunpack, \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    50
    VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    51
    RC_FLAGS := $(RC_FLAGS) \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    52
        -D "JDK_FNAME=unpack.dll" \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    53
        -D "JDK_INTERNAL_NAME=unpack" \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    54
        -D "JDK_FTYPE=0x2L", \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    55
    DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    56
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    57
$(BUILD_LIBUNPACK): $(BUILD_LIBJAVA)
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    58
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    59
UNPACK_LIBRARIES += $(BUILD_LIBUNPACK)
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    60
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
LIBJSDT_SRC := $(JDK_TOPDIR)/src/jdk.runtime/share/native/libjsdt \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    64
    $(JDK_TOPDIR)/src/jdk.runtime/$(OPENJDK_TARGET_OS_API_DIR)/native/libjsdt
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    65
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    66
$(eval $(call SetupNativeCompilation,BUILD_LIBJSDT, \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    67
    LIBRARY := jsdt, \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    68
    OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    69
    SRC := $(LIBJSDT_SRC), \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    70
    LANG := C, \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    71
    OPTIMIZATION := LOW, \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    72
    CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_WARNINGS_ARE_ERRORS) \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    73
        $(addprefix -I, $(LIBJSDT_SRC)) \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    74
        $(LIBJAVA_HEADER_FLAGS) \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    75
        -I$(JDK_OUTPUTDIR)/gensrc_headers/jdk.runtime, \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    76
    MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjsdt/mapfile-vers, \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    77
    LDFLAGS := $(LDFLAGS_JDKLIB) \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    78
        $(call SET_SHARED_LIBRARY_ORIGIN), \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    79
    LDFLAGS_SUFFIX_linux := $(LIBDL), \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    80
    LDFLAGS_SUFFIX_windows := $(LDFLAGS_JDKLIB_SUFFIX) $(LIBDL), \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    81
    LDFLAGS_SUFFIX_macosx := $(LIBDL), \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    82
    LDFLAGS_SUFFIX_solaris := -lc, \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    83
    VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    84
    RC_FLAGS := $(RC_FLAGS) \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    85
        -D "JDK_FNAME=jsdt.dll" \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    86
        -D "JDK_INTERNAL_NAME=jsdt" \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    87
        -D "JDK_FTYPE=0x2L", \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    88
    OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjsdt, \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    89
    DEBUG_SYMBOLS := true))
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    90
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    91
$(BUILD_LIBJSDT): $(BUILD_LIBJAVA)
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    92
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    93
JSDT_LIBRARIES += $(BUILD_LIBJSDT)
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    94
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    95
################################################################################
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    96
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    97
jdk.runtime: $(JSDT_LIBRARIES) $(UNPACK_LIBRARIES)
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    98
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    99
all: jdk.runtime
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   100
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   101
.PHONY: all jdk.runtime