jdk/make/lib/CoreLibraries.gmk
author katleman
Thu, 17 Apr 2014 10:14:07 -0700
changeset 23965 987510c49ac7
parent 23562 596efd9dfcaf
child 24710 c019dc4104b2
permissions -rw-r--r--
Added tag jdk9-b09 for changeset 16bad6bc066b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     1
#
16476
e269be167fae 8001334: Remove use of JVM_* functions from java.io code
dxu
parents: 15676
diff changeset
     2
# Copyright (c) 2011, 2013, 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
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
    26
WIN_VERIFY_LIB := $(JDK_OUTPUTDIR)/objs/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
##########################################################################################
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    29
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    30
BUILD_LIBFDLIBM_OPTIMIZATION := HIGH
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
    31
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
    32
ifneq ($(OPENJDK_TARGET_OS), solaris)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    33
  BUILD_LIBFDLIBM_OPTIMIZATION := NONE
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
    34
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
    35
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    36
ifneq ($(OPENJDK_TARGET_OS), macosx)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    37
  $(eval $(call SetupNativeCompilation,BUILD_LIBFDLIBM, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    38
      STATIC_LIBRARY := fdlibm, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    39
      OUTPUT_DIR := $(JDK_OUTPUTDIR)/objs, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    40
      SRC := $(JDK_TOPDIR)/src/share/native/java/lang/fdlibm/src, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    41
      LANG := C, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    42
      OPTIMIZATION := $(BUILD_LIBFDLIBM_OPTIMIZATION), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    43
      CFLAGS := $(CFLAGS_JDKLIB) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    44
          -I$(JDK_TOPDIR)/src/share/native/java/lang/fdlibm/include, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    45
      CFLAGS_windows_debug := -DLOGGING, \
22594
kvn
parents: 22593 20896
diff changeset
    46
      CFLAGS_aix := -qfloat=nomaf, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    47
      ARFLAGS := $(ARFLAGS), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    48
      OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libfdlibm, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    49
      DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
    50
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
    51
else
14855
d104ff4d4bb9 8005178: build-infra: Dependency on libfdlibm on mac is broken
erikj
parents: 14789
diff changeset
    52
20890
9d7cc1b4291b 8025715: Split CompileNativeLibraries.gmk
ihse
parents: 20547
diff changeset
    53
  # On macosx the old build does partial (incremental) linking of fdlibm instead of
9d7cc1b4291b 8025715: Split CompileNativeLibraries.gmk
ihse
parents: 20547
diff changeset
    54
  # a plain static library.
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    55
  $(eval $(call SetupNativeCompilation,BUILD_LIBFDLIBM_MAC, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    56
      LIBRARY := fdlibm, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    57
      OUTPUT_DIR := $(JDK_OUTPUTDIR)/objs/libfdlibm, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    58
      SRC := $(JDK_TOPDIR)/src/share/native/java/lang/fdlibm/src, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    59
      LANG := C, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    60
      CFLAGS := $(CFLAGS_JDKLIB) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    61
          -I$(JDK_TOPDIR)/src/share/native/java/lang/fdlibm/include, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    62
      LDFLAGS := -nostdlib -r -arch x86_64, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    63
      OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libfdlibm, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    64
      DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    65
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    66
  BUILD_LIBFDLIBM := $(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)fdlibm$(STATIC_LIBRARY_SUFFIX)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    67
  $(BUILD_LIBFDLIBM): $(BUILD_LIBFDLIBM_MAC)
16636
1cc691bcfe50 8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents: 16513
diff changeset
    68
	$(call install-file)
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
    69
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    70
endif
20890
9d7cc1b4291b 8025715: Split CompileNativeLibraries.gmk
ihse
parents: 20547
diff changeset
    71
14855
d104ff4d4bb9 8005178: build-infra: Dependency on libfdlibm on mac is broken
erikj
parents: 14789
diff changeset
    72
BUILD_LIBRARIES += $(BUILD_LIBFDLIBM)
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    73
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    74
##########################################################################################
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    75
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    76
BUILD_LIBVERIFY_SRC := check_code.c check_format.c
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
    77
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
    78
ifeq ($(OPENJDK_TARGET_OS), solaris)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    79
  ifneq ($(OPENJDK_TARGET_CPU), x86_64)
21805
c7d7946239de 8027566: Remove the old build system
ihse
parents: 21628
diff changeset
    80
    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
    81
  endif
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
    82
endif
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
    83
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    84
LIBVERIFY_OPTIMIZATION := HIGH
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    85
ifneq ($(findstring $(OPENJDK_TARGET_OS), solaris linux), )
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    86
  ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    87
    LIBVERIFY_OPTIMIZATION := LOW
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    88
  endif
13702
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    89
endif
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    90
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    91
$(eval $(call SetupNativeCompilation,BUILD_LIBVERIFY, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    92
    LIBRARY := verify, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    93
    OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    94
    SRC := $(JDK_TOPDIR)/src/share/native/common, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    95
    INCLUDE_FILES := $(BUILD_LIBVERIFY_SRC), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    96
    LANG := C, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    97
    OPTIMIZATION := $(LIBVERIFY_OPTIMIZATION), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    98
    CFLAGS := $(CFLAGS_JDKLIB), \
21805
c7d7946239de 8027566: Remove the old build system
ihse
parents: 21628
diff changeset
    99
    MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libverify/mapfile-vers, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   100
    LDFLAGS := $(LDFLAGS_JDKLIB) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   101
        $(call SET_SHARED_LIBRARY_ORIGIN), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   102
    LDFLAGS_SUFFIX_posix := -ljvm -lc, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   103
    LDFLAGS_SUFFIX_windows := jvm.lib, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   104
    VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   105
    RC_FLAGS := $(RC_FLAGS) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   106
        -D "JDK_FNAME=verify.dll" \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   107
        -D "JDK_INTERNAL_NAME=verify" \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   108
        -D "JDK_FTYPE=0x2L", \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   109
    REORDER := $(BUILD_LIBVERIFY_REORDER), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   110
    OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libverify, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   111
    DEBUG_SYMBOLS := true))
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
   112
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
   113
BUILD_LIBRARIES += $(BUILD_LIBVERIFY)
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   114
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   115
##########################################################################################
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   116
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   117
LIBJAVA_SRC_DIRS := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/lang \
20890
9d7cc1b4291b 8025715: Split CompileNativeLibraries.gmk
ihse
parents: 20547
diff changeset
   118
    $(JDK_TOPDIR)/src/share/native/java/lang \
9d7cc1b4291b 8025715: Split CompileNativeLibraries.gmk
ihse
parents: 20547
diff changeset
   119
    $(JDK_TOPDIR)/src/share/native/java/lang/reflect \
9d7cc1b4291b 8025715: Split CompileNativeLibraries.gmk
ihse
parents: 20547
diff changeset
   120
    $(JDK_TOPDIR)/src/share/native/java/io \
9d7cc1b4291b 8025715: Split CompileNativeLibraries.gmk
ihse
parents: 20547
diff changeset
   121
    $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/io \
9d7cc1b4291b 8025715: Split CompileNativeLibraries.gmk
ihse
parents: 20547
diff changeset
   122
    $(JDK_TOPDIR)/src/share/native/java/nio \
9d7cc1b4291b 8025715: Split CompileNativeLibraries.gmk
ihse
parents: 20547
diff changeset
   123
    $(JDK_TOPDIR)/src/share/native/java/security \
9d7cc1b4291b 8025715: Split CompileNativeLibraries.gmk
ihse
parents: 20547
diff changeset
   124
    $(JDK_TOPDIR)/src/share/native/common \
9d7cc1b4291b 8025715: Split CompileNativeLibraries.gmk
ihse
parents: 20547
diff changeset
   125
    $(JDK_TOPDIR)/src/share/native/sun/misc \
22951
5fd21112b2b6 8034043: Native methods for preferences API should not be in libjava
alanb
parents: 22941
diff changeset
   126
    $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/misc \
20890
9d7cc1b4291b 8025715: Split CompileNativeLibraries.gmk
ihse
parents: 20547
diff changeset
   127
    $(JDK_TOPDIR)/src/share/native/sun/reflect \
9d7cc1b4291b 8025715: Split CompileNativeLibraries.gmk
ihse
parents: 20547
diff changeset
   128
    $(JDK_TOPDIR)/src/share/native/java/util \
9d7cc1b4291b 8025715: Split CompileNativeLibraries.gmk
ihse
parents: 20547
diff changeset
   129
    $(JDK_TOPDIR)/src/share/native/java/util/concurrent/atomic \
9d7cc1b4291b 8025715: Split CompileNativeLibraries.gmk
ihse
parents: 20547
diff changeset
   130
    $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/common \
9d7cc1b4291b 8025715: Split CompileNativeLibraries.gmk
ihse
parents: 20547
diff changeset
   131
    $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/util
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   132
22941
e39416d4eb9a 8033893: jdk build is broken due to the changeset of JDK-8033370
mchung
parents: 22607
diff changeset
   133
ifeq ($(OPENJDK_TARGET_OS), windows)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   134
  LIBJAVA_SRC_DIRS += $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/util/locale/provider
22941
e39416d4eb9a 8033893: jdk build is broken due to the changeset of JDK-8033370
mchung
parents: 22607
diff changeset
   135
else ifeq ($(OPENJDK_TARGET_OS), macosx)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   136
  LIBJAVA_SRC_DIRS += $(JDK_TOPDIR)/src/macosx/native/sun/util/locale/provider
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
   137
endif
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
   138
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   139
ifeq ($(OPENJDK_TARGET_OS), windows)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   140
  LIBJAVA_SRC_DIRS += $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/provider \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   141
      $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/io
14231
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
   142
endif
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
   143
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   144
LIBJAVA_CFLAGS := $(foreach dir, $(LIBJAVA_SRC_DIRS), -I$(dir)) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   145
    -I$(JDK_TOPDIR)/src/share/native/java/lang/fdlibm/include \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   146
    -DARCHPROPNAME='"$(OPENJDK_TARGET_CPU_OSARCH)"'
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
   147
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
   148
LIBJAVA_CFLAGS += -DJDK_MAJOR_VERSION='"$(JDK_MAJOR_VERSION)"' \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   149
    -DJDK_MINOR_VERSION='"$(JDK_MINOR_VERSION)"' \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   150
    -DJDK_MICRO_VERSION='"$(JDK_MICRO_VERSION)"' \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   151
     -DJDK_BUILD_NUMBER='"$(JDK_BUILD_NUMBER)"'
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   152
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   153
ifneq (, $(JDK_UPDATE_VERSION))
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   154
  LIBJAVA_CFLAGS += -DJDK_UPDATE_VERSION='"$(JDK_UPDATE_VERSION)"'
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
   155
endif
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
   156
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   157
LIBJAVA_EXCLUDE_FILES := check_code.c check_format.c jspawnhelper.c
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   158
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   159
ifneq ($(OPENJDK_TARGET_OS), macosx)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   160
  LIBJAVA_EXCLUDE_FILES += java_props_macosx.c
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
   161
else
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   162
  BUILD_LIBJAVA_java_props_md.c_CFLAGS := -x objective-c
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   163
  BUILD_LIBJAVA_java_props_macosx.c_CFLAGS := -x objective-c
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
   164
endif
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
   165
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   166
ifeq ($(OPENJDK_TARGET_OS), windows)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   167
  LIBJAVA_EXCLUDE_FILES += \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   168
      UNIXProcess_md.c \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   169
      UnixFileSystem_md.c \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   170
      FileSystemPreferences.c
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
   171
else
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   172
  LIBJAVA_EXCLUDE_FILES += \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   173
      ProcessImpl_md.c \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   174
      WinNTFileSystem_md.c \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   175
      dirent_md.c \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   176
      WindowsPreferences.c \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   177
      sun/security/provider/WinCAPISeedGenerator.c \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   178
      sun/io/Win32ErrorMode.c
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
   179
endif
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
   180
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
   181
ifeq ($(OPENJDK_TARGET_OS), solaris)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   182
  ifneq ($(OPENJDK_TARGET_CPU), x86_64)
21805
c7d7946239de 8027566: Remove the old build system
ihse
parents: 21628
diff changeset
   183
    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
   184
  endif
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
   185
endif
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
   186
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   187
$(eval $(call SetupNativeCompilation,BUILD_LIBJAVA, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   188
    LIBRARY := java, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   189
    OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   190
    SRC := $(LIBJAVA_SRC_DIRS), \
22951
5fd21112b2b6 8034043: Native methods for preferences API should not be in libjava
alanb
parents: 22941
diff changeset
   191
    EXCLUDES := fdlibm/src zip prefs, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   192
    EXCLUDE_FILES := $(LIBJAVA_EXCLUDE_FILES), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   193
    LANG := C, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   194
    OPTIMIZATION := HIGH, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   195
    CFLAGS := $(CFLAGS_JDKLIB) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   196
        $(LIBJAVA_CFLAGS), \
21805
c7d7946239de 8027566: Remove the old build system
ihse
parents: 21628
diff changeset
   197
    MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjava/mapfile-vers, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   198
    LDFLAGS := $(LDFLAGS_JDKLIB) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   199
        $(call SET_SHARED_LIBRARY_ORIGIN), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   200
    LDFLAGS_SUFFIX_posix := -ljvm -lverify, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   201
    LDFLAGS_SUFFIX_solaris := -lsocket -lnsl -lscf $(LIBDL) $(BUILD_LIBFDLIBM) -lc, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   202
    LDFLAGS_SUFFIX_linux := $(LIBDL) $(BUILD_LIBFDLIBM), \
22594
kvn
parents: 22593 20896
diff changeset
   203
    LDFLAGS_SUFFIX_aix := $(LIBDL) $(BUILD_LIBFDLIBM) -lm,\
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   204
    LDFLAGS_SUFFIX_macosx := -L$(JDK_OUTPUTDIR)/objs/ -lfdlibm \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   205
        -framework CoreFoundation \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   206
        -framework Foundation \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   207
        -framework Security -framework SystemConfiguration, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   208
    LDFLAGS_SUFFIX_windows := -export:winFileHandleOpen -export:handleLseek \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   209
        jvm.lib $(BUILD_LIBFDLIBM) $(WIN_VERIFY_LIB) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   210
        shell32.lib delayimp.lib -DELAYLOAD:shell32.dll \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   211
        advapi32.lib, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   212
    VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   213
    RC_FLAGS := $(RC_FLAGS) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   214
        -D "JDK_FNAME=java.dll" \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   215
        -D "JDK_INTERNAL_NAME=java" \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   216
        -D "JDK_FTYPE=0x2L", \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   217
    REORDER := $(LIBJAVA_REORDER), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   218
    OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjava, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   219
    DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
   220
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
   221
BUILD_LIBRARIES += $(BUILD_LIBJAVA)
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
   222
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   223
$(BUILD_LIBJAVA): $(LIBJLI_BINARY)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   224
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   225
$(BUILD_LIBJAVA): $(BUILD_LIBVERIFY)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   226
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   227
$(BUILD_LIBJAVA): $(BUILD_LIBFDLIBM)
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   228
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   229
##########################################################################################
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   230
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   231
BUILD_LIBZIP_EXCLUDES :=
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   232
ifeq ($(USE_EXTERNAL_LIBZ), true)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   233
  LIBZ := -lz
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   234
  LIBZIP_EXCLUDES += zlib-1.2.5
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   235
else
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   236
  ZLIB_CPPFLAGS := -I$(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.5
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   237
endif
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
BUILD_LIBZIP_REORDER :=
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   240
ifeq ($(OPENJDK_TARGET_OS), solaris)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   241
  ifneq ($(OPENJDK_TARGET_CPU), x86_64)
21805
c7d7946239de 8027566: Remove the old build system
ihse
parents: 21628
diff changeset
   242
    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
   243
  endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   244
endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   245
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   246
ifeq ($(LIBZIP_CAN_USE_MMAP), true)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   247
  BUILD_LIBZIP_MMAP := -DUSE_MMAP
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   248
endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   249
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   250
$(eval $(call SetupNativeCompilation,BUILD_LIBZIP, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   251
    LIBRARY := zip, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   252
    OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   253
    LANG := C, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   254
    OPTIMIZATION := LOW, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   255
    SRC := $(JDK_TOPDIR)/src/share/native/java/util/zip, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   256
    EXCLUDES := $(LIBZIP_EXCLUDES), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   257
    CFLAGS := $(CFLAGS_JDKLIB) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   258
        $(ZLIB_CPPFLAGS) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   259
        -I$(JDK_TOPDIR)/src/share/native/java/io \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   260
        -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/io, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   261
    CFLAGS_posix := $(BUILD_LIBZIP_MMAP) -UDEBUG, \
21805
c7d7946239de 8027566: Remove the old build system
ihse
parents: 21628
diff changeset
   262
    MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libzip/mapfile-vers, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   263
    REORDER := $(BUILD_LIBZIP_REORDER), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   264
    LDFLAGS := $(LDFLAGS_JDKLIB) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   265
        $(call SET_SHARED_LIBRARY_ORIGIN) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   266
        $(EXPORT_ZIP_FUNCS), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   267
    LDFLAGS_windows := -export:ZIP_Open -export:ZIP_Close -export:ZIP_FindEntry \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   268
        -export:ZIP_ReadEntry -export:ZIP_GetNextEntry jvm.lib \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   269
        $(WIN_JAVA_LIB), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   270
    LDFLAGS_SUFFIX_linux := -ljvm -ljava $(LIBZ), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   271
    LDFLAGS_SUFFIX_solaris := -ljvm -ljava $(LIBZ) -lc, \
22595
aaa6b141196c 8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents: 22594
diff changeset
   272
    LDFLAGS_SUFFIX_aix := -ljvm -ljava $(LIBZ),\
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   273
    LDFLAGS_SUFFIX_macosx := $(LIBZ) -ljava -ljvm, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   274
    VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   275
    RC_FLAGS := $(RC_FLAGS) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   276
        -D "JDK_FNAME=zip.dll" \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   277
        -D "JDK_INTERNAL_NAME=zip" \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   278
        -D "JDK_FTYPE=0x2L", \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   279
    OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libzip, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   280
    DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   281
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   282
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   283
$(BUILD_LIBZIP): $(BUILD_LIBJAVA)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   284
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   285
BUILD_LIBRARIES += $(BUILD_LIBZIP)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   286
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
22951
5fd21112b2b6 8034043: Native methods for preferences API should not be in libjava
alanb
parents: 22941
diff changeset
   289
ifeq ($(OPENJDK_TARGET_OS), macosx)
5fd21112b2b6 8034043: Native methods for preferences API should not be in libjava
alanb
parents: 22941
diff changeset
   290
  LIBPREF_SRC_DIRS := $(JDK_TOPDIR)/src/macosx/native/java/util/prefs
5fd21112b2b6 8034043: Native methods for preferences API should not be in libjava
alanb
parents: 22941
diff changeset
   291
else
5fd21112b2b6 8034043: Native methods for preferences API should not be in libjava
alanb
parents: 22941
diff changeset
   292
  LIBPREF_SRC_DIRS := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/util/prefs
5fd21112b2b6 8034043: Native methods for preferences API should not be in libjava
alanb
parents: 22941
diff changeset
   293
endif
5fd21112b2b6 8034043: Native methods for preferences API should not be in libjava
alanb
parents: 22941
diff changeset
   294
5fd21112b2b6 8034043: Native methods for preferences API should not be in libjava
alanb
parents: 22941
diff changeset
   295
$(eval $(call SetupNativeCompilation,BUILD_LIBPREFS, \
5fd21112b2b6 8034043: Native methods for preferences API should not be in libjava
alanb
parents: 22941
diff changeset
   296
    LIBRARY := prefs, \
5fd21112b2b6 8034043: Native methods for preferences API should not be in libjava
alanb
parents: 22941
diff changeset
   297
    OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
5fd21112b2b6 8034043: Native methods for preferences API should not be in libjava
alanb
parents: 22941
diff changeset
   298
    SRC := $(LIBPREF_SRC_DIRS), \
5fd21112b2b6 8034043: Native methods for preferences API should not be in libjava
alanb
parents: 22941
diff changeset
   299
    LANG := C, \
5fd21112b2b6 8034043: Native methods for preferences API should not be in libjava
alanb
parents: 22941
diff changeset
   300
    OPTIMIZATION := HIGH, \
5fd21112b2b6 8034043: Native methods for preferences API should not be in libjava
alanb
parents: 22941
diff changeset
   301
    CFLAGS := $(CFLAGS_JDKLIB), \
5fd21112b2b6 8034043: Native methods for preferences API should not be in libjava
alanb
parents: 22941
diff changeset
   302
    MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libprefs/mapfile-vers, \
5fd21112b2b6 8034043: Native methods for preferences API should not be in libjava
alanb
parents: 22941
diff changeset
   303
    LDFLAGS := $(LDFLAGS_JDKLIB) \
5fd21112b2b6 8034043: Native methods for preferences API should not be in libjava
alanb
parents: 22941
diff changeset
   304
        $(call SET_SHARED_LIBRARY_ORIGIN), \
5fd21112b2b6 8034043: Native methods for preferences API should not be in libjava
alanb
parents: 22941
diff changeset
   305
    LDFLAGS_SUFFIX_linux := -ljvm -ljava, \
5fd21112b2b6 8034043: Native methods for preferences API should not be in libjava
alanb
parents: 22941
diff changeset
   306
    LDFLAGS_SUFFIX_solaris := -ljvm -ljava -lc, \
5fd21112b2b6 8034043: Native methods for preferences API should not be in libjava
alanb
parents: 22941
diff changeset
   307
    LDFLAGS_SUFFIX_aix := -ljvm -ljava, \
23562
596efd9dfcaf 8035340: (prefs) Check jdk/src/windows/native/java/util/WindowsPreference.c for JNI pending exceptions
msheppar
parents: 22951
diff changeset
   308
    LDFLAGS_SUFFIX_windows := advapi32.lib jvm.lib $(WIN_JAVA_LIB), \
22951
5fd21112b2b6 8034043: Native methods for preferences API should not be in libjava
alanb
parents: 22941
diff changeset
   309
    LDFLAGS_SUFFIX_macosx := -ljvm -framework CoreFoundation, \
5fd21112b2b6 8034043: Native methods for preferences API should not be in libjava
alanb
parents: 22941
diff changeset
   310
    VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
5fd21112b2b6 8034043: Native methods for preferences API should not be in libjava
alanb
parents: 22941
diff changeset
   311
    RC_FLAGS := $(RC_FLAGS) \
5fd21112b2b6 8034043: Native methods for preferences API should not be in libjava
alanb
parents: 22941
diff changeset
   312
        -D "JDK_FNAME=prefs.dll" \
5fd21112b2b6 8034043: Native methods for preferences API should not be in libjava
alanb
parents: 22941
diff changeset
   313
        -D "JDK_INTERNAL_NAME=prefs" \
5fd21112b2b6 8034043: Native methods for preferences API should not be in libjava
alanb
parents: 22941
diff changeset
   314
        -D "JDK_FTYPE=0x2L", \
5fd21112b2b6 8034043: Native methods for preferences API should not be in libjava
alanb
parents: 22941
diff changeset
   315
    OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libprefs, \
5fd21112b2b6 8034043: Native methods for preferences API should not be in libjava
alanb
parents: 22941
diff changeset
   316
    DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
5fd21112b2b6 8034043: Native methods for preferences API should not be in libjava
alanb
parents: 22941
diff changeset
   317
5fd21112b2b6 8034043: Native methods for preferences API should not be in libjava
alanb
parents: 22941
diff changeset
   318
$(BUILD_LIBPREFS): $(BUILD_LIBJAVA)
5fd21112b2b6 8034043: Native methods for preferences API should not be in libjava
alanb
parents: 22941
diff changeset
   319
    
5fd21112b2b6 8034043: Native methods for preferences API should not be in libjava
alanb
parents: 22941
diff changeset
   320
BUILD_LIBRARIES += $(BUILD_LIBPREFS)
5fd21112b2b6 8034043: Native methods for preferences API should not be in libjava
alanb
parents: 22941
diff changeset
   321
5fd21112b2b6 8034043: Native methods for preferences API should not be in libjava
alanb
parents: 22941
diff changeset
   322
##########################################################################################
5fd21112b2b6 8034043: Native methods for preferences API should not be in libjava
alanb
parents: 22941
diff changeset
   323
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   324
$(eval $(call SetupNativeCompilation,BUILD_LIBUNPACK, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   325
    LIBRARY := unpack, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   326
    OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   327
    SRC := $(JDK_TOPDIR)/src/share/native/com/sun/java/util/jar/pack, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   328
    EXCLUDE_FILES := main.cpp, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   329
    LANG := C++, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   330
    OPTIMIZATION := LOW, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   331
    CFLAGS := $(CXXFLAGS_JDKLIB) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   332
        -DNO_ZLIB -DUNPACK_JNI -DFULL, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   333
    CFLAGS_release := -DPRODUCT, \
21805
c7d7946239de 8027566: Remove the old build system
ihse
parents: 21628
diff changeset
   334
    MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libunpack/mapfile-vers, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   335
    LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   336
        $(call SET_SHARED_LIBRARY_ORIGIN), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   337
    LDFLAGS_windows := -map:$(JDK_OUTPUTDIR)/objs/unpack.map -debug \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   338
        jvm.lib $(WIN_JAVA_LIB), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   339
    LDFLAGS_SUFFIX_posix := -ljvm $(LIBCXX) -ljava -lc, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   340
    OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libunpack, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   341
    VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   342
    RC_FLAGS := $(RC_FLAGS) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   343
        -D "JDK_FNAME=unpack.dll" \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   344
        -D "JDK_INTERNAL_NAME=unpack" \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   345
        -D "JDK_FTYPE=0x2L", \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   346
    DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   347
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   348
$(BUILD_LIBUNPACK): $(BUILD_LIBJAVA)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   349
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   350
BUILD_LIBRARIES += $(BUILD_LIBUNPACK)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   351
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   352
##########################################################################################
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   353
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   354
BUILD_LIBJLI_SRC_DIRS := $(JDK_TOPDIR)/src/share/bin $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/bin
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   355
LIBJLI_CFLAGS := $(CFLAGS_JDKLIB) $(foreach dir, $(BUILD_LIBJLI_SRC_DIRS), -I$(dir))
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   356
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   357
BUILD_LIBJLI_FILES := \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   358
    java.c \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   359
    splashscreen_stubs.c \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   360
    parse_manifest.c \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   361
    version_comp.c \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   362
    wildcard.c \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   363
    jli_util.c
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   364
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   365
ifeq ($(JVM_VARIANT_ZERO), true)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   366
  ERGO_FAMILY := zero
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   367
else
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   368
  ifeq ($(OPENJDK_TARGET_CPU_ARCH), x86)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   369
    ERGO_FAMILY := i586
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   370
  else
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   371
    ERGO_FAMILY := $(OPENJDK_TARGET_CPU_ARCH)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   372
  endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   373
endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   374
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   375
ifeq ($(OPENJDK_TARGET_OS), macosx)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   376
  LIBJLI_CFLAGS += -I$(JDK_TOPDIR)/src/macosx/bin
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   377
  BUILD_LIBJLI_SRC_DIRS += $(JDK_TOPDIR)/src/macosx/bin
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   378
  BUILD_LIBJLI_FILES += java_md_common.c java_md_macosx.c
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   379
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   380
  BUILD_LIBJLI_java_md_macosx.c_CFLAGS := -x objective-c
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   381
  BUILD_LIBJLI_STATIC_java_md_macosx.c_CFLAGS := -x objective-c
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   382
endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   383
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   384
ifeq ($(OPENJDK_TARGET_OS), windows)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   385
  BUILD_LIBJLI_FILES += java_md.c \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   386
      cmdtoargs.c
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   387
  # Staticically link with c runtime on windows.
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   388
  LIBJLI_CFLAGS := $(filter-out -MD, $(LIBJLI_CFLAGS))
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   389
else ifneq ($(OPENJDK_TARGET_OS), macosx)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   390
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   391
  BUILD_LIBJLI_FILES += java_md_common.c
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   392
  BUILD_LIBJLI_FILES += java_md_solinux.c ergo.c
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   393
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   394
  ERGO_ARCH_FILE = ergo_$(ERGO_FAMILY).c
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
  # if the architecture specific ergo file exists then
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   397
  # use it, else use the generic definitions from ergo.c
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   398
  ifneq ($(wildcard $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/bin/$(ERGO_ARCH_FILE)), )
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   399
    BUILD_LIBJLI_FILES += $(ERGO_ARCH_FILE)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   400
  else # !ERGO_ARCH_FILE
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   401
    LIBJLI_CFLAGS += -DUSE_GENERIC_ERGO
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   402
  endif # ERGO_ARCH_FILE
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   403
endif #WINDOWS
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   404
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   405
# Append defines depending on target platform
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   406
LIBJLI_CFLAGS += $(OPENJDK_TARGET_CPU_JLI_CFLAGS)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   407
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   408
ifeq ($(OPENJDK_TARGET_OS), macosx)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   409
  LIBJLI_CFLAGS += -DPACKAGE_PATH=\"$(PACKAGE_PATH)\"
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   410
endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   411
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   412
ifneq ($(USE_EXTERNAL_LIBZ), true)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   413
  BUILD_LIBJLI_SRC_DIRS += $(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.5
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   414
  LIBJLI_CFLAGS += $(ZLIB_CPPFLAGS)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   415
  BUILD_LIBJLI_FILES += \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   416
      inflate.c \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   417
      inftrees.c \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   418
      inffast.c \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   419
      zadler32.c \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   420
      zcrc32.c \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   421
      zutil.c
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   422
endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   423
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   424
ifeq ($(OPENJDK_TARGET_OS), windows)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   425
  LIBJLI_OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   426
else
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   427
  LIBJLI_OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE)/jli
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   428
endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   429
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   430
$(eval $(call SetupNativeCompilation,BUILD_LIBJLI, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   431
    LIBRARY := jli, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   432
    OUTPUT_DIR := $(LIBJLI_OUTPUT_DIR), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   433
    SRC := $(BUILD_LIBJLI_SRC_DIRS), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   434
    INCLUDE_FILES := $(BUILD_LIBJLI_FILES), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   435
    LANG := C, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   436
    OPTIMIZATION := HIGH, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   437
    CFLAGS := $(LIBJLI_CFLAGS), \
21805
c7d7946239de 8027566: Remove the old build system
ihse
parents: 21628
diff changeset
   438
    MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjli/mapfile-vers, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   439
    LDFLAGS := $(LDFLAGS_JDKLIB) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   440
        $(call SET_SHARED_LIBRARY_ORIGIN), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   441
    LDFLAGS_linux := $(call SET_SHARED_LIBRARY_ORIGIN,/..), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   442
    LDFLAGS_solaris := $(call SET_SHARED_LIBRARY_ORIGIN,/..), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   443
    LDFLAGS_macosx := -framework Cocoa -framework Security -framework ApplicationServices, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   444
    LDFLAGS_SUFFIX_solaris := $(LIBZ) $(LIBDL) -lc, \
21606
1984e107a4b3 8027755: Anti-delta incorrect push for 8025198
dholmes
parents: 21605
diff changeset
   445
    LDFLAGS_SUFFIX_linux := $(LIBZ) $(LIBDL) -lc -lpthread, \
22595
aaa6b141196c 8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents: 22594
diff changeset
   446
    LDFLAGS_SUFFIX_aix := $(LIBZ) $(LIBDL),\
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   447
    LDFLAGS_SUFFIX_macosx := $(LIBZ), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   448
    LDFLAGS_SUFFIX_windows := \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   449
        -export:JLI_Launch \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   450
        -export:JLI_ManifestIterate \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   451
        -export:JLI_SetTraceLauncher \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   452
        -export:JLI_ReportErrorMessage \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   453
        -export:JLI_ReportErrorMessageSys \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   454
        -export:JLI_ReportMessage \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   455
        -export:JLI_ReportExceptionDescription \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   456
        -export:JLI_MemAlloc \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   457
        -export:JLI_CmdToArgs \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   458
        -export:JLI_GetStdArgc \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   459
        -export:JLI_GetStdArgs \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   460
        advapi32.lib \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   461
        comctl32.lib \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   462
        user32.lib, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   463
    VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   464
    RC_FLAGS := $(RC_FLAGS) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   465
        -D "JDK_FNAME=jli.dll" \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   466
        -D "JDK_INTERNAL_NAME=jli" \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   467
        -D "JDK_FTYPE=0x2L", \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   468
    OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjli, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   469
    DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   470
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   471
BUILD_LIBRARIES += $(BUILD_LIBJLI)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   472
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   473
# 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
   474
# 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
   475
# in doing it for all platform to reduce complexity.
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   476
ifeq ($(OPENJDK_TARGET_OS), windows)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   477
  $(eval $(call SetupNativeCompilation,BUILD_LIBJLI_STATIC, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   478
      STATIC_LIBRARY := jli_static, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   479
      OUTPUT_DIR := $(JDK_OUTPUTDIR)/objs, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   480
      SRC := $(BUILD_LIBJLI_SRC_DIRS), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   481
      INCLUDE_FILES := $(BUILD_LIBJLI_FILES), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   482
      LANG := C, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   483
      OPTIMIZATION := HIGH, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   484
      CFLAGS := $(STATIC_LIBRARY_FLAGS) $(LIBJLI_CFLAGS), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   485
      ARFLAGS := $(ARFLAGS), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   486
      OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjli_static, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   487
      DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   488
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   489
  BUILD_LIBRARIES += $(BUILD_LIBJLI_STATIC)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   490
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   491
else ifeq ($(OPENJDK_TARGET_OS), macosx)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   492
  #
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   493
  # On macosx they do partial (incremental) linking of libjli_static.a
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   494
  # code it here...rather than add support to NativeCompilation
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   495
  # as this is first time I see it
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   496
  $(eval $(call SetupNativeCompilation,BUILD_LIBJLI_STATIC, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   497
      LIBRARY := jli_static, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   498
      OUTPUT_DIR := $(JDK_OUTPUTDIR)/objs, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   499
      SRC := $(BUILD_LIBJLI_SRC_DIRS), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   500
      INCLUDE_FILES := $(BUILD_LIBJLI_FILES), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   501
      LANG := C, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   502
      OPTIMIZATION := HIGH, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   503
      CFLAGS := $(CFLAGS_JDKLIB) $(LIBJLI_CFLAGS), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   504
      LDFLAGS := -nostdlib -r, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   505
      OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjli_static, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   506
      DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   507
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   508
  $(JDK_OUTPUTDIR)/objs/libjli_static.a: $(BUILD_LIBJLI_STATIC)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   509
	$(call install-file)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   510
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   511
  BUILD_LIBRARIES += $(JDK_OUTPUTDIR)/objs/libjli_static.a
22595
aaa6b141196c 8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents: 22594
diff changeset
   512
aaa6b141196c 8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents: 22594
diff changeset
   513
else ifeq ($(OPENJDK_TARGET_OS), aix)
aaa6b141196c 8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents: 22594
diff changeset
   514
  # AIX also requires a static libjli because the compiler doesn't support '-rpath'
aaa6b141196c 8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents: 22594
diff changeset
   515
  $(eval $(call SetupNativeCompilation,BUILD_LIBJLI_STATIC,\
aaa6b141196c 8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents: 22594
diff changeset
   516
      STATIC_LIBRARY:=jli_static,\
aaa6b141196c 8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents: 22594
diff changeset
   517
      OUTPUT_DIR:=$(JDK_OUTPUTDIR)/objs,\
aaa6b141196c 8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents: 22594
diff changeset
   518
      SRC:=$(BUILD_LIBJLI_SRC_DIRS),\
aaa6b141196c 8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents: 22594
diff changeset
   519
      INCLUDE_FILES:=$(BUILD_LIBJLI_FILES),\
aaa6b141196c 8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents: 22594
diff changeset
   520
      LANG:=C,\
aaa6b141196c 8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents: 22594
diff changeset
   521
      OPTIMIZATION:=HIGH, \
aaa6b141196c 8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents: 22594
diff changeset
   522
      CFLAGS:=$(STATIC_LIBRARY_FLAGS) $(LIBJLI_CFLAGS),\
aaa6b141196c 8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents: 22594
diff changeset
   523
      ARFLAGS:=$(ARFLAGS),\
aaa6b141196c 8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents: 22594
diff changeset
   524
      OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libjli_static))
aaa6b141196c 8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents: 22594
diff changeset
   525
aaa6b141196c 8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents: 22594
diff changeset
   526
  BUILD_LIBRARIES += $(JDK_OUTPUTDIR)/objs/libjli_static.a
aaa6b141196c 8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents: 22594
diff changeset
   527
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   528
endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   529
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   530
##########################################################################################
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   531
20890
9d7cc1b4291b 8025715: Split CompileNativeLibraries.gmk
ihse
parents: 20547
diff changeset
   532
$(eval $(call SetupNativeCompilation,BUILD_LIBNPT, \
9d7cc1b4291b 8025715: Split CompileNativeLibraries.gmk
ihse
parents: 20547
diff changeset
   533
    LIBRARY := npt, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   534
    OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
20890
9d7cc1b4291b 8025715: Split CompileNativeLibraries.gmk
ihse
parents: 20547
diff changeset
   535
    SRC := $(JDK_TOPDIR)/src/share/npt $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/npt, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   536
    LANG := C, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   537
    OPTIMIZATION := LOW, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   538
    CFLAGS := $(CFLAGS_JDKLIB) \
20890
9d7cc1b4291b 8025715: Split CompileNativeLibraries.gmk
ihse
parents: 20547
diff changeset
   539
        -I$(JDK_TOPDIR)/src/share/npt \
9d7cc1b4291b 8025715: Split CompileNativeLibraries.gmk
ihse
parents: 20547
diff changeset
   540
        -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/npt, \
21805
c7d7946239de 8027566: Remove the old build system
ihse
parents: 21628
diff changeset
   541
    MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libnpt/mapfile-vers, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   542
    LDFLAGS := $(LDFLAGS_JDKLIB) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   543
        $(call SET_SHARED_LIBRARY_ORIGIN), \
20890
9d7cc1b4291b 8025715: Split CompileNativeLibraries.gmk
ihse
parents: 20547
diff changeset
   544
    LDFLAGS_macosx := -liconv, \
9d7cc1b4291b 8025715: Split CompileNativeLibraries.gmk
ihse
parents: 20547
diff changeset
   545
    LDFLAGS_SUFFIX_windows := -export:nptInitialize -export:nptTerminate, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   546
    LDFLAGS_SUFFIX_solaris := -lc, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   547
    VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   548
    RC_FLAGS := $(RC_FLAGS) \
20890
9d7cc1b4291b 8025715: Split CompileNativeLibraries.gmk
ihse
parents: 20547
diff changeset
   549
        -D "JDK_FNAME=npt.dll" \
9d7cc1b4291b 8025715: Split CompileNativeLibraries.gmk
ihse
parents: 20547
diff changeset
   550
        -D "JDK_INTERNAL_NAME=npt" \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   551
        -D "JDK_FTYPE=0x2L", \
20890
9d7cc1b4291b 8025715: Split CompileNativeLibraries.gmk
ihse
parents: 20547
diff changeset
   552
    OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libnpt, \
9d7cc1b4291b 8025715: Split CompileNativeLibraries.gmk
ihse
parents: 20547
diff changeset
   553
    DEBUG_SYMBOLS := true))
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   554
20890
9d7cc1b4291b 8025715: Split CompileNativeLibraries.gmk
ihse
parents: 20547
diff changeset
   555
BUILD_LIBRARIES += $(BUILD_LIBNPT)