jdk/make/lib/CoreLibraries.gmk
author ihse
Tue, 15 Dec 2015 11:02:12 +0100
changeset 34695 7a6cc9982d22
parent 34014 1ffce305d533
child 35262 6ffcba13c973
permissions -rw-r--r--
8142907: Integration of minor fixes from the build-infra project Reviewed-by: erikj, dholmes
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     1
#
29374
f031a666744a 8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents: 28999
diff changeset
     2
# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     4
#
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    10
#
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    15
# accompanied this code).
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    16
#
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    20
#
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    23
# questions.
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    24
#
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    25
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27186
diff changeset
    26
WIN_VERIFY_LIB := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libverify/verify.lib
13702
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    27
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    28
##########################################################################################
29374
f031a666744a 8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents: 28999
diff changeset
    29
# libfdlibm is statically linked with libjava below and not delivered into the
26191
a0ff4b39d34b 8055188: General cleanup of minor issues from source restructure
erikj
parents: 25859
diff changeset
    30
# product on its own.
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    31
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    32
BUILD_LIBFDLIBM_OPTIMIZATION := HIGH
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
    33
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
    34
ifneq ($(OPENJDK_TARGET_OS), solaris)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    35
  BUILD_LIBFDLIBM_OPTIMIZATION := NONE
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
    36
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
    37
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25086
diff changeset
    38
LIBFDLIBM_SRC := $(JDK_TOPDIR)/src/java.base/share/native/libfdlibm
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25086
diff changeset
    39
LIBFDLIBM_CFLAGS := -I$(LIBFDLIBM_SRC)
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25086
diff changeset
    40
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    41
ifneq ($(OPENJDK_TARGET_OS), macosx)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    42
  $(eval $(call SetupNativeCompilation,BUILD_LIBFDLIBM, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    43
      STATIC_LIBRARY := fdlibm, \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27186
diff changeset
    44
      OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE), \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25086
diff changeset
    45
      SRC := $(LIBFDLIBM_SRC), \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    46
      OPTIMIZATION := $(BUILD_LIBFDLIBM_OPTIMIZATION), \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25086
diff changeset
    47
      CFLAGS := $(CFLAGS_JDKLIB) $(LIBFDLIBM_CFLAGS), \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    48
      CFLAGS_windows_debug := -DLOGGING, \
22594
kvn
parents: 22593 20896
diff changeset
    49
      CFLAGS_aix := -qfloat=nomaf, \
29374
f031a666744a 8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents: 28999
diff changeset
    50
      DISABLED_WARNINGS_gcc := sign-compare, \
f031a666744a 8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents: 28999
diff changeset
    51
      DISABLED_WARNINGS_microsoft := 4146 4244 4018, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    52
      ARFLAGS := $(ARFLAGS), \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27186
diff changeset
    53
      OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libfdlibm, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    54
      DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
    55
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
    56
else
14855
d104ff4d4bb9 8005178: build-infra: Dependency on libfdlibm on mac is broken
erikj
parents: 14789
diff changeset
    57
20890
9d7cc1b4291b 8025715: Split CompileNativeLibraries.gmk
ihse
parents: 20547
diff changeset
    58
  # On macosx the old build does partial (incremental) linking of fdlibm instead of
9d7cc1b4291b 8025715: Split CompileNativeLibraries.gmk
ihse
parents: 20547
diff changeset
    59
  # a plain static library.
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    60
  $(eval $(call SetupNativeCompilation,BUILD_LIBFDLIBM_MAC, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    61
      LIBRARY := fdlibm, \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27186
diff changeset
    62
      OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libfdlibm, \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25086
diff changeset
    63
      SRC := $(LIBFDLIBM_SRC), \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25086
diff changeset
    64
      CFLAGS := $(CFLAGS_JDKLIB) $(LIBFDLIBM_CFLAGS), \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    65
      LDFLAGS := -nostdlib -r -arch x86_64, \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27186
diff changeset
    66
      OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libfdlibm, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    67
      DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    68
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27186
diff changeset
    69
  BUILD_LIBFDLIBM := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/$(LIBRARY_PREFIX)fdlibm$(STATIC_LIBRARY_SUFFIX)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    70
  $(BUILD_LIBFDLIBM): $(BUILD_LIBFDLIBM_MAC)
16636
1cc691bcfe50 8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents: 16513
diff changeset
    71
	$(call install-file)
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
    72
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    73
endif
20890
9d7cc1b4291b 8025715: Split CompileNativeLibraries.gmk
ihse
parents: 20547
diff changeset
    74
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    75
##########################################################################################
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    76
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
    77
ifeq ($(OPENJDK_TARGET_OS), solaris)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    78
  ifneq ($(OPENJDK_TARGET_CPU), x86_64)
21805
c7d7946239de 8027566: Remove the old build system
ihse
parents: 21628
diff changeset
    79
    BUILD_LIBVERIFY_REORDER := $(JDK_TOPDIR)/make/mapfiles/libverify/reorder-$(OPENJDK_TARGET_CPU)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    80
  endif
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
    81
endif
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
    82
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    83
LIBVERIFY_OPTIMIZATION := HIGH
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    84
ifneq ($(findstring $(OPENJDK_TARGET_OS), solaris linux), )
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    85
  ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    86
    LIBVERIFY_OPTIMIZATION := LOW
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    87
  endif
13702
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    88
endif
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    89
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    90
$(eval $(call SetupNativeCompilation,BUILD_LIBVERIFY, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    91
    LIBRARY := verify, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    92
    OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25086
diff changeset
    93
    SRC := $(JDK_TOPDIR)/src/java.base/share/native/libverify, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    94
    OPTIMIZATION := $(LIBVERIFY_OPTIMIZATION), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    95
    CFLAGS := $(CFLAGS_JDKLIB), \
29374
f031a666744a 8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents: 28999
diff changeset
    96
    DISABLED_WARNINGS_microsoft := 4244 4267, \
21805
c7d7946239de 8027566: Remove the old build system
ihse
parents: 21628
diff changeset
    97
    MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libverify/mapfile-vers, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    98
    LDFLAGS := $(LDFLAGS_JDKLIB) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    99
        $(call SET_SHARED_LIBRARY_ORIGIN), \
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32846
diff changeset
   100
    LIBS_unix := -ljvm -lc, \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32846
diff changeset
   101
    LIBS_windows := jvm.lib, \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25086
diff changeset
   102
    VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   103
    RC_FLAGS := $(RC_FLAGS) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   104
        -D "JDK_FNAME=verify.dll" \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   105
        -D "JDK_INTERNAL_NAME=verify" \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   106
        -D "JDK_FTYPE=0x2L", \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   107
    REORDER := $(BUILD_LIBVERIFY_REORDER), \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27186
diff changeset
   108
    OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libverify, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   109
    DEBUG_SYMBOLS := true))
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
   110
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27186
diff changeset
   111
TARGETS += $(BUILD_LIBVERIFY)
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   112
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   113
##########################################################################################
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   114
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25086
diff changeset
   115
LIBJAVA_SRC_DIRS := $(call FindSrcDirsForLib, java.base, java)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   116
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25086
diff changeset
   117
LIBJAVA_CFLAGS := $(addprefix -I, $(LIBJAVA_SRC_DIRS)) \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25086
diff changeset
   118
    -I$(JDK_TOPDIR)/src/java.base/share/native/libfdlibm \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27186
diff changeset
   119
    -I$(SUPPORT_OUTPUTDIR)/headers/java.base \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   120
    -DARCHPROPNAME='"$(OPENJDK_TARGET_CPU_OSARCH)"'
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
   121
28658
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   122
ifeq ($(OPENJDK_TARGET_OS), macosx)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   123
  BUILD_LIBJAVA_java_props_md.c_CFLAGS := -x objective-c
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   124
  BUILD_LIBJAVA_java_props_macosx.c_CFLAGS := -x objective-c
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
   125
endif
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
   126
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
   127
ifeq ($(OPENJDK_TARGET_OS), solaris)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   128
  ifneq ($(OPENJDK_TARGET_CPU), x86_64)
21805
c7d7946239de 8027566: Remove the old build system
ihse
parents: 21628
diff changeset
   129
    LIBJAVA_REORDER := $(JDK_TOPDIR)/make/mapfiles/libjava/reorder-$(OPENJDK_TARGET_CPU)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   130
  endif
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
   131
endif
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
   132
33522
8d13fc52c3c4 8140630: java/nio/Buffer/Basic.java crashes vm on linux-x64 using latest devkit to build
bpb
parents: 33406
diff changeset
   133
ifeq ($(OPENJDK_TARGET_OS), linux)
8d13fc52c3c4 8140630: java/nio/Buffer/Basic.java crashes vm on linux-x64 using latest devkit to build
bpb
parents: 33406
diff changeset
   134
  ifeq ($(OPENJDK_TARGET_CPU), x86_64)
8d13fc52c3c4 8140630: java/nio/Buffer/Basic.java crashes vm on linux-x64 using latest devkit to build
bpb
parents: 33406
diff changeset
   135
    BUILD_LIBJAVA_Bits.c_CFLAGS := $(C_O_FLAG_NORM)
8d13fc52c3c4 8140630: java/nio/Buffer/Basic.java crashes vm on linux-x64 using latest devkit to build
bpb
parents: 33406
diff changeset
   136
  endif
8d13fc52c3c4 8140630: java/nio/Buffer/Basic.java crashes vm on linux-x64 using latest devkit to build
bpb
parents: 33406
diff changeset
   137
endif
8d13fc52c3c4 8140630: java/nio/Buffer/Basic.java crashes vm on linux-x64 using latest devkit to build
bpb
parents: 33406
diff changeset
   138
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   139
$(eval $(call SetupNativeCompilation,BUILD_LIBJAVA, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   140
    LIBRARY := java, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   141
    OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   142
    SRC := $(LIBJAVA_SRC_DIRS), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   143
    OPTIMIZATION := HIGH, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   144
    CFLAGS := $(CFLAGS_JDKLIB) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   145
        $(LIBJAVA_CFLAGS), \
33984
2333676816eb 8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents: 30784
diff changeset
   146
    System.c_CFLAGS := $(VERSION_CFLAGS), \
2333676816eb 8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents: 30784
diff changeset
   147
    jdk_util.c_CFLAGS := $(VERSION_CFLAGS), \
32408
97230ec16697 8134408: Disable warnings for jdk libraries triggered by SS12u4
erikj
parents: 32267
diff changeset
   148
    DISABLED_WARNINGS_solstudio := E_STATEMENT_NOT_REACHED, \
21805
c7d7946239de 8027566: Remove the old build system
ihse
parents: 21628
diff changeset
   149
    MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjava/mapfile-vers, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   150
    LDFLAGS := $(LDFLAGS_JDKLIB) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   151
        $(call SET_SHARED_LIBRARY_ORIGIN), \
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32846
diff changeset
   152
    LDFLAGS_macosx := -L$(SUPPORT_OUTPUTDIR)/native/$(MODULE)/, \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32846
diff changeset
   153
    LDFLAGS_windows := -export:winFileHandleOpen -export:handleLseek \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32846
diff changeset
   154
        -export:getLastErrorString \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32846
diff changeset
   155
        -export:getErrorString -delayload:shell32.dll, \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32846
diff changeset
   156
    LIBS_unix := -ljvm -lverify, \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32846
diff changeset
   157
    LIBS_linux := $(LIBDL) $(BUILD_LIBFDLIBM), \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32846
diff changeset
   158
    LIBS_solaris := -lsocket -lnsl -lscf $(LIBDL) $(BUILD_LIBFDLIBM) -lc, \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32846
diff changeset
   159
    LIBS_aix := $(LIBDL) $(BUILD_LIBFDLIBM) -lm,\
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32846
diff changeset
   160
    LIBS_macosx := -lfdlibm \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   161
        -framework CoreFoundation \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   162
        -framework Foundation \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   163
        -framework Security -framework SystemConfiguration, \
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32846
diff changeset
   164
    LIBS_windows := jvm.lib $(BUILD_LIBFDLIBM) $(WIN_VERIFY_LIB) \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32846
diff changeset
   165
        shell32.lib delayimp.lib \
31246
dfc58fd4feec 8066504: GetVersionEx in java.base/windows/native/libjava/java_props_md.c might not get correct Windows version 0
rriggs
parents: 30784
diff changeset
   166
        advapi32.lib version.lib, \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25086
diff changeset
   167
    VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   168
    RC_FLAGS := $(RC_FLAGS) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   169
        -D "JDK_FNAME=java.dll" \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   170
        -D "JDK_INTERNAL_NAME=java" \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   171
        -D "JDK_FTYPE=0x2L", \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   172
    REORDER := $(LIBJAVA_REORDER), \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27186
diff changeset
   173
    OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjava, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   174
    DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
   175
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27186
diff changeset
   176
TARGETS += $(BUILD_LIBJAVA)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   177
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   178
$(BUILD_LIBJAVA): $(BUILD_LIBVERIFY)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   179
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   180
$(BUILD_LIBJAVA): $(BUILD_LIBFDLIBM)
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   181
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   182
##########################################################################################
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   183
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   184
BUILD_LIBZIP_EXCLUDES :=
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   185
ifeq ($(USE_EXTERNAL_LIBZ), true)
24710
c019dc4104b2 8044725: Bug in zlib 1.2.5 prevents inflation of some gzipped files
sherman
parents: 23562
diff changeset
   186
  LIBZIP_EXCLUDES += zlib-1.2.8
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   187
endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   188
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   189
BUILD_LIBZIP_REORDER :=
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   190
ifeq ($(OPENJDK_TARGET_OS), solaris)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   191
  ifneq ($(OPENJDK_TARGET_CPU), x86_64)
21805
c7d7946239de 8027566: Remove the old build system
ihse
parents: 21628
diff changeset
   192
    BUILD_LIBZIP_REORDER := $(JDK_TOPDIR)/make/mapfiles/libzip/reorder-$(OPENJDK_TARGET_CPU)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   193
  endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   194
endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   195
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   196
ifeq ($(LIBZIP_CAN_USE_MMAP), true)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   197
  BUILD_LIBZIP_MMAP := -DUSE_MMAP
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   198
endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   199
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   200
$(eval $(call SetupNativeCompilation,BUILD_LIBZIP, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   201
    LIBRARY := zip, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   202
    OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   203
    OPTIMIZATION := LOW, \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25086
diff changeset
   204
    SRC := $(JDK_TOPDIR)/src/java.base/share/native/libzip, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   205
    EXCLUDES := $(LIBZIP_EXCLUDES), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   206
    CFLAGS := $(CFLAGS_JDKLIB) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   207
        $(ZLIB_CPPFLAGS) \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25086
diff changeset
   208
        -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: 27186
diff changeset
   209
        -I$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libjava \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27186
diff changeset
   210
        -I$(SUPPORT_OUTPUTDIR)/headers/java.base, \
27736
8c9bd4be4a86 8058631: Rename posix to unix in build system to match file name changes
ihse
parents: 27186
diff changeset
   211
    CFLAGS_unix := $(BUILD_LIBZIP_MMAP) -UDEBUG, \
29374
f031a666744a 8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents: 28999
diff changeset
   212
    DISABLED_WARNINGS_gcc := parentheses, \
f031a666744a 8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents: 28999
diff changeset
   213
    DISABLED_WARNINGS_clang := dangling-else, \
f031a666744a 8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents: 28999
diff changeset
   214
    DISABLED_WARNINGS_microsoft := 4267, \
21805
c7d7946239de 8027566: Remove the old build system
ihse
parents: 21628
diff changeset
   215
    MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libzip/mapfile-vers, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   216
    REORDER := $(BUILD_LIBZIP_REORDER), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   217
    LDFLAGS := $(LDFLAGS_JDKLIB) \
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32846
diff changeset
   218
        $(call SET_SHARED_LIBRARY_ORIGIN), \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   219
    LDFLAGS_windows := -export:ZIP_Open -export:ZIP_Close -export:ZIP_FindEntry \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27186
diff changeset
   220
        -export:ZIP_ReadEntry -export:ZIP_GetNextEntry \
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32846
diff changeset
   221
        -export:ZIP_InflateFully -export:ZIP_CRC32, \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32846
diff changeset
   222
    LIBS_unix := -ljvm -ljava $(LIBZ), \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32846
diff changeset
   223
    LIBS_solaris := -lc, \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32846
diff changeset
   224
    LIBS_windows := jvm.lib $(WIN_JAVA_LIB), \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25086
diff changeset
   225
    VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   226
    RC_FLAGS := $(RC_FLAGS) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   227
        -D "JDK_FNAME=zip.dll" \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   228
        -D "JDK_INTERNAL_NAME=zip" \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   229
        -D "JDK_FTYPE=0x2L", \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27186
diff changeset
   230
    OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libzip, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   231
    DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   232
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   233
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   234
$(BUILD_LIBZIP): $(BUILD_LIBJAVA)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   235
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27186
diff changeset
   236
TARGETS += $(BUILD_LIBZIP)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   237
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   238
##########################################################################################
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   239
32654
23ae9cdf149e 8136690: AIX: libjimage should be linked with the C++ compiler
simonis
parents: 32758
diff changeset
   240
ifeq ($(OPENJDK_TARGET_OS), aix)
23ae9cdf149e 8136690: AIX: libjimage should be linked with the C++ compiler
simonis
parents: 32758
diff changeset
   241
  LIBJIMAGE_TOOLCHAIN := TOOLCHAIN_LINK_CXX
23ae9cdf149e 8136690: AIX: libjimage should be linked with the C++ compiler
simonis
parents: 32758
diff changeset
   242
endif # OPENJDK_TARGET_OS aix
23ae9cdf149e 8136690: AIX: libjimage should be linked with the C++ compiler
simonis
parents: 32758
diff changeset
   243
32641
ac2c73b45253 8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents: 32267
diff changeset
   244
$(eval $(call SetupNativeCompilation,BUILD_LIBJIMAGE, \
ac2c73b45253 8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents: 32267
diff changeset
   245
    LIBRARY := jimage, \
32654
23ae9cdf149e 8136690: AIX: libjimage should be linked with the C++ compiler
simonis
parents: 32758
diff changeset
   246
    TOOLCHAIN := $(LIBJIMAGE_TOOLCHAIN), \
32641
ac2c73b45253 8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents: 32267
diff changeset
   247
    OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
ac2c73b45253 8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents: 32267
diff changeset
   248
    OPTIMIZATION := LOW, \
ac2c73b45253 8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents: 32267
diff changeset
   249
    SRC := $(JDK_TOPDIR)/src/java.base/share/native/libjimage \
ac2c73b45253 8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents: 32267
diff changeset
   250
        $(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libjimage, \
ac2c73b45253 8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents: 32267
diff changeset
   251
    EXCLUDES := $(LIBJIMAGE_EXCLUDES), \
ac2c73b45253 8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents: 32267
diff changeset
   252
    CFLAGS := $(CFLAGS_JDKLIB) \
ac2c73b45253 8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents: 32267
diff changeset
   253
        $(JIMAGELIB_CPPFLAGS) \
ac2c73b45253 8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents: 32267
diff changeset
   254
        -I$(JDK_TOPDIR)/src/java.base/share/native/libjava \
ac2c73b45253 8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents: 32267
diff changeset
   255
        -I$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libjava \
ac2c73b45253 8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents: 32267
diff changeset
   256
        -I$(JDK_TOPDIR)/src/java.base/share/native/libjimage \
ac2c73b45253 8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents: 32267
diff changeset
   257
        -I$(SUPPORT_OUTPUTDIR)/headers/java.base, \
ac2c73b45253 8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents: 32267
diff changeset
   258
    CFLAGS_unix := -UDEBUG, \
ac2c73b45253 8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents: 32267
diff changeset
   259
    MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjimage/mapfile-vers, \
ac2c73b45253 8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents: 32267
diff changeset
   260
    LDFLAGS := $(LDFLAGS_JDKLIB) \
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32846
diff changeset
   261
        $(call SET_SHARED_LIBRARY_ORIGIN), \
32641
ac2c73b45253 8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents: 32267
diff changeset
   262
    LDFLAGS_windows := -export:JIMAGE_Open -export:JIMAGE_Close \
ac2c73b45253 8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents: 32267
diff changeset
   263
        -export:JIMAGE_PackageToModule \
ac2c73b45253 8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents: 32267
diff changeset
   264
        -export:JIMAGE_FindResource -export:JIMAGE_GetResource \
ac2c73b45253 8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents: 32267
diff changeset
   265
        -export:JIMAGE_ResourceIterator, \
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32846
diff changeset
   266
    LIBS_unix := -ljvm -ldl $(LIBCXX), \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32846
diff changeset
   267
    LIBS_solaris := -lc, \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32846
diff changeset
   268
    LIBS_macosx := -lc++, \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32846
diff changeset
   269
    LIBS_windows := jvm.lib, \
32641
ac2c73b45253 8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents: 32267
diff changeset
   270
    VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
ac2c73b45253 8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents: 32267
diff changeset
   271
    RC_FLAGS := $(RC_FLAGS) \
ac2c73b45253 8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents: 32267
diff changeset
   272
        -D "JDK_FNAME=jimage.dll" \
ac2c73b45253 8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents: 32267
diff changeset
   273
        -D "JDK_INTERNAL_NAME=jimage" \
ac2c73b45253 8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents: 32267
diff changeset
   274
        -D "JDK_FTYPE=0x2L", \
ac2c73b45253 8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents: 32267
diff changeset
   275
    OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjimage, \
ac2c73b45253 8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents: 32267
diff changeset
   276
    DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
ac2c73b45253 8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents: 32267
diff changeset
   277
ac2c73b45253 8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents: 32267
diff changeset
   278
$(BUILD_LIBJIMAGE): $(BUILD_LIBJAVA)
ac2c73b45253 8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents: 32267
diff changeset
   279
ac2c73b45253 8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents: 32267
diff changeset
   280
TARGETS += $(BUILD_LIBJIMAGE)
ac2c73b45253 8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents: 32267
diff changeset
   281
ac2c73b45253 8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents: 32267
diff changeset
   282
##########################################################################################
ac2c73b45253 8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents: 32267
diff changeset
   283
28658
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   284
LIBJLI_SRC_DIRS := $(call FindSrcDirsForLib, java.base, jli)
22951
5fd21112b2b6 8034043: Native methods for preferences API should not be in libjava
alanb
parents: 22941
diff changeset
   285
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25086
diff changeset
   286
LIBJLI_CFLAGS := $(CFLAGS_JDKLIB)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   287
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   288
ifeq ($(JVM_VARIANT_ZERO), true)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   289
  ERGO_FAMILY := zero
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   290
else
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   291
  ifeq ($(OPENJDK_TARGET_CPU_ARCH), x86)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   292
    ERGO_FAMILY := i586
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   293
  else
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   294
    ERGO_FAMILY := $(OPENJDK_TARGET_CPU_ARCH)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   295
  endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   296
endif
28658
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   297
LIBJLI_ALL_ERGO := $(wildcard $(addsuffix /ergo_*.c, $(LIBJLI_SRC_DIRS)))
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   298
LIBJLI_EXCLUDE_ERGO := $(filter-out %/ergo_$(ERGO_FAMILY).c, $(LIBJLI_ALL_ERGO))
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   299
# If all specialized ergo files are excluded, use generic ergo
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   300
ifeq ($(LIBJLI_ALL_ERGO), $(LIBJLI_EXCLUDE_ERGO))
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   301
  LIBJLI_CFLAGS += -DUSE_GENERIC_ERGO
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   302
endif
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   303
LIBJLI_EXCLUDE_FILES += $(notdir $(LIBJLI_EXCLUDE_ERGO))
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   304
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   305
ifeq ($(OPENJDK_TARGET_OS), macosx)
29742
b73f38796859 8074840: Resolve disabled warnings for libjli and libjli_static
mikael
parents: 29374
diff changeset
   306
  LIBJLI_EXCLUDE_FILES += java_md_solinux.c ergo.c ergo_i586.c
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   307
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   308
  BUILD_LIBJLI_java_md_macosx.c_CFLAGS := -x objective-c
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   309
  BUILD_LIBJLI_STATIC_java_md_macosx.c_CFLAGS := -x objective-c
28658
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   310
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   311
  LIBJLI_CFLAGS += -DPACKAGE_PATH=\"$(PACKAGE_PATH)\"
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   312
endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   313
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   314
ifeq ($(OPENJDK_TARGET_OS), windows)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   315
  # Staticically link with c runtime on windows.
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   316
  LIBJLI_CFLAGS := $(filter-out -MD, $(LIBJLI_CFLAGS))
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   317
  LIBJLI_OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE)
28984
12031ba2dc38 8042707: Source changes needed to build JDK 9 with Visual Studio 2013 (VS2013)
erikj
parents: 27799
diff changeset
   318
  # Supply the name of the C runtime lib.
12031ba2dc38 8042707: Source changes needed to build JDK 9 with Visual Studio 2013 (VS2013)
erikj
parents: 27799
diff changeset
   319
  LIBJLI_CFLAGS += -DMSVCR_DLL_NAME='"$(notdir $(MSVCR_DLL))"'
12031ba2dc38 8042707: Source changes needed to build JDK 9 with Visual Studio 2013 (VS2013)
erikj
parents: 27799
diff changeset
   320
  ifneq ($(MSVCP_DLL), )
12031ba2dc38 8042707: Source changes needed to build JDK 9 with Visual Studio 2013 (VS2013)
erikj
parents: 27799
diff changeset
   321
    LIBJLI_CFLAGS += -DMSVCP_DLL_NAME='"$(notdir $(MSVCP_DLL))"'
12031ba2dc38 8042707: Source changes needed to build JDK 9 with Visual Studio 2013 (VS2013)
erikj
parents: 27799
diff changeset
   322
  endif
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   323
else
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   324
  LIBJLI_OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE)/jli
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   325
endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   326
28658
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   327
LIBJLI_CFLAGS += $(addprefix -I, $(LIBJLI_SRC_DIRS))
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   328
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   329
# Append defines depending on target platform
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   330
LIBJLI_CFLAGS += $(OPENJDK_TARGET_CPU_JLI_CFLAGS)
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   331
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   332
ifneq ($(USE_EXTERNAL_LIBZ), true)
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   333
  LIBJLI_CFLAGS += $(ZLIB_CPPFLAGS)
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   334
  LIBJLI_EXTRA_FILES += \
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   335
      $(addprefix $(JDK_TOPDIR)/src/java.base/share/native/libzip/zlib-1.2.8/, \
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   336
          inflate.c \
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   337
          inftrees.c \
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   338
          inffast.c \
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   339
          zadler32.c \
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   340
          zcrc32.c \
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   341
          zutil.c \
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   342
      )
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   343
endif
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   344
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   345
$(eval $(call SetupNativeCompilation,BUILD_LIBJLI, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   346
    LIBRARY := jli, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   347
    OUTPUT_DIR := $(LIBJLI_OUTPUT_DIR), \
28658
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   348
    SRC := $(LIBJLI_SRC_DIRS), \
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   349
    EXCLUDE_FILES := $(LIBJLI_EXCLUDE_FILES), \
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   350
    EXTRA_FILES := $(LIBJLI_EXTRA_FILES), \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   351
    OPTIMIZATION := HIGH, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   352
    CFLAGS := $(LIBJLI_CFLAGS), \
32408
97230ec16697 8134408: Disable warnings for jdk libraries triggered by SS12u4
erikj
parents: 32267
diff changeset
   353
    DISABLED_WARNINGS_solstudio := \
97230ec16697 8134408: Disable warnings for jdk libraries triggered by SS12u4
erikj
parents: 32267
diff changeset
   354
        E_ASM_DISABLES_OPTIMIZATION \
97230ec16697 8134408: Disable warnings for jdk libraries triggered by SS12u4
erikj
parents: 32267
diff changeset
   355
        E_STATEMENT_NOT_REACHED, \
21805
c7d7946239de 8027566: Remove the old build system
ihse
parents: 21628
diff changeset
   356
    MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjli/mapfile-vers, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   357
    LDFLAGS := $(LDFLAGS_JDKLIB) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   358
        $(call SET_SHARED_LIBRARY_ORIGIN), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   359
    LDFLAGS_linux := $(call SET_SHARED_LIBRARY_ORIGIN,/..), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   360
    LDFLAGS_solaris := $(call SET_SHARED_LIBRARY_ORIGIN,/..), \
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32846
diff changeset
   361
    LDFLAGS_windows := \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   362
        -export:JLI_Launch \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   363
        -export:JLI_ManifestIterate \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   364
        -export:JLI_SetTraceLauncher \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   365
        -export:JLI_ReportErrorMessage \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   366
        -export:JLI_ReportErrorMessageSys \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   367
        -export:JLI_ReportMessage \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   368
        -export:JLI_ReportExceptionDescription \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   369
        -export:JLI_MemAlloc \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   370
        -export:JLI_CmdToArgs \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   371
        -export:JLI_GetStdArgc \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   372
        -export:JLI_GetStdArgs \
32267
4e96a9ee01b1 8027634: Support @argfiles for java command-line tool
henryjen
parents: 31246
diff changeset
   373
        -export:JLI_List_new \
4e96a9ee01b1 8027634: Support @argfiles for java command-line tool
henryjen
parents: 31246
diff changeset
   374
        -export:JLI_List_add \
4e96a9ee01b1 8027634: Support @argfiles for java command-line tool
henryjen
parents: 31246
diff changeset
   375
        -export:JLI_StringDup \
4e96a9ee01b1 8027634: Support @argfiles for java command-line tool
henryjen
parents: 31246
diff changeset
   376
        -export:JLI_MemFree \
4e96a9ee01b1 8027634: Support @argfiles for java command-line tool
henryjen
parents: 31246
diff changeset
   377
        -export:JLI_InitArgProcessing \
4e96a9ee01b1 8027634: Support @argfiles for java command-line tool
henryjen
parents: 31246
diff changeset
   378
        -export:JLI_PreprocessArg \
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32846
diff changeset
   379
        -export:JLI_GetAppArgIndex, \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32846
diff changeset
   380
    LIBS_unix := $(LIBZ), \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32846
diff changeset
   381
    LIBS_linux := $(LIBDL) -lc -lpthread, \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32846
diff changeset
   382
    LIBS_solaris := $(LIBDL) -lc, \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32846
diff changeset
   383
    LIBS_aix := $(LIBDL),\
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32846
diff changeset
   384
    LIBS_macosx := -framework Cocoa -framework Security -framework ApplicationServices, \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32846
diff changeset
   385
    LIBS_windows := advapi32.lib comctl32.lib user32.lib, \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 25086
diff changeset
   386
    VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   387
    RC_FLAGS := $(RC_FLAGS) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   388
        -D "JDK_FNAME=jli.dll" \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   389
        -D "JDK_INTERNAL_NAME=jli" \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   390
        -D "JDK_FTYPE=0x2L", \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27186
diff changeset
   391
    OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   392
    DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   393
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27186
diff changeset
   394
TARGETS += $(BUILD_LIBJLI)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   395
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   396
# On windows, the static library has the same suffix as the import library created by
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   397
# with the shared library, so the static library is given a different name. No harm
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   398
# in doing it for all platform to reduce complexity.
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   399
ifeq ($(OPENJDK_TARGET_OS), windows)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   400
  $(eval $(call SetupNativeCompilation,BUILD_LIBJLI_STATIC, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   401
      STATIC_LIBRARY := jli_static, \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27186
diff changeset
   402
      OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE), \
28658
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   403
      SRC := $(LIBJLI_SRC_DIRS), \
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   404
      EXCLUDE_FILES := $(LIBJLI_EXCLUDE_FILES), \
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   405
      EXTRA_FILES := $(LIBJLI_EXTRA_FILES), \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   406
      OPTIMIZATION := HIGH, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   407
      CFLAGS := $(STATIC_LIBRARY_FLAGS) $(LIBJLI_CFLAGS), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   408
      ARFLAGS := $(ARFLAGS), \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27186
diff changeset
   409
      OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   410
      DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   411
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27186
diff changeset
   412
  TARGETS += $(BUILD_LIBJLI_STATIC)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   413
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   414
else ifeq ($(OPENJDK_TARGET_OS), macosx)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   415
  #
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   416
  # On macosx they do partial (incremental) linking of libjli_static.a
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   417
  # code it here...rather than add support to NativeCompilation
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   418
  # as this is first time I see it
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   419
  $(eval $(call SetupNativeCompilation,BUILD_LIBJLI_STATIC, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   420
      LIBRARY := jli_static, \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27186
diff changeset
   421
      OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE), \
28658
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   422
      SRC := $(LIBJLI_SRC_DIRS), \
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   423
      EXCLUDE_FILES := $(LIBJLI_EXCLUDE_FILES), \
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   424
      EXTRA_FILES := $(LIBJLI_EXTRA_FILES), \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   425
      OPTIMIZATION := HIGH, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   426
      CFLAGS := $(CFLAGS_JDKLIB) $(LIBJLI_CFLAGS), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   427
      LDFLAGS := -nostdlib -r, \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27186
diff changeset
   428
      OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   429
      DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   430
33653
c1ee09fe3274 8136556: Add the ability to perform static builds of MacOSX x64 binaries
bobv
parents: 32846
diff changeset
   431
  ifeq ($(STATIC_BUILD), true)
c1ee09fe3274 8136556: Add the ability to perform static builds of MacOSX x64 binaries
bobv
parents: 32846
diff changeset
   432
    TARGETS += $(BUILD_LIBJLI_STATIC)
c1ee09fe3274 8136556: Add the ability to perform static builds of MacOSX x64 binaries
bobv
parents: 32846
diff changeset
   433
  else
c1ee09fe3274 8136556: Add the ability to perform static builds of MacOSX x64 binaries
bobv
parents: 32846
diff changeset
   434
    $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static.a: $(BUILD_LIBJLI_STATIC)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   435
	$(call install-file)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   436
33653
c1ee09fe3274 8136556: Add the ability to perform static builds of MacOSX x64 binaries
bobv
parents: 32846
diff changeset
   437
    TARGETS += $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static.a
c1ee09fe3274 8136556: Add the ability to perform static builds of MacOSX x64 binaries
bobv
parents: 32846
diff changeset
   438
  endif
22595
aaa6b141196c 8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents: 22594
diff changeset
   439
aaa6b141196c 8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents: 22594
diff changeset
   440
else ifeq ($(OPENJDK_TARGET_OS), aix)
aaa6b141196c 8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents: 22594
diff changeset
   441
  # AIX also requires a static libjli because the compiler doesn't support '-rpath'
28658
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   442
  $(eval $(call SetupNativeCompilation,BUILD_LIBJLI_STATIC, \
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   443
      STATIC_LIBRARY := jli_static, \
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   444
      OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE), \
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   445
      SRC := $(LIBJLI_SRC_DIRS), \
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   446
      EXCLUDE_FILES := $(LIBJLI_EXCLUDE_FILES), \
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   447
      EXTRA_FILES := $(LIBJLI_EXTRA_FILES), \
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   448
      OPTIMIZATION := HIGH, \
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   449
      CFLAGS := $(STATIC_LIBRARY_FLAGS) $(LIBJLI_CFLAGS), \
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   450
      ARFLAGS := $(ARFLAGS), \
344426303820 8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents: 27799
diff changeset
   451
      OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static))
22595
aaa6b141196c 8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents: 22594
diff changeset
   452
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27186
diff changeset
   453
  TARGETS += $(BUILD_LIBJLI_STATIC)
22595
aaa6b141196c 8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents: 22594
diff changeset
   454
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   455
endif