1 #
   2 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
   3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4 #
   5 # This code is free software; you can redistribute it and/or modify it
   6 # under the terms of the GNU General Public License version 2 only, as
   7 # published by the Free Software Foundation.  Oracle designates this
   8 # particular file as subject to the "Classpath" exception as provided
   9 # by Oracle in the LICENSE file that accompanied this code.
  10 #
  11 # This code is distributed in the hope that it will be useful, but WITHOUT
  12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14 # version 2 for more details (a copy is included in the LICENSE file that
  15 # accompanied this code).
  16 #
  17 # You should have received a copy of the GNU General Public License version
  18 # 2 along with this work; if not, write to the Free Software Foundation,
  19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20 #
  21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22 # or visit www.oracle.com if you need additional information or have any
  23 # questions.
  24 #
  25 
  26 WIN_VERIFY_LIB := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libverify/verify.lib
  27 
  28 ##########################################################################################
  29 # libfdlibm is statically linked with libjava below and not delivered into the
  30 # product on its own.
  31 
  32 BUILD_LIBFDLIBM_OPTIMIZATION := HIGH
  33 
  34 ifneq ($(OPENJDK_TARGET_OS), solaris)
  35   BUILD_LIBFDLIBM_OPTIMIZATION := NONE
  36 endif
  37 
  38 LIBFDLIBM_SRC := $(JDK_TOPDIR)/src/java.base/share/native/libfdlibm
  39 LIBFDLIBM_CFLAGS := -I$(LIBFDLIBM_SRC)
  40 
  41 ifneq ($(OPENJDK_TARGET_OS), macosx)
  42   $(eval $(call SetupNativeCompilation,BUILD_LIBFDLIBM, \
  43       STATIC_LIBRARY := fdlibm, \
  44       OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE), \
  45       SRC := $(LIBFDLIBM_SRC), \
  46       OPTIMIZATION := $(BUILD_LIBFDLIBM_OPTIMIZATION), \
  47       CFLAGS := $(CFLAGS_JDKLIB) $(LIBFDLIBM_CFLAGS), \
  48       CFLAGS_windows_debug := -DLOGGING, \
  49       CFLAGS_aix := -qfloat=nomaf, \
  50       DISABLED_WARNINGS_gcc := sign-compare, \
  51       DISABLED_WARNINGS_microsoft := 4146 4244 4018, \
  52       ARFLAGS := $(ARFLAGS), \
  53       OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libfdlibm, \
  54       DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
  55 
  56 else
  57 
  58   # On macosx the old build does partial (incremental) linking of fdlibm instead of
  59   # a plain static library.
  60   $(eval $(call SetupNativeCompilation,BUILD_LIBFDLIBM_MAC, \
  61       LIBRARY := fdlibm, \
  62       OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libfdlibm, \
  63       SRC := $(LIBFDLIBM_SRC), \
  64       CFLAGS := $(CFLAGS_JDKLIB) $(LIBFDLIBM_CFLAGS), \
  65       LDFLAGS := -nostdlib -r -arch x86_64, \
  66       OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libfdlibm, \
  67       DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
  68 
  69   BUILD_LIBFDLIBM := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/$(LIBRARY_PREFIX)fdlibm$(STATIC_LIBRARY_SUFFIX)
  70   $(BUILD_LIBFDLIBM): $(BUILD_LIBFDLIBM_MAC)
  71         $(call install-file)
  72 
  73 endif
  74 
  75 ##########################################################################################
  76 
  77 ifeq ($(OPENJDK_TARGET_OS), solaris)
  78   ifneq ($(OPENJDK_TARGET_CPU), x86_64)
  79     BUILD_LIBVERIFY_REORDER := $(JDK_TOPDIR)/make/mapfiles/libverify/reorder-$(OPENJDK_TARGET_CPU)
  80   endif
  81 endif
  82 
  83 LIBVERIFY_OPTIMIZATION := HIGH
  84 ifneq ($(findstring $(OPENJDK_TARGET_OS), solaris linux), )
  85   ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
  86     LIBVERIFY_OPTIMIZATION := LOW
  87   endif
  88 endif
  89 
  90 $(eval $(call SetupNativeCompilation,BUILD_LIBVERIFY, \
  91     LIBRARY := verify, \
  92     OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
  93     SRC := $(JDK_TOPDIR)/src/java.base/share/native/libverify, \
  94     OPTIMIZATION := $(LIBVERIFY_OPTIMIZATION), \
  95     CFLAGS := $(CFLAGS_JDKLIB), \
  96     DISABLED_WARNINGS_microsoft := 4244 4267, \
  97     MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libverify/mapfile-vers, \
  98     LDFLAGS := $(LDFLAGS_JDKLIB) \
  99         $(call SET_SHARED_LIBRARY_ORIGIN), \
 100     LDFLAGS_SUFFIX_unix := -ljvm -lc, \
 101     LDFLAGS_SUFFIX_windows := jvm.lib, \
 102     VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
 103     RC_FLAGS := $(RC_FLAGS) \
 104         -D "JDK_FNAME=verify.dll" \
 105         -D "JDK_INTERNAL_NAME=verify" \
 106         -D "JDK_FTYPE=0x2L", \
 107     REORDER := $(BUILD_LIBVERIFY_REORDER), \
 108     OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libverify, \
 109     DEBUG_SYMBOLS := true))
 110 
 111 TARGETS += $(BUILD_LIBVERIFY)
 112 
 113 ##########################################################################################
 114 
 115 LIBJAVA_SRC_DIRS := $(call FindSrcDirsForLib, java.base, java)
 116 
 117 LIBJAVA_CFLAGS := $(addprefix -I, $(LIBJAVA_SRC_DIRS)) \
 118     -I$(JDK_TOPDIR)/src/java.base/share/native/libfdlibm \
 119     -I$(SUPPORT_OUTPUTDIR)/headers/java.base \
 120     -DARCHPROPNAME='"$(OPENJDK_TARGET_CPU_OSARCH)"'
 121 
 122 LIBJAVA_CFLAGS += -DJDK_MAJOR_VERSION='"$(JDK_MAJOR_VERSION)"' \
 123     -DJDK_MINOR_VERSION='"$(JDK_MINOR_VERSION)"' \
 124     -DJDK_MICRO_VERSION='"$(JDK_MICRO_VERSION)"' \
 125      -DJDK_BUILD_NUMBER='"$(JDK_BUILD_NUMBER)"'
 126 
 127 ifneq (, $(JDK_UPDATE_VERSION))
 128   LIBJAVA_CFLAGS += -DJDK_UPDATE_VERSION='"$(JDK_UPDATE_VERSION)"'
 129 endif
 130 
 131 ifeq ($(OPENJDK_TARGET_OS), macosx)
 132   BUILD_LIBJAVA_java_props_md.c_CFLAGS := -x objective-c
 133   BUILD_LIBJAVA_java_props_macosx.c_CFLAGS := -x objective-c
 134 endif
 135 
 136 ifeq ($(OPENJDK_TARGET_OS), solaris)
 137   ifneq ($(OPENJDK_TARGET_CPU), x86_64)
 138     LIBJAVA_REORDER := $(JDK_TOPDIR)/make/mapfiles/libjava/reorder-$(OPENJDK_TARGET_CPU)
 139   endif
 140 endif
 141 
 142 $(eval $(call SetupNativeCompilation,BUILD_LIBJAVA, \
 143     LIBRARY := java, \
 144     OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
 145     SRC := $(LIBJAVA_SRC_DIRS), \
 146     OPTIMIZATION := HIGH, \
 147     CFLAGS := $(CFLAGS_JDKLIB) \
 148         $(LIBJAVA_CFLAGS), \
 149     DISABLED_WARNINGS_solstudio := E_STATEMENT_NOT_REACHED, \
 150     MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjava/mapfile-vers, \
 151     LDFLAGS := $(LDFLAGS_JDKLIB) \
 152         $(call SET_SHARED_LIBRARY_ORIGIN), \
 153     LDFLAGS_SUFFIX_unix := -ljvm -lverify, \
 154     LDFLAGS_SUFFIX_solaris := -lsocket -lnsl -lscf $(LIBDL) $(BUILD_LIBFDLIBM) -lc, \
 155     LDFLAGS_SUFFIX_linux := $(LIBDL) $(BUILD_LIBFDLIBM), \
 156     LDFLAGS_SUFFIX_aix := $(LIBDL) $(BUILD_LIBFDLIBM) -lm,\
 157     LDFLAGS_SUFFIX_macosx := -L$(SUPPORT_OUTPUTDIR)/native/$(MODULE)/ -lfdlibm \
 158         -framework CoreFoundation \
 159         -framework Foundation \
 160         -framework Security -framework SystemConfiguration, \
 161     LDFLAGS_SUFFIX_windows := -export:jdk_strerror \
 162         -export:winFileHandleOpen -export:handleLseek \
 163         -export:getLastErrorString \
 164         jvm.lib $(BUILD_LIBFDLIBM) $(WIN_VERIFY_LIB) \
 165         shell32.lib delayimp.lib -DELAYLOAD:shell32.dll \
 166         advapi32.lib version.lib, \
 167     VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
 168     RC_FLAGS := $(RC_FLAGS) \
 169         -D "JDK_FNAME=java.dll" \
 170         -D "JDK_INTERNAL_NAME=java" \
 171         -D "JDK_FTYPE=0x2L", \
 172     REORDER := $(LIBJAVA_REORDER), \
 173     OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjava, \
 174     DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
 175 
 176 TARGETS += $(BUILD_LIBJAVA)
 177 
 178 $(BUILD_LIBJAVA): $(BUILD_LIBVERIFY)
 179 
 180 $(BUILD_LIBJAVA): $(BUILD_LIBFDLIBM)
 181 
 182 ##########################################################################################
 183 
 184 BUILD_LIBZIP_EXCLUDES :=
 185 ifeq ($(USE_EXTERNAL_LIBZ), true)
 186   LIBZIP_EXCLUDES += zlib-1.2.8
 187 endif
 188 
 189 BUILD_LIBZIP_REORDER :=
 190 ifeq ($(OPENJDK_TARGET_OS), solaris)
 191   ifneq ($(OPENJDK_TARGET_CPU), x86_64)
 192     BUILD_LIBZIP_REORDER := $(JDK_TOPDIR)/make/mapfiles/libzip/reorder-$(OPENJDK_TARGET_CPU)
 193   endif
 194 endif
 195 
 196 ifeq ($(LIBZIP_CAN_USE_MMAP), true)
 197   BUILD_LIBZIP_MMAP := -DUSE_MMAP
 198 endif
 199 
 200 $(eval $(call SetupNativeCompilation,BUILD_LIBZIP, \
 201     LIBRARY := zip, \
 202     OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
 203     OPTIMIZATION := LOW, \
 204     SRC := $(JDK_TOPDIR)/src/java.base/share/native/libzip, \
 205     EXCLUDES := $(LIBZIP_EXCLUDES), \
 206     CFLAGS := $(CFLAGS_JDKLIB) \
 207         $(ZLIB_CPPFLAGS) \
 208         -I$(JDK_TOPDIR)/src/java.base/share/native/libjava \
 209         -I$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libjava \
 210         -I$(SUPPORT_OUTPUTDIR)/headers/java.base, \
 211     CFLAGS_unix := $(BUILD_LIBZIP_MMAP) -UDEBUG, \
 212     DISABLED_WARNINGS_gcc := parentheses, \
 213     DISABLED_WARNINGS_clang := dangling-else, \
 214     DISABLED_WARNINGS_microsoft := 4267, \
 215     MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libzip/mapfile-vers, \
 216     REORDER := $(BUILD_LIBZIP_REORDER), \
 217     LDFLAGS := $(LDFLAGS_JDKLIB) \
 218         $(call SET_SHARED_LIBRARY_ORIGIN) \
 219         $(EXPORT_ZIP_FUNCS), \
 220     LDFLAGS_windows := -export:ZIP_Open -export:ZIP_Close -export:ZIP_FindEntry \
 221         -export:ZIP_ReadEntry -export:ZIP_GetNextEntry \
 222         -export:ZIP_InflateFully -export:ZIP_CRC32 \
 223         jvm.lib $(WIN_JAVA_LIB), \
 224     LDFLAGS_SUFFIX_linux := -ljvm -ljava $(LIBZ), \
 225     LDFLAGS_SUFFIX_solaris := -ljvm -ljava $(LIBZ) -lc, \
 226     LDFLAGS_SUFFIX_aix := -ljvm -ljava $(LIBZ),\
 227     LDFLAGS_SUFFIX_macosx := $(LIBZ) -ljava -ljvm, \
 228     VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
 229     RC_FLAGS := $(RC_FLAGS) \
 230         -D "JDK_FNAME=zip.dll" \
 231         -D "JDK_INTERNAL_NAME=zip" \
 232         -D "JDK_FTYPE=0x2L", \
 233     OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libzip, \
 234     DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
 235 
 236 
 237 $(BUILD_LIBZIP): $(BUILD_LIBJAVA)
 238 
 239 TARGETS += $(BUILD_LIBZIP)
 240 
 241 ##########################################################################################
 242 
 243 ifeq ($(OPENJDK_TARGET_OS), aix)
 244   LIBJIMAGE_TOOLCHAIN := TOOLCHAIN_LINK_CXX
 245 endif # OPENJDK_TARGET_OS aix
 246 
 247 $(eval $(call SetupNativeCompilation,BUILD_LIBJIMAGE, \
 248     LIBRARY := jimage, \
 249     TOOLCHAIN := $(LIBJIMAGE_TOOLCHAIN), \
 250     OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
 251     OPTIMIZATION := LOW, \
 252     SRC := $(JDK_TOPDIR)/src/java.base/share/native/libjimage \
 253         $(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libjimage, \
 254     EXCLUDES := $(LIBJIMAGE_EXCLUDES), \
 255     CFLAGS := $(CFLAGS_JDKLIB) \
 256         $(JIMAGELIB_CPPFLAGS) \
 257         -I$(JDK_TOPDIR)/src/java.base/share/native/libjava \
 258         -I$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libjava \
 259         -I$(JDK_TOPDIR)/src/java.base/share/native/libjimage \
 260         -I$(SUPPORT_OUTPUTDIR)/headers/java.base, \
 261     CFLAGS_unix := -UDEBUG, \
 262     MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjimage/mapfile-vers, \
 263     LDFLAGS := $(LDFLAGS_JDKLIB) \
 264         $(call SET_SHARED_LIBRARY_ORIGIN) \
 265         $(EXPORT_JIMAGE_FUNCS), \
 266     LDFLAGS_windows := -export:JIMAGE_Open -export:JIMAGE_Close \
 267         -export:JIMAGE_PackageToModule \
 268         -export:JIMAGE_FindResource -export:JIMAGE_GetResource \
 269         -export:JIMAGE_ResourceIterator, \
 270     LDFLAGS_SUFFIX_unix := -ljvm -ldl $(LIBCXX), \
 271     LDFLAGS_SUFFIX_linux := , \
 272     LDFLAGS_SUFFIX_solaris := -lc, \
 273     LDFLAGS_SUFFIX_aix := ,\
 274     LDFLAGS_SUFFIX_macosx := -lc++, \
 275     LDFLAGS_SUFFIX_windows := jvm.lib, \
 276     VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
 277     RC_FLAGS := $(RC_FLAGS) \
 278         -D "JDK_FNAME=jimage.dll" \
 279         -D "JDK_INTERNAL_NAME=jimage" \
 280         -D "JDK_FTYPE=0x2L", \
 281     OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjimage, \
 282     DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
 283 
 284 $(BUILD_LIBJIMAGE): $(BUILD_LIBJAVA)
 285 
 286 TARGETS += $(BUILD_LIBJIMAGE)
 287 
 288 ##########################################################################################
 289 
 290 LIBJLI_SRC_DIRS := $(call FindSrcDirsForLib, java.base, jli)
 291 
 292 LIBJLI_CFLAGS := $(CFLAGS_JDKLIB)
 293 
 294 ifeq ($(JVM_VARIANT_ZERO), true)
 295   ERGO_FAMILY := zero
 296 else
 297   ifeq ($(OPENJDK_TARGET_CPU_ARCH), x86)
 298     ERGO_FAMILY := i586
 299   else
 300     ERGO_FAMILY := $(OPENJDK_TARGET_CPU_ARCH)
 301   endif
 302 endif
 303 LIBJLI_ALL_ERGO := $(wildcard $(addsuffix /ergo_*.c, $(LIBJLI_SRC_DIRS)))
 304 LIBJLI_EXCLUDE_ERGO := $(filter-out %/ergo_$(ERGO_FAMILY).c, $(LIBJLI_ALL_ERGO))
 305 # If all specialized ergo files are excluded, use generic ergo
 306 ifeq ($(LIBJLI_ALL_ERGO), $(LIBJLI_EXCLUDE_ERGO))
 307   LIBJLI_CFLAGS += -DUSE_GENERIC_ERGO
 308 endif
 309 LIBJLI_EXCLUDE_FILES += $(notdir $(LIBJLI_EXCLUDE_ERGO))
 310 
 311 ifeq ($(OPENJDK_TARGET_OS), macosx)
 312   LIBJLI_EXCLUDE_FILES += java_md_solinux.c ergo.c ergo_i586.c
 313 
 314   BUILD_LIBJLI_java_md_macosx.c_CFLAGS := -x objective-c
 315   BUILD_LIBJLI_STATIC_java_md_macosx.c_CFLAGS := -x objective-c
 316 
 317   LIBJLI_CFLAGS += -DPACKAGE_PATH=\"$(PACKAGE_PATH)\"
 318 endif
 319 
 320 ifeq ($(OPENJDK_TARGET_OS), windows)
 321   # Staticically link with c runtime on windows.
 322   LIBJLI_CFLAGS := $(filter-out -MD, $(LIBJLI_CFLAGS))
 323   LIBJLI_OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE)
 324   # Supply the name of the C runtime lib.
 325   LIBJLI_CFLAGS += -DMSVCR_DLL_NAME='"$(notdir $(MSVCR_DLL))"'
 326   ifneq ($(MSVCP_DLL), )
 327     LIBJLI_CFLAGS += -DMSVCP_DLL_NAME='"$(notdir $(MSVCP_DLL))"'
 328   endif
 329 else
 330   LIBJLI_OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE)/jli
 331 endif
 332 
 333 LIBJLI_CFLAGS += $(addprefix -I, $(LIBJLI_SRC_DIRS))
 334 
 335 # Append defines depending on target platform
 336 LIBJLI_CFLAGS += $(OPENJDK_TARGET_CPU_JLI_CFLAGS)
 337 
 338 ifneq ($(USE_EXTERNAL_LIBZ), true)
 339   LIBJLI_CFLAGS += $(ZLIB_CPPFLAGS)
 340   LIBJLI_EXTRA_FILES += \
 341       $(addprefix $(JDK_TOPDIR)/src/java.base/share/native/libzip/zlib-1.2.8/, \
 342           inflate.c \
 343           inftrees.c \
 344           inffast.c \
 345           zadler32.c \
 346           zcrc32.c \
 347           zutil.c \
 348       )
 349 endif
 350 
 351 LIBJLI_CFLAGS += -I$(JDK_TOPDIR)/src/java.base/share/native/libjava
 352 LIBJLI_EXTRA_FILES += \
 353     $(addprefix $(JDK_TOPDIR)/src/java.base/share/native/libjava/, \
 354         jdk_strerror.c \
 355     )
 356 
 357 $(eval $(call SetupNativeCompilation,BUILD_LIBJLI, \
 358     LIBRARY := jli, \
 359     OUTPUT_DIR := $(LIBJLI_OUTPUT_DIR), \
 360     SRC := $(LIBJLI_SRC_DIRS), \
 361     EXCLUDE_FILES := $(LIBJLI_EXCLUDE_FILES), \
 362     EXTRA_FILES := $(LIBJLI_EXTRA_FILES), \
 363     OPTIMIZATION := HIGH, \
 364     CFLAGS := $(LIBJLI_CFLAGS), \
 365     DISABLED_WARNINGS_solstudio := \
 366         E_ASM_DISABLES_OPTIMIZATION \
 367         E_STATEMENT_NOT_REACHED, \
 368     MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjli/mapfile-vers, \
 369     LDFLAGS := $(LDFLAGS_JDKLIB) \
 370         $(call SET_SHARED_LIBRARY_ORIGIN), \
 371     LDFLAGS_linux := $(call SET_SHARED_LIBRARY_ORIGIN,/..), \
 372     LDFLAGS_solaris := $(call SET_SHARED_LIBRARY_ORIGIN,/..), \
 373     LDFLAGS_macosx := -framework Cocoa -framework Security -framework ApplicationServices, \
 374     LDFLAGS_SUFFIX_solaris := $(LIBZ) $(LIBDL) -lc, \
 375     LDFLAGS_SUFFIX_linux := $(LIBZ) $(LIBDL) -lc -lpthread, \
 376     LDFLAGS_SUFFIX_aix := $(LIBZ) $(LIBDL),\
 377     LDFLAGS_SUFFIX_macosx := $(LIBZ), \
 378     LDFLAGS_SUFFIX_windows := \
 379         -export:JLI_Launch \
 380         -export:JLI_ManifestIterate \
 381         -export:JLI_SetTraceLauncher \
 382         -export:JLI_ReportErrorMessage \
 383         -export:JLI_ReportErrorMessageSys \
 384         -export:JLI_ReportMessage \
 385         -export:JLI_ReportExceptionDescription \
 386         -export:JLI_MemAlloc \
 387         -export:JLI_CmdToArgs \
 388         -export:JLI_GetStdArgc \
 389         -export:JLI_GetStdArgs \
 390         -export:JLI_List_new \
 391         -export:JLI_List_add \
 392         -export:JLI_StringDup \
 393         -export:JLI_MemFree \
 394         -export:JLI_InitArgProcessing \
 395         -export:JLI_PreprocessArg \
 396         -export:JLI_GetAppArgIndex \
 397         advapi32.lib \
 398         comctl32.lib \
 399         user32.lib, \
 400     VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
 401     RC_FLAGS := $(RC_FLAGS) \
 402         -D "JDK_FNAME=jli.dll" \
 403         -D "JDK_INTERNAL_NAME=jli" \
 404         -D "JDK_FTYPE=0x2L", \
 405     OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli, \
 406     DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
 407 
 408 TARGETS += $(BUILD_LIBJLI)
 409 
 410 # On windows, the static library has the same suffix as the import library created by
 411 # with the shared library, so the static library is given a different name. No harm
 412 # in doing it for all platform to reduce complexity.
 413 ifeq ($(OPENJDK_TARGET_OS), windows)
 414   $(eval $(call SetupNativeCompilation,BUILD_LIBJLI_STATIC, \
 415       STATIC_LIBRARY := jli_static, \
 416       OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE), \
 417       SRC := $(LIBJLI_SRC_DIRS), \
 418       EXCLUDE_FILES := $(LIBJLI_EXCLUDE_FILES), \
 419       EXTRA_FILES := $(LIBJLI_EXTRA_FILES), \
 420       OPTIMIZATION := HIGH, \
 421       CFLAGS := $(STATIC_LIBRARY_FLAGS) $(LIBJLI_CFLAGS), \
 422       ARFLAGS := $(ARFLAGS), \
 423       OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static, \
 424       DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
 425 
 426   TARGETS += $(BUILD_LIBJLI_STATIC)
 427 
 428 else ifeq ($(OPENJDK_TARGET_OS), macosx)
 429   #
 430   # On macosx they do partial (incremental) linking of libjli_static.a
 431   # code it here...rather than add support to NativeCompilation
 432   # as this is first time I see it
 433   $(eval $(call SetupNativeCompilation,BUILD_LIBJLI_STATIC, \
 434       LIBRARY := jli_static, \
 435       OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE), \
 436       SRC := $(LIBJLI_SRC_DIRS), \
 437       EXCLUDE_FILES := $(LIBJLI_EXCLUDE_FILES), \
 438       EXTRA_FILES := $(LIBJLI_EXTRA_FILES), \
 439       OPTIMIZATION := HIGH, \
 440       CFLAGS := $(CFLAGS_JDKLIB) $(LIBJLI_CFLAGS), \
 441       LDFLAGS := -nostdlib -r, \
 442       OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static, \
 443       DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
 444 
 445   $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static.a: $(BUILD_LIBJLI_STATIC)
 446         $(call install-file)
 447 
 448   TARGETS += $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static.a
 449 
 450 else ifeq ($(OPENJDK_TARGET_OS), aix)
 451   # AIX also requires a static libjli because the compiler doesn't support '-rpath'
 452   $(eval $(call SetupNativeCompilation,BUILD_LIBJLI_STATIC, \
 453       STATIC_LIBRARY := jli_static, \
 454       OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE), \
 455       SRC := $(LIBJLI_SRC_DIRS), \
 456       EXCLUDE_FILES := $(LIBJLI_EXCLUDE_FILES), \
 457       EXTRA_FILES := $(LIBJLI_EXTRA_FILES), \
 458       OPTIMIZATION := HIGH, \
 459       CFLAGS := $(STATIC_LIBRARY_FLAGS) $(LIBJLI_CFLAGS), \
 460       ARFLAGS := $(ARFLAGS), \
 461       OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static))
 462 
 463   TARGETS += $(BUILD_LIBJLI_STATIC)
 464 
 465 endif
--- EOF ---