提交 e887669e 编写于 作者: C chegar

Merge

......@@ -234,3 +234,5 @@ eea685b9ccaa1980e0a7e07d6a3a84bcc7e9ab82 jdk8-b107
54e099776f08430d3a7f4feabd9f2ba886b55320 jdk8-b110
719befd87c7b96ae103c05730ca555227bfc0116 jdk8-b111
f002f5f3a16cca62e139cb8eed05ffaeb373587d jdk8-b112
5b4261b4b72af53e8e178933ef6bc6c7f8cdbc60 jdk8-b113
f26a0c8071bde1e3b923713c75156e4a58955623 jdk8-b114
#
# Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
......@@ -85,6 +85,100 @@ SCRIPT_SUFFIX =
CC_OBJECT_OUTPUT_FLAG = -o #trailing blank required!
CC_PROGRAM_OUTPUT_FLAG = -o #trailing blank required!
# The Full Debug Symbols (FDS) default for VARIANT == OPT builds is
# enabled with debug info files ZIP'ed to save space. For VARIANT !=
# OPT builds, FDS is always enabled, after all a debug build without
# debug info isn't very useful. The ZIP_DEBUGINFO_FILES option only has
# meaning when FDS is enabled.
#
# If you invoke a build with FULL_DEBUG_SYMBOLS=0, then FDS will be
# disabled for a VARIANT == OPT build.
#
# Note: Use of a different variable name for the FDS override option
# versus the FDS enabled check is intentional (FULL_DEBUG_SYMBOLS
# versus ENABLE_FULL_DEBUG_SYMBOLS). For auto build systems that pass
# in options via environment variables, use of distinct variables
# prevents strange behaviours. For example, in a VARIANT != OPT build,
# the FULL_DEBUG_SYMBOLS environment variable will be 0, but the
# ENABLE_FULL_DEBUG_SYMBOLS make variable will be 1. If the same
# variable name is used, then different values can be picked up by
# different parts of the build. Just to be clear, we only need two
# variable names because the incoming option value can be overridden
# in some situations, e.g., a VARIANT != OPT build.
ifeq ($(VARIANT), OPT)
FULL_DEBUG_SYMBOLS ?= 1
ENABLE_FULL_DEBUG_SYMBOLS = $(FULL_DEBUG_SYMBOLS)
else
# debug variants always get Full Debug Symbols (if available)
ENABLE_FULL_DEBUG_SYMBOLS = 1
endif
_JUNK_ := $(shell \
echo >&2 "INFO: ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)")
# since objcopy is optional, we set ZIP_DEBUGINFO_FILES later
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
ifeq ($(OS_NAME),darwin)
# MacOS X doesn't use OBJCOPY or STRIP_POLICY
OBJCOPY=
STRIP_POLICY=
ZIP_DEBUGINFO_FILES ?= 1
else
ifndef CROSS_COMPILE_ARCH
# Default OBJCOPY comes from GNU Binutils on Linux:
DEF_OBJCOPY=/usr/bin/objcopy
else
# Assume objcopy is part of the cross-compilation toolkit
DEF_OBJCOPY=$(COMPILER_PATH)/objcopy
endif
OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY))
ifneq ($(ALT_OBJCOPY),)
_JUNK_ := $(shell echo >&2 "INFO: ALT_OBJCOPY=$(ALT_OBJCOPY)")
# disable .debuginfo support by setting ALT_OBJCOPY to a non-existent path
OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY))
endif
# Setting ENABLE_FULL_DEBUG_SYMBOLS=1 (and OBJCOPY) above enables the
# JDK build to import .debuginfo or .diz files from the HotSpot build.
# However, adding FDS support to the JDK build will occur in phases
# so a different make variable (LIBRARY_SUPPORTS_FULL_DEBUG_SYMBOLS
# and PROGRAM_SUPPORTS_FULL_DEBUG_SYMBOLS) is used to indicate that a
# particular library or program supports FDS.
ifeq ($(OBJCOPY),)
_JUNK_ := $(shell \
echo >&2 "INFO: no objcopy cmd found so cannot create .debuginfo" \
"files. You may need to set ALT_OBJCOPY.")
ENABLE_FULL_DEBUG_SYMBOLS=0
else
_JUNK_ := $(shell \
echo >&2 "INFO: $(OBJCOPY) cmd found so will create .debuginfo files.")
# Library stripping policies for .debuginfo configs:
# all_strip - strips everything from the library
# min_strip - strips most stuff from the library; leaves
# minimum symbols
# no_strip - does not strip the library at all
#
# Oracle security policy requires "all_strip". A waiver was granted
# on 2011.09.01 that permits using "min_strip" in the Java JDK and
# Java JRE.
#
# Currently, STRIP_POLICY is only used when Full Debug Symbols
# is enabled.
STRIP_POLICY ?= min_strip
_JUNK_ := $(shell \
echo >&2 "INFO: STRIP_POLICY=$(STRIP_POLICY)")
ZIP_DEBUGINFO_FILES ?= 1
endif
endif
_JUNK_ := $(shell \
echo >&2 "INFO: ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES)")
endif
#
# Default optimization
#
......
#
# Copyright (c) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
......@@ -508,12 +508,18 @@ endef
# Convenient macros
#
# Prepare $@ target, remove old one and making sure directory exists
# Prepare $@ target, remove old one and making sure containing dir exists
define prep-target
$(MKDIR) -p $(@D)
$(RM) $@
endef
# Prepare $@ target dir, remove old one and making sure containing dir exists
define prep-target-dir
$(MKDIR) -p $(@D)
$(RM) -r $@
endef
# Simple install of $< file to $@
define install-file
$(prep-target)
......@@ -616,6 +622,26 @@ $(CP) $< $@
fi
endef
# MacOS X strongly discourages 'cp -r' and provides 'cp -R' instead.
# May need to have a MacOS X specific definition of install-import-dir
# sometime in the future.
define install-import-dir
@$(ECHO) "ASSEMBLY_IMPORT: $@"
$(prep-target-dir)
$(CP) -r $< $@
endef
ifeq ($(PLATFORM), macosx)
# On MacOS X, debug info is in .dSYM directories
define install-import-debuginfo
$(install-import-dir)
endef
else
define install-import-debuginfo
$(install-import-file)
endef
endif
define install-import-file
$(install-importonly-file)
endef
......
#
# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
......@@ -60,15 +60,24 @@ LIBJSIG_NAME = $(LIB_PREFIX)jsig.$(LIBRARY_SUFFIX)
JVMDB_NAME = $(LIB_PREFIX)jvm$(DB_SUFFIX).$(LIBRARY_SUFFIX)
JVMDTRACE_NAME = $(LIB_PREFIX)jvm$(DTRACE_SUFFIX).$(LIBRARY_SUFFIX)
JVM_DEBUGINFO_NAME = $(LIB_PREFIX)jvm.debuginfo
JVM_DIZ_NAME = $(LIB_PREFIX)jvm.diz
LIBJSIG_DEBUGINFO_NAME = $(LIB_PREFIX)jsig.debuginfo
LIBJSIG_DIZ_NAME = $(LIB_PREFIX)jsig.diz
JVMDB_DEBUGINFO_NAME = $(LIB_PREFIX)jvm$(DB_SUFFIX).debuginfo
JVMDB_DIZ_NAME = $(LIB_PREFIX)jvm$(DB_SUFFIX).diz
JVMDTRACE_DEBUGINFO_NAME = $(LIB_PREFIX)jvm$(DTRACE_SUFFIX).debuginfo
JVMDTRACE_DIZ_NAME = $(LIB_PREFIX)jvm$(DTRACE_SUFFIX).diz
ifeq ($(PLATFORM), macosx)
# Note: *.dSYM is a directory
JVM_DEBUGINFO_NAME = $(LIB_PREFIX)jvm.dSYM
LIBJSIG_DEBUGINFO_NAME = $(LIB_PREFIX)jsig.dSYM
JVMDB_DEBUGINFO_NAME = $(LIB_PREFIX)jvm$(DB_SUFFIX).dSYM
JVMDTRACE_DEBUGINFO_NAME = $(LIB_PREFIX)jvm$(DTRACE_SUFFIX).dSYM
else
JVM_DEBUGINFO_NAME = $(LIB_PREFIX)jvm.debuginfo
LIBJSIG_DEBUGINFO_NAME = $(LIB_PREFIX)jsig.debuginfo
JVMDB_DEBUGINFO_NAME = $(LIB_PREFIX)jvm$(DB_SUFFIX).debuginfo
JVMDTRACE_DEBUGINFO_NAME = $(LIB_PREFIX)jvm$(DTRACE_SUFFIX).debuginfo
endif
CLASSSHARINGDATA_DIR = $(BUILDDIR)/tools/sharing
# Needed to do file copy
......@@ -441,7 +450,7 @@ $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVM_DIZ_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVM
$(install-import-file)
else
$(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVM_DEBUGINFO_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVM_DEBUGINFO_NAME)
$(install-import-file)
$(install-import-debuginfo)
endif
endif
......@@ -459,7 +468,7 @@ $(LIB_LOCATION)/$(LIBJSIG_DIZ_NAME): $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(
$(install-import-file)
else
$(LIB_LOCATION)/$(LIBJSIG_DEBUGINFO_NAME): $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(LIBJSIG_DEBUGINFO_NAME)
$(install-import-file)
$(install-import-debuginfo)
endif
endif
......@@ -471,8 +480,8 @@ $(LIB_LOCATION)/$(SERVER_LOCATION)/$(LIBJSIG_NAME):
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
# We don't create a symlink to a libjsig.diz file, but we do put
# the libjsig.debuginfo symlink into a libjsig.diz file. The aurora
# system does not like dangling symlinks.
# the $(LIBJSIG_DEBUGINFO_NAME) symlink into a libjsig.diz file.
# The aurora system does not like dangling symlinks.
ifeq ($(ZIP_DEBUGINFO_FILES),1)
$(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_DIZ_NAME) \
$(LIB_LOCATION)/$(SERVER_LOCATION)/$(LIBJSIG_DIZ_NAME):
......@@ -496,8 +505,8 @@ $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_NAME):
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
# We don't create a symlink to a libjsig.diz file, but we do put
# the libjsig.debuginfo symlink into a libjsig.diz file. The aurora
# system does not like dangling symlinks.
# the $(LIBJSIG_DEBUGINFO_NAME) symlink into a libjsig.diz file.
# The aurora system does not like dangling symlinks.
ifeq ($(ZIP_DEBUGINFO_FILES),1)
$(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_DIZ_NAME):
@$(prep-target)
......@@ -531,10 +540,10 @@ $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDB_DIZ_NAME): $(HOTSPOT_CLIENT_PATH)/
$(install-import-file)
else
$(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDB_DEBUGINFO_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVMDB_DEBUGINFO_NAME)
$(install-import-file)
$(install-import-debuginfo)
$(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDB_DEBUGINFO_NAME): $(HOTSPOT_CLIENT_PATH)/64/$(JVMDB_DEBUGINFO_NAME)
$(install-import-file)
$(install-import-debuginfo)
endif
endif
......@@ -556,10 +565,10 @@ $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDB_DIZ_NAME): $(HOTSPOT_SERVER_PATH)/
$(install-import-file)
else
$(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDB_DEBUGINFO_NAME): $(HOTSPOT_SERVER_PATH)/$(JVMDB_DEBUGINFO_NAME)
$(install-import-file)
$(install-import-debuginfo)
$(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDB_DEBUGINFO_NAME): $(HOTSPOT_SERVER_PATH)/64/$(JVMDB_DEBUGINFO_NAME)
$(install-import-file)
$(install-import-debuginfo)
endif
endif
endif
......@@ -581,10 +590,10 @@ $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDTRACE_DIZ_NAME): $(HOTSPOT_CLIENT_PA
$(install-import-file)
else
$(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDTRACE_DEBUGINFO_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVMDTRACE_DEBUGINFO_NAME)
$(install-import-file)
$(install-import-debuginfo)
$(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDTRACE_DEBUGINFO_NAME): $(HOTSPOT_CLIENT_PATH)/64/$(JVMDTRACE_DEBUGINFO_NAME)
$(install-import-file)
$(install-import-debuginfo)
endif
endif
......@@ -613,13 +622,13 @@ $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVM_DIZ_NAME): $(HOTSPOT_SERVER_PATH)/$(JVM
$(install-import-file)
else
$(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDTRACE_DEBUGINFO_NAME): $(HOTSPOT_SERVER_PATH)/$(JVMDTRACE_DEBUGINFO_NAME)
$(install-import-file)
$(install-import-debuginfo)
$(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDTRACE_DEBUGINFO_NAME): $(HOTSPOT_SERVER_PATH)/64/$(JVMDTRACE_DEBUGINFO_NAME)
$(install-import-file)
$(install-import-debuginfo)
$(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVM_DEBUGINFO_NAME): $(HOTSPOT_SERVER_PATH)/$(JVM_DEBUGINFO_NAME)
$(install-import-file)
$(install-import-debuginfo)
endif
endif
......
......@@ -33,9 +33,7 @@ jprt.build.flavors=product,fastdebug
# Standard list of jprt build targets for this source tree
jprt.build.targets= \
solaris_sparc_5.10-{product|fastdebug}, \
solaris_sparcv9_5.10-{product|fastdebug}, \
solaris_i586_5.10-{product|fastdebug}, \
solaris_x64_5.10-{product|fastdebug}, \
linux_i586_2.6-{product|fastdebug}, \
linux_x64_2.6-{product|fastdebug}, \
......@@ -48,9 +46,7 @@ jprt.my.test.set=${jprt.test.set}
# Test target list (no fastdebug & limited c2 testing)
jprt.my.test.target.set= \
solaris_sparc_5.10-product-c1-TESTNAME, \
solaris_sparcv9_5.10-product-c2-TESTNAME, \
solaris_i586_5.10-product-c1-TESTNAME, \
solaris_x64_5.10-product-c2-TESTNAME, \
linux_i586_2.6-product-{c1|c2}-TESTNAME, \
linux_x64_2.6-product-c2-TESTNAME, \
......@@ -112,9 +108,7 @@ jprt.make.rule.all.test.targets= \
# JCK test targets in test/Makefile (no windows)
jprt.my.jck.test.target.set= \
solaris_sparc_5.10-product-c1-JCK7TESTRULE, \
solaris_sparcv9_5.10-product-c2-JCK7TESTRULE, \
solaris_i586_5.10-product-c1-JCK7TESTRULE, \
solaris_x64_5.10-product-c2-JCK7TESTRULE, \
linux_i586_2.6-product-c1-JCK7TESTRULE, \
linux_x64_2.6-product-c2-JCK7TESTRULE
......
......@@ -80,7 +80,11 @@ genclasses-only:
# to execute launchers.
+$(MAKE) -f GenerateClasses.gmk
jdk: genclasses
securityjars: genclasses securityjars-only
securityjars-only:
+$(MAKE) -f CreateSecurityJars.gmk
jdk: securityjars
# Now we have a complete jdk, which you can run.
# It is not yet wrapped up as an installed image.
......
......@@ -96,11 +96,7 @@ ifneq ($(OPENJDK_TARGET_OS), solaris)
EXCLUDES += com/oracle/security
endif
# In the old build, this isn't excluded on macosx, even though it probably
# should be.
ifneq ($(OPENJDK_TARGET_OS), macosx)
EXFILES += WrapperGenerator.java
endif
EXFILES += WrapperGenerator.java
ifneq ($(OPENJDK_TARGET_OS), windows)
# Exclude Window security related files in src/share/classes
......@@ -169,7 +165,11 @@ ifeq (, $(filter $(OPENJDK_TARGET_OS), windows macosx))
EXFILES += sun/awt/AWTCharset.java
endif
ifneq ($(OPENJDK_TARGET_OS), macosx)
ifeq ($(OPENJDK_TARGET_OS), macosx)
# exclude all X11 on Mac, we can't exclude some like below or we'll have compilation errors
EXCLUDES += sun/awt/X11
else
# TBD: figure out how to eliminate this long list
EXFILES += sun/awt/X11/ScreenFormat.java \
sun/awt/X11/XArc.java \
sun/awt/X11/XChar2b.java \
......@@ -276,6 +276,19 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
endif
# The security classes should not end up in the classes directory as that will prevent them
# from working when running the exploded jdk image. Compile them separately to a different
# directory from where the jars can be created.
SECURITY_PKGS := \
com/oracle/security/ucrypto \
com/sun/crypto/provider \
javax/crypto \
sun/security/ec \
sun/security/internal \
sun/security/mscapi \
sun/security/pkcs11 \
#
# The exception handling of swing beaninfo
# These resources violates the convention of having code and resources together under
# $(JDK_TOPDIR)/src/.../classes directories
......@@ -288,22 +301,46 @@ $(JDK_OUTPUTDIR)/classes/javax/swing/beaninfo/images/%.gif: $(JDK_TOPDIR)/make/t
# space separated list.
JDK_USER_DEFINED_FILTER := $(strip $(subst $(COMMA),$(SPACE), $(JDK_FILTER)))
$(eval $(call SetupJavaCompilation,BUILD_JDK, \
SETUP := GENERATE_JDKBYTECODE, \
SRC := $(JDK_TOPDIR)/src/share/classes \
ifeq ($(ENABLE_SJAVAC),yes)
# With sjavac enabled, excluded sources are not even considered for linking.
# Explicitly add the security sources to sourcepath for linking.
BUILD_JDK_SOURCEPATH:=$(patsubst %,-i$(SPACE)%.*,$(subst /,.,$(SECURITY_PKGS))) \
-sourcepath $(JDK_TOPDIR)/src/share/classes
endif
$(eval $(call SetupJavaCompilation,BUILD_JDK,\
SETUP:=GENERATE_JDKBYTECODE,\
SRC:=$(JDK_TOPDIR)/src/share/classes \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes \
$(MACOSX_SRC_DIRS) \
$(JDK_OUTPUTDIR)/gensrc \
$(JDK_OUTPUTDIR)/gensrc_no_srczip \
$(CLOSED_SRC_DIRS),\
INCLUDES:=$(JDK_USER_DEFINED_FILTER),\
EXCLUDES:=$(EXCLUDES) $(SECURITY_PKGS),\
EXCLUDE_FILES:=$(EXFILES),\
BIN:=$(JDK_OUTPUTDIR)/classes,\
COPY:=$(COPY_PATTERNS),\
COPY_FILES:=$(COPY_FILES),\
HEADERS:=$(JDK_OUTPUTDIR)/gensrc_headers,\
ADD_JAVAC_FLAGS:=$(BUILD_JDK_SOURCEPATH)))
##########################################################################################
$(eval $(call SetupJavaCompilation,BUILD_SECURITY, \
SETUP := GENERATE_JDKBYTECODE, \
SRC := $(JDK_TOPDIR)/src/share/classes \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes \
$(MACOSX_SRC_DIRS) \
$(CLOSED_SRC_DIRS), \
INCLUDES := $(JDK_USER_DEFINED_FILTER), \
INCLUDES := $(SECURITY_PKGS), \
EXCLUDES := $(EXCLUDES), \
EXCLUDE_FILES := $(EXFILES), \
BIN := $(JDK_OUTPUTDIR)/classes, \
COPY := $(COPY_PATTERNS), \
COPY_FILES := $(COPY_FILES), \
BIN := $(JDK_OUTPUTDIR)/classes_security, \
HEADERS := $(JDK_OUTPUTDIR)/gensrc_headers))
$(BUILD_SECURITY): $(BUILD_JDK)
##########################################################################################
$(JDK_OUTPUTDIR)/classes/META-INF/services/com.sun.tools.xjc.Plugin:
......@@ -350,7 +387,7 @@ endif
##########################################################################################
all: $(BUILD_JDK) $(COPY_EXTRA) \
all: $(BUILD_JDK) $(BUILD_SECURITY) $(COPY_EXTRA) \
$(JDK_OUTPUTDIR)/classes/META-INF/services/com.sun.tools.xjc.Plugin \
$(BUILD_ACCESSBRIDGE_32) $(BUILD_ACCESSBRIDGE_64) \
$(BUILD_ACCESSBRIDGE_LEGACY)
......
......@@ -574,9 +574,7 @@ ifeq ($(OPENJDK_TARGET_OS), linux)
BUILD_LAUNCHERS += $(JAVA_RMI_CGI)
endif
ifeq ($(OPENJDK_TARGET_OS), solaris)
ifeq ($(OPENJDK_TARGET_CPU_BITS), 32)
BUILD_LAUNCHERS += $(JAVA_RMI_CGI)
endif
endif
# TODO:
......
......@@ -56,9 +56,7 @@ BUILD_LIBRARIES =
# Absolute paths to lib files on windows for use in LDFLAGS. Should figure out a more
# elegant solution to this.
WIN_VERIFY_LIB := $(JDK_OUTPUTDIR)/objs/libverify/verify.lib
WIN_JAVA_LIB := $(JDK_OUTPUTDIR)/objs/libjava/java.lib
WIN_AWT_LIB := $(JDK_OUTPUTDIR)/objs/libawt/awt.lib
# Use this variable to set DEBUG_SYMBOLS true on windows for all libraries, but
# not on other platforms.
......@@ -71,3321 +69,23 @@ ifdef OPENJDK
DEBUG_ALL_BINARIES := true
endif
#
# TODO replace with X_FLAGS / X_LIBS
# and add them to configure
#
OPENWIN_LIB := $(OPENWIN_HOME)/lib
##########################################################################################
BUILD_LIBFDLIBM_OPTIMIZATION := HIGH
ifneq ($(OPENJDK_TARGET_OS), solaris)
BUILD_LIBFDLIBM_OPTIMIZATION := NONE
endif
ifneq ($(OPENJDK_TARGET_OS), macosx)
$(eval $(call SetupNativeCompilation,BUILD_LIBFDLIBM, \
STATIC_LIBRARY := fdlibm, \
OUTPUT_DIR := $(JDK_OUTPUTDIR)/objs, \
SRC := $(JDK_TOPDIR)/src/share/native/java/lang/fdlibm/src, \
LANG := C, \
OPTIMIZATION := $(BUILD_LIBFDLIBM_OPTIMIZATION), \
CFLAGS := $(CFLAGS_JDKLIB) \
-I$(JDK_TOPDIR)/src/share/native/java/lang/fdlibm/include, \
CFLAGS_windows_debug := -DLOGGING, \
ARFLAGS := $(ARFLAGS), \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libfdlibm, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
else
# On macosx the old build does partial (incremental) linking of fdlibm instead of
# a plain static library.
$(eval $(call SetupNativeCompilation,BUILD_LIBFDLIBM_MAC, \
LIBRARY := fdlibm, \
OUTPUT_DIR := $(JDK_OUTPUTDIR)/objs/libfdlibm, \
SRC := $(JDK_TOPDIR)/src/share/native/java/lang/fdlibm/src, \
LANG := C, \
CFLAGS := $(CFLAGS_JDKLIB) \
-I$(JDK_TOPDIR)/src/share/native/java/lang/fdlibm/include, \
LDFLAGS := -nostdlib -r -arch x86_64, \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libfdlibm, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
BUILD_LIBFDLIBM := $(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)fdlibm$(STATIC_LIBRARY_SUFFIX)
$(BUILD_LIBFDLIBM): $(BUILD_LIBFDLIBM_MAC)
$(call install-file)
endif
BUILD_LIBRARIES += $(BUILD_LIBFDLIBM)
##########################################################################################
BUILD_LIBVERIFY_SRC := check_code.c check_format.c
ifeq ($(OPENJDK_TARGET_OS), solaris)
ifneq ($(OPENJDK_TARGET_CPU), x86_64)
BUILD_LIBVERIFY_REORDER := $(JDK_TOPDIR)/makefiles/mapfiles/libverify/reorder-$(OPENJDK_TARGET_CPU)
endif
endif
LIBVERIFY_OPTIMIZATION := HIGH
ifneq ($(findstring $(OPENJDK_TARGET_OS), solaris linux), )
ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
LIBVERIFY_OPTIMIZATION := LOW
endif
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBVERIFY, \
LIBRARY := verify, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/share/native/common, \
INCLUDE_FILES := $(BUILD_LIBVERIFY_SRC), \
LANG := C, \
OPTIMIZATION := $(LIBVERIFY_OPTIMIZATION), \
CFLAGS := $(CFLAGS_JDKLIB), \
MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libverify/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX_posix := -ljvm -lc, \
LDFLAGS_SUFFIX_windows := jvm.lib, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=verify.dll" \
-D "JDK_INTERNAL_NAME=verify" \
-D "JDK_FTYPE=0x2L", \
REORDER := $(BUILD_LIBVERIFY_REORDER), \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libverify, \
DEBUG_SYMBOLS := true))
BUILD_LIBRARIES += $(BUILD_LIBVERIFY)
##########################################################################################
LIBJAVA_SRC_DIRS := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/lang \
$(JDK_TOPDIR)/src/share/native/java/lang \
$(JDK_TOPDIR)/src/share/native/java/lang/ref \
$(JDK_TOPDIR)/src/share/native/java/lang/reflect \
$(JDK_TOPDIR)/src/share/native/java/io \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/io \
$(JDK_TOPDIR)/src/share/native/java/nio \
$(JDK_TOPDIR)/src/share/native/java/security \
$(JDK_TOPDIR)/src/share/native/common \
$(JDK_TOPDIR)/src/share/native/sun/misc \
$(JDK_TOPDIR)/src/share/native/sun/reflect \
$(JDK_TOPDIR)/src/share/native/java/util \
$(JDK_TOPDIR)/src/share/native/java/util/concurrent/atomic \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/common \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/util
ifneq ($(OPENJDK_TARGET_OS), macosx)
LIBJAVA_SRC_DIRS += $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/util/locale/provider
else
LIBJAVA_SRC_DIRS += $(JDK_TOPDIR)/src/macosx/native/sun/util/locale/provider
endif
ifeq ($(OPENJDK_TARGET_OS), windows)
LIBJAVA_SRC_DIRS += $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/provider \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/io
endif
LIBJAVA_CFLAGS := $(foreach dir, $(LIBJAVA_SRC_DIRS), -I$(dir)) \
-I$(JDK_TOPDIR)/src/share/native/java/lang/fdlibm/include \
-DARCHPROPNAME='"$(OPENJDK_TARGET_CPU_OSARCH)"'
LIBJAVA_CFLAGS += -DJDK_MAJOR_VERSION='"$(JDK_MAJOR_VERSION)"' \
-DJDK_MINOR_VERSION='"$(JDK_MINOR_VERSION)"' \
-DJDK_MICRO_VERSION='"$(JDK_MICRO_VERSION)"' \
-DJDK_BUILD_NUMBER='"$(JDK_BUILD_NUMBER)"'
ifneq (, $(JDK_UPDATE_VERSION))
LIBJAVA_CFLAGS += -DJDK_UPDATE_VERSION='"$(JDK_UPDATE_VERSION)"'
endif
LIBJAVA_EXCLUDE_FILES := check_code.c check_format.c jspawnhelper.c
ifneq ($(OPENJDK_TARGET_OS), macosx)
LIBJAVA_EXCLUDE_FILES += java_props_macosx.c
else
BUILD_LIBJAVA_java_props_md.c_CFLAGS := -x objective-c
BUILD_LIBJAVA_java_props_macosx.c_CFLAGS := -x objective-c
endif
ifeq ($(OPENJDK_TARGET_OS), windows)
LIBJAVA_EXCLUDE_FILES += \
UNIXProcess_md.c \
UnixFileSystem_md.c \
FileSystemPreferences.c
else
LIBJAVA_EXCLUDE_FILES += \
ProcessImpl_md.c \
WinNTFileSystem_md.c \
dirent_md.c \
WindowsPreferences.c \
sun/security/provider/WinCAPISeedGenerator.c \
sun/io/Win32ErrorMode.c
endif
ifeq ($(OPENJDK_TARGET_OS), solaris)
ifneq ($(OPENJDK_TARGET_CPU), x86_64)
LIBJAVA_REORDER := $(JDK_TOPDIR)/makefiles/mapfiles/libjava/reorder-$(OPENJDK_TARGET_CPU)
endif
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBJAVA, \
LIBRARY := java, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBJAVA_SRC_DIRS), \
EXCLUDES := fdlibm/src zip, \
EXCLUDE_FILES := $(LIBJAVA_EXCLUDE_FILES), \
LANG := C, \
OPTIMIZATION := HIGH, \
CFLAGS := $(CFLAGS_JDKLIB) \
$(LIBJAVA_CFLAGS), \
MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libjava/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX_posix := -ljvm -lverify, \
LDFLAGS_SUFFIX_solaris := -lsocket -lnsl -lscf $(LIBDL) $(BUILD_LIBFDLIBM) -lc, \
LDFLAGS_SUFFIX_linux := $(LIBDL) $(BUILD_LIBFDLIBM), \
LDFLAGS_SUFFIX_macosx := -L$(JDK_OUTPUTDIR)/objs/ -lfdlibm \
-framework CoreFoundation \
-framework Foundation \
-framework Security -framework SystemConfiguration, \
LDFLAGS_SUFFIX_windows := -export:winFileHandleOpen -export:handleLseek \
jvm.lib $(BUILD_LIBFDLIBM) $(WIN_VERIFY_LIB) \
shell32.lib delayimp.lib -DELAYLOAD:shell32.dll \
advapi32.lib, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=java.dll" \
-D "JDK_INTERNAL_NAME=java" \
-D "JDK_FTYPE=0x2L", \
REORDER := $(LIBJAVA_REORDER), \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjava, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
BUILD_LIBRARIES += $(BUILD_LIBJAVA)
$(BUILD_LIBJAVA): $(LIBJLI_BINARY)
$(BUILD_LIBJAVA): $(BUILD_LIBVERIFY)
$(BUILD_LIBJAVA): $(BUILD_LIBFDLIBM)
##########################################################################################
BUILD_LIBMLIB_SRC := $(JDK_TOPDIR)/src/share/native/sun/awt/medialib
BUILD_LIBMLIB_CFLAGS := -D__USE_J2D_NAMES -D__MEDIALIB_OLD_NAMES \
-I$(BUILD_LIBMLIB_SRC) \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/awt/medialib
BUILD_LIBMLIB_LDLIBS :=
BUILD_LIBMLIB_IMAGE_MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libmlib_image/mapfile-vers
BUILD_LIBMLIB_CFLAGS += -DMLIB_NO_LIBSUNMATH
ifeq ($(OPENJDK_TARGET_CPU_BITS), 64)
BUILD_LIBMLIB_CFLAGS += -DMLIB_OS64BIT
endif
ifneq ($(OPENJDK_TARGET_OS), windows)
BUILD_LIBMLIB_LDLIBS += $(LIBM) $(LIBDL)
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBMLIB_IMAGE, \
LIBRARY := mlib_image, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(BUILD_LIBMLIB_SRC), \
EXCLUDE_FILES := awt_ImagingLib.c mlib_c_ImageBlendTable.c, \
LANG := C, \
OPTIMIZATION := HIGHEST, \
CFLAGS := $(CFLAGS_JDKLIB) \
$(BUILD_LIBMLIB_CFLAGS), \
MAPFILE := $(BUILD_LIBMLIB_IMAGE_MAPFILE), \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX := $(BUILD_LIBMLIB_LDLIBS) \
$(LDFLAGS_JDKLIB_SUFFIX), \
LDFLAGS_SUFFIX_solaris := -lc, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=mlib_image.dll" \
-D "JDK_INTERNAL_NAME=mlib_image" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libmlib_image, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBMLIB_IMAGE): $(BUILD_LIBJAVA)
BUILD_LIBRARIES += $(BUILD_LIBMLIB_IMAGE)
##########################################################################################
ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_ARCH), solaris-sparc)
BUILD_LIBMLIB_IMAGE_V_FILES := \
mlib_v_ImageLookUp.c \
mlib_ImageCreate.c \
mlib_ImageAffine.c \
mlib_ImageConvMxN.c \
mlib_ImageConvKernelConvert.c \
mlib_sys.c \
mlib_ImageLookUp_64.c \
mlib_ImageLookUp_Bit.c \
mlib_ImageColorTrue2Index.c \
mlib_c_ImageThresh1_U8.c \
mlib_v_ImageLookUpS16S16Func.c \
mlib_v_ImageLookUpS16S32Func.c \
mlib_v_ImageLookUpS16U16Func.c \
mlib_v_ImageLookUpS16U8Func.c \
mlib_v_ImageLookUpS32S16Func.c \
mlib_v_ImageLookUpS32S32Func.c \
mlib_v_ImageLookUpS32U16Func.c \
mlib_v_ImageLookUpS32U8Func.c \
mlib_v_ImageLookUpSIS16S16Func.c \
mlib_v_ImageLookUpSIS16S32Func.c \
mlib_v_ImageLookUpSIS16U16Func.c \
mlib_v_ImageLookUpSIS16U8Func.c \
mlib_v_ImageLookUpSIS32S16Func.c \
mlib_v_ImageLookUpSIS32S32Func.c \
mlib_v_ImageLookUpSIS32U16Func.c \
mlib_v_ImageLookUpSIS32U8Func.c \
mlib_v_ImageLookUpSIU16S16Func.c \
mlib_v_ImageLookUpSIU16S32Func.c \
mlib_v_ImageLookUpSIU16U16Func.c \
mlib_v_ImageLookUpSIU16U8Func.c \
mlib_v_ImageLookUpSIU8S16Func.c \
mlib_v_ImageLookUpSIU8S32Func.c \
mlib_v_ImageLookUpSIU8U16Func.c \
mlib_v_ImageLookUpSIU8U8Func.c \
mlib_v_ImageLookUpU16S16Func.c \
mlib_v_ImageLookUpU16S32Func.c \
mlib_v_ImageLookUpU16U16Func.c \
mlib_v_ImageLookUpU16U8Func.c \
mlib_v_ImageLookUpU8S16Func.c \
mlib_v_ImageLookUpU8S32Func.c \
mlib_v_ImageLookUpU8U16Func.c \
mlib_v_ImageLookUpU8U8Func.c \
mlib_v_ImageAffineIndex_BC.c \
mlib_v_ImageAffine_BC.c \
mlib_v_ImageAffine_BC_S16.c \
mlib_v_ImageAffine_BC_U16.c \
mlib_v_ImageAffine_BL.c \
mlib_v_ImageAffine_BL_S16.c \
mlib_v_ImageAffine_BL_U16.c \
mlib_v_ImageAffine_NN.c \
mlib_v_ImageFilters.c \
mlib_ImageAffineEdge.c \
mlib_ImageAffine_BC_D64.c \
mlib_ImageAffine_BC_F32.c \
mlib_ImageAffine_BC_S32.c \
mlib_ImageAffine_BL_D64.c \
mlib_ImageAffine_BL_F32.c \
mlib_ImageAffine_BL_S32.c \
mlib_ImageAffine_NN.c \
mlib_ImageAffine_NN_Bit.c \
mlib_ImageFilters.c \
mlib_ImageScanPoly.c \
mlib_ImageConv_8nw.c \
mlib_ImageConv_8ext.c \
mlib_ImageConv_16nw.c \
mlib_ImageConv_16ext.c \
mlib_ImageConv_u16nw.c \
mlib_ImageConv_u16ext.c \
mlib_ImageConv_32nw.c \
mlib_ImageConv_F32nw.c \
mlib_ImageConvMxN_Fp.c \
mlib_ImageConvMxN_ext.c \
mlib_ImageConv_D64nw.c \
mlib_ImageClipping.c \
mlib_ImageConvCopyEdge_Bit.c \
mlib_ImageConvClearEdge_Bit.c \
mlib_ImageConv2x2_f.c \
mlib_ImageConvClearEdge_Fp.c \
mlib_v_ImageConvMxN_8.c \
mlib_v_ImageConvClearEdge.c \
mlib_v_ImageConvCopyEdge.c \
mlib_v_ImageConvMxN_8ext.c \
mlib_v_ImageConvVersion.c \
mlib_v_ImageConv_8nw.c \
mlib_ImageConvCopyEdge_Fp.c \
mlib_v_ImageChannelInsert_1.c \
mlib_v_ImageChannelExtract_43.c \
mlib_v_ImageChannelExtract_1.c \
mlib_ImageCopy_Bit.c \
mlib_v_ImageCopy_f.c \
mlib_ImageUtils.c \
mlib_ImageDivTables.c
BUILD_LIBMLIB_V_CFLAGS := $(filter-out -DMLIB_NO_LIBSUNMATH, $(BUILD_LIBMLIB_CFLAGS))
$(eval $(call SetupNativeCompilation,BUILD_LIBMLIB_IMAGE_V, \
LIBRARY := mlib_image_v, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/share/native/sun/awt/medialib \
$(JDK_TOPDIR)/src/solaris/native/sun/awt/medialib, \
LANG := C, \
INCLUDE_FILES := $(BUILD_LIBMLIB_IMAGE_V_FILES), \
OPTIMIZATION := HIGHEST, \
CFLAGS := -xarch=sparcvis \
$(JDK_TOPDIR)/src/solaris/native/sun/awt/medialib/vis_$(OPENJDK_TARGET_CPU_BITS).il \
$(BUILD_LIBMLIB_V_CFLAGS) \
$(CFLAGS_JDKLIB), \
MAPFILE := $(BUILD_LIBMLIB_IMAGE_MAPFILE), \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(BUILD_LIBMLIB_LDLIBS) -ljava -ljvm \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX_solaris := -lc, \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libmlib_image_v, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBMLIB_IMAGE_V): $(BUILD_LIBJAVA)
BUILD_LIBRARIES += $(BUILD_LIBMLIB_IMAGE_V)
endif
##########################################################################################
LIBAWT_DIRS := \
$(JDK_TOPDIR)/src/share/native/sun/awt \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/awt \
$(JDK_TOPDIR)/src/share/native/sun/awt/image \
$(JDK_TOPDIR)/src/share/native/sun/awt/image/gif \
$(JDK_TOPDIR)/src/share/native/sun/awt/image/cvutils \
$(JDK_TOPDIR)/src/share/native/sun/awt/medialib \
$(JDK_TOPDIR)/src/share/native/sun/awt/debug \
$(JDK_TOPDIR)/src/share/native/sun/awt/utility \
$(JDK_TOPDIR)/src/share/native/sun/java2d \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d \
$(JDK_TOPDIR)/src/share/native/sun/java2d/loops \
$(JDK_TOPDIR)/src/share/native/sun/java2d/pipe \
$(JDK_TOPDIR)/src/share/native/sun/awt/image \
$(JDK_TOPDIR)/src/share/native/sun/java2d/opengl \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d/opengl \
$(JDK_TOPDIR)/src/share/native/sun/font
ifeq ($(OPENJDK_TARGET_OS), windows)
LIBAWT_DIRS += \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/windows \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d/windows \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d/d3d
else
LIBAWT_DIRS += \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d/x11
endif
LIBAWT_CFLAGS += -D__MEDIALIB_OLD_NAMES -D__USE_J2D_NAMES \
$(X_CFLAGS) \
$(foreach dir, $(LIBAWT_DIRS), -I$(dir))
LIBAWT_FILES := \
gifdecoder.c \
imageInitIDs.c \
img_globals.c \
SurfaceData.c \
Region.c \
BufImgSurfaceData.c \
Disposer.c \
Trace.c \
GraphicsPrimitiveMgr.c \
Blit.c \
BlitBg.c \
ScaledBlit.c \
FillRect.c \
FillSpans.c \
FillParallelogram.c \
DrawParallelogram.c \
DrawLine.c \
DrawRect.c \
DrawPolygons.c \
DrawPath.c \
FillPath.c \
ProcessPath.c \
MaskBlit.c \
MaskFill.c \
TransformHelper.c \
AlphaMath.c \
AlphaMacros.c \
AnyByte.c \
ByteBinary1Bit.c \
ByteBinary2Bit.c \
ByteBinary4Bit.c \
ByteIndexed.c \
ByteGray.c \
Index8Gray.c \
Index12Gray.c \
AnyShort.c \
Ushort555Rgb.c \
Ushort565Rgb.c \
Ushort4444Argb.c \
Ushort555Rgbx.c \
UshortGray.c \
UshortIndexed.c \
Any3Byte.c \
ThreeByteBgr.c \
AnyInt.c \
IntArgb.c \
IntArgbPre.c \
IntArgbBm.c \
IntRgb.c \
IntBgr.c \
IntRgbx.c \
Any4Byte.c \
FourByteAbgr.c \
FourByteAbgrPre.c \
BufferedMaskBlit.c \
BufferedRenderPipe.c \
ShapeSpanIterator.c \
SpanClipRenderer.c \
awt_ImageRep.c \
awt_ImagingLib.c \
awt_Mlib.c \
awt_parseImage.c \
DataBufferNative.c \
dither.c \
debug_assert.c \
debug_mem.c \
debug_trace.c \
debug_util.c
ifneq (, $(filter $(OPENJDK_TARGET_OS), solaris linux))
LIBAWT_FILES += awt_LoadLibrary.c initIDs.c img_colors.c
endif
ifeq ($(OPENJDK_TARGET_OS), macosx)
LIBAWT_FILES += awt_LoadLibrary.c img_colors.c
LIBAWT_CFLAGS += -F/System/Library/Frameworks/JavaVM.framework/Frameworks
endif
ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_ARCH), solaris-sparc)
LIBAWT_CFLAGS += -DMLIB_ADD_SUFF
LIBAWT_CFLAGS += -xarch=sparcvis
LIBAWT_CFLAGS += $(JDK_TOPDIR)/src/solaris/native/sun/awt/medialib/vis_$(OPENJDK_TARGET_CPU_BITS).il
LIBAWT_CFLAGS += \
-I$(JDK_TOPDIR)/src/solaris/native/sun/awt/medialib \
-I$(JDK_TOPDIR)/src/solaris/native/sun/java2d/medialib \
-I$(JDK_TOPDIR)/src/solaris/native/sun/java2d/loops
LIBAWT_DIRS += $(JDK_TOPDIR)/src/solaris/native/sun/awt/medialib \
$(JDK_TOPDIR)/src/solaris/native/sun/java2d/loops
LIBAWT_FILES += \
vis_FuncArray.c \
java2d_Mlib.c \
mlib_ImageCreate.c \
mlib_ImageZoom_NN.c \
mlib_ImageCopy_Bit.c \
mlib_sys.c \
mlib_v_ImageClear.c \
mlib_v_ImageClear_f.c \
mlib_v_ImageConstXor.c \
mlib_v_ImageCopy.c \
mlib_v_ImageCopy_f.c \
mlib_v_ImageXor.c \
mlib_v_ImageZoom_NN_f.c \
vis_Interp.c \
vis_AlphaMacros.c \
vis_AlphaMaskBlit.c \
vis_AlphaMaskFill.c \
vis_ByteGray.c \
vis_ByteGray_FromRgb.c \
vis_ByteGray_Mask.c \
vis_ByteIndexed.c \
vis_DrawLine.c \
vis_FourByteAbgr.c \
vis_IntArgb.c \
vis_IntArgbPre.c \
vis_IntArgbPre_Mask.c \
vis_IntBgr.c \
vis_IntRgb.c \
vis_IntRgbx.c \
vis_SrcMaskFill.c \
vis_SrcOverMaskBlit.c \
vis_SrcOverMaskFill.c \
vis_FourByteAbgrPre.c \
vis_GlyphList.c \
vis_GlyphListXor.c \
vis_IntArgbBm.c \
vis_ThreeByteBgr.c \
vis_UshortGray.c \
vis_UshortGray_FromRgb.c \
vis_XorBlit.c \
mlib_v_ImageCopy_blk.s
ifeq ($(OPENJDK_TARGET_CPU), sparcv9)
LIBAWT_ASFLAGS = -P -xarch=v9a
else
LIBAWT_ASFLAGS = -P -xarch=v8plusa
endif
else
LIBAWT_FILES += MapAccelFunc.c
endif
ifneq ($(OPENJDK_TARGET_OS), solaris)
LIBAWT_CFLAGS += -DMLIB_NO_LIBSUNMATH
endif
LIBAWT_LANG := C
ifeq ($(OPENJDK_TARGET_OS), windows)
LIBAWT_FILES += AccelGlyphCache.c \
ShaderList.c \
CmdIDList.cpp \
Hashtable.cpp \
GDIHashtable.cpp \
Devices.cpp \
ObjectList.cpp \
GDIBlitLoops.cpp \
GDIRenderer.cpp \
GDIWindowSurfaceData.cpp \
WindowsFlags.cpp \
WPrinterJob.cpp \
awt_%.cpp \
D3DBlitLoops.cpp \
D3DBufImgOps.cpp \
D3DContext.cpp \
D3DGlyphCache.cpp \
D3DGraphicsDevice.cpp \
D3DMaskBlit.cpp \
D3DMaskCache.cpp \
D3DMaskFill.cpp \
D3DPipelineManager.cpp \
D3DPaints.cpp \
D3DRenderer.cpp \
D3DRenderQueue.cpp \
D3DResourceManager.cpp \
D3DSurfaceData.cpp \
D3DTextRenderer.cpp \
D3DVertexCacher.cpp \
ShellFolder2.cpp \
ThemeReader.cpp \
ComCtl32Util.cpp \
DllUtil.cpp \
initIDs.cpp \
MouseInfo.cpp \
rect.c \
OGLBlitLoops.c \
OGLBufImgOps.c \
OGLContext.c \
OGLFuncs.c \
OGLMaskBlit.c \
OGLMaskFill.c \
OGLPaints.c \
OGLRenderQueue.c \
OGLRenderer.c \
OGLSurfaceData.c \
OGLTextRenderer.c \
OGLVertexCache.c \
WGLGraphicsConfig.c \
WGLSurfaceData.c
LIBAWT_LANG := C++
LIBAWT_CFLAGS += -EHsc -DUNICODE -D_UNICODE
ifeq ($(OPENJDK_TARGET_CPU_BITS), 64)
LIBAWT_CFLAGS += -DMLIB_OS64BIT
endif
ifdef OPENJDK
LIBAWT_RC_FLAGS := -i "$(JDK_TOPDIR)/src/windows/resource/icons"
else
LIBAWT_RC_FLAGS := -i "$(JDK_TOPDIR)/src/closed/windows/native/sun/windows"
endif
LIBAWT_VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/native/sun/windows/awt.rc
endif
ifeq ($(MILESTONE), internal)
LIBAWT_CFLAGS += -DINTERNAL_BUILD
endif
LIBAWT_MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libawt/mapfile-vers
ifeq ($(OPENJDK_TARGET_OS), linux)
LIBAWT_MAPFILE :=
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBAWT, \
LIBRARY := awt, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBAWT_DIRS), \
INCLUDE_FILES := $(LIBAWT_FILES), \
LANG := $(LIBAWT_LANG), \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) $(LIBAWT_CFLAGS), \
ASFLAGS := $(LIBAWT_ASFLAGS), \
MAPFILE := $(LIBAWT_MAPFILE), \
LDFLAGS := $(LDFLAGS_JDKLIB) $(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_solaris := -R/usr/dt/lib$(OPENJDK_TARGET_CPU_ISADIR) -R$(OPENWIN_LIB)$(OPENJDK_TARGET_CPU_ISADIR), \
LDFLAGS_SUFFIX_linux := -ljvm $(LIBM) $(LIBDL) -ljava, \
LDFLAGS_SUFFIX_solaris := -ljvm $(LIBM) $(LIBDL) -ljava -lc, \
LDFLAGS_SUFFIX_macosx := -lmlib_image -ljvm $(LIBM) \
-framework Cocoa \
-framework OpenGL \
-F/System/Library/Frameworks/JavaVM.framework/Frameworks \
-framework JavaNativeFoundation \
-framework JavaRuntimeSupport \
-framework ApplicationServices \
-framework AudioToolbox \
-ljava, \
LDFLAGS_SUFFIX_windows := kernel32.lib user32.lib gdi32.lib winspool.lib \
imm32.lib ole32.lib uuid.lib shell32.lib \
comdlg32.lib winmm.lib comctl32.lib shlwapi.lib \
delayimp.lib jvm.lib $(WIN_JAVA_LIB) advapi32.lib \
-DELAYLOAD:user32.dll -DELAYLOAD:gdi32.dll \
-DELAYLOAD:shell32.dll -DELAYLOAD:winmm.dll \
-DELAYLOAD:winspool.drv -DELAYLOAD:imm32.dll \
-DELAYLOAD:ole32.dll -DELAYLOAD:comdlg32.dll \
-DELAYLOAD:comctl32.dll -DELAYLOAD:shlwapi.dll, \
VERSIONINFO_RESOURCE := $(LIBAWT_VERSIONINFO_RESOURCE), \
RC_FLAGS := $(RC_FLAGS) $(LIBAWT_RC_FLAGS) \
-D "JDK_FNAME=awt.dll" \
-D "JDK_INTERNAL_NAME=awt" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libawt, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBAWT): $(BUILD_LIBJAVA)
ifeq ($(OPENJDK_TARGET_OS), macosx)
$(BUILD_LIBAWT): $(BUILD_LIBMLIB_IMAGE)
endif
BUILD_LIBRARIES += $(BUILD_LIBAWT)
##########################################################################################
# TODO!!
# Even though this variable as a general name, it is
# only used on macos, in fontpath.c, as prefix for where to find fonts.
#
# It's used for libawt_headless _and_ libawt_xawt
#
X11_PATH := /usr/X11R6
ifneq ($(OPENJDK_TARGET_OS), windows)
ifndef BUILD_HEADLESS_ONLY
LIBAWT_XAWT_DIRS := \
$(JDK_TOPDIR)/src/share/native/sun/awt/debug \
$(JDK_TOPDIR)/src/share/native/sun/awt/utility \
$(JDK_TOPDIR)/src/share/native/sun/font \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/font \
$(JDK_TOPDIR)/src/share/native/sun/java2d/opengl \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/awt \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d/opengl \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d/x11 \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/xawt \
LIBAWT_XAWT_CFLAGS := -DXAWT -DXAWT_HACK \
-DX11_PATH=\"$(X11_PATH)\" -DPACKAGE_PATH=\"$(PACKAGE_PATH)\" \
$(CUPS_CFLAGS) \
$(foreach dir, $(LIBAWT_XAWT_DIRS), -I$(dir)) \
-I$(JDK_TOPDIR)/src/share/native/sun/java2d \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d \
-I$(JDK_TOPDIR)/src/share/native/sun/java2d/loops \
-I$(JDK_TOPDIR)/src/share/native/sun/java2d/pipe \
-I$(JDK_TOPDIR)/src/share/native/sun/awt/image \
-I$(JDK_TOPDIR)/src/share/native/sun/awt/image/cvutils \
-I$(JDK_TOPDIR)/src/share/native/sun/awt/debug \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/jdga
ifeq ($(OPENJDK_TARGET_OS), solaris)
LIBAWT_XAWT_CFLAGS += -DFUNCPROTO=15
endif
ifeq ($(OPENJDK_TARGET_OS), linux)
ifndef OPENJDK
include $(JDK_TOPDIR)/make/closed/xawt.gmk
endif
ifeq ($(DISABLE_XRENDER), true)
LIBAWT_XAWT_CFLAGS += -DDISABLE_XRENDER_BY_DEFAULT=true
endif
endif
ifeq ($(MILESTONE), internal)
LIBAWT_XAWT_CFLAGS += -DINTERNAL_BUILD
endif
LIBAWT_XAWT_FILES := \
XlibWrapper.c \
XWindow.c \
XToolkit.c \
X11Color.c \
X11SurfaceData.c \
awt_GraphicsEnv.c \
awt_InputMethod.c \
robot_common.c \
awt_Robot.c \
list.c \
multiVis.c \
initIDs.c \
awt_util.c \
awt_Desktop.c \
awt_UNIXToolkit.c \
X11FontScaler_md.c \
X11TextRenderer_md.c \
fontpath.c \
awt_Insets.c \
awt_Event.c \
X11Renderer.c \
X11PMBlitLoops.c \
OGLBlitLoops.c \
OGLBufImgOps.c \
OGLContext.c \
OGLFuncs.c \
OGLMaskBlit.c \
OGLMaskFill.c \
OGLPaints.c \
OGLRenderQueue.c \
OGLRenderer.c \
OGLSurfaceData.c \
OGLTextRenderer.c \
OGLVertexCache.c \
GLXGraphicsConfig.c \
GLXSurfaceData.c \
AccelGlyphCache.c \
awt_Font.c \
multi_font.c \
awt_AWTEvent.c \
awt_DrawingSurface.c \
jawt.c \
CUPSfuncs.c \
debug_assert.c \
debug_mem.c \
debug_trace.c \
debug_util.c \
awt_Plugin.c \
gnome_interface.c \
gtk2_interface.c \
swing_GTKEngine.c \
swing_GTKStyle.c \
rect.c \
sun_awt_X11_GtkFileDialogPeer.c \
XRSurfaceData.c \
XRBackendNative.c
LIBAWT_XAWT_LDFLAGS_SUFFIX := $(LIBM) -lawt -lXext -lX11 -lXrender $(LIBDL) -lXtst -lXi -ljava -ljvm -lc
ifeq ($(OPENJDK_TARGET_OS), linux)
# To match old build, add this to LDFLAGS instead of suffix.
LIBAWT_XAWT_LDFLAGS += -lpthread
endif
ifeq ($(OPENJDK_TARGET_OS), macosx)
LIBAWT_XAWT_LDFLAGS_SUFFIX += -lpthread
endif
# On macosx, the shared library origin is set twice for this lib.
$(eval $(call SetupNativeCompilation,BUILD_LIBAWT_XAWT, \
LIBRARY := awt_xawt, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBAWT_XAWT_DIRS), \
INCLUDE_FILES := $(LIBAWT_XAWT_FILES), \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) $(LIBAWT_XAWT_CFLAGS) \
$(X_CFLAGS), \
MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libawt_xawt/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(X_LIBS) $(LIBAWT_XAWT_LDFLAGS), \
LDFLAGS_linux := $(call SET_SHARED_LIBRARY_ORIGIN) \
$(call SET_SHARED_LIBRARY_ORIGIN,/..), \
LDFLAGS_solaris := -L$(OPENWIN_HOME)/sfw/lib$(OPENJDK_TARGET_CPU_ISADIR) \
-L$(OPENWIN_LIB)$(OPENJDK_TARGET_CPU_ISADIR) \
-R$(OPENWIN_HOME)/sfw/lib$(OPENJDK_TARGET_CPU_ISADIR) \
-R$(OPENWIN_LIB)$(OPENJDK_TARGET_CPU_ISADIR) \
-R/usr/dt/lib$(OPENJDK_TARGET_CPU_ISADIR) \
$(call SET_SHARED_LIBRARY_ORIGIN) \
$(call SET_SHARED_LIBRARY_ORIGIN,/..), \
LDFLAGS_macosx := $(call SET_SHARED_LIBRARY_ORIGIN) \
$(call SET_SHARED_LIBRARY_ORIGIN). \
$(call SET_SHARED_LIBRARY_ORIGIN) \
$(call SET_SHARED_LIBRARY_ORIGIN)., \
LDFLAGS_SUFFIX := $(LIBAWT_XAWT_LDFLAGS_SUFFIX), \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=xawt.dll" \
-D "JDK_INTERNAL_NAME=xawt" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libawt_xawt, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBAWT_XAWT): $(BUILD_LIBJAVA)
$(BUILD_LIBAWT_XAWT): $(BUILD_LIBAWT)
BUILD_LIBRARIES += $(BUILD_LIBAWT_XAWT)
endif
endif
##########################################################################################
BUILD_LIBZIP_EXCLUDES :=
ifeq ($(USE_EXTERNAL_LIBZ), true)
LIBZ := -lz
LIBZIP_EXCLUDES += zlib-1.2.5
else
ZLIB_CPPFLAGS := -I$(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.5
endif
BUILD_LIBZIP_REORDER :=
ifeq ($(OPENJDK_TARGET_OS), solaris)
ifneq ($(OPENJDK_TARGET_CPU), x86_64)
BUILD_LIBZIP_REORDER := $(JDK_TOPDIR)/makefiles/mapfiles/libzip/reorder-$(OPENJDK_TARGET_CPU)
endif
endif
ifeq ($(LIBZIP_CAN_USE_MMAP), true)
BUILD_LIBZIP_MMAP := -DUSE_MMAP
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBZIP, \
LIBRARY := zip, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
LANG := C, \
OPTIMIZATION := LOW, \
SRC := $(JDK_TOPDIR)/src/share/native/java/util/zip, \
EXCLUDES := $(LIBZIP_EXCLUDES), \
CFLAGS := $(CFLAGS_JDKLIB) \
$(ZLIB_CPPFLAGS) \
-I$(JDK_TOPDIR)/src/share/native/java/io \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/io, \
CFLAGS_posix := $(BUILD_LIBZIP_MMAP) -UDEBUG, \
MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libzip/mapfile-vers, \
REORDER := $(BUILD_LIBZIP_REORDER), \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN) \
$(EXPORT_ZIP_FUNCS), \
LDFLAGS_windows := -export:ZIP_Open -export:ZIP_Close -export:ZIP_FindEntry \
-export:ZIP_ReadEntry -export:ZIP_GetNextEntry jvm.lib \
$(WIN_JAVA_LIB), \
LDFLAGS_SUFFIX_linux := -ljvm -ljava $(LIBZ), \
LDFLAGS_SUFFIX_solaris := -ljvm -ljava $(LIBZ) -lc, \
LDFLAGS_SUFFIX_macosx := $(LIBZ) -ljava -ljvm, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=zip.dll" \
-D "JDK_INTERNAL_NAME=zip" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libzip, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBZIP): $(BUILD_LIBJAVA)
BUILD_LIBRARIES += $(BUILD_LIBZIP)
##########################################################################################
$(eval $(call SetupNativeCompilation,BUILD_LIBUNPACK, \
LIBRARY := unpack, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/share/native/com/sun/java/util/jar/pack, \
EXCLUDE_FILES := main.cpp, \
LANG := C++, \
OPTIMIZATION := LOW, \
CFLAGS := $(CXXFLAGS_JDKLIB) \
-DNO_ZLIB -DUNPACK_JNI -DFULL, \
CFLAGS_release := -DPRODUCT, \
MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libunpack/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_windows := -map:$(JDK_OUTPUTDIR)/objs/unpack.map -debug \
jvm.lib $(WIN_JAVA_LIB), \
LDFLAGS_SUFFIX_posix := -ljvm $(LIBCXX) -ljava -lc, \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libunpack, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=unpack.dll" \
-D "JDK_INTERNAL_NAME=unpack" \
-D "JDK_FTYPE=0x2L", \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBUNPACK): $(BUILD_LIBJAVA)
BUILD_LIBRARIES += $(BUILD_LIBUNPACK)
ifeq ($(OPENJDK_TARGET_OS), windows)
$(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)unpack.map: $(BUILD_LIBUNPACK)
$(ECHO) Copying $(@F)
$(CP) $(patsubst %$(SHARED_LIBRARY_SUFFIX), %.map, $<) $@
$(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)unpack.pdb: $(BUILD_LIBUNPACK)
$(ECHO) Copying $(@F)
$(CP) $(patsubst %$(SHARED_LIBRARY_SUFFIX), %.pdb, $<) $@
endif
##########################################################################################
LIBATTACH_EXCLUDE_FILES :=
ifneq ($(OPENJDK_TARGET_OS), solaris)
LIBATTACH_EXCLUDE_FILES += SolarisVirtualMachine.c
endif
ifneq ($(OPENJDK_TARGET_OS), linux)
LIBATTACH_EXCLUDE_FILES += LinuxVirtualMachine.c
endif
ifneq ($(OPENJDK_TARGET_OS), macosx)
LIBATTACH_EXCLUDE_FILES += BsdVirtualMachine.c
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBATTACH, \
LIBRARY := attach, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/tools/attach, \
EXCLUDE_FILES := $(LIBATTACH_EXCLUDE_FILES), \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB), \
CFLAGS_windows := /Gy, \
MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libattach/mapfile-$(OPENJDK_TARGET_OS), \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=attach.dll" \
-D "JDK_INTERNAL_NAME=attach" \
-D "JDK_FTYPE=0x2L", \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_solaris := -ldoor, \
LDFLAGS_windows := /ORDER:@$(JDK_TOPDIR)/makefiles/mapfiles/libattach/reorder-windows-$(OPENJDK_TARGET_CPU), \
LDFLAGS_SUFFIX := $(LDFLAGS_JDKLIB_SUFFIX), \
LDFLAGS_SUFFIX_windows := $(WIN_JAVA_LIB) advapi32.lib psapi.lib, \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libattach, \
DEBUG_SYMBOLS := true))
$(BUILD_LIBATTACH): $(BUILD_LIBJAVA)
BUILD_LIBRARIES += $(BUILD_LIBATTACH)
##########################################################################################
$(eval $(call SetupNativeCompilation,BUILD_LIBDT_SOCKET, \
LIBRARY := dt_socket, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/share/transport/socket \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/transport/socket, \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) -DUSE_MMAP \
-I$(INCLUDEDIR) -I$(JDK_OUTPUTDIR)/include/$(OPENJDK_TARGET_OS) \
-I$(JDK_TOPDIR)/src/share/transport/socket \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/transport/socket \
-I$(JDK_TOPDIR)/src/share/back/export \
-I$(JDK_TOPDIR)/src/share/back, \
MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libdt_socket/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX_linux := -lpthread, \
LDFLAGS_SUFFIX_solaris := -lnsl -lsocket -lc, \
LDFLAGS_SUFFIX_windows := $(LDFLAGS_JDKLIB_SUFFIX) -export:jdwpTransport_OnLoad ws2_32.lib, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=dt_socket.dll" \
-D "JDK_INTERNAL_NAME=dt_socket" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libdt_socket, \
DEBUG_SYMBOLS := true))
$(BUILD_LIBDT_SOCKET): $(BUILD_LIBJAVA)
BUILD_LIBRARIES += $(BUILD_LIBDT_SOCKET)
##########################################################################################
ifeq ($(OPENJDK_TARGET_OS), windows)
$(eval $(call SetupNativeCompilation,BUILD_LIBDT_SHMEM, \
LIBRARY := dt_shmem, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/share/native/com/sun/tools/jdi \
$(JDK_TOPDIR)/src/share/transport/shmem \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/transport/shmem, \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) -DUSE_MMAP \
-I$(INCLUDEDIR) -I$(JDK_OUTPUTDIR)/include/$(OPENJDK_TARGET_OS) \
-I$(JDK_TOPDIR)/src/share/transport/shmem \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/transport/shmem \
-I$(JDK_TOPDIR)/src/share/back/export, \
LDFLAGS := $(LDFLAGS_JDKLIB), \
LDFLAGS_windows := -export:jdwpTransport_OnLoad, \
LDFLAGS_SUFFIX := $(LDFLAGS_JDKLIB_SUFFIX), \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=dt_shmem.dll" \
-D "JDK_INTERNAL_NAME=dt_shmem" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libdt_shmem, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
BUILD_LIBRARIES += $(BUILD_LIBDT_SHMEM)
endif # OPENJDK_TARGET_OS
##########################################################################################
# JDWP_LOGGING causes log messages to be compiled into the library.
$(eval $(call SetupNativeCompilation,BUILD_LIBJDWP, \
LIBRARY := jdwp, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/share/back $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/back, \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) -DJDWP_LOGGING \
-I$(JDK_TOPDIR)/src/share/transport/export \
-I$(JDK_TOPDIR)/src/share/back/export \
-I$(JDK_TOPDIR)/src/share/npt \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/npt \
-I$(JDK_TOPDIR)/src/share/back \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/back \
-I$(JDK_OUTPUTDIR)/gensrc_jdwp_headers, \
MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libjdwp/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX_linux := $(LIBDL), \
LDFLAGS_SUFFIX_solaris := $(LIBDL) -lc, \
LDFLAGS_SUFFIX_windows := $(LDFLAGS_JDKLIB_SUFFIX), \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=jdwp.dll" \
-D "JDK_INTERNAL_NAME=jdwp" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjdwp, \
DEBUG_SYMBOLS := true))
$(BUILD_LIBJDWP): $(BUILD_LIBJAVA)
BUILD_LIBRARIES += $(BUILD_LIBJDWP)
##########################################################################################
LIBJAAS_MAPFILE :=
ifneq ($(OPENJDK_TARGET_OS), solaris)
LIBJAAS_EXCLUDE_FILES := Solaris.c
else
# only on solaris...wonder why
LIBJAAS_MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libjaas/mapfile-vers
endif
LIBJAAS_NAME := jaas_unix
ifeq ($(OPENJDK_TARGET_OS), windows)
LIBJAAS_NAME := jaas_nt
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBJAAS, \
LIBRARY := $(LIBJAAS_NAME), \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/com/sun/security/auth/module, \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB), \
MAPFILE := $(LIBJAAS_MAPFILE), \
LDFLAGS := $(filter-out -ljava, $(LDFLAGS_JDKLIB)) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_windows := netapi32.lib user32.lib mpr.lib advapi32.lib, \
LDFLAGS_SUFFIX_windows := $(LDFLAGS_JDKLIB_SUFFIX), \
LDFLAGS_SUFFIX_solaris := -lc, \
EXCLUDE_FILES := $(LIBJAAS_EXCLUDE_FILES), \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=$(LIBJAAS_NAME).dll" \
-D "JDK_INTERNAL_NAME=$(LIBJAAS_NAME)" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjaas, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBJAAS): $(BUILD_LIBJAVA)
BUILD_LIBRARIES += $(BUILD_LIBJAAS)
##########################################################################################
$(eval $(call SetupNativeCompilation,BUILD_LIBJSDT, \
LIBRARY := jsdt, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/share/native/sun/tracing/dtrace \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/tracing/dtrace, \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
-I$(JDK_TOPDIR)/src/share/native/sun/tracing/dtrace, \
MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libjsdt/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX_linux := $(LIBDL), \
LDFLAGS_SUFFIX_windows := $(LDFLAGS_JDKLIB_SUFFIX) $(LIBDL), \
LDFLAGS_SUFFIX_macosx := $(LIBDL), \
LDFLAGS_SUFFIX_solaris := -lc, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=jsdt.dll" \
-D "JDK_INTERNAL_NAME=jsdt" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjsdt, \
DEBUG_SYMBOLS := true))
$(BUILD_LIBJSDT): $(BUILD_LIBJAVA)
BUILD_LIBRARIES += $(BUILD_LIBJSDT)
##########################################################################################
# TODO: Update awt lib path when awt is converted
$(eval $(call SetupNativeCompilation,BUILD_LIBLCMS, \
LIBRARY := lcms, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/share/native/sun/java2d/cmm/lcms, \
LANG := C, \
OPTIMIZATION := HIGHEST, \
CFLAGS := $(filter-out -xc99=%none, $(CFLAGS_JDKLIB)) \
$(SHARED_LIBRARY_FLAGS) \
-I$(JDK_TOPDIR)/src/share/native/sun/java2d \
-I$(JDK_TOPDIR)/src/share/native/sun/awt/debug, \
CFLAGS_solaris := -xc99=no_lib, \
CFLAGS_windows := -DCMS_IS_WINDOWS_, \
MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/liblcms/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_solaris := /usr/lib$(OPENJDK_TARGET_CPU_ISADIR)/libm.so.2, \
LDFLAGS_windows := $(WIN_AWT_LIB) $(WIN_JAVA_LIB), \
LDFLAGS_SUFFIX_solaris := -lawt -ljava -ljvm -lc, \
LDFLAGS_SUFFIX_macosx := $(LIBM) -lawt -ljava -ljvm, \
LDFLAGS_SUFFIX_linux := -lm -lawt -ljava -ljvm, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=lcms.dll" \
-D "JDK_INTERNAL_NAME=lcms" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/liblcms, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
BUILD_LIBRARIES += $(BUILD_LIBLCMS)
$(BUILD_LIBLCMS): $(BUILD_LIBAWT)
##########################################################################################
ifdef OPENJDK
BUILD_LIBJPEG_MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libjpeg/mapfile-vers
else
BUILD_LIBJPEG_MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libjpeg/mapfile-vers-closed
BUILD_LIBJPEG_CLOSED_SRC := $(JDK_TOPDIR)/src/closed/share/native/sun/awt/image/jpeg
BUILD_LIBJPEG_CLOSED_INCLUDES := -I$(BUILD_LIBJPEG_CLOSED_SRC)
endif
BUILD_LIBJPEG_REORDER :=
ifeq ($(OPENJDK_TARGET_OS), solaris)
ifneq ($(OPENJDK_TARGET_CPU), x86_64)
BUILD_LIBJPEG_REORDER := $(JDK_TOPDIR)/makefiles/mapfiles/libjpeg/reorder-$(OPENJDK_TARGET_CPU)
endif
endif
# Suppress gcc warnings like "variable might be clobbered by 'longjmp'
# or 'vfork'": this warning indicates that some variable is placed to
# a register by optimized compiler and it's value might be lost on longjmp().
# Recommended way to avoid such warning is to declare the variable as
# volatile to prevent the optimization. However, this approach does not
# work because we have to declare all variables as volatile in result.
#ifndef CROSS_COMPILE_ARCH
# CC_43_OR_NEWER := \
# $(shell $(EXPR) $(CC_MAJORVER) \> 4 \| \
# \( $(CC_MAJORVER) = 4 \& $(CC_MINORVER) \>= 3 \) )
# ifeq ($(CC_43_OR_NEWER), 1)
# BUILD_LIBJPEG_CFLAGS_linux += -Wno-clobbered
# endif
#endif
$(eval $(call SetupNativeCompilation,BUILD_LIBJPEG, \
LIBRARY := jpeg, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(BUILD_LIBJPEG_CLOSED_SRC) \
$(JDK_TOPDIR)/src/share/native/sun/awt/image/jpeg, \
LANG := C, \
OPTIMIZATION := HIGHEST, \
CFLAGS := $(CFLAGS_JDKLIB) \
$(BUILD_LIBJPEG_CLOSED_INCLUDES) \
-I$(JDK_TOPDIR)/src/share/native/sun/awt/image/jpeg, \
MAPFILE := $(BUILD_LIBJPEG_MAPFILE), \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_windows := $(WIN_JAVA_LIB) jvm.lib, \
LDFLAGS_SUFFIX := $(LDFLAGS_JDKLIB_SUFFIX), \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=jpeg.dll" \
-D "JDK_INTERNAL_NAME=jpeg" \
-D "JDK_FTYPE=0x2L", \
REORDER := $(BUILD_LIBJPEG_REORDER), \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjpeg, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBJPEG): $(BUILD_LIBJAVA)
BUILD_LIBRARIES += $(BUILD_LIBJPEG)
##########################################################################################
ifndef OPENJDK
FONT_HEADERS := -I$(JDK_TOPDIR)/src/closed/share/native/sun/font/t2k
BUILD_LIBFONTMANAGER_MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libfontmanager/mapfile-vers
LIBFONTMANAGER_EXCLUDE_FILES += freetypeScaler.c
else
FONT_HEADERS := $(FREETYPE2_CFLAGS)
BUILD_LIBFONTMANAGER_MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libfontmanager/mapfile-vers.openjdk
BUILD_LIBFONTMANAGER_FONTLIB := $(FREETYPE2_LIBS)
endif
LIBFONTMANAGER_OPTIMIZATION := HIGH
ifeq ($(OPENJDK_TARGET_OS), windows)
LIBFONTMANAGER_EXCLUDE_FILES += X11FontScaler.c \
X11TextRenderer.c
LIBFONTMANAGER_OPTIMIZATION := HIGHEST
else
LIBFONTMANAGER_EXCLUDE_FILES += fontpath.c \
lcdglyph.c
endif
BUILD_LIBFONTMANAGER_CFLAGS_COMMON := \
$(X_CFLAGS) \
-DLE_STANDALONE -DHEADLESS \
$(FONT_HEADERS) \
-I$(JDK_TOPDIR)/src/share/native/sun/font \
-I$(JDK_TOPDIR)/src/share/native/sun/font/layout \
-I$(JDK_TOPDIR)/src/share/native/sun/awt/image/cvutils \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/awt \
-I$(JDK_TOPDIR)/src/share/native/sun/awt/debug \
-I$(JDK_TOPDIR)/src/share/native/sun/java2d/loops \
-I$(JDK_TOPDIR)/src/share/native/sun/java2d/pipe \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d \
-I$(JDK_TOPDIR)/src/share/native/sun/java2d
# Turn off aliasing with GCC for ExtensionSubtables.cpp
ifeq ($(OPENJDK_TARGET_OS), linux)
BUILD_LIBFONTMANAGER_ExtensionSubtables.cpp_CXXFLAGS := -fno-strict-aliasing
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBFONTMANAGER, \
LIBRARY := fontmanager, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/share/native/sun/font \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/font, \
EXCLUDE_FILES := $(LIBFONTMANAGER_EXCLUDE_FILES) \
AccelGlyphCache.c, \
LANG := C++, \
CFLAGS := $(CFLAGS_JDKLIB) $(BUILD_LIBFONTMANAGER_CFLAGS_COMMON), \
CXXFLAGS := $(CXXFLAGS_JDKLIB) $(BUILD_LIBFONTMANAGER_CFLAGS_COMMON), \
OPTIMIZATION := $(LIBFONTMANAGER_OPTIMIZATION), \
CFLAGS_windows = -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/windows \
-DCC_NOEX, \
MAPFILE := $(BUILD_LIBFONTMANAGER_MAPFILE), \
LDFLAGS := $(subst -Xlinker -z -Xlinker defs,,$(LDFLAGS_JDKLIB)) $(LDFLAGS_CXX_JDK) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX := $(BUILD_LIBFONTMANAGER_FONTLIB), \
LDFLAGS_SUFFIX_linux := -lawt $(LIBM) $(LIBCXX) -ljava -ljvm -lc, \
LDFLAGS_SUFFIX_solaris := -lawt -lawt_xawt -lc $(LIBM) $(LIBCXX) -ljava -ljvm, \
LDFLAGS_SUFFIX_macosx := -lawt $(LIBM) $(LIBCXX) -undefined dynamic_lookup \
-ljava -ljvm, \
LDFLAGS_SUFFIX_windows := $(WIN_JAVA_LIB) advapi32.lib user32.lib gdi32.lib \
$(WIN_AWT_LIB), \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=fontmanager.dll" \
-D "JDK_INTERNAL_NAME=fontmanager" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libfontmanager, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBFONTMANAGER): $(BUILD_LIBAWT)
ifneq (, $(findstring $(OPENJDK_TARGET_OS), solaris macosx))
$(BUILD_LIBFONTMANAGER): $(BUILD_LIBAWT_XAWT)
endif
BUILD_LIBRARIES += $(BUILD_LIBFONTMANAGER)
##########################################################################################
ifndef OPENJDK
#ifeq ($(OPENJDK_TARGET_OS), linux)
# ifeq ("$(CC_VER_MAJOR)", "3")
# OTHER_LDLIBS += -Wl,-Bstatic -lgcc_eh -Wl,-Bdynamic
# endif
#endif
#
# The resulting size of the t2k lib file is (at least on linux) dependant on the order of
# the input .o files. Because of this the new build will differ in size to the old build.
BUILD_LIBT2K_CFLAGS_COMMON := -I$(JDK_TOPDIR)/src/share/native/sun/font \
-I$(JDK_TOPDIR)/src/closed/share/native/sun/font/t2k \
-I$(JDK_TOPDIR)/src/closed/share/native/sun/font \
-I$(JDK_TOPDIR)/src/share/share/native/sun/font \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/font \
-I$(JDK_TOPDIR)/src/share/native/sun/java2d/loops \
-I$(JDK_TOPDIR)/src/share/native/sun/java2d/pipe \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d \
-I$(JDK_TOPDIR)/src/share/native/sun/java2d
$(eval $(call SetupNativeCompilation,BUILD_LIBT2K, \
LIBRARY := t2k, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/closed/share/native/sun/font \
$(JDK_TOPDIR)/src/closed/share/native/sun/font/t2k \
$(JDK_TOPDIR)/src/closed/share/native/sun/font/t2k/ttHints, \
EXCLUDE_FILES := orion.c, \
LANG := C++, \
OPTIMIZATION := HIGH, \
CFLAGS := $(CFLAGS_JDKLIB) $(BUILD_LIBT2K_CFLAGS_COMMON), \
CXXFLAGS := $(CXXFLAGS_JDKLIB) $(BUILD_LIBT2K_CFLAGS_COMMON), \
CFLAGS_windows = -DCC_NOEX, \
CXXFLAGS_windows = -DCC_NOEX, \
MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libt2k/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_windows := user32.lib $(JDK_OUTPUTDIR)/objs/libfontmanager/fontmanager.lib, \
LDFLAGS_SUFFIX_posix := $(LIBM) $(LIBCXX) -lfontmanager -ljava -ljvm -lc, \
LDFLAGS_SUFFIX_solaris := -lawt -lawt_xawt, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=t2k.dll" \
-D "JDK_INTERNAL_NAME=t2k" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libt2k, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
# t2k is linked against fontmanager
$(BUILD_LIBT2K): $(BUILD_LIBFONTMANAGER)
BUILD_LIBRARIES += $(BUILD_LIBT2K)
endif
##########################################################################################
ifeq ($(OPENJDK_TARGET_OS), windows)
ifeq ($(OPENJDK_TARGET_CPU), x86)
KERNEL32_LIB := kernel32.lib
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBJAWT, \
LIBRARY := jawt, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/windows, \
INCLUDE_FILES := jawt.cpp, \
LANG := C++, \
OPTIMIZATION := LOW, \
CFLAGS := $(CXXFLAGS_JDKLIB) \
-EHsc -DUNICODE -D_UNICODE \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/windows \
-I$(JDK_TOPDIR)/src/share/native/sun/awt/debug \
-I$(JDK_TOPDIR)/src/share/native/sun/java2d \
-I$(JDK_TOPDIR)/src/share/native/sun/awt/image/cvutils \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d/windows, \
LDFLAGS := $(LDFLAGS_JDKLIB) $(KERNEL32_LIB) $(LDFLAGS_CXX_JDK) \
advapi32.lib $(WIN_AWT_LIB), \
LDFLAGS_SUFFIX := $(LDFLAGS_JDKLIB_SUFFIX), \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=jawt.dll" \
-D "JDK_INTERNAL_NAME=jawt" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjawt, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBJAWT): $(BUILD_LIBAWT)
$(JDK_OUTPUTDIR)/lib/$(LIBRARY_PREFIX)jawt$(STATIC_LIBRARY_SUFFIX): $(BUILD_LIBJAWT)
$(ECHO) Copying $(@F)
$(CP) $(JDK_OUTPUTDIR)/objs/libjawt/$(LIBRARY_PREFIX)jawt$(STATIC_LIBRARY_SUFFIX) $@
BUILD_LIBRARIES += $(JDK_OUTPUTDIR)/lib/$(LIBRARY_PREFIX)jawt$(STATIC_LIBRARY_SUFFIX)
else # OPENJDK_TARGET_OS not windows
JAWT_LIBS :=
ifneq ($(OPENJDK_TARGET_OS), solaris)
JAWT_LIBS += -lawt
endif
ifndef BUILD_HEADLESS_ONLY
JAWT_LIBS += -lawt_xawt
else
JAWT_LIBS += -lawt_headless
HEADLESS_CFLAG += -DHEADLESS
endif
JAWT_FILES := jawt.c
ifeq ($(OPENJDK_TARGET_OS), macosx)
JAWT_FILES := jawt.m
JAWT_LIBS := -lawt_lwawt
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBJAWT, \
LIBRARY := jawt, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/awt \
$(JDK_TOPDIR)/src/macosx/native/sun/awt, \
INCLUDE_FILES := $(JAWT_FILES), \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB), \
CFLAGS_linux := $(HEADLESS_CFLAG), \
CFLAGS_macosx := -I$(JDK_TOPDIR)/src/solaris/native/sun/awt, \
MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libjawt/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_solaris := -L$(OPENWIN_HOME)/sfw/lib$(OPENJDK_TARGET_CPU_ISADIR) -L$(OPENWIN_LIB)$(OPENJDK_TARGET_CPU_ISADIR), \
LDFLAGS_SUFFIX_linux := $(JAWT_LIBS) $(LDFLAGS_JDKLIB_SUFFIX), \
LDFLAGS_SUFFIX_solaris := $(JAWT_LIBS) $(LDFLAGS_JDKLIB_SUFFIX) -lXrender, \
LDFLAGS_SUFFIX_macosx := -Xlinker -rpath -Xlinker @loader_path $(JAWT_LIBS) \
-framework Cocoa $(LDFLAGS_JDKLIB_SUFFIX), \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjawt, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
ifndef BUILD_HEADLESS_ONLY
$(BUILD_LIBJAWT): $(BUILD_LIBAWT_XAWT)
else
$(BUILD_LIBJAWT): $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)awt_headless$(SHARED_LIBRARY_SUFFIX)
endif
ifeq ($(OPENJDK_TARGET_OS), macosx)
$(BUILD_LIBJAWT): $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)awt_lwawt$(SHARED_LIBRARY_SUFFIX)
endif
endif # OPENJDK_TARGET_OS
BUILD_LIBRARIES += $(BUILD_LIBJAWT)
##########################################################################################
LIBINSTRUMENT_SRC := $(JDK_TOPDIR)/src/share/instrument \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/io \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/instrument
LIBINSTRUMENT_FILES := \
EncodingSupport.c \
EncodingSupport_md.c \
FileSystemSupport_md.c \
InstrumentationImplNativeMethods.c \
InvocationAdapter.c \
JarFacade.c \
JPLISAgent.c \
JPLISAssert.c \
JavaExceptions.c \
PathCharsValidator.c \
Reentrancy.c \
Utilities.c \
canonicalize_md.c
LIBINSTRUMENT_DIR := $(JDK_OUTPUTDIR)/objs/libinstrument
LIBINSTRUMENT_CFLAGS := $(CFLAGS_JDKLIB) \
-I$(JDK_TOPDIR)/src/share/instrument \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/instrument \
-I$(JDK_TOPDIR)/src/share/bin
LIBINSTRUMENT_LDFLAGS :=
LIBINSTRUMENT_LDFLAGS_SUFFIX :=
ifeq ($(OPENJDK_TARGET_OS), windows)
LIBINSTRUMENT_LDFLAGS += $(JDK_OUTPUTDIR)/objs/jli_static.lib $(WIN_JAVA_LIB) \
-export:Agent_OnAttach advapi32.lib
# Statically link the C runtime so that there are not dependencies on modules
# not on the search patch when invoked from the Windows system directory
# (or elsewhere).
LIBINSTRUMENT_CFLAGS := $(filter-out -MD, $(LIBINSTRUMENT_CFLAGS))
# equivalent of strcasecmp is stricmp on Windows
LIBINSTRUMENT_CFLAGS += -Dstrcasecmp=stricmp
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBINSTRUMENT, \
LIBRARY := instrument, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBINSTRUMENT_SRC), \
INCLUDE_FILES := $(LIBINSTRUMENT_FILES), \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(LIBINSTRUMENT_CFLAGS), \
CFLAGS_debug := -DJPLIS_LOGGING, \
CFLAGS_release := -DNO_JPLIS_LOGGING, \
MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libinstrument/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN) \
$(LIBINSTRUMENT_LDFLAGS), \
LDFLAGS_linux := $(call SET_SHARED_LIBRARY_ORIGIN,/jli), \
LDFLAGS_solaris := $(call SET_SHARED_LIBRARY_ORIGIN,/jli), \
LDFLAGS_macosx := -Xlinker -all_load $(JDK_OUTPUTDIR)/objs/libjli_static.a \
-framework Cocoa -framework Security -framework ApplicationServices, \
LDFLAGS_SUFFIX := $(LIBINSTRUMENT_LDFLAGS_SUFFIX), \
LDFLAGS_SUFFIX_macosx := -liconv $(LIBZ), \
LDFLAGS_SUFFIX_solaris := $(LIBZ) -L $(INSTALL_LIBRARIES_HERE)/jli -ljli $(LIBDL) -lc, \
LDFLAGS_SUFFIX_linux := $(LIBZ) -L $(INSTALL_LIBRARIES_HERE)/jli -ljli $(LIBDL), \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=instrument.dll" \
-D "JDK_INTERNAL_NAME=instrument" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(LIBINSTRUMENT_DIR), \
DEBUG_SYMBOLS := true))
ifneq (, $(findstring $(OPENJDK_TARGET_OS), macosx windows))
$(BUILD_LIBINSTRUMENT): $(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)jli_static$(STATIC_LIBRARY_SUFFIX)
else
$(BUILD_LIBINSTRUMENT): $(INSTALL_LIBRARIES_HERE)/jli/$(LIBRARY_PREFIX)jli$(SHARED_LIBRARY_SUFFIX)
endif
$(BUILD_LIBINSTRUMENT): $(BUILD_LIBJAVA)
BUILD_LIBRARIES += $(BUILD_LIBINSTRUMENT)
##########################################################################################
BUILD_LIBMANAGEMENT_SRC := $(JDK_TOPDIR)/src/share/native/sun/management \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/management \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/com/sun/management
BUILD_LIBMANAGEMENT_EXCLUDES :=
BUILD_LIBMANAGEMENT_CFLAGS := -I$(JDK_TOPDIR)/src/share/native/sun/management
ifneq ($(OPENJDK_TARGET_OS), windows)
BUILD_LIBMANAGEMENT_EXCLUDES += OperatingSystem_md.c
else
BUILD_LIBMANAGEMENT_EXCLUDES += UnixOperatingSystem_md.c
endif
ifneq ($(OPENJDK_TARGET_OS), solaris)
BUILD_LIBMANAGEMENT_EXCLUDES += SolarisOperatingSystem.c
endif
ifneq ($(OPENJDK_TARGET_OS), linux)
BUILD_LIBMANAGEMENT_EXCLUDES += LinuxOperatingSystem.c
endif
ifneq ($(OPENJDK_TARGET_OS), macosx)
BUILD_LIBMANAGEMENT_EXCLUDES += MacosxOperatingSystem.c
endif
LIBMANAGEMENT_OPTIMIZATION := HIGH
ifneq ($(findstring $(OPENJDK_TARGET_OS), solaris linux), )
ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
LIBMANAGEMENT_OPTIMIZATION := LOW
endif
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBMANAGEMENT, \
LIBRARY := management, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(BUILD_LIBMANAGEMENT_SRC), \
EXCLUDE_FILES := $(BUILD_LIBMANAGEMENT_EXCLUDES), \
LANG := C, \
OPTIMIZATION := $(LIBMANAGEMENT_OPTIMIZATION), \
CFLAGS := $(CFLAGS_JDKLIB) $(BUILD_LIBMANAGEMENT_CFLAGS), \
MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libmanagement/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_solaris := -lkstat, \
LDFLAGS_SUFFIX := $(LDFLAGS_JDKLIB_SUFFIX), \
LDFLAGS_SUFFIX_windows := jvm.lib psapi.lib $(WIN_JAVA_LIB) advapi32.lib, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=management.dll" \
-D "JDK_INTERNAL_NAME=management" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libmanagement, \
DEBUG_SYMBOLS := true))
$(BUILD_LIBMANAGEMENT): $(BUILD_LIBJAVA)
BUILD_LIBRARIES += $(BUILD_LIBMANAGEMENT)
##########################################################################################
BUILD_LIBHPROF_SRC := $(JDK_TOPDIR)/src/share/demo/jvmti/hprof $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/demo/jvmti/hprof
BUILD_LIBHPROF_CFLAGS := -I$(JDK_TOPDIR)/src/share/demo/jvmti/hprof \
-I$(JDK_TOPDIR)/src/share/npt \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/npt \
-I$(JDK_TOPDIR)/src/share/demo/jvmti/java_crw_demo
BUILD_LIBHPROF_LDFLAGS :=
LIBHPROF_OPTIMIZATION := HIGHEST
ifneq ($(findstring $(OPENJDK_TARGET_OS), solaris linux), )
ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
LIBHPROF_OPTIMIZATION := LOW
endif
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBHPROF, \
LIBRARY := hprof, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(BUILD_LIBHPROF_SRC), \
LANG := C, \
OPTIMIZATION := $(LIBHPROF_OPTIMIZATION), \
CFLAGS := $(CFLAGS_JDKLIB) \
$(BUILD_LIBHPROF_CFLAGS), \
CFLAGS_debug := -DHPROF_LOGGING, \
MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libhprof/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_windows := wsock32.lib winmm.lib advapi32.lib, \
LDFLAGS_SUFFIX_linux := $(LIBDL), \
LDFLAGS_SUFFIX_macosx := $(LIBDL), \
LDFLAGS_SUFFIX_solaris := -lsocket -lnsl $(LIBDL) -lc, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=hprof.dll" \
-D "JDK_INTERNAL_NAME=hprof" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libhprof_jvmti, \
DEBUG_SYMBOLS := true))
BUILD_LIBRARIES += $(BUILD_LIBHPROF)
##########################################################################################
$(eval $(call SetupNativeCompilation,BUILD_LIBJAVA_CRW_DEMO, \
LIBRARY := java_crw_demo, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/share/demo/jvmti/java_crw_demo, \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
-I$(JDK_TOPDIR)/src/share/demo/jvmti/java_crw_demo, \
MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libjava_crw_demo/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX_solaris := -lc, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=java_crw_demo.dll" \
-D "JDK_INTERNAL_NAME=java_crw_demo" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjava_crw_demo, \
DEBUG_SYMBOLS := true))
BUILD_LIBRARIES += $(BUILD_LIBJAVA_CRW_DEMO)
##########################################################################################
$(eval $(call SetupNativeCompilation,BUILD_LIBNPT, \
LIBRARY := npt, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/share/npt $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/npt, \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
-I$(JDK_TOPDIR)/src/share/npt \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/npt, \
MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libnpt/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_macosx := -liconv, \
LDFLAGS_SUFFIX_windows := -export:nptInitialize -export:nptTerminate, \
LDFLAGS_SUFFIX_solaris := -lc, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=npt.dll" \
-D "JDK_INTERNAL_NAME=npt" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libnpt, \
DEBUG_SYMBOLS := true))
BUILD_LIBRARIES += $(BUILD_LIBNPT)
##########################################################################################
LIBNET_SRC_DIRS := $(JDK_TOPDIR)/src/share/native/java/net \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/net \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/net/dns \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/net/spi
ifeq ($(OPENJDK_TARGET_OS), windows)
LIBNET_SRC_DIRS += $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/net/www/protocol/http/ntlm
else
LIBNET_SRC_DIRS += $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/net/sdp
endif
LIBNET_CFLAGS := $(foreach dir, $(LIBNET_SRC_DIRS), -I$(dir))
LIBNET_EXCLUDE_FILES :=
ifneq ($(OPENJDK_TARGET_OS), linux)
LIBNET_EXCLUDE_FILES += linux_close.c
endif
ifneq ($(OPENJDK_TARGET_OS), macosx)
LIBNET_EXCLUDE_FILES += bsd_close.c
endif
ifeq ($(OPENJDK_TARGET_OS), windows)
LIBNET_EXCLUDE_FILES += PlainSocketImpl.c PlainDatagramSocketImpl.c SdpSupport.c
else
LIBNET_EXCLUDE_FILES += TwoStacksPlainSocketImpl.c DualStackPlainSocketImpl.c \
TwoStacksPlainDatagramSocketImpl.c DualStackPlainDatagramSocketImpl.c \
NTLMAuthSequence.c NetworkInterface_winXP.c
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBNET, \
LIBRARY := net, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBNET_SRC_DIRS), \
EXCLUDE_FILES := $(LIBNET_EXCLUDE_FILES), \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
$(LIBNET_CFLAGS), \
MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libnet/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX_macosx := -ljvm -ljava, \
LDFLAGS_SUFFIX_solaris := -ljvm -ljava -lnsl -lsocket $(LIBDL) -lc, \
LDFLAGS_SUFFIX_linux := $(LIBDL) -ljvm -lpthread -ljava, \
LDFLAGS_SUFFIX_windows := ws2_32.lib jvm.lib secur32.lib iphlpapi.lib \
delayimp.lib $(WIN_JAVA_LIB) advapi32.lib \
-DELAYLOAD:secur32.dll -DELAYLOAD:iphlpapi.dll, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=net.dll" \
-D "JDK_INTERNAL_NAME=net" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libnet, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBNET): $(BUILD_LIBJAVA)
BUILD_LIBRARIES += $(BUILD_LIBNET)
$(JDK_OUTPUTDIR)/lib/net.properties: $(JDK_TOPDIR)/src/share/lib/net.properties
$(ECHO) $(LOG_INFO) Copying $(@F)
$(call install-file)
COPY_FILES += $(JDK_OUTPUTDIR)/lib/net.properties
ifeq ($(OPENJDK_TARGET_OS), solaris)
$(JDK_OUTPUTDIR)/lib/sdp/sdp.conf.template: $(JDK_TOPDIR)/src/${OPENJDK_TARGET_OS_API_DIR}/lib/sdp/sdp.conf.template
$(ECHO) $(LOG_INFO) Copying $(@F)
$(call install-file)
COPY_FILES += $(JDK_OUTPUTDIR)/lib/sdp/sdp.conf.template
endif
##########################################################################################
BUILD_LIBNIO_SRC := \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/nio \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/nio/ch \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/nio/fs
BUILD_LIBNIO_CFLAGS := \
-I$(JDK_TOPDIR)/src/share/native/sun/nio/ch \
-I$(JDK_TOPDIR)/src/share/native/java/io \
-I$(JDK_TOPDIR)/src/share/native/java/net \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/net
BUILD_LIBNIO_FILES := \
DatagramChannelImpl.c \
DatagramDispatcher.c \
FileChannelImpl.c \
FileDispatcherImpl.c \
FileKey.c \
IOUtil.c \
MappedByteBuffer.c \
Net.c \
ServerSocketChannelImpl.c \
SocketChannelImpl.c \
SocketDispatcher.c
ifeq ($(OPENJDK_TARGET_OS), windows)
BUILD_LIBNIO_FILES += \
Iocp.c \
RegistryFileTypeDetector.c \
WindowsAsynchronousFileChannelImpl.c \
WindowsAsynchronousServerSocketChannelImpl.c \
WindowsAsynchronousSocketChannelImpl.c \
WindowsNativeDispatcher.c \
WindowsSelectorImpl.c
endif
ifeq ($(OPENJDK_TARGET_OS), linux)
BUILD_LIBNIO_MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libnio/mapfile-$(OPENJDK_TARGET_OS)
BUILD_LIBNIO_FILES += \
EPoll.c \
EPollArrayWrapper.c \
EPollPort.c \
InheritedChannel.c \
NativeThread.c \
PollArrayWrapper.c \
UnixAsynchronousServerSocketChannelImpl.c \
UnixAsynchronousSocketChannelImpl.c \
GnomeFileTypeDetector.c \
MagicFileTypeDetector.c \
LinuxNativeDispatcher.c \
LinuxWatchService.c \
UnixCopyFile.c \
UnixNativeDispatcher.c
endif
ifeq ($(OPENJDK_TARGET_OS), macosx)
BUILD_LIBNIO_MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libnio/mapfile-$(OPENJDK_TARGET_OS)
BUILD_LIBNIO_SRC += $(JDK_TOPDIR)/src/macosx/native/sun/nio/ch
BUILD_LIBNIO_FILES += \
InheritedChannel.c \
NativeThread.c \
PollArrayWrapper.c \
UnixAsynchronousServerSocketChannelImpl.c \
UnixAsynchronousSocketChannelImpl.c \
BsdNativeDispatcher.c \
MacOSXNativeDispatcher.c \
UnixCopyFile.c \
UnixNativeDispatcher.c \
KQueue.c \
KQueuePort.c \
KQueueArrayWrapper.c
endif
ifeq ($(OPENJDK_TARGET_OS), solaris)
BUILD_LIBNIO_MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libnio/mapfile-$(OPENJDK_TARGET_OS)
BUILD_LIBNIO_FILES += \
DevPollArrayWrapper.c \
InheritedChannel.c \
NativeThread.c \
PollArrayWrapper.c \
SolarisEventPort.c \
UnixAsynchronousServerSocketChannelImpl.c \
UnixAsynchronousSocketChannelImpl.c \
GnomeFileTypeDetector.c \
SolarisNativeDispatcher.c \
SolarisWatchService.c \
UnixCopyFile.c \
UnixNativeDispatcher.c
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBNIO, \
LIBRARY := nio, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(BUILD_LIBNIO_SRC), \
INCLUDE_FILES := $(BUILD_LIBNIO_FILES), \
LANG := C, \
OPTIMIZATION := HIGH, \
CFLAGS := $(CFLAGS_JDKLIB) \
$(BUILD_LIBNIO_CFLAGS), \
MAPFILE := $(BUILD_LIBNIO_MAPFILE), \
LDFLAGS := $(LDFLAGS_JDKLIB) $(BUILD_LIBNIO_LDFLAGS) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX_linux := -ljava -lnet -lpthread $(LIBDL), \
LDFLAGS_SUFFIX_solaris := -ljvm -lsocket -lposix4 $(LIBDL) \
-lsendfile -ljava -lnet -lc, \
LDFLAGS_SUFFIX_windows := jvm.lib ws2_32.lib $(WIN_JAVA_LIB) \
$(JDK_OUTPUTDIR)/objs/libnet/net.lib \
advapi32.lib, \
LDFLAGS_SUFFIX_macosx := -ljava -lnet -pthread -framework CoreFoundation, \
LDFLAGS_SUFFIX :=, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=nio.dll" \
-D "JDK_INTERNAL_NAME=nio" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libnio, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
BUILD_LIBRARIES += $(BUILD_LIBNIO)
$(BUILD_LIBNIO): $(BUILD_LIBNET)
##########################################################################################
ifeq ($(OPENJDK_TARGET_OS_API), posix)
ifneq ($(OPENJDK_TARGET_OS), macosx)
SCTP_WERROR := -Werror
ifeq ($(OPENJDK_TARGET_CPU_ARCH), ppc)
SCTP_WERROR :=
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBSCTP, \
LIBRARY := sctp, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/nio/ch/sctp, \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
-I$(JDK_TOPDIR)/src/share/native/sun/nio/ch \
-I$(JDK_TOPDIR)/src/share/native/sun/nio/ch/sctp \
-I$(JDK_TOPDIR)/src/share/native/java/net \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/nio/ch \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/net, \
CFLAGS_linux := $(SCTP_WERROR), \
MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libsctp/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX_linux := -lpthread $(LIBDL) -ljava -ljvm, \
LDFLAGS_SUFFIX_posix := -lnio -lnet, \
LDFLAGS_SUFFIX_solaris := -lsocket -ljava -ljvm -lc, \
LDFLAGS_SUFFIX_macosx := -ljava -ljvm, \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libsctp, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
BUILD_LIBRARIES += $(BUILD_LIBSCTP)
$(BUILD_LIBSCTP): $(BUILD_LIBNIO)
endif
endif
##########################################################################################
BUILD_LIBJLI_SRC_DIRS := $(JDK_TOPDIR)/src/share/bin $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/bin
LIBJLI_CFLAGS := $(CFLAGS_JDKLIB) $(foreach dir, $(BUILD_LIBJLI_SRC_DIRS), -I$(dir))
BUILD_LIBJLI_FILES := \
java.c \
splashscreen_stubs.c \
parse_manifest.c \
version_comp.c \
wildcard.c \
jli_util.c
ifeq ($(JVM_VARIANT_ZERO), true)
ERGO_FAMILY := zero
else
ifeq ($(OPENJDK_TARGET_CPU_ARCH), x86)
ERGO_FAMILY := i586
else
ERGO_FAMILY := $(OPENJDK_TARGET_CPU_ARCH)
endif
endif
ifeq ($(OPENJDK_TARGET_OS), macosx)
LIBJLI_CFLAGS += -I$(JDK_TOPDIR)/src/macosx/bin
BUILD_LIBJLI_SRC_DIRS += $(JDK_TOPDIR)/src/macosx/bin
BUILD_LIBJLI_FILES += java_md_common.c java_md_macosx.c
BUILD_LIBJLI_java_md_macosx.c_CFLAGS := -x objective-c
BUILD_LIBJLI_STATIC_java_md_macosx.c_CFLAGS := -x objective-c
endif
ifeq ($(OPENJDK_TARGET_OS), windows)
BUILD_LIBJLI_FILES += java_md.c \
cmdtoargs.c
# Staticically link with c runtime on windows.
LIBJLI_CFLAGS := $(filter-out -MD, $(LIBJLI_CFLAGS))
else ifneq ($(OPENJDK_TARGET_OS), macosx)
BUILD_LIBJLI_FILES += java_md_common.c
BUILD_LIBJLI_FILES += java_md_solinux.c ergo.c
ERGO_ARCH_FILE = ergo_$(ERGO_FAMILY).c
# if the architecture specific ergo file exists then
# use it, else use the generic definitions from ergo.c
ifneq ($(wildcard $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/bin/$(ERGO_ARCH_FILE)), )
BUILD_LIBJLI_FILES += $(ERGO_ARCH_FILE)
else # !ERGO_ARCH_FILE
LIBJLI_CFLAGS += -DUSE_GENERIC_ERGO
endif # ERGO_ARCH_FILE
endif #WINDOWS
# Append defines depending on target platform
LIBJLI_CFLAGS += $(OPENJDK_TARGET_CPU_JLI_CFLAGS)
ifeq ($(OPENJDK_TARGET_OS), macosx)
LIBJLI_CFLAGS += -DPACKAGE_PATH=\"$(PACKAGE_PATH)\"
endif
ifneq ($(USE_EXTERNAL_LIBZ), true)
BUILD_LIBJLI_SRC_DIRS += $(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.5
LIBJLI_CFLAGS += $(ZLIB_CPPFLAGS)
BUILD_LIBJLI_FILES += \
inflate.c \
inftrees.c \
inffast.c \
zadler32.c \
zcrc32.c \
zutil.c
endif
ifeq ($(OPENJDK_TARGET_OS), windows)
LIBJLI_OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE)
else
LIBJLI_OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE)/jli
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBJLI, \
LIBRARY := jli, \
OUTPUT_DIR := $(LIBJLI_OUTPUT_DIR), \
SRC := $(BUILD_LIBJLI_SRC_DIRS), \
INCLUDE_FILES := $(BUILD_LIBJLI_FILES), \
LANG := C, \
OPTIMIZATION := HIGH, \
CFLAGS := $(LIBJLI_CFLAGS), \
MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libjli/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_linux := $(call SET_SHARED_LIBRARY_ORIGIN,/..), \
LDFLAGS_solaris := $(call SET_SHARED_LIBRARY_ORIGIN,/..), \
LDFLAGS_macosx := -framework Cocoa -framework Security -framework ApplicationServices, \
LDFLAGS_SUFFIX_solaris := $(LIBZ) $(LIBDL) -lc, \
LDFLAGS_SUFFIX_linux := $(LIBZ) $(LIBDL) -lc -lpthread, \
LDFLAGS_SUFFIX_macosx := $(LIBZ), \
LDFLAGS_SUFFIX_windows := \
-export:JLI_Launch \
-export:JLI_ManifestIterate \
-export:JLI_SetTraceLauncher \
-export:JLI_ReportErrorMessage \
-export:JLI_ReportErrorMessageSys \
-export:JLI_ReportMessage \
-export:JLI_ReportExceptionDescription \
-export:JLI_MemAlloc \
-export:JLI_CmdToArgs \
-export:JLI_GetStdArgc \
-export:JLI_GetStdArgs \
advapi32.lib \
comctl32.lib \
user32.lib, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=jli.dll" \
-D "JDK_INTERNAL_NAME=jli" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjli, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
BUILD_LIBRARIES += $(BUILD_LIBJLI)
# On windows, the static library has the same suffix as the import library created by
# with the shared library, so the static library is given a different name. No harm
# in doing it for all platform to reduce complexity.
ifeq ($(OPENJDK_TARGET_OS), windows)
$(eval $(call SetupNativeCompilation,BUILD_LIBJLI_STATIC, \
STATIC_LIBRARY := jli_static, \
OUTPUT_DIR := $(JDK_OUTPUTDIR)/objs, \
SRC := $(BUILD_LIBJLI_SRC_DIRS), \
INCLUDE_FILES := $(BUILD_LIBJLI_FILES), \
LANG := C, \
OPTIMIZATION := HIGH, \
CFLAGS := $(STATIC_LIBRARY_FLAGS) $(LIBJLI_CFLAGS), \
ARFLAGS := $(ARFLAGS), \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjli_static, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
BUILD_LIBRARIES += $(BUILD_LIBJLI_STATIC)
else ifeq ($(OPENJDK_TARGET_OS), macosx)
#
# On macosx they do partial (incremental) linking of libjli_static.a
# code it here...rather than add support to NativeCompilation
# as this is first time I see it
$(eval $(call SetupNativeCompilation,BUILD_LIBJLI_STATIC, \
LIBRARY := jli_static, \
OUTPUT_DIR := $(JDK_OUTPUTDIR)/objs, \
SRC := $(BUILD_LIBJLI_SRC_DIRS), \
INCLUDE_FILES := $(BUILD_LIBJLI_FILES), \
LANG := C, \
OPTIMIZATION := HIGH, \
CFLAGS := $(CFLAGS_JDKLIB) $(LIBJLI_CFLAGS), \
LDFLAGS := -nostdlib -r, \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjli_static, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(JDK_OUTPUTDIR)/objs/libjli_static.a: $(BUILD_LIBJLI_STATIC)
$(call install-file)
BUILD_LIBRARIES += $(JDK_OUTPUTDIR)/objs/libjli_static.a
endif
##########################################################################################
ifndef OPENJDK
ifeq ($(ENABLE_JFR), true)
$(eval $(call SetupNativeCompilation,BUILD_LIBJFR, \
LIBRARY := jfr, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/closed/share/native/oracle/jfr, \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
-I$(JDK_TOPDIR)/src/closed/share/javavm/export, \
MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libjfr/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX_solaris := -lc, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=jfr.dll" \
-D "JDK_INTERNAL_NAME=jfr" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjfr, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
BUILD_LIBRARIES += $(BUILD_LIBJFR)
endif
endif
##########################################################################################
ifndef OPENJDK
BUILD_LIBKCMS_EXCLUDE_FILES :=
ifeq ($(OPENJDK_TARGET_OS), windows)
BUILD_LIBKCMS_EXCLUDE_FILES += ukcpmgr.c unixmem.c
else
BUILD_LIBKCMS_EXCLUDE_FILES += cmmdll.c registry.c spxffile.c sysinfo.c winmem.c wkcpmgr.c
endif
BUILD_LIBKCMS_FLAGS := $(CFLAGS_JDKLIB)
ifeq ($(OPENJDK_TARGET_OS), solaris)
# This particular library uses a feature called PIC_CODE_SMALL (on solaris)
# implement it like this...since it's only used here
BUILD_LIBKCMS_FLAGS := $(patsubst -KPIC, -Kpic, $(BUILD_LIBKCMS_FLAGS))
else ifeq ($(OPENJDK_TARGET_CPU_ARCH), ppc)
BUILD_LIBKCMS_FLAGS := $(patsubst -fPIC, -fpic, $(BUILD_LIBKCMS_FLAGS))
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBKCMS, \
LIBRARY := kcms, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/closed/share/native/sun/java2d/cmm/kcms, \
LANG := C, \
EXCLUDE_FILES := $(BUILD_LIBKCMS_EXCLUDE_FILES), \
OPTIMIZATION := LOW, \
CFLAGS := $(BUILD_LIBKCMS_FLAGS) \
-DJAVACMM -DFUT_CALC_EX -DNO_FUT_GCONST, \
CFLAGS_linux := -Wno-missing-field-initializers, \
MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libkcms/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX_linux := -lc -lpthread, \
LDFLAGS_SUFFIX_solaris := -lc, \
LDFLAGS_SUFFIX_windows := $(WIN_JAVA_LIB) advapi32.lib user32.lib version.lib, \
LDFLAGS_SUFFIX_posix := -lm -ljava -ljvm, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/closed/share/native/sun/java2d/cmm/kcms/cmm.rc, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/closed/share/native/sun/java2d/cmm/kcms/cmm.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=kcms.dll" \
-D "JDK_INTERNAL_NAME=kcms" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libkcms, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBKCMS): $(BUILD_LIBJAVA)
BUILD_LIBRARIES += $(BUILD_LIBKCMS)
endif
##########################################################################################
ifndef OPENJDK
ifeq ($(OPENJDK_TARGET_OS), solaris)
ifneq ($(OPENJDK_TARGET_CPU), x86_64)
ifeq ($(shell if test "$(OS_VERSION_MAJOR)" -eq 5 -a "$(OS_VERSION_MINOR)" -le 10; then $(ECHO) ok; fi), ok)
SUNWJDGA_MAPFILE :=
ifeq ($(OPENJDK_TARGET_CPU_ARCH), sparc)
SUNWJDGA_MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libjdga/mapfile-vers
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBSUNWJDGA, \
LIBRARY := sunwjdga, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/solaris/native/sun/jdga, \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
-I$(JDK_TOPDIR)/src/share/javavm/export \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/javavm/export \
-I$(OPENWIN_HOME)/include, \
MAPFILE := $(SUNWJDGA_MAPFILE), \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX := -L$(OPENWIN_LIB)$(OPENJDK_TARGET_CPU_ISADIR) -R$(OPENWIN_LIB)$(OPENJDK_TARGET_CPU_ISADIR) -ldga -lX11 $(LIBDL) -lc, \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libsunwjdga, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
BUILD_LIBRARIES += $(BUILD_LIBSUNWJDGA)
endif
endif
endif
endif
##########################################################################################
ifeq ($(BUILD_HEADLESS), true)
ifneq ($(OPENJDK_TARGET_OS), windows)
LIBAWT_HEADLESS_DIRS := $(JDK_TOPDIR)/src/share/native/sun/font \
$(JDK_TOPDIR)/src/share/native/sun/java2d/opengl \
$(JDK_TOPDIR)/src/solaris/native/sun/font \
$(JDK_TOPDIR)/src/solaris/native/sun/awt \
$(JDK_TOPDIR)/src/solaris/native/sun/java2d/opengl \
$(JDK_TOPDIR)/src/solaris/native/sun/java2d/x11
ifeq ($(OPENJDK_TARGET_OS), macosx)
LIBAWT_HEADLESS_DIRS += $(JDK_TOPDIR)/src/macosx/native/sun/font
endif
LIBAWT_HEADLESS_CFLAGS := -DHEADLESS=true \
-DX11_PATH=\"$(X11_PATH)\" -DPACKAGE_PATH=\"$(PACKAGE_PATH)\" \
$(CUPS_CFLAGS) \
$(X_CFLAGS) \
-I$(JDK_TOPDIR)/src/share/native/sun/java2d \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d \
-I$(JDK_TOPDIR)/src/share/native/sun/java2d/loops \
-I$(JDK_TOPDIR)/src/share/native/sun/java2d/pipe \
-I$(JDK_TOPDIR)/src/share/native/sun/awt/image \
-I$(JDK_TOPDIR)/src/share/native/sun/awt/image/cvutils \
-I$(JDK_TOPDIR)/src/share/native/sun/awt/debug \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/jdga \
$(foreach dir, $(LIBAWT_HEADLESS_DIRS), -I$(dir))
ifeq ($(OPENJDK_TARGET_OS), macosx)
LIBAWT_HEADLESS_CFLAGS += \
-F/System/Library/Frameworks/JavaVM.framework/Frameworks \
-F/System/Library/Frameworks/ApplicationServices.framework/Frameworks
endif
LIBAWT_HEADLESS_FILES := \
awt_Font.c \
HeadlessToolkit.c \
fontpath.c \
VDrawingArea.c \
X11Color.c \
X11Renderer.c \
X11PMBlitLoops.c \
X11SurfaceData.c \
X11FontScaler_md.c \
X11TextRenderer_md.c \
OGLBlitLoops.c \
OGLBufImgOps.c \
OGLContext.c \
OGLFuncs.c \
OGLMaskBlit.c \
OGLMaskFill.c \
OGLPaints.c \
OGLRenderQueue.c \
OGLRenderer.c \
OGLSurfaceData.c \
OGLTextRenderer.c \
OGLVertexCache.c \
GLXGraphicsConfig.c \
GLXSurfaceData.c \
AccelGlyphCache.c \
CUPSfuncs.c
ifeq ($(OPENJDK_TARGET_OS), macosx)
LIBAWT_HEADLESS_FILES += \
AWTFont.m \
AWTStrike.m \
CCharToGlyphMapper.m \
CGGlyphImages.m \
CGGlyphOutlines.m \
CoreTextSupport.m
endif
LIBAWT_HEADLESS_REORDER :=
ifeq ($(OPENJDK_TARGET_OS), solaris)
ifneq ($(OPENJDK_TARGET_CPU), x86_64)
LIBAWT_HEADLESS_REORDER := $(JDK_TOPDIR)/makefiles/mapfiles/libawt_headless/reorder-$(OPENJDK_TARGET_CPU)
endif
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBAWT_HEADLESS, \
LIBRARY := awt_headless, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBAWT_HEADLESS_DIRS), \
INCLUDE_FILES := $(LIBAWT_HEADLESS_FILES), \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) $(LIBAWT_HEADLESS_CFLAGS), \
MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libawt_headless/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_linux := $(call SET_SHARED_LIBRARY_ORIGIN,/..), \
LDFLAGS_solaris := $(call SET_SHARED_LIBRARY_ORIGIN,/..) \
-R/usr/dt/lib$(OPENJDK_TARGET_CPU_ISADIR) \
-R$(OPENWIN_LIB)$(OPENJDK_TARGET_CPU_ISADIR), \
LDFLAGS_macosx := $(call SET_SHARED_LIBRARY_ORIGIN)., \
REORDER := $(LIBAWT_HEADLESS_REORDER), \
LDFLAGS_SUFFIX_linux := -ljvm -lawt -lm $(LIBDL) -ljava, \
LDFLAGS_SUFFIX_solaris := $(LIBDL) -ljvm -lawt -lm -ljava $(LIBCXX) -lc, \
LDFLAGS_SUFFIX_macosx := -ljvm $(LIBCXX) -lawt $(LIBDL) -ljava \
-framework Accelerate \
-framework ApplicationServices \
-framework Cocoa \
-F/System/Library/Frameworks/JavaVM.framework/Frameworks \
-framework JavaNativeFoundation \
-framework JavaRuntimeSupport, \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libawt_headless, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBAWT_HEADLESS): $(BUILD_LIBAWT)
BUILD_LIBRARIES += $(BUILD_LIBAWT_HEADLESS)
endif
endif
##########################################################################################
ifndef BUILD_HEADLESS_ONLY
LIBSPLASHSCREEN_DIRS := \
$(JDK_TOPDIR)/src/share/native/sun/awt/image/jpeg \
$(JDK_TOPDIR)/src/share/native/sun/awt/libpng \
$(JDK_TOPDIR)/src/share/native/sun/awt/splashscreen
ifeq ($(USE_EXTERNAL_LIBGIF), true)
GIFLIB_LDFLAGS := -lgif
else
LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/share/native/sun/awt/giflib
GIFLIB_CFLAGS := -I$(JDK_TOPDIR)/src/share/native/sun/awt/giflib
endif
ifneq ($(OPENJDK_TARGET_OS), macosx)
LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/awt/splashscreen
else
LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/macosx/native/sun/awt/splashscreen
endif
LIBSPLASHSCREEN_CFLAGS := -DSPLASHSCREEN -DPNG_NO_MMX_CODE \
$(foreach dir, $(LIBSPLASHSCREEN_DIRS), -I$(dir))
ifeq ($(OPENJDK_TARGET_OS), macosx)
LIBSPLASHSCREEN_CFLAGS := -I$(JDK_TOPDIR)/src/macosx/native/sun/awt/splashscreen \
$(LIBSPLASHSCREEN_CFLAGS) \
-F/System/Library/Frameworks/JavaVM.framework/Frameworks
LIBSPLASHSCREEN_CFLAGS += -DWITH_MACOSX
LIBSPLASHSCREEN_CFLAGS += -I$(JDK_TOPDIR)/src/macosx/native/sun/osxapp
LIBSPLASHSCREEN_java_awt_SplashScreen.c_CFLAGS := -x objective-c -O0
LIBSPLASHSCREEN_splashscreen_gfx_impl.c_CFLAGS := -x objective-c -O0
LIBSPLASHSCREEN_splashscreen_gif.c_CFLAGS := -x objective-c -O0
LIBSPLASHSCREEN_splashscreen_impl.c_CFLAGS := -x objective-c -O0
LIBSPLASHSCREEN_splashscreen_jpeg.c_CFLAGS := -x objective-c -O0
LIBSPLASHSCREEN_splashscreen_png.c_CFLAGS := -x objective-c -O0
LIBSPLASHSCREEN_splashscreen_sys.m_CFLAGS := -O0
else ifneq ($(OPENJDK_TARGET_OS), windows)
LIBSPLASHSCREEN_CFLAGS += -DWITH_X11 -I$(OPENWIN_HOME)/include -I$(OPENWIN_HOME)/include/X11/extensions
else
LIBSPLASHSCREEN_CFLAGS += -DWITH_WIN32
endif
LIBSPLASHSCREEN_LDFLAGS_SUFFIX :=
ifneq ($(USE_EXTERNAL_LIBZ), true)
LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.5
LIBSPLASHSCREEN_CFLAGS += $(ZLIB_CPPFLAGS)
endif
ifeq ($(OPENJDK_TARGET_OS), macosx)
LIBSPLASHSCREEN_LDFLAGS_SUFFIX += $(LIBM) -lpthread -liconv -losxapp \
-framework ApplicationServices \
-framework Foundation \
-framework Cocoa \
-F/System/Library/Frameworks/JavaVM.framework/Frameworks \
-framework JavaNativeFoundation
else ifneq ($(OPENJDK_TARGET_OS), windows)
LIBSPLASHSCREEN_LDFLAGS_SUFFIX += -L$(OPENWIN_LIB)$(OPENJDK_TARGET_CPU_ISADIR) -lX11 -lXext $(LIBM) -lpthread
else # OPENJDK_TARGET_OS
LIBSPLASHSCREEN_LDFLAGS_SUFFIX += kernel32.lib user32.lib gdi32.lib delayimp.lib -DELAYLOAD:user32.dll
endif # OPENJDK_TARGET_OS
$(eval $(call SetupNativeCompilation,LIBSPLASHSCREEN, \
LIBRARY := splashscreen, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBSPLASHSCREEN_DIRS), \
EXCLUDE_FILES := imageioJPEG.c jpegdecoder.c pngtest.c, \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(LIBSPLASHSCREEN_CFLAGS) $(CFLAGS_JDKLIB) $(GIFLIB_CFLAGS), \
MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libsplashscreen/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX := $(LIBSPLASHSCREEN_LDFLAGS_SUFFIX) $(LIBZ) $(GIFLIB_LDFLAGS), \
LDFLAGS_SUFFIX_solaris := -lc, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=splashscreen.dll" \
-D "JDK_INTERNAL_NAME=splashscreen" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libsplashscreen, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
BUILD_LIBRARIES += $(LIBSPLASHSCREEN)
ifeq ($(OPENJDK_TARGET_OS), macosx)
$(LIBSPLASHSCREEN): $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)osxapp$(SHARED_LIBRARY_SUFFIX)
endif
endif
##########################################################################################
ifndef OPENJDK
LIBDCPR_SRC_DIRS := \
$(JDK_TOPDIR)/src/closed/share/native/sun/dc/doe \
$(JDK_TOPDIR)/src/closed/share/native/sun/dc/path \
$(JDK_TOPDIR)/src/closed/share/native/sun/dc/pr \
$(JDK_TOPDIR)/src/closed/share/native/sun/dc/util
LIBDCPR_CFLAGS := $(foreach dir, $(LIBDCPR_SRC_DIRS), -I$(dir)) \
-I$(JDK_TOPDIR)/src/share/native/sun/java2d/pipe
$(eval $(call SetupNativeCompilation,BUILD_LIBDCPR, \
LIBRARY := dcpr, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBDCPR_SRC_DIRS), \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
$(LIBDCPR_CFLAGS), \
MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libdcpr/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX := $(LIBM) $(LDFLAGS_JDKLIB_SUFFIX), \
LDFLAGS_SUFFIX_posix := -lm, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=dcpr.dll" \
-D "JDK_INTERNAL_NAME=dcpr" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libdcpr, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBDCPR): $(BUILD_LIBJAVA)
BUILD_LIBRARIES += $(BUILD_LIBDCPR)
endif
##########################################################################################
$(eval $(call SetupNativeCompilation,BUILD_LIBJ2PCSC, \
LIBRARY := j2pcsc, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/share/native/sun/security/smartcardio \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/smartcardio, \
LANG := C, \
CFLAGS_posix := -D__sun_jdk, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
-I$(JDK_TOPDIR)/src/share/native/sun/security/smartcardio \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/smartcardio \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/smartcardio/MUSCLE, \
MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libj2pcsc/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX_posix := $(LIBDL), \
LDFLAGS_SUFFIX_windows := winscard.lib, \
LDFLAGS_SUFFIX_solaris := -lc, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=j2pcsc.dll" \
-D "JDK_INTERNAL_NAME=j2pcsc" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libj2pcsc, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
BUILD_LIBRARIES += $(BUILD_LIBJ2PCSC)
##########################################################################################
ifneq ($(OPENJDK_TARGET_OS), windows)
$(eval $(call SetupNativeCompilation,BUILD_LIBJ2GSS, \
LIBRARY := j2gss, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/share/native/sun/security/jgss/wrapper \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/jgss/wrapper, \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
-I$(JDK_TOPDIR)/src/share/native/sun/security/jgss/wrapper \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/jgss/wrapper, \
MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libj2gss/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX := $(LIBDL), \
LDFLAGS_SUFFIX_solaris := -lc, \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libj2gss, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
BUILD_LIBRARIES += $(BUILD_LIBJ2GSS)
endif
##########################################################################################
ifneq ($(BUILD_CRYPTO), no)
BUILD_LIBKRB5_NAME :=
ifeq ($(OPENJDK_TARGET_OS), windows)
BUILD_LIBKRB5_NAME := w2k_lsa_auth
BUILD_LIBKRB5_SRC := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/krb5
BUILD_LIBKRB5_LIBS := advapi32.lib Secur32.lib netapi32.lib kernel32.lib user32.lib \
gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib \
ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib
else ifeq ($(OPENJDK_TARGET_OS), macosx)
BUILD_LIBKRB5_NAME := osxkrb5
BUILD_LIBKRB5_SRC := $(JDK_TOPDIR)/src/share/native/sun/security/krb5
BUILD_LIBKRB5_LIBS := -framework Kerberos
endif
ifneq ($(BUILD_LIBKRB5_NAME), )
$(eval $(call SetupNativeCompilation,BUILD_LIBKRB5, \
LIBRARY := $(BUILD_LIBKRB5_NAME), \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(BUILD_LIBKRB5_SRC), \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
-I$(JDK_TOPDIR)/src/share/native/sun/security/krb5 \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/krb5, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX := $(BUILD_LIBKRB5_LIBS), \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=$(BUILD_LIBKRB5_NAME).dll" \
-D "JDK_INTERNAL_NAME=$(BUILD_LIBKRB5_NAME)" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libkrb5, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
BUILD_LIBRARIES += $(BUILD_LIBKRB5)
endif
endif
##########################################################################################
ifeq ($(OPENJDK_TARGET_OS), windows)
$(eval $(call SetupNativeCompilation,BUILD_LIBSUNMSCAPI, \
LIBRARY := sunmscapi, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/mscapi, \
LANG := C++, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/mscapi, \
LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX := Crypt32.Lib advapi32.lib, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=sunmscapi.dll" \
-D "JDK_INTERNAL_NAME=sunmscapi" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libsunmscapi, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
BUILD_LIBRARIES += $(BUILD_LIBSUNMSCAPI)
endif
##########################################################################################
$(eval $(call SetupNativeCompilation,BUILD_LIBJ2PKCS11, \
LIBRARY := j2pkcs11, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/share/native/sun/security/pkcs11 \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/pkcs11 \
$(JDK_TOPDIR)/src/share/native/sun/security/pkcs11/wrapper \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/pkcs11/wrapper, \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
-I$(JDK_TOPDIR)/src/share/native/sun/security/pkcs11 \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/pkcs11 \
-I$(JDK_TOPDIR)/src/share/native/sun/security/pkcs11/wrapper \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/pkcs11/wrapper, \
MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libj2pkcs11/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX_posix := $(LIBDL), \
LDFLAGS_SUFFIX_solaris := -lc, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=j2pkcs11.dll" \
-D "JDK_INTERNAL_NAME=j2pkcs11" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libj2pkcs11, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
BUILD_LIBRARIES += $(BUILD_LIBJ2PKCS11)
##########################################################################################
ifeq ($(ENABLE_INTREE_EC), yes)
BUILD_LIBSUNEC_FLAGS := -I$(JDK_TOPDIR)/src/share/native/sun/security/ec \
-I$(JDK_TOPDIR)/src/share/native/sun/security/ec/impl
#
# On sol-sparc...all libraries are compiled with -xregs=no%appl
# (set in CFLAGS_REQUIRED_sparc)
#
# except!!! libsunec.so
#
ECC_JNI_SOLSPARC_FILTER :=
ifeq ($(OPENJDK_TARGET_CPU_ARCH), sparc)
ECC_JNI_SOLSPARC_FILTER := -xregs=no%appl
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBSUNEC, \
LIBRARY := sunec, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/share/native/sun/security/ec \
$(JDK_TOPDIR)/src/share/native/sun/security/ec/impl, \
LANG := C++, \
OPTIMIZATION := LOW, \
CFLAGS := $(filter-out $(ECC_JNI_SOLSPARC_FILTER), $(CFLAGS_JDKLIB)) \
$(BUILD_LIBSUNEC_FLAGS) \
-DMP_API_COMPATIBLE -DNSS_ECC_MORE_THAN_SUITE_B, \
CXXFLAGS := $(filter-out $(ECC_JNI_SOLSPARC_FILTER), $(CXXFLAGS_JDKLIB)) \
$(BUILD_LIBSUNEC_FLAGS), \
MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libsunec/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK), \
LDFLAGS_macosx := $(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX := $(LIBCXX), \
LDFLAGS_SUFFIX_linux := -lc, \
LDFLAGS_SUFFIX_solaris := -lc, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=sunec.dll" \
-D "JDK_INTERNAL_NAME=sunec" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libsunec, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
BUILD_LIBRARIES += $(BUILD_LIBSUNEC)
endif
##########################################################################################
LIBJSOUND_SRC_DIRS := \
$(JDK_TOPDIR)/src/share/native/com/sun/media/sound \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/com/sun/media/sound
LIBJSOUND_SRC_FILES := Utilities.c Platform.c
LIBJSOUND_LANG := C
LIBJSOUND_CFLAGS := $(foreach dir, $(LIBJSOUND_SRC_DIRS), -I$(dir))
EXTRA_SOUND_JNI_LIBS :=
LIBJSOUND_MIDIFILES := \
MidiInDevice.c \
MidiInDeviceProvider.c \
MidiOutDevice.c \
MidiOutDeviceProvider.c \
PlatformMidi.c
# files needed for ports
LIBJSOUND_PORTFILES := \
PortMixerProvider.c \
PortMixer.c
# files needed for direct audio
LIBJSOUND_DAUDIOFILES := \
DirectAudioDeviceProvider.c \
DirectAudioDevice.c
ifeq ($(OPENJDK_TARGET_OS), windows)
EXTRA_SOUND_JNI_LIBS += jsoundds
LIBJSOUND_CFLAGS += -DX_PLATFORM=X_WINDOWS \
-DUSE_PLATFORM_MIDI_OUT=TRUE \
-DUSE_PLATFORM_MIDI_IN=TRUE \
-DUSE_PORTS=TRUE
LIBJSOUND_SRC_FILES += \
PLATFORM_API_WinOS_MidiIn.cpp \
PLATFORM_API_WinOS_MidiOut.c \
PLATFORM_API_WinOS_Util.c \
PLATFORM_API_WinOS_Ports.c
LIBJSOUND_SRC_FILES += $(LIBJSOUND_MIDIFILES)
LIBJSOUND_SRC_FILES += $(LIBJSOUND_PORTFILES)
endif # OPENJDK_TARGET_OS windows
ifeq ($(OPENJDK_TARGET_OS), linux)
EXTRA_SOUND_JNI_LIBS += jsoundalsa
LIBJSOUND_CFLAGS += -DX_PLATFORM=X_LINUX
endif # OPENJDK_TARGET_OS linux
ifeq ($(OPENJDK_TARGET_OS), macosx)
LIBJSOUND_LANG := C++
LIBJSOUND_CFLAGS += -DX_PLATFORM=X_MACOSX \
-DUSE_PORTS=TRUE \
-DUSE_DAUDIO=TRUE \
-DUSE_PLATFORM_MIDI_OUT=TRUE \
-DUSE_PLATFORM_MIDI_IN=TRUE
LIBJSOUND_SRC_DIRS += $(JDK_TOPDIR)/src/macosx/native/com/sun/media/sound
LIBJSOUND_SRC_FILES += \
PLATFORM_API_MacOSX_Utils.cpp \
PLATFORM_API_MacOSX_PCM.cpp \
PLATFORM_API_MacOSX_Ports.cpp \
PLATFORM_API_MacOSX_MidiIn.c \
PLATFORM_API_MacOSX_MidiOut.c \
PLATFORM_API_MacOSX_MidiUtils.c
LIBJSOUND_SRC_FILES += $(LIBJSOUND_MIDIFILES)
LIBJSOUND_SRC_FILES += $(LIBJSOUND_PORTFILES)
LIBJSOUND_SRC_FILES += $(LIBJSOUND_DAUDIOFILES)
endif # OPENJDK_TARGET_OS macosx
ifeq ($(OPENJDK_TARGET_OS), solaris)
LIBJSOUND_CFLAGS += -DX_PLATFORM=X_SOLARIS \
-DUSE_PORTS=TRUE \
-DUSE_DAUDIO=TRUE
LIBJSOUND_SRC_FILES += \
PLATFORM_API_SolarisOS_Utils.c \
PLATFORM_API_SolarisOS_Ports.c \
PLATFORM_API_SolarisOS_PCM.c
LIBJSOUND_SRC_FILES += $(LIBJSOUND_MIDIFILES)
LIBJSOUND_SRC_FILES += $(LIBJSOUND_PORTFILES)
LIBJSOUND_SRC_FILES += $(LIBJSOUND_DAUDIOFILES)
endif # OPENJDK_TARGET_OS solaris
ifeq ($(JVM_VARIANT_ZERO), true)
LIBJSOUND_CFLAGS += -DX_ARCH=X_ZERO
else
ifeq ($(OPENJDK_TARGET_CPU), x86)
LIBJSOUND_CFLAGS += -DX_ARCH=X_I586
endif
ifeq ($(OPENJDK_TARGET_CPU), sparc)
LIBJSOUND_CFLAGS += -DX_ARCH=X_SPARC
endif
ifeq ($(OPENJDK_TARGET_CPU), sparcv9)
LIBJSOUND_CFLAGS += -DX_ARCH=X_SPARCV9
endif
ifeq ($(OPENJDK_TARGET_CPU), x86_64)
LIBJSOUND_CFLAGS += -DX_ARCH=X_AMD64
endif
ifeq ($(OPENJDK_TARGET_CPU), arm)
LIBJSOUND_CFLAGS += -DX_ARCH=X_ARM
endif
ifeq ($(OPENJDK_TARGET_CPU), ppc)
LIBJSOUND_CFLAGS += -DX_ARCH=X_PPC
endif
endif
LIBJSOUND_CFLAGS += -DEXTRA_SOUND_JNI_LIBS='"$(EXTRA_SOUND_JNI_LIBS)"'
$(eval $(call SetupNativeCompilation,BUILD_LIBJSOUND, \
LIBRARY := jsound, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBJSOUND_SRC_DIRS), \
INCLUDE_FILES := $(LIBJSOUND_SRC_FILES), \
LANG := $(LIBJSOUND_LANG), \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
$(LIBJSOUND_CFLAGS), \
CXXFLAGS := $(CXXFLAGS_JDKLIB) $(LIBJSOUND_CFLAGS), \
MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libjsound/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_macosx := -framework CoreAudio -framework CoreFoundation \
-framework CoreServices -framework AudioUnit $(LIBCXX) \
-framework CoreMIDI -framework AudioToolbox, \
LDFLAGS_windows := $(WIN_JAVA_LIB) advapi32.lib winmm.lib, \
LDFLAGS_SUFFIX_posix := -ljava -ljvm, \
LDFLAGS_SUFFIX_solaris := -lc, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=jsound.dll" \
-D "JDK_INTERNAL_NAME=jsound" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjsound, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBJSOUND): $(BUILD_LIBJAVA)
BUILD_LIBRARIES += $(BUILD_LIBJSOUND)
##########################################################################################
ifneq ($(filter jsoundalsa, $(EXTRA_SOUND_JNI_LIBS)), )
$(eval $(call SetupNativeCompilation,BUILD_LIBJSOUNDALSA, \
LIBRARY := jsoundalsa, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBJSOUND_SRC_DIRS), \
INCLUDE_FILES := Utilities.c $(LIBJSOUND_MIDIFILES) $(LIBJSOUND_PORTFILES) \
$(LIBJSOUND_DAUDIOFILES) \
PLATFORM_API_LinuxOS_ALSA_CommonUtils.c \
PLATFORM_API_LinuxOS_ALSA_PCM.c \
PLATFORM_API_LinuxOS_ALSA_PCMUtils.c \
PLATFORM_API_LinuxOS_ALSA_MidiIn.c \
PLATFORM_API_LinuxOS_ALSA_MidiOut.c \
PLATFORM_API_LinuxOS_ALSA_MidiUtils.c \
PLATFORM_API_LinuxOS_ALSA_Ports.c, \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) $(ALSA_CFLAGS) \
$(LIBJSOUND_CFLAGS) \
-DUSE_DAUDIO=TRUE \
-DUSE_PORTS=TRUE \
-DUSE_PLATFORM_MIDI_OUT=TRUE \
-DUSE_PLATFORM_MIDI_IN=TRUE, \
MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libjsoundalsa/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX := $(ALSA_LIBS) -ljava -ljvm, \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjsoundalsa, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBJSOUNDALSA): $(BUILD_LIBJAVA)
BUILD_LIBRARIES += $(BUILD_LIBJSOUNDALSA)
endif
##########################################################################################
ifneq ($(filter jsoundds, $(EXTRA_SOUND_JNI_LIBS)), )
$(eval $(call SetupNativeCompilation,BUILD_LIBJSOUNDDS, \
LIBRARY := jsoundds, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBJSOUND_SRC_DIRS), \
INCLUDE_FILES := Utilities.c $(LIBJSOUND_DAUDIOFILES) \
PLATFORM_API_WinOS_DirectSound.cpp, \
LANG := C++, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
$(LIBJSOUND_CFLAGS) \
-DUSE_DAUDIO=TRUE, \
LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX := $(LDFLAGS_JDKLIB_SUFFIX) dsound.lib winmm.lib user32.lib ole32.lib, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=jsoundds.dll" \
-D "JDK_INTERNAL_NAME=jsoundds" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjsoundds, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBJSOUNDDS): $(BUILD_LIBJAVA)
BUILD_LIBRARIES += $(BUILD_LIBJSOUNDDS)
endif
##########################################################################################
ifeq ($(OPENJDK_TARGET_OS), solaris)
ifndef OPENJDK
$(eval $(call SetupNativeCompilation,BUILD_LIBJ2UCRYPTO, \
LIBRARY := j2ucrypto, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/closed/solaris/native/com/oracle/security/ucrypto, \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
-I$(JDK_TOPDIR)/src/closed/solaris/native/com/oracle/security/ucrypto, \
MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libj2ucrypto/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB), \
LDFLAGS_SUFFIX := $(LIBDL), \
LDFLAGS_SUFFIX_solaris := -lc, \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libj2ucrypto, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBJ2UCRYPTO): $(BUILD_LIBJAVA)
BUILD_LIBRARIES += $(BUILD_LIBJ2UCRYPTO)
endif
endif
##########################################################################################
ifeq ($(OPENJDK_TARGET_OS), macosx)
$(eval $(call SetupNativeCompilation,BUILD_LIBAPPLESCRIPTENGINE, \
LIBRARY := AppleScriptEngine, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/macosx/native/apple/applescript, \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
-I$(JDK_TOPDIR)/src/macosx/native/apple/applescript \
-F/System/Library/Frameworks/JavaVM.framework/Frameworks \
-F/System/Library/Frameworks/ApplicationServices.framework/Frameworks, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX := -framework Cocoa \
-framework Carbon \
-F/System/Library/Frameworks/JavaVM.framework/Frameworks \
-framework JavaNativeFoundation \
$(LDFLAGS_JDKLIB_SUFFIX), \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libAppleScriptEngine, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBAPPLESCRIPTENGINE): $(BUILD_LIBJAVA)
BUILD_LIBRARIES += $(BUILD_LIBAPPLESCRIPTENGINE)
endif
##########################################################################################
ifeq ($(OPENJDK_TARGET_OS), macosx)
$(eval $(call SetupNativeCompilation,BUILD_LIBOSXAPP, \
LIBRARY := osxapp, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/macosx/native/sun/osxapp, \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
-I$(JDK_TOPDIR)/src/macosx/native/sun/osxapp \
-I$(JDK_OUTPUTDIR)/gensrc/sun/osxapp \
-F/System/Library/Frameworks/JavaVM.framework/Frameworks \
-F/System/Library/Frameworks/ApplicationServices.framework/Frameworks, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX_macosx := \
-framework Accelerate \
-framework ApplicationServices \
-framework AudioToolbox \
-framework Carbon \
-framework Cocoa \
-framework Security \
-framework ExceptionHandling \
-F/System/Library/Frameworks/JavaVM.framework/Frameworks \
-framework JavaNativeFoundation \
-framework JavaRuntimeSupport \
-framework OpenGL \
-framework IOSurface \
-framework QuartzCore, \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libosxapp, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
BUILD_LIBRARIES += $(BUILD_LIBOSXAPP)
endif
##########################################################################################
ifeq ($(OPENJDK_TARGET_OS), macosx)
LIBOSX_DIRS := \
$(JDK_TOPDIR)/src/macosx/native/com/apple/concurrent \
$(JDK_TOPDIR)/src/macosx/native/java/util \
$(JDK_TOPDIR)/src/macosx/native/com/apple/eio \
$(JDK_TOPDIR)/src/macosx/native/apple/security \
$(JDK_TOPDIR)/src/macosx/native/apple/launcher
$(eval $(call SetupNativeCompilation,BUILD_LIBOSX, \
LIBRARY := osx, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBOSX_DIRS), \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
$(foreach dir, $(LIBOSX_DIRS), -I$(dir)) \
-I$(JDK_TOPDIR)/src/macosx/native/sun/osxapp \
-F/System/Library/Frameworks/JavaVM.framework/Frameworks \
-F/System/Library/Frameworks/ApplicationServices.framework/Frameworks, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX_macosx := \
-losxapp \
-framework Cocoa \
-framework ApplicationServices \
-F/System/Library/Frameworks/JavaVM.framework/Frameworks \
-framework JavaNativeFoundation \
-framework JavaRuntimeSupport \
-framework Security \
-framework SystemConfiguration \
$(LDFLAGS_JDKLIB_SUFFIX), \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libosx, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
BUILD_LIBRARIES += $(BUILD_LIBOSX)
$(BUILD_LIBOSX): $(BUILD_LIBOSXAPP)
$(BUILD_LIBOSX): $(BUILD_LIBJAVA)
endif
##########################################################################################
ifeq ($(OPENJDK_TARGET_OS), macosx)
LIBAWT_LWAWT_FILES := \
awt.m \
ApplicationDelegate.m \
CFRetainedResource.m \
CGLGraphicsConfig.m \
CGLSurfaceData.m \
CGLLayer.m \
CGraphicsConfig.m \
CGraphicsDevice.m \
CGraphicsEnv.m \
CCharToGlyphMapper.m \
CSystemColors.m \
AWTFont.m \
CGGlyphOutlines.m \
CGGlyphImages.m \
CoreTextSupport.m \
AWTStrike.m \
InitIDs.m \
AWTEvent.m \
AWTView.m \
AWTWindow.m \
AWTSurfaceLayers.m \
CCursorManager.m \
CClipboard.m \
CDataTransferer.m \
CDragSource.m \
CDragSourceContextPeer.m \
CDropTarget.m \
CDropTargetContextPeer.m \
CInputMethod.m \
CDesktopPeer.m \
OSVersion.m \
DnDUtilities.m \
CFileDialog.m \
CImage.m \
CMenu.m \
CMenuBar.m \
CMenuComponent.m \
CMenuItem.m \
CPopupMenu.m \
CRobot.m \
CTrayIcon.m \
CWrapper.m \
JavaAccessibilityAction.m \
JavaAccessibilityUtilities.m \
JavaComponentAccessibility.m \
JavaTextAccessibility.m \
LWCToolkit.m \
GeomUtilities.m \
CPrinterJob.m \
PrintModel.m \
PrinterSurfaceData.m \
PrinterView.m \
QuartzSurfaceData.m \
QuartzRenderer.m \
CTextPipe.m \
ImageSurfaceData.m \
awt_DrawingSurface.m \
\
OGLBlitLoops.c \
OGLBufImgOps.c \
OGLContext.c \
OGLFuncs.c \
OGLMaskBlit.c \
OGLMaskFill.c \
OGLPaints.c \
OGLRenderQueue.c \
OGLRenderer.c \
OGLSurfaceData.c \
OGLTextRenderer.c \
OGLVertexCache.c \
AccelGlyphCache.c \
CUPSfuncs.c
LIBAWT_LWAWT_DIRS := \
$(JDK_TOPDIR)/src/macosx/native/sun/awt \
$(JDK_TOPDIR)/src/macosx/native/sun/font \
$(JDK_TOPDIR)/src/macosx/native/sun/java2d/opengl \
$(JDK_TOPDIR)/src/solaris/native/sun/awt \
$(JDK_TOPDIR)/src/share/native/sun/font \
$(JDK_TOPDIR)/src/share/native/sun/java2d/opengl \
$(eval $(call SetupNativeCompilation,BUILD_LIBAWT_LWAWT, \
LIBRARY := awt_lwawt, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBAWT_LWAWT_DIRS), \
LANG := C, \
INCLUDE_FILES := $(LIBAWT_LWAWT_FILES), \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
$(X_CFLAGS) \
$(X_LIBS) \
$(foreach dir, $(LIBAWT_LWAWT_DIRS), -I$(dir)) \
-I$(JDK_TOPDIR)/src/macosx/native/sun/osxapp \
-I$(JDK_TOPDIR)/src/share/native/sun/java2d \
-I$(JDK_TOPDIR)/src/solaris/native/sun/java2d \
-I$(JDK_TOPDIR)/src/share/native/sun/awt/image \
-I$(JDK_TOPDIR)/src/share/native/sun/awt/image/cvutils \
-I$(JDK_TOPDIR)/src/share/native/sun/java2d/loops \
-I$(JDK_TOPDIR)/src/share/native/sun/java2d/pipe \
-I$(JDK_TOPDIR)/src/share/native/sun/awt/debug \
-F/System/Library/Frameworks/JavaVM.framework/Frameworks \
-F/System/Library/Frameworks/ApplicationServices.framework/Frameworks, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX_macosx := -lawt -lmlib_image -losxapp -ljvm $(LIBM) \
-framework Accelerate \
-framework ApplicationServices \
-framework AudioToolbox \
-framework Carbon \
-framework Cocoa \
-framework Security \
-framework ExceptionHandling \
-F/System/Library/Frameworks/JavaVM.framework/Frameworks \
-framework JavaNativeFoundation \
-framework JavaRuntimeSupport \
-framework OpenGL \
-framework QuartzCore -ljava, \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libawt_lwawt, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
BUILD_LIBRARIES += $(BUILD_LIBAWT_LWAWT)
$(BUILD_LIBAWT_LWAWT): $(BUILD_LIBAWT)
$(BUILD_LIBAWT_LWAWT): $(BUILD_LIBMLIB_IMAGE)
$(BUILD_LIBAWT_LWAWT): $(BUILD_LIBOSXAPP)
$(BUILD_LIBAWT_LWAWT): $(BUILD_LIBJAVA)
endif
##########################################################################################
ifeq ($(OPENJDK_TARGET_OS), macosx)
$(eval $(call SetupNativeCompilation,BUILD_LIBOSXUI, \
LIBRARY := osxui, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/macosx/native/com/apple/laf, \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
-I$(JDK_TOPDIR)/src/macosx/native/com/apple/laf \
-I$(JDK_TOPDIR)/src/macosx/native/sun/osxapp \
-I$(JDK_TOPDIR)/src/macosx/native/sun/awt \
-F/System/Library/Frameworks/JavaVM.framework/Frameworks, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN) \
-Xlinker -rpath -Xlinker @loader_path, \
LDFLAGS_SUFFIX_macosx := -lawt -losxapp -lawt_lwawt \
-framework Cocoa \
-framework Carbon \
-framework ApplicationServices \
-F/System/Library/Frameworks/JavaVM.framework/Frameworks \
-framework JavaNativeFoundation \
-framework JavaRuntimeSupport \
-ljava -ljvm, \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libosxui, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
BUILD_LIBRARIES += $(BUILD_LIBOSXUI)
$(BUILD_LIBOSXUI): $(BUILD_LIBAWT)
$(BUILD_LIBOSXUI): $(BUILD_LIBOSXAPP)
$(BUILD_LIBOSXUI): $(BUILD_LIBAWT_LWAWT)
#$(BUILD_LIBOSXUI): $(BUILD_LIBJAVA)
endif
##########################################################################################
ifndef OPENJDK
ifeq ($(OPENJDK_TARGET_OS), windows)
include lib/CoreLibraries.gmk
ACCESSBRIDGE_SRCDIR := $(JDK_TOPDIR)/src/closed/windows/native/sun/bridge
include lib/PlatformLibraries.gmk
define SetupAccessBridge
# Parameter 1 Suffix
# Parameter 2 Machine
# Parameter 3 ACCESSBRIDGE_ARCH_ suffix
include lib/NetworkingLibraries.gmk
$(call SetupNativeCompilation,BUILD_JAWTACCESSBRIDGE$1, \
LIBRARY = JAWTAccessBridge$1, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(ACCESSBRIDGE_SRCDIR), \
INCLUDE_FILES := JAWTAccessBridge.cpp, \
LANG := C++, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
-DACCESSBRIDGE_ARCH_$3, \
LDFLAGS := $(LDFLAGS_JDKLIB) kernel32.lib user32.lib gdi32.lib \
winspool.lib jawt.lib comdlg32.lib advapi32.lib shell32.lib \
ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib \
-subsystem:windows -machine:$2 \
-def:$(ACCESSBRIDGE_SRCDIR)/JAWTAccessBridge.DEF, \
VERSIONINFO_RESOURCE := $(ACCESSBRIDGE_SRCDIR)/AccessBridgeStatusWindow.rc, \
RC_FLAGS := $(RC_FLAGS), \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjawtaccessbridge$1, \
DEBUG_SYMBOLS := true)
include lib/NioLibraries.gmk
$$(BUILD_JAWTACCESSBRIDGE$1): $(JDK_OUTPUTDIR)/lib/$(LIBRARY_PREFIX)jawt$(STATIC_LIBRARY_SUFFIX)
include lib/SecurityLibraries.gmk
$(call SetupNativeCompilation,BUILD_JAVAACCESSBRIDGE$1, \
LIBRARY = JavaAccessBridge$1, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(ACCESSBRIDGE_SRCDIR), \
INCLUDE_FILES := AccessBridgeATInstance.cpp AccessBridgeDebug.cpp \
AccessBridgeJavaEntryPoints.cpp \
AccessBridgeMessages.cpp JavaAccessBridge.cpp, \
LANG := C++, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
-DACCESSBRIDGE_ARCH_$3, \
LDFLAGS := $(LDFLAGS_JDKLIB) kernel32.lib user32.lib gdi32.lib \
winspool.lib comdlg32.lib advapi32.lib shell32.lib \
ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib \
-subsystem:windows -machine:$2 \
-def:$(ACCESSBRIDGE_SRCDIR)/JavaAccessBridge.DEF, \
VERSIONINFO_RESOURCE := $(ACCESSBRIDGE_SRCDIR)/AccessBridgeStatusWindow.rc, \
RC_FLAGS := $(RC_FLAGS), \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjavaaccessbridge$1, \
DEBUG_SYMBOLS := true)
include lib/ServiceabilityLibraries.gmk
$(call SetupNativeCompilation,BUILD_WINDOWSACCESSBRIDGE$1, \
LIBRARY = WindowsAccessBridge$1, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(ACCESSBRIDGE_SRCDIR), \
INCLUDE_FILES := AccessBridgeJavaVMInstance.cpp AccessBridgeMessageQueue.cpp \
AccessBridgeMessages.cpp AccessBridgeWindowsEntryPoints.cpp \
WinAccessBridge.cpp AccessBridgeDebug.cpp \
AccessBridgeEventHandler.cpp, \
LANG := C++, \
OPTIMIZATION := LOW, \
CFLAGS := $(filter-out -MD, $(CFLAGS_JDKLIB)) -MT \
-DACCESSBRIDGE_ARCH_$3, \
LDFLAGS := $(LDFLAGS_JDKLIB) kernel32.lib user32.lib gdi32.lib \
winspool.lib comdlg32.lib advapi32.lib shell32.lib \
ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib \
-subsystem:windows -machine:$2 \
-def:$(ACCESSBRIDGE_SRCDIR)/WinAccessBridge.DEF, \
VERSIONINFO_RESOURCE := $(ACCESSBRIDGE_SRCDIR)/AccessBridgeStatusWindow.rc, \
RC_FLAGS := $(RC_FLAGS), \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libwindowsaccessbridge$1, \
DEBUG_SYMBOLS := true)
BUILD_LIBRARIES += $$(BUILD_JAWTACCESSBRIDGE$1) $$(BUILD_JAVAACCESSBRIDGE$1) \
$$(BUILD_WINDOWSACCESSBRIDGE$1)
endef
ifeq ($(OPENJDK_TARGET_CPU_BITS), 32)
$(eval $(call SetupAccessBridge,-32,I386,32))
$(eval $(call SetupAccessBridge,,I386,LEGACY))
else
$(eval $(call SetupAccessBridge,-64,X64,64))
endif
endif
endif
include lib/Awt2dLibraries.gmk
include lib/SoundLibraries.gmk
##########################################################################################
......
......@@ -48,7 +48,7 @@ H_TARGET_FILES = $(INCLUDEDIR)/jdwpTransport.h \
$(INCLUDEDIR)/%.h: $(JDK_TOPDIR)/src/share/javavm/export/%.h
$(call install-file)
$(OPENJDK_TARGET_OS_INCLUDE)/%.h: $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/javavm/export/%.h
$(OPENJDK_TARGET_OS_INCLUDE)/%.h: $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_EXPORT_DIR)/javavm/export/%.h
$(call install-file)
COPY_FILES = $(H_TARGET_FILES)
......@@ -215,39 +215,37 @@ COPY_FILES += $(ICCPROFILE_TARGET_FILES)
##########################################################################################
# make sure freetype dll will be available at runtime as well as link time
#
# NB: Default freetype build system uses -h linker option and
# result .so contains hardcoded library name that is later
# used for adding dependencies to other objects
# (e.g. libfontmanager.so).
#
# It is not obvious how to extract that hardcoded name (libfreetype.so.6)
# without overcomplicating logic here.
# To workaround this we hardcode .6 suffix for now.
#
# Note that .so.6 library will not be found by System.loadLibrary()
# but fortunately we need to load FreeType library explicitly
# on windows only
#
#TODO: rework this to avoid hardcoding library name in the makefile
#
ifdef OPENJDK
ifneq ($(FREETYPE_BUNDLE_LIB_PATH), )
# We need to bundle the freetype library, so it will be available at runtime as well as link time.
#
# NB: Default freetype build system uses -h linker option and
# result .so contains hardcoded library name that is later
# used for adding dependencies to other objects
# (e.g. libfontmanager.so).
#
# It is not obvious how to extract that hardcoded name (libfreetype.so.6)
# without overcomplicating logic here.
# To workaround this we hardcode .6 suffix for now.
#
# Note that .so.6 library will not be found by System.loadLibrary()
# but fortunately we need to load FreeType library explicitly
# on windows only
#
#TODO: rework this to avoid hardcoding library name in the makefile
#
ifeq ($(OPENJDK_TARGET_OS), windows)
FREETYPE_LIB = $(JDK_OUTPUTDIR)/bin/$(call SHARED_LIBRARY,freetype)
FREETYPE_TARGET_LIB = $(JDK_OUTPUTDIR)/bin/$(call SHARED_LIBRARY,freetype)
else
ifeq ($(USING_SYSTEM_FT_LIB), false)
FREETYPE_LIB = $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/$(call SHARED_LIBRARY,freetype).6
endif
FREETYPE_TARGET_LIB = $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/$(call SHARED_LIBRARY,freetype).6
endif
$(FREETYPE_LIB): $(FREETYPE2_LIB_PATH)/$(call SHARED_LIBRARY,freetype)
$(CP) $(FREETYPE2_LIB_PATH)/$(call SHARED_LIBRARY,freetype) $@
$(FREETYPE_TARGET_LIB): $(FREETYPE_BUNDLE_LIB_PATH)/$(call SHARED_LIBRARY,freetype)
$(CP) $(FREETYPE_BUNDLE_LIB_PATH)/$(call SHARED_LIBRARY,freetype) $@
ifeq ($(OPENJDK_BUILD_OS), windows)
$(CHMOD) +rx $@
endif
COPY_FILES += $(FREETYPE_LIB)
COPY_FILES += $(FREETYPE_TARGET_LIB)
endif
##########################################################################################
......
......@@ -91,7 +91,7 @@ ifndef OPENJDK
$(SWING_PLAF_WINDOWS_RESOURCES_DIR_CLOSED)/icons/JavaCup32.png
endif
ifndef OPENJDK
ifeq ($(ENABLE_JFR), true)
JFR_CONFIGURATION_DIR_CLOSED = $(JDK_TOPDIR)/src/closed/share/classes/oracle/jrockit/jfr/settings
COPY_FILES += \
$(JFR_CONFIGURATION_DIR_CLOSED)/jfc.xsd
......
......@@ -102,7 +102,6 @@ $(eval $(call SetupArchive,BUILD_LOCALEDATA_JAR, , \
# This value should exclude types destined for jars other than rt.jar and resources.jar.
# When building a Profile this value augments the profile specific exclusions
RT_JAR_EXCLUDES += \
com/oracle/security \
com/sun/codemodel \
com/sun/crypto/provider \
com/sun/istack/internal/tools \
......@@ -414,86 +413,6 @@ $(eval $(call SetupArchive,BUILD_JSSE_JAR, , \
MANIFEST := $(MAINMANIFEST), \
CHECK_COMPRESS_JAR := true))
##########################################################################################
# Create manifest for security jars
#
# Include these extra attributes for now, should probably take out.
#
JCE_MANIFEST := $(IMAGES_OUTPUTDIR)/lib/_the.security.manifest.mf
$(JCE_MANIFEST): $(MAINMANIFEST)
$(MKDIR) -p $(@D)
$(RM) $@ $@.tmp
$(SED) -e "s#@@RELEASE@@#$(JDK_VERSION)#" \
-e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" \
$(MAINMANIFEST) >> $@.tmp
$(ECHO) "Extension-Name: javax.crypto" >> $@.tmp
$(ECHO) "Implementation-Vendor-Id: com.sun" >> $@.tmp
$(MV) $@.tmp $@
##########################################################################################
# For security and crypto jars, always build the jar, but for closed, install the prebuilt
# signed version instead of the newly built jar. Unsigned jars are treated as intermediate
# targets and explicitly added to the JARS list. For open, signing is not needed. See
# SignJars.gmk for more information.
#
# The source for the crypto jars is not available for all licensees. The BUILD_CRYPTO
# variable is set to no if these jars can't be built to skip that step of the build.
# Note that for OPENJDK, the build will fail if BUILD_CRYPTO=no since then there is no
# other way to get the jars than to build them.
SUNPKCS11_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/ext/sunpkcs11.jar
SUNPKCS11_JAR_UNSIGNED := $(IMAGES_OUTPUTDIR)/unsigned/sunpkcs11.jar
$(eval $(call SetupArchive,BUILD_SUNPKCS11_JAR, , \
SRCS := $(JDK_OUTPUTDIR)/classes, \
SUFFIXES := .class, \
INCLUDES := sun/security/pkcs11, \
JAR := $(SUNPKCS11_JAR_UNSIGNED), \
MANIFEST := $(JCE_MANIFEST), \
SKIP_METAINF := true))
$(SUNPKCS11_JAR_UNSIGNED): $(JCE_MANIFEST)
ifndef OPENJDK
SUNPKCS11_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/pkcs11/sunpkcs11.jar
$(SUNPKCS11_JAR_DST): $(SUNPKCS11_JAR_SRC)
@$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt SunPKCS11 provider..."
$(install-file)
else
$(SUNPKCS11_JAR_DST): $(SUNPKCS11_JAR_UNSIGNED)
$(install-file)
endif
JARS += $(SUNPKCS11_JAR_UNSIGNED)
##########################################################################################
SUNEC_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/ext/sunec.jar
SUNEC_JAR_UNSIGNED := $(IMAGES_OUTPUTDIR)/unsigned/sunec.jar
$(eval $(call SetupArchive,BUILD_SUNEC_JAR, , \
SRCS := $(JDK_OUTPUTDIR)/classes, \
SUFFIXES := .class, \
INCLUDES := sun/security/ec, \
JAR := $(SUNEC_JAR_UNSIGNED), \
MANIFEST := $(JCE_MANIFEST), \
SKIP_METAINF := true))
$(SUNEC_JAR_UNSIGNED): $(JCE_MANIFEST)
ifndef OPENJDK
SUNEC_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/ec/sunec.jar
$(SUNEC_JAR_DST): $(SUNEC_JAR_SRC)
@$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt SunEC provider..."
$(install-file)
else
$(SUNEC_JAR_DST): $(SUNEC_JAR_UNSIGNED)
$(install-file)
endif
JARS += $(SUNEC_JAR_UNSIGNED)
##########################################################################################
$(eval $(call SetupArchive,BUILD_SWINGBEANS_JAR, , \
......@@ -507,208 +426,6 @@ $(eval $(call SetupArchive,BUILD_SWINGBEANS_JAR, , \
##########################################################################################
SUNJCE_PROVIDER_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/ext/sunjce_provider.jar
SUNJCE_PROVIDER_JAR_UNSIGNED := $(IMAGES_OUTPUTDIR)/unsigned/sunjce_provider.jar
ifneq ($(BUILD_CRYPTO), no)
$(eval $(call SetupArchive,BUILD_SUNJCE_PROVIDER_JAR, , \
SRCS := $(JDK_OUTPUTDIR)/classes, \
SUFFIXES := .class, \
INCLUDES := com/sun/crypto/provider, \
JAR := $(SUNJCE_PROVIDER_JAR_UNSIGNED), \
MANIFEST := $(JCE_MANIFEST), \
SKIP_METAINF := true))
$(SUNJCE_PROVIDER_JAR_UNSIGNED): $(JCE_MANIFEST)
JARS += $(SUNJCE_PROVIDER_JAR_UNSIGNED)
endif
ifndef OPENJDK
SUNJCE_PROVIDER_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/jce/sunjce_provider.jar
$(SUNJCE_PROVIDER_JAR_DST): $(SUNJCE_PROVIDER_JAR_SRC)
@$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt SunJCE provider..."
$(install-file)
else
$(SUNJCE_PROVIDER_JAR_DST): $(SUNJCE_PROVIDER_JAR_UNSIGNED)
$(install-file)
endif
##########################################################################################
JCE_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/jce.jar
JCE_JAR_UNSIGNED := $(IMAGES_OUTPUTDIR)/unsigned/jce.jar
ifneq ($(BUILD_CRYPTO), no)
$(eval $(call SetupArchive,BUILD_JCE_JAR, , \
SRCS := $(JDK_OUTPUTDIR)/classes, \
SUFFIXES := .class, \
INCLUDES := javax/crypto sun/security/internal, \
JAR := $(JCE_JAR_UNSIGNED), \
MANIFEST := $(JCE_MANIFEST), \
SKIP_METAINF := true))
$(JCE_JAR_UNSIGNED): $(JCE_MANIFEST)
JARS += $(JCE_JAR_UNSIGNED)
endif
ifndef OPENJDK
JCE_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/jce/jce.jar
$(JCE_JAR_DST): $(JCE_JAR_SRC)
@$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt jce.jar..."
$(install-file)
else
$(JCE_JAR_DST): $(JCE_JAR_UNSIGNED)
$(install-file)
endif
##########################################################################################
US_EXPORT_POLICY_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/security/US_export_policy.jar
US_EXPORT_POLICY_JAR_UNSIGNED := $(IMAGES_OUTPUTDIR)/unsigned/US_export_policy.jar
ifneq ($(BUILD_CRYPTO), no)
#
# TODO fix so that SetupArchive does not write files into SRCS
# then we don't need this extra copying
# NOTE: We currently do not place restrictions on our limited export
# policy. This was not a typo.
#
US_EXPORT_POLICY_JAR_SRC_DIR := $(JDK_TOPDIR)/make/javax/crypto/policy/unlimited
US_EXPORT_POLICY_JAR_TMP := $(IMAGES_OUTPUTDIR)/US_export_policy_jar.tmp
$(US_EXPORT_POLICY_JAR_TMP)/%: $(US_EXPORT_POLICY_JAR_SRC_DIR)/%
$(install-file)
US_EXPORT_POLICY_JAR_DEPS := $(US_EXPORT_POLICY_JAR_TMP)/default_US_export.policy
$(eval $(call SetupArchive,BUILD_US_EXPORT_POLICY_JAR, $(US_EXPORT_POLICY_JAR_DEPS), \
SRCS := $(US_EXPORT_POLICY_JAR_TMP), \
SUFFIXES := .policy, \
JAR := $(US_EXPORT_POLICY_JAR_UNSIGNED), \
EXTRA_MANIFEST_ATTR := Crypto-Strength: unlimited, \
SKIP_METAINF := true))
JARS += $(US_EXPORT_POLICY_JAR_UNSIGNED)
endif
ifndef OPENJDK
$(US_EXPORT_POLICY_JAR_DST): $(JDK_TOPDIR)/make/closed/tools/crypto/jce/US_export_policy.jar
$(ECHO) $(LOG_INFO) Copying $(@F)
$(install-file)
else
$(US_EXPORT_POLICY_JAR_DST): $(US_EXPORT_POLICY_JAR_UNSIGNED)
$(install-file)
endif
##########################################################################################
LOCAL_POLICY_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/security/local_policy.jar
LOCAL_POLICY_JAR_UNSIGNED := $(IMAGES_OUTPUTDIR)/unsigned/local_policy.jar
ifneq ($(BUILD_CRYPTO), no)
#
# TODO fix so that SetupArchive does not write files into SRCS
# then we don't need this extra copying
#
LOCAL_POLICY_JAR_TMP := $(IMAGES_OUTPUTDIR)/local_policy_jar.tmp
ifeq ($(UNLIMITED_CRYPTO), true)
LOCAL_POLICY_JAR_SRC_DIR := $(JDK_TOPDIR)/make/javax/crypto/policy/unlimited
LOCAL_POLICY_JAR_DEPS := $(LOCAL_POLICY_JAR_TMP)/default_local.policy
LOCAL_POLICY_JAR_ATTR := Crypto-Strength: unlimited
else
LOCAL_POLICY_JAR_SRC_DIR := $(JDK_TOPDIR)/make/javax/crypto/policy/limited
LOCAL_POLICY_JAR_DEPS := $(LOCAL_POLICY_JAR_TMP)/exempt_local.policy \
$(LOCAL_POLICY_JAR_TMP)/default_local.policy
LOCAL_POLICY_JAR_ATTR := Crypto-Strength: limited
endif
$(LOCAL_POLICY_JAR_TMP)/%: $(LOCAL_POLICY_JAR_SRC_DIR)/%
$(install-file)
$(eval $(call SetupArchive,BUILD_LOCAL_POLICY_JAR, $(LOCAL_POLICY_JAR_DEPS), \
SRCS := $(LOCAL_POLICY_JAR_TMP), \
SUFFIXES := .policy, \
JAR := $(LOCAL_POLICY_JAR_UNSIGNED), \
EXTRA_MANIFEST_ATTR := $(LOCAL_POLICY_JAR_ATTR), \
SKIP_METAINF := true))
JARS += $(LOCAL_POLICY_JAR_UNSIGNED)
endif
ifndef OPENJDK
$(LOCAL_POLICY_JAR_DST): $(JDK_TOPDIR)/make/closed/tools/crypto/jce/local_policy.jar
$(ECHO) $(LOG_INFO) Copying $(@F)
$(install-file)
else
$(LOCAL_POLICY_JAR_DST): $(LOCAL_POLICY_JAR_UNSIGNED)
$(install-file)
endif
##########################################################################################
ifeq ($(OPENJDK_TARGET_OS), windows)
SUNMSCAPI_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/ext/sunmscapi.jar
SUNMSCAPI_JAR_UNSIGNED := $(IMAGES_OUTPUTDIR)/unsigned/sunmscapi.jar
$(eval $(call SetupArchive,BUILD_SUNMSCAPI_JAR, , \
SRCS := $(JDK_OUTPUTDIR)/classes, \
SUFFIXES := .class, \
INCLUDES := sun/security/mscapi, \
JAR := $(SUNMSCAPI_JAR_UNSIGNED), \
MANIFEST := $(JCE_MANIFEST), \
SKIP_METAINF := true))
$(SUNMSCAPI_JAR_UNSIGNED): $(JCE_MANIFEST)
ifndef OPENJDK
SUNMSCAPI_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/mscapi/sunmscapi.jar
$(SUNMSCAPI_JAR_DST): $(SUNMSCAPI_JAR_SRC)
@$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt SunMSCAPI provider..."
$(install-file)
else
$(SUNMSCAPI_JAR_DST): $(SUNMSCAPI_JAR_UNSIGNED)
$(install-file)
endif
JARS += $(SUNMSCAPI_JAR_UNSIGNED)
endif
##########################################################################################
ifeq ($(OPENJDK_TARGET_OS), solaris)
ifndef OPENJDK
UCRYPTO_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/ext/ucrypto.jar
UCRYPTO_JAR_UNSIGNED := $(IMAGES_OUTPUTDIR)/unsigned/ucrypto.jar
UCRYPTO_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/ucrypto/ucrypto.jar
$(eval $(call SetupArchive,BUILD_UCRYPTO_JAR, , \
SRCS := $(JDK_OUTPUTDIR)/classes, \
SUFFIXES := .class, \
INCLUDES := com/oracle/security/ucrypto, \
JAR := $(UCRYPTO_JAR_UNSIGNED), \
MANIFEST := $(JCE_MANIFEST), \
SKIP_METAINF := true))
$(UCRYPTO_JAR_UNSIGNED): $(JCE_MANIFEST)
$(UCRYPTO_JAR_DST): $(UCRYPTO_JAR_SRC)
@$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt OracleUcrypto provider..."
$(install-file)
JARS += $(UCRYPTO_JAR_UNSIGNED)
endif
endif
##########################################################################################
# Get the CLDRVERSION
include gensrc/GensrcCLDR.gmk
......@@ -1040,6 +757,13 @@ endif
##########################################################################################
# This rule copies all jars from jdk/lib/... to images/lib/... to avoid having to track
# which jars are where
$(IMAGES_OUTPUTDIR)/lib/%: $(JDK_OUTPUTDIR)/lib/%
$(install-file)
##########################################################################################
# Import nashorn.jar from nashorn dist dir.
$(IMAGES_OUTPUTDIR)/lib/ext/nashorn.jar: $(NASHORN_DIST)/nashorn.jar
$(install-file)
......
#
# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
default: all
include $(SPEC)
include MakeBase.gmk
include JavaCompilation.gmk
include Setup.gmk
# The jars created in this file are required for the exploded jdk image to function and
# cannot wait to be built in the images target.
##########################################################################################
# Create manifest for security jars
#
# Include these extra attributes for now, should probably take out.
#
MAINMANIFEST := $(JDK_TOPDIR)/make/tools/manifest.mf
JCE_MANIFEST := $(JDK_OUTPUTDIR)/lib/_the.security.manifest.mf
$(JCE_MANIFEST): $(MAINMANIFEST)
$(MKDIR) -p $(@D)
$(RM) $@ $@.tmp
$(SED) -e "s#@@RELEASE@@#$(JDK_VERSION)#" \
-e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" \
$(MAINMANIFEST) >> $@.tmp
$(ECHO) "Extension-Name: javax.crypto" >> $@.tmp
$(ECHO) "Implementation-Vendor-Id: com.sun" >> $@.tmp
$(MV) $@.tmp $@
##########################################################################################
# For security and crypto jars, always build the jar, but for closed, install the prebuilt
# signed version instead of the newly built jar. Unsigned jars are treated as intermediate
# targets and explicitly added to the JARS list. For open, signing is not needed. See
# SignJars.gmk for more information.
#
# The source for the crypto jars is not available for all licensees. The BUILD_CRYPTO
# variable is set to no if these jars can't be built to skip that step of the build.
# Note that for OPENJDK, the build will fail if BUILD_CRYPTO=no since then there is no
# other way to get the jars than to build them.
SUNPKCS11_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/sunpkcs11.jar
SUNPKCS11_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/unsigned/sunpkcs11.jar
$(eval $(call SetupArchive,BUILD_SUNPKCS11_JAR, , \
SRCS := $(JDK_OUTPUTDIR)/classes_security, \
SUFFIXES := .class, \
INCLUDES := sun/security/pkcs11, \
JAR := $(SUNPKCS11_JAR_UNSIGNED), \
MANIFEST := $(JCE_MANIFEST), \
SKIP_METAINF := true))
$(SUNPKCS11_JAR_UNSIGNED): $(JCE_MANIFEST)
ifndef OPENJDK
SUNPKCS11_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/pkcs11/sunpkcs11.jar
$(SUNPKCS11_JAR_DST): $(SUNPKCS11_JAR_SRC)
@$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt SunPKCS11 provider..."
$(install-file)
else
$(SUNPKCS11_JAR_DST): $(SUNPKCS11_JAR_UNSIGNED)
$(install-file)
endif
JARS += $(SUNPKCS11_JAR_UNSIGNED) $(SUNPKCS11_JAR_DST)
##########################################################################################
SUNEC_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/sunec.jar
SUNEC_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/unsigned/sunec.jar
$(eval $(call SetupArchive,BUILD_SUNEC_JAR, , \
SRCS := $(JDK_OUTPUTDIR)/classes_security, \
SUFFIXES := .class, \
INCLUDES := sun/security/ec, \
JAR := $(SUNEC_JAR_UNSIGNED), \
MANIFEST := $(JCE_MANIFEST), \
SKIP_METAINF := true))
$(SUNEC_JAR_UNSIGNED): $(JCE_MANIFEST)
ifndef OPENJDK
SUNEC_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/ec/sunec.jar
$(SUNEC_JAR_DST): $(SUNEC_JAR_SRC)
@$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt SunEC provider..."
$(install-file)
else
$(SUNEC_JAR_DST): $(SUNEC_JAR_UNSIGNED)
$(install-file)
endif
JARS += $(SUNEC_JAR_UNSIGNED) $(SUNEC_JAR_DST)
##########################################################################################
SUNJCE_PROVIDER_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/sunjce_provider.jar
SUNJCE_PROVIDER_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/unsigned/sunjce_provider.jar
ifneq ($(BUILD_CRYPTO), no)
$(eval $(call SetupArchive,BUILD_SUNJCE_PROVIDER_JAR, , \
SRCS := $(JDK_OUTPUTDIR)/classes_security, \
SUFFIXES := .class, \
INCLUDES := com/sun/crypto/provider, \
JAR := $(SUNJCE_PROVIDER_JAR_UNSIGNED), \
MANIFEST := $(JCE_MANIFEST), \
SKIP_METAINF := true))
$(SUNJCE_PROVIDER_JAR_UNSIGNED): $(JCE_MANIFEST)
JARS += $(SUNJCE_PROVIDER_JAR_UNSIGNED)
endif
ifndef OPENJDK
SUNJCE_PROVIDER_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/jce/sunjce_provider.jar
$(SUNJCE_PROVIDER_JAR_DST): $(SUNJCE_PROVIDER_JAR_SRC)
@$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt SunJCE provider..."
$(install-file)
else
$(SUNJCE_PROVIDER_JAR_DST): $(SUNJCE_PROVIDER_JAR_UNSIGNED)
$(install-file)
endif
JARS += $(SUNJCE_PROVIDER_JAR_DST)
##########################################################################################
JCE_JAR_DST := $(JDK_OUTPUTDIR)/lib/jce.jar
JCE_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/unsigned/jce.jar
ifneq ($(BUILD_CRYPTO), no)
$(eval $(call SetupArchive,BUILD_JCE_JAR, , \
SRCS := $(JDK_OUTPUTDIR)/classes_security, \
SUFFIXES := .class, \
INCLUDES := javax/crypto sun/security/internal, \
JAR := $(JCE_JAR_UNSIGNED), \
MANIFEST := $(JCE_MANIFEST), \
SKIP_METAINF := true))
$(JCE_JAR_UNSIGNED): $(JCE_MANIFEST)
JARS += $(JCE_JAR_UNSIGNED)
endif
ifndef OPENJDK
JCE_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/jce/jce.jar
$(JCE_JAR_DST): $(JCE_JAR_SRC)
@$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt jce.jar..."
$(install-file)
else
$(JCE_JAR_DST): $(JCE_JAR_UNSIGNED)
$(install-file)
endif
JARS += $(JCE_JAR_DST)
##########################################################################################
US_EXPORT_POLICY_JAR_DST := $(JDK_OUTPUTDIR)/lib/security/US_export_policy.jar
US_EXPORT_POLICY_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/unsigned/US_export_policy.jar
ifneq ($(BUILD_CRYPTO), no)
#
# TODO fix so that SetupArchive does not write files into SRCS
# then we don't need this extra copying
#
# NOTE: We currently do not place restrictions on our limited export
# policy. This was not a typo.
#
US_EXPORT_POLICY_JAR_SRC_DIR := $(JDK_TOPDIR)/make/javax/crypto/policy/unlimited
US_EXPORT_POLICY_JAR_TMP := $(JDK_OUTPUTDIR)/US_export_policy_jar.tmp
$(US_EXPORT_POLICY_JAR_TMP)/%: $(US_EXPORT_POLICY_JAR_SRC_DIR)/%
$(install-file)
US_EXPORT_POLICY_JAR_DEPS := $(US_EXPORT_POLICY_JAR_TMP)/default_US_export.policy
$(eval $(call SetupArchive,BUILD_US_EXPORT_POLICY_JAR, $(US_EXPORT_POLICY_JAR_DEPS), \
SRCS := $(US_EXPORT_POLICY_JAR_TMP), \
SUFFIXES := .policy, \
JAR := $(US_EXPORT_POLICY_JAR_UNSIGNED), \
EXTRA_MANIFEST_ATTR := Crypto-Strength: unlimited, \
SKIP_METAINF := true))
JARS += $(US_EXPORT_POLICY_JAR_UNSIGNED)
endif
ifndef OPENJDK
$(US_EXPORT_POLICY_JAR_DST): $(JDK_TOPDIR)/make/closed/tools/crypto/jce/US_export_policy.jar
$(ECHO) $(LOG_INFO) Copying $(@F)
$(install-file)
else
$(US_EXPORT_POLICY_JAR_DST): $(US_EXPORT_POLICY_JAR_UNSIGNED)
$(install-file)
endif
JARS += $(US_EXPORT_POLICY_JAR_DST)
##########################################################################################
LOCAL_POLICY_JAR_DST := $(JDK_OUTPUTDIR)/lib/security/local_policy.jar
LOCAL_POLICY_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/unsigned/local_policy.jar
ifneq ($(BUILD_CRYPTO), no)
#
# TODO fix so that SetupArchive does not write files into SRCS
# then we don't need this extra copying
#
LOCAL_POLICY_JAR_TMP := $(JDK_OUTPUTDIR)/local_policy_jar.tmp
ifeq ($(UNLIMITED_CRYPTO), true)
LOCAL_POLICY_JAR_SRC_DIR := $(JDK_TOPDIR)/make/javax/crypto/policy/unlimited
LOCAL_POLICY_JAR_DEPS := $(LOCAL_POLICY_JAR_TMP)/default_local.policy
LOCAL_POLICY_JAR_ATTR := Crypto-Strength: unlimited
else
LOCAL_POLICY_JAR_SRC_DIR := $(JDK_TOPDIR)/make/javax/crypto/policy/limited
LOCAL_POLICY_JAR_DEPS := $(LOCAL_POLICY_JAR_TMP)/exempt_local.policy \
$(LOCAL_POLICY_JAR_TMP)/default_local.policy
LOCAL_POLICY_JAR_ATTR := Crypto-Strength: limited
endif
$(LOCAL_POLICY_JAR_TMP)/%: $(LOCAL_POLICY_JAR_SRC_DIR)/%
$(install-file)
$(eval $(call SetupArchive,BUILD_LOCAL_POLICY_JAR, $(LOCAL_POLICY_JAR_DEPS), \
SRCS := $(LOCAL_POLICY_JAR_TMP), \
SUFFIXES := .policy, \
JAR := $(LOCAL_POLICY_JAR_UNSIGNED), \
EXTRA_MANIFEST_ATTR := $(LOCAL_POLICY_JAR_ATTR), \
SKIP_METAINF := true))
JARS += $(LOCAL_POLICY_JAR_UNSIGNED)
endif
ifndef OPENJDK
$(LOCAL_POLICY_JAR_DST): $(JDK_TOPDIR)/make/closed/tools/crypto/jce/local_policy.jar
$(ECHO) $(LOG_INFO) Copying $(@F)
$(install-file)
else
$(LOCAL_POLICY_JAR_DST): $(LOCAL_POLICY_JAR_UNSIGNED)
$(install-file)
endif
JARS += $(LOCAL_POLICY_JAR_DST)
##########################################################################################
ifeq ($(OPENJDK_TARGET_OS), windows)
SUNMSCAPI_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/sunmscapi.jar
SUNMSCAPI_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/unsigned/sunmscapi.jar
$(eval $(call SetupArchive,BUILD_SUNMSCAPI_JAR, , \
SRCS := $(JDK_OUTPUTDIR)/classes_security, \
SUFFIXES := .class, \
INCLUDES := sun/security/mscapi, \
JAR := $(SUNMSCAPI_JAR_UNSIGNED), \
MANIFEST := $(JCE_MANIFEST), \
SKIP_METAINF := true))
$(SUNMSCAPI_JAR_UNSIGNED): $(JCE_MANIFEST)
ifndef OPENJDK
SUNMSCAPI_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/mscapi/sunmscapi.jar
$(SUNMSCAPI_JAR_DST): $(SUNMSCAPI_JAR_SRC)
@$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt SunMSCAPI provider..."
$(install-file)
else
$(SUNMSCAPI_JAR_DST): $(SUNMSCAPI_JAR_UNSIGNED)
$(install-file)
endif
JARS += $(SUNMSCAPI_JAR_UNSIGNED) $(SUNMSCAPI_JAR_DST)
endif
##########################################################################################
ifeq ($(OPENJDK_TARGET_OS), solaris)
ifndef OPENJDK
UCRYPTO_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/ucrypto.jar
UCRYPTO_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/unsigned/ucrypto.jar
UCRYPTO_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/ucrypto/ucrypto.jar
$(eval $(call SetupArchive,BUILD_UCRYPTO_JAR, , \
SRCS := $(JDK_OUTPUTDIR)/classes_security, \
SUFFIXES := .class, \
INCLUDES := com/oracle/security/ucrypto, \
JAR := $(UCRYPTO_JAR_UNSIGNED), \
MANIFEST := $(JCE_MANIFEST), \
SKIP_METAINF := true))
$(UCRYPTO_JAR_UNSIGNED): $(JCE_MANIFEST)
$(UCRYPTO_JAR_DST): $(UCRYPTO_JAR_SRC)
@$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt OracleUcrypto provider..."
$(install-file)
JARS += $(UCRYPTO_JAR_UNSIGNED) $(UCRYPTO_JAR_DST)
endif
endif
all: $(JARS)
.PHONY: default all
......@@ -66,15 +66,17 @@ include gensrc/GensrcExceptions.gmk
GENSRC += $(GENSRC_EXCEPTIONS)
ifneq ($(OPENJDK_TARGET_OS), windows)
include gensrc/GensrcIcons.gmk
GENSRC += $(GENSRC_AWT_ICONS)
include gensrc/GensrcIcons.gmk
GENSRC += $(GENSRC_AWT_ICONS)
ifeq ($(OPENJDK_TARGET_OS), macosx)
GENSRC += $(GENSRC_OSX_ICONS)
endif
ifeq ($(OPENJDK_TARGET_OS), macosx)
GENSRC += $(GENSRC_OSX_ICONS)
endif
include gensrc/GensrcX11Wrappers.gmk
GENSRC += $(GENSRC_X11WRAPPERS)
ifneq ($(OPENJDK_TARGET_OS), macosx)
include gensrc/GensrcX11Wrappers.gmk
GENSRC += $(GENSRC_X11WRAPPERS)
endif
endif
include gensrc/GensrcCLDR.gmk
......
#
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
......@@ -119,8 +119,13 @@ HOTSPOT_IMPORT_FILES := $(addprefix $(LIBRARY_PREFIX), jvm.* saproc.* jsig.* saw
$(eval $(call CopyDir,HOTSPOT0, $(HOTSPOT_LIB_DIR), $(INSTALL_LIBRARIES_HERE), $(HOTSPOT_IMPORT_FILES)))
$(eval $(call CopyDir,HOTSPOT1, $(HOTSPOT_DIST)/lib, $(JDK_OUTPUTDIR)/lib, $(HOTSPOT_IMPORT_FILES)))
JSIG_DEBUGINFO := $(strip $(wildcard $(HOTSPOT_DIST)/jre/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjsig.debuginfo) \
ifeq ($(OPENJDK_TARGET_OS), macosx)
JSIG_DEBUGINFO := $(strip $(wildcard $(HOTSPOT_DIST)/jre/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjsig$(SHARED_LIBRARY_SUFFIX).dSYM) \
$(wildcard $(HOTSPOT_DIST)/jre/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjsig.diz) )
else
JSIG_DEBUGINFO := $(strip $(wildcard $(HOTSPOT_DIST)/jre/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjsig.debuginfo) \
$(wildcard $(HOTSPOT_DIST)/jre/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjsig.diz) )
endif
ifneq ($(OPENJDK_TARGET_OS), windows)
ifeq ($(JVM_VARIANT_SERVER), true)
......@@ -135,12 +140,14 @@ ifneq ($(OPENJDK_TARGET_OS), windows)
IMPORT_TARGET_FILES += $(INSTALL_LIBRARIES_HERE)/client/$(foreach I,$(JSIG_DEBUGINFO),$(notdir $I))
endif
endif
ifneq ($(OPENJDK_TARGET_OS), macosx)
ifeq ($(JVM_VARIANT_MINIMAL1), true)
IMPORT_TARGET_FILES += $(INSTALL_LIBRARIES_HERE)/minimal/$(LIBRARY_PREFIX)jsig$(SHARED_LIBRARY_SUFFIX)
ifneq (, $(JSIG_DEBUGINFO))
ifneq (,$(JSIG_DEBUGINFO))
IMPORT_TARGET_FILES += $(INSTALL_LIBRARIES_HERE)/minimal/$(foreach I,$(JSIG_DEBUGINFO),$(notdir $I))
endif
endif
endif
endif
$(INSTALL_LIBRARIES_HERE)/server/%$(SHARED_LIBRARY_SUFFIX): $(INSTALL_LIBRARIES_HERE)/%$(SHARED_LIBRARY_SUFFIX)
......@@ -148,12 +155,27 @@ $(INSTALL_LIBRARIES_HERE)/server/%$(SHARED_LIBRARY_SUFFIX): $(INSTALL_LIBRARIES_
$(RM) $@
$(LN) -s ../$(@F) $@
$(INSTALL_LIBRARIES_HERE)/server/%.debuginfo: $(INSTALL_LIBRARIES_HERE)/%.debuginfo
ifeq ($(OPENJDK_TARGET_OS), macosx)
$(INSTALL_LIBRARIES_HERE)/server/%.dSYM : $(INSTALL_LIBRARIES_HERE)/%.dSYM
$(MKDIR) -p $(@D)
$(RM) $@
$(LN) -s ../$(@F) $@
$(INSTALL_LIBRARIES_HERE)/server/%.diz : $(INSTALL_LIBRARIES_HERE)/%.diz
$(MKDIR) -p $(@D)
$(RM) $@
$(RM) $@.tmp $(basename $@)$(SHARED_LIBRARY_SUFFIX).dSYM
$(LN) -s ../$(basename $(@F))$(SHARED_LIBRARY_SUFFIX).dSYM $(basename $@)$(SHARED_LIBRARY_SUFFIX).dSYM
$(CD) $(@D) && $(ZIP) -q -y $@.tmp $(basename $(@F))$(SHARED_LIBRARY_SUFFIX).dSYM
$(RM) $(basename $@)$(SHARED_LIBRARY_SUFFIX).dSYM
$(MV) $@.tmp $@
else
$(INSTALL_LIBRARIES_HERE)/server/%.debuginfo: $(INSTALL_LIBRARIES_HERE)/%.debuginfo
$(MKDIR) -p $(@D)
$(RM) $@
$(LN) -s ../$(@F) $@
$(INSTALL_LIBRARIES_HERE)/server/%.diz: $(INSTALL_LIBRARIES_HERE)/%.diz
$(INSTALL_LIBRARIES_HERE)/server/%.diz: $(INSTALL_LIBRARIES_HERE)/%.diz
$(MKDIR) -p $(@D)
$(RM) $@
$(RM) $@.tmp $(basename $@).debuginfo
......@@ -161,18 +183,34 @@ $(INSTALL_LIBRARIES_HERE)/server/%.diz: $(INSTALL_LIBRARIES_HERE)/%.diz
$(CD) $(@D) && $(ZIP) -q -y $@.tmp $(basename $(@F)).debuginfo
$(RM) $(basename $@).debuginfo
$(MV) $@.tmp $@
endif
$(INSTALL_LIBRARIES_HERE)/client/%$(SHARED_LIBRARY_SUFFIX): $(INSTALL_LIBRARIES_HERE)/%$(SHARED_LIBRARY_SUFFIX)
$(MKDIR) -p $(@D)
$(RM) $@
$(LN) -s ../$(@F) $@
$(INSTALL_LIBRARIES_HERE)/client/%.debuginfo: $(INSTALL_LIBRARIES_HERE)/%.debuginfo
ifeq ($(OPENJDK_TARGET_OS), macosx)
$(INSTALL_LIBRARIES_HERE)/client/%.dSYM : $(INSTALL_LIBRARIES_HERE)/%.dSYM
$(MKDIR) -p $(@D)
$(RM) $@
$(LN) -s ../$(@F) $@
$(INSTALL_LIBRARIES_HERE)/client/%.diz : $(INSTALL_LIBRARIES_HERE)/%.diz
$(MKDIR) -p $(@D)
$(RM) $@
$(RM) $@.tmp $(basename $@)$(SHARED_LIBRARY_SUFFIX).dSYM
$(LN) -s ../$(basename $(@F))$(SHARED_LIBRARY_SUFFIX).dSYM $(basename $@)$(SHARED_LIBRARY_SUFFIX).dSYM
$(CD) $(@D) && $(ZIP) -q -y $@.tmp $(basename $(@F))$(SHARED_LIBRARY_SUFFIX).dSYM
$(RM) $(basename $@)$(SHARED_LIBRARY_SUFFIX).dSYM
$(MV) $@.tmp $@
else
$(INSTALL_LIBRARIES_HERE)/client/%.debuginfo: $(INSTALL_LIBRARIES_HERE)/%.debuginfo
$(MKDIR) -p $(@D)
$(RM) $@
$(LN) -s ../$(@F) $@
$(INSTALL_LIBRARIES_HERE)/client/%.diz: $(INSTALL_LIBRARIES_HERE)/%.diz
$(INSTALL_LIBRARIES_HERE)/client/%.diz: $(INSTALL_LIBRARIES_HERE)/%.diz
$(MKDIR) -p $(@D)
$(RM) $@
$(RM) $@.tmp $(basename $@).debuginfo
......@@ -180,18 +218,20 @@ $(INSTALL_LIBRARIES_HERE)/client/%.diz: $(INSTALL_LIBRARIES_HERE)/%.diz
$(CD) $(@D) && $(ZIP) -q -y $@.tmp $(basename $(@F)).debuginfo
$(RM) $(basename $@).debuginfo
$(MV) $@.tmp $@
endif
$(INSTALL_LIBRARIES_HERE)/minimal/%$(SHARED_LIBRARY_SUFFIX): $(INSTALL_LIBRARIES_HERE)/%$(SHARED_LIBRARY_SUFFIX)
$(MKDIR) -p $(@D)
$(RM) $@
$(LN) -s ../$(@F) $@
$(INSTALL_LIBRARIES_HERE)/minimal/%.debuginfo: $(INSTALL_LIBRARIES_HERE)/%.debuginfo
ifneq ($(OPENJDK_TARGET_OS), macosx)
$(INSTALL_LIBRARIES_HERE)/minimal/%.debuginfo: $(INSTALL_LIBRARIES_HERE)/%.debuginfo
$(MKDIR) -p $(@D)
$(RM) $@
$(LN) -s ../$(@F) $@
$(INSTALL_LIBRARIES_HERE)/minimal/%.diz: $(INSTALL_LIBRARIES_HERE)/%.diz
$(INSTALL_LIBRARIES_HERE)/minimal/%.diz: $(INSTALL_LIBRARIES_HERE)/%.diz
$(MKDIR) -p $(@D)
$(RM) $@
$(RM) $@.tmp $(basename $@).debuginfo
......@@ -199,6 +239,7 @@ $(INSTALL_LIBRARIES_HERE)/minimal/%.diz: $(INSTALL_LIBRARIES_HERE)/%.diz
$(CD) $(@D) && $(ZIP) -q -y $@.tmp $(basename $(@F)).debuginfo
$(RM) $(basename $@).debuginfo
$(MV) $@.tmp $@
endif
##########################################################################################
# Unpack the binary distributions of the crypto classes if they exist.
......
......@@ -78,7 +78,7 @@ check-keystore:
exit 2; \
fi
$(JCE_OUTPUTDIR)/%: $(IMAGES_OUTPUTDIR)/unsigned/%
$(JCE_OUTPUTDIR)/%: $(JDK_OUTPUTDIR)/unsigned/%
$(call install-file)
$(JARSIGNER) -keystore $(SIGNING_KEYSTORE) \
$@ $(SIGNING_ALIAS) < $(SIGNING_PASSPHRASE)
......
......@@ -32,7 +32,7 @@ TOOLS_SRC := $(JDK_TOPDIR)/make/tools/src \
$(JDK_TOPDIR)/makefiles/sun/osxapp \
$(JDK_TOPDIR)/make/tools/swing-beans
ifneq ($(OPENJDK_TARGET_OS), windows)
ifeq ($(findstring $(OPENJDK_TARGET_OS),windows macosx),)
TOOLS_SRC += $(JDK_TOPDIR)/src/solaris/classes/sun/awt/X11/generator
endif
......@@ -156,6 +156,7 @@ TOOL_ADDTORESTRICTEDPKGS=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
# Tools needed on solaris because OBJCOPY is broken.
ifeq ($(OPENJDK_TARGET_OS), solaris)
$(eval $(call SetupNativeCompilation,ADD_GNU_DEBUGLINK, \
SRC := $(JDK_TOPDIR)/make/tools/add_gnu_debuglink, \
LANG := C, \
......@@ -175,3 +176,4 @@ $(eval $(call SetupNativeCompilation,FIX_EMPTY_SEC_HDR_FLAGS, \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/fix_empty_sec_hdr_flags, \
OUTPUT_DIR := $(JDK_OUTPUTDIR)/btbin, \
PROGRAM := fix_empty_sec_hdr_flags))
endif
......@@ -99,7 +99,7 @@ ifneq ($(COMPILE_TYPE), cross)
$(X_LIBS) \
-I$(JDK_OUTPUTDIR)/include \
-I$(JDK_TOPDIR)/src/share/javavm/export \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/javavm/export \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_EXPORT_DIR)/javavm/export \
-I$(JDK_TOPDIR)/src/share/native/common \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/common \
-I$(JDK_TOPDIR)/src/solaris/native/sun/awt \
......
......@@ -33,9 +33,7 @@ jprt.build.flavors=product,fastdebug
# Standard list of jprt build targets for this source tree
jprt.build.targets= \
solaris_sparc_5.10-{product|fastdebug}, \
solaris_sparcv9_5.10-{product|fastdebug}, \
solaris_i586_5.10-{product|fastdebug}, \
solaris_x64_5.10-{product|fastdebug}, \
linux_i586_2.6-{product|fastdebug}, \
linux_x64_2.6-{product|fastdebug}, \
......@@ -47,9 +45,7 @@ jprt.my.test.set=${jprt.test.set}
# Standard vm test target
jprt.vm.default.test.targets= \
solaris_sparc_5.10-product-c1-jvm98, \
solaris_sparcv9_5.10-product-c2-jvm98, \
solaris_i586_5.10-product-c1-jvm98, \
solaris_x64_5.10-product-c2-jvm98, \
linux_i586_2.6-product-{c1|c2}-jvm98, \
linux_x64_2.6-product-c2-jvm98, \
......@@ -64,117 +60,91 @@ jprt.test.targets=${jprt.vm.${jprt.my.test.set}.test.targets}
# Default jdk test targets in test/Makefile (no fastdebug & limited c2)
jprt.make.rule.default.test.targets= \
\
solaris_sparc_5.10-product-c1-jdk_beans1, \
solaris_sparcv9_5.10-product-c2-jdk_beans1, \
solaris_i586_5.10-product-c1-jdk_beans1, \
solaris_x64_5.10-product-c2-jdk_beans1, \
linux_i586_2.6-product-{c1|c2}-jdk_beans1, \
linux_x64_2.6-product-c2-jdk_beans1, \
windows_i586_6.1-product-c1-jdk_beans1, \
windows_x64_6.1-product-c2-jdk_beans1, \
\
solaris_sparc_5.10-product-c1-jdk_io, \
solaris_sparcv9_5.10-product-c2-jdk_io, \
solaris_i586_5.10-product-c1-jdk_io, \
solaris_x64_5.10-product-c2-jdk_io, \
linux_i586_2.6-product-{c1|c2}-jdk_io, \
linux_x64_2.6-product-c2-jdk_io, \
windows_i586_6.1-product-c1-jdk_io, \
windows_x64_6.1-product-c2-jdk_io, \
\
solaris_sparc_5.10-product-c1-jdk_lang, \
solaris_sparcv9_5.10-product-c2-jdk_lang, \
solaris_i586_5.10-product-c1-jdk_lang, \
solaris_x64_5.10-product-c2-jdk_lang, \
linux_i586_2.6-product-{c1|c2}-jdk_lang, \
linux_x64_2.6-product-c2-jdk_lang, \
windows_i586_6.1-product-c1-jdk_lang, \
windows_x64_6.1-product-c2-jdk_lang, \
\
solaris_sparc_5.10-product-c1-jdk_math, \
solaris_sparcv9_5.10-product-c2-jdk_math, \
solaris_i586_5.10-product-c1-jdk_math, \
solaris_x64_5.10-product-c2-jdk_math, \
linux_i586_2.6-product-{c1|c2}-jdk_math, \
linux_x64_2.6-product-c2-jdk_math, \
windows_i586_6.1-product-c1-jdk_math, \
windows_x64_6.1-product-c2-jdk_math, \
\
solaris_sparc_5.10-product-c1-jdk_misc, \
solaris_sparcv9_5.10-product-c2-jdk_misc, \
solaris_i586_5.10-product-c1-jdk_misc, \
solaris_x64_5.10-product-c2-jdk_misc, \
linux_i586_2.6-product-{c1|c2}-jdk_misc, \
linux_x64_2.6-product-c2-jdk_misc, \
windows_i586_6.1-product-c1-jdk_misc, \
windows_x64_6.1-product-c2-jdk_misc, \
\
solaris_sparc_5.10-product-c1-jdk_net, \
solaris_sparcv9_5.10-product-c2-jdk_net, \
solaris_i586_5.10-product-c1-jdk_net, \
solaris_x64_5.10-product-c2-jdk_net, \
linux_i586_2.6-product-{c1|c2}-jdk_net, \
linux_x64_2.6-product-c2-jdk_net, \
windows_i586_6.1-product-c1-jdk_net, \
windows_x64_6.1-product-c2-jdk_net, \
\
solaris_sparc_5.10-product-c1-jdk_nio1, \
solaris_sparcv9_5.10-product-c2-jdk_nio1, \
solaris_i586_5.10-product-c1-jdk_nio1, \
solaris_x64_5.10-product-c2-jdk_nio1, \
linux_i586_2.6-product-{c1|c2}-jdk_nio1, \
linux_x64_2.6-product-c2-jdk_nio1, \
windows_i586_6.1-product-c1-jdk_nio1, \
windows_x64_6.1-product-c2-jdk_nio1, \
\
solaris_sparc_5.10-product-c1-jdk_nio2, \
solaris_sparcv9_5.10-product-c2-jdk_nio2, \
solaris_i586_5.10-product-c1-jdk_nio2, \
solaris_x64_5.10-product-c2-jdk_nio2, \
linux_i586_2.6-product-{c1|c2}-jdk_nio2, \
linux_x64_2.6-product-c2-jdk_nio2, \
windows_i586_6.1-product-c1-jdk_nio2, \
windows_x64_6.1-product-c2-jdk_nio2, \
\
solaris_sparc_5.10-product-c1-jdk_nio3, \
solaris_sparcv9_5.10-product-c2-jdk_nio3, \
solaris_i586_5.10-product-c1-jdk_nio3, \
solaris_x64_5.10-product-c2-jdk_nio3, \
linux_i586_2.6-product-{c1|c2}-jdk_nio3, \
linux_x64_2.6-product-c2-jdk_nio3, \
windows_i586_6.1-product-c1-jdk_nio3, \
windows_x64_6.1-product-c2-jdk_nio3, \
\
solaris_sparc_5.10-product-c1-jdk_security1, \
solaris_sparcv9_5.10-product-c2-jdk_security1, \
solaris_i586_5.10-product-c1-jdk_security1, \
solaris_x64_5.10-product-c2-jdk_security1, \
linux_i586_2.6-product-{c1|c2}-jdk_security1, \
linux_x64_2.6-product-c2-jdk_security1, \
windows_i586_6.1-product-c1-jdk_security1, \
windows_x64_6.1-product-c2-jdk_security1, \
\
solaris_sparc_5.10-product-c1-jdk_text, \
solaris_sparcv9_5.10-product-c2-jdk_text, \
solaris_i586_5.10-product-c1-jdk_text, \
solaris_x64_5.10-product-c2-jdk_text, \
linux_i586_2.6-product-{c1|c2}-jdk_text, \
linux_x64_2.6-product-c2-jdk_text, \
windows_i586_6.1-product-c1-jdk_text, \
windows_x64_6.1-product-c2-jdk_text, \
\
solaris_sparc_5.10-product-c1-jdk_tools1, \
solaris_sparcv9_5.10-product-c2-jdk_tools1, \
solaris_i586_5.10-product-c1-jdk_tools1, \
solaris_x64_5.10-product-c2-jdk_tools1, \
linux_i586_2.6-product-{c1|c2}-jdk_tools1, \
linux_x64_2.6-product-c2-jdk_tools1, \
windows_i586_6.1-product-c1-jdk_tools1, \
windows_x64_6.1-product-c2-jdk_tools1, \
\
solaris_sparc_5.10-product-c1-jdk_util, \
solaris_sparcv9_5.10-product-c2-jdk_util, \
solaris_i586_5.10-product-c1-jdk_util, \
solaris_x64_5.10-product-c2-jdk_util, \
linux_i586_2.6-product-{c1|c2}-jdk_util, \
linux_x64_2.6-product-c2-jdk_util, \
......@@ -186,99 +156,77 @@ jprt.make.rule.all.test.targets= \
\
${jprt.make.rule.default.test.targets}, \
\
solaris_sparc_5.10-product-c1-jdk_awt, \
solaris_sparcv9_5.10-product-c2-jdk_awt, \
solaris_i586_5.10-product-c1-jdk_awt, \
solaris_x64_5.10-product-c2-jdk_awt, \
linux_i586_2.6-product-{c1|c2}-jdk_awt, \
linux_x64_2.6-product-c2-jdk_awt, \
windows_i586_6.1-product-c1-jdk_awt, \
windows_x64_6.1-product-c2-jdk_awt, \
\
solaris_sparc_5.10-product-c1-jdk_beans2, \
solaris_sparcv9_5.10-product-c2-jdk_beans2, \
solaris_i586_5.10-product-c1-jdk_beans2, \
solaris_x64_5.10-product-c2-jdk_beans2, \
linux_i586_2.6-product-{c1|c2}-jdk_beans2, \
linux_x64_2.6-product-c2-jdk_beans2, \
windows_i586_6.1-product-c1-jdk_beans2, \
windows_x64_6.1-product-c2-jdk_beans2, \
\
solaris_sparc_5.10-product-c1-jdk_beans3, \
solaris_sparcv9_5.10-product-c2-jdk_beans3, \
solaris_i586_5.10-product-c1-jdk_beans3, \
solaris_x64_5.10-product-c2-jdk_beans3, \
linux_i586_2.6-product-{c1|c2}-jdk_beans3, \
linux_x64_2.6-product-c2-jdk_beans3, \
windows_i586_6.1-product-c1-jdk_beans3, \
windows_x64_6.1-product-c2-jdk_beans3, \
\
solaris_sparc_5.10-product-c1-jdk_management1, \
solaris_sparcv9_5.10-product-c2-jdk_management1, \
solaris_i586_5.10-product-c1-jdk_management1, \
solaris_x64_5.10-product-c2-jdk_management1, \
linux_i586_2.6-product-{c1|c2}-jdk_management1, \
linux_x64_2.6-product-c2-jdk_management1, \
windows_i586_6.1-product-c1-jdk_management1, \
windows_x64_6.1-product-c2-jdk_management1, \
\
solaris_sparc_5.10-product-c1-jdk_management2, \
solaris_sparcv9_5.10-product-c2-jdk_management2, \
solaris_i586_5.10-product-c1-jdk_management2, \
solaris_x64_5.10-product-c2-jdk_management2, \
linux_i586_2.6-product-{c1|c2}-jdk_management2, \
linux_x64_2.6-product-c2-jdk_management2, \
windows_i586_6.1-product-c1-jdk_management2, \
windows_x64_6.1-product-c2-jdk_management2, \
\
solaris_sparc_5.10-product-c1-jdk_rmi, \
solaris_sparcv9_5.10-product-c2-jdk_rmi, \
solaris_i586_5.10-product-c1-jdk_rmi, \
solaris_x64_5.10-product-c2-jdk_rmi, \
linux_i586_2.6-product-{c1|c2}-jdk_rmi, \
linux_x64_2.6-product-c2-jdk_rmi, \
windows_i586_6.1-product-c1-jdk_rmi, \
windows_x64_6.1-product-c2-jdk_rmi, \
\
solaris_sparc_5.10-product-c1-jdk_security2, \
solaris_sparcv9_5.10-product-c2-jdk_security2, \
solaris_i586_5.10-product-c1-jdk_security2, \
solaris_x64_5.10-product-c2-jdk_security2, \
linux_i586_2.6-product-{c1|c2}-jdk_security2, \
linux_x64_2.6-product-c2-jdk_security2, \
windows_i586_6.1-product-c1-jdk_security2, \
windows_x64_6.1-product-c2-jdk_security2, \
\
solaris_sparc_5.10-product-c1-jdk_security3, \
solaris_sparcv9_5.10-product-c2-jdk_security3, \
solaris_i586_5.10-product-c1-jdk_security3, \
solaris_x64_5.10-product-c2-jdk_security3, \
linux_i586_2.6-product-{c1|c2}-jdk_security3, \
linux_x64_2.6-product-c2-jdk_security3, \
windows_i586_6.1-product-c1-jdk_security3, \
windows_x64_6.1-product-c2-jdk_security3, \
\
solaris_sparc_5.10-product-c1-jdk_sound, \
solaris_sparcv9_5.10-product-c2-jdk_sound, \
solaris_i586_5.10-product-c1-jdk_sound, \
solaris_x64_5.10-product-c2-jdk_sound, \
linux_i586_2.6-product-{c1|c2}-jdk_sound, \
linux_x64_2.6-product-c2-jdk_sound, \
windows_i586_6.1-product-c1-jdk_sound, \
windows_x64_6.1-product-c2-jdk_sound, \
\
solaris_sparc_5.10-product-c1-jdk_swing, \
solaris_sparcv9_5.10-product-c2-jdk_swing, \
solaris_i586_5.10-product-c1-jdk_swing, \
solaris_x64_5.10-product-c2-jdk_swing, \
linux_i586_2.6-product-{c1|c2}-jdk_swing, \
linux_x64_2.6-product-c2-jdk_swing, \
windows_i586_6.1-product-c1-jdk_swing, \
windows_x64_6.1-product-c2-jdk_swing, \
\
solaris_sparc_5.10-product-c1-jdk_tools2, \
solaris_sparcv9_5.10-product-c2-jdk_tools2, \
solaris_i586_5.10-product-c1-jdk_tools2, \
solaris_x64_5.10-product-c2-jdk_tools2, \
linux_i586_2.6-product-{c1|c2}-jdk_tools2, \
linux_x64_2.6-product-c2-jdk_tools2, \
......@@ -287,9 +235,7 @@ jprt.make.rule.all.test.targets= \
# JCK test targets in test/Makefile (no fastdebug & limited c2, windows broken)
jprt.my.jck.test.target.set= \
solaris_sparc_5.10-product-c1-JCK7TESTRULE, \
solaris_sparcv9_5.10-product-c2-JCK7TESTRULE, \
solaris_i586_5.10-product-c1-JCK7TESTRULE, \
solaris_x64_5.10-product-c2-JCK7TESTRULE, \
linux_i586_2.6-product-c1-JCK7TESTRULE, \
linux_x64_2.6-product-c2-JCK7TESTRULE
......
#
# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
# Openwin is defined on Solaris.
OPENWIN_LIB := $(OPENWIN_HOME)/lib
WIN_AWT_LIB := $(JDK_OUTPUTDIR)/objs/libawt/awt.lib
##########################################################################################
BUILD_LIBMLIB_SRC := $(JDK_TOPDIR)/src/share/native/sun/awt/medialib
BUILD_LIBMLIB_CFLAGS := -D__USE_J2D_NAMES -D__MEDIALIB_OLD_NAMES \
-I$(BUILD_LIBMLIB_SRC) \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/awt/medialib
BUILD_LIBMLIB_LDLIBS :=
BUILD_LIBMLIB_IMAGE_MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libmlib_image/mapfile-vers
BUILD_LIBMLIB_CFLAGS += -DMLIB_NO_LIBSUNMATH
ifeq ($(OPENJDK_TARGET_CPU_BITS), 64)
BUILD_LIBMLIB_CFLAGS += -DMLIB_OS64BIT
endif
ifneq ($(OPENJDK_TARGET_OS), windows)
BUILD_LIBMLIB_LDLIBS += $(LIBM) $(LIBDL)
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBMLIB_IMAGE, \
LIBRARY := mlib_image, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(BUILD_LIBMLIB_SRC), \
EXCLUDE_FILES := awt_ImagingLib.c mlib_c_ImageBlendTable.c, \
LANG := C, \
OPTIMIZATION := HIGHEST, \
CFLAGS := $(CFLAGS_JDKLIB) \
$(BUILD_LIBMLIB_CFLAGS), \
MAPFILE := $(BUILD_LIBMLIB_IMAGE_MAPFILE), \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX := $(BUILD_LIBMLIB_LDLIBS) \
$(LDFLAGS_JDKLIB_SUFFIX), \
LDFLAGS_SUFFIX_solaris := -lc, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=mlib_image.dll" \
-D "JDK_INTERNAL_NAME=mlib_image" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libmlib_image, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBMLIB_IMAGE): $(BUILD_LIBJAVA)
BUILD_LIBRARIES += $(BUILD_LIBMLIB_IMAGE)
##########################################################################################
ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_ARCH), solaris-sparc)
BUILD_LIBMLIB_IMAGE_V_FILES := \
mlib_v_ImageLookUp.c \
mlib_ImageCreate.c \
mlib_ImageAffine.c \
mlib_ImageConvMxN.c \
mlib_ImageConvKernelConvert.c \
mlib_sys.c \
mlib_ImageLookUp_64.c \
mlib_ImageLookUp_Bit.c \
mlib_ImageColorTrue2Index.c \
mlib_c_ImageThresh1_U8.c \
mlib_v_ImageLookUpS16S16Func.c \
mlib_v_ImageLookUpS16S32Func.c \
mlib_v_ImageLookUpS16U16Func.c \
mlib_v_ImageLookUpS16U8Func.c \
mlib_v_ImageLookUpS32S16Func.c \
mlib_v_ImageLookUpS32S32Func.c \
mlib_v_ImageLookUpS32U16Func.c \
mlib_v_ImageLookUpS32U8Func.c \
mlib_v_ImageLookUpSIS16S16Func.c \
mlib_v_ImageLookUpSIS16S32Func.c \
mlib_v_ImageLookUpSIS16U16Func.c \
mlib_v_ImageLookUpSIS16U8Func.c \
mlib_v_ImageLookUpSIS32S16Func.c \
mlib_v_ImageLookUpSIS32S32Func.c \
mlib_v_ImageLookUpSIS32U16Func.c \
mlib_v_ImageLookUpSIS32U8Func.c \
mlib_v_ImageLookUpSIU16S16Func.c \
mlib_v_ImageLookUpSIU16S32Func.c \
mlib_v_ImageLookUpSIU16U16Func.c \
mlib_v_ImageLookUpSIU16U8Func.c \
mlib_v_ImageLookUpSIU8S16Func.c \
mlib_v_ImageLookUpSIU8S32Func.c \
mlib_v_ImageLookUpSIU8U16Func.c \
mlib_v_ImageLookUpSIU8U8Func.c \
mlib_v_ImageLookUpU16S16Func.c \
mlib_v_ImageLookUpU16S32Func.c \
mlib_v_ImageLookUpU16U16Func.c \
mlib_v_ImageLookUpU16U8Func.c \
mlib_v_ImageLookUpU8S16Func.c \
mlib_v_ImageLookUpU8S32Func.c \
mlib_v_ImageLookUpU8U16Func.c \
mlib_v_ImageLookUpU8U8Func.c \
mlib_v_ImageAffineIndex_BC.c \
mlib_v_ImageAffine_BC.c \
mlib_v_ImageAffine_BC_S16.c \
mlib_v_ImageAffine_BC_U16.c \
mlib_v_ImageAffine_BL.c \
mlib_v_ImageAffine_BL_S16.c \
mlib_v_ImageAffine_BL_U16.c \
mlib_v_ImageAffine_NN.c \
mlib_v_ImageFilters.c \
mlib_ImageAffineEdge.c \
mlib_ImageAffine_BC_D64.c \
mlib_ImageAffine_BC_F32.c \
mlib_ImageAffine_BC_S32.c \
mlib_ImageAffine_BL_D64.c \
mlib_ImageAffine_BL_F32.c \
mlib_ImageAffine_BL_S32.c \
mlib_ImageAffine_NN.c \
mlib_ImageAffine_NN_Bit.c \
mlib_ImageFilters.c \
mlib_ImageScanPoly.c \
mlib_ImageConv_8nw.c \
mlib_ImageConv_8ext.c \
mlib_ImageConv_16nw.c \
mlib_ImageConv_16ext.c \
mlib_ImageConv_u16nw.c \
mlib_ImageConv_u16ext.c \
mlib_ImageConv_32nw.c \
mlib_ImageConv_F32nw.c \
mlib_ImageConvMxN_Fp.c \
mlib_ImageConvMxN_ext.c \
mlib_ImageConv_D64nw.c \
mlib_ImageClipping.c \
mlib_ImageConvCopyEdge_Bit.c \
mlib_ImageConvClearEdge_Bit.c \
mlib_ImageConv2x2_f.c \
mlib_ImageConvClearEdge_Fp.c \
mlib_v_ImageConvMxN_8.c \
mlib_v_ImageConvClearEdge.c \
mlib_v_ImageConvCopyEdge.c \
mlib_v_ImageConvMxN_8ext.c \
mlib_v_ImageConvVersion.c \
mlib_v_ImageConv_8nw.c \
mlib_ImageConvCopyEdge_Fp.c \
mlib_v_ImageChannelInsert_1.c \
mlib_v_ImageChannelExtract_43.c \
mlib_v_ImageChannelExtract_1.c \
mlib_ImageCopy_Bit.c \
mlib_v_ImageCopy_f.c \
mlib_ImageUtils.c \
mlib_ImageDivTables.c
BUILD_LIBMLIB_V_CFLAGS := $(filter-out -DMLIB_NO_LIBSUNMATH, $(BUILD_LIBMLIB_CFLAGS))
$(eval $(call SetupNativeCompilation,BUILD_LIBMLIB_IMAGE_V, \
LIBRARY := mlib_image_v, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/share/native/sun/awt/medialib \
$(JDK_TOPDIR)/src/solaris/native/sun/awt/medialib, \
LANG := C, \
INCLUDE_FILES := $(BUILD_LIBMLIB_IMAGE_V_FILES), \
OPTIMIZATION := HIGHEST, \
CFLAGS := -xarch=sparcvis \
$(JDK_TOPDIR)/src/solaris/native/sun/awt/medialib/vis_$(OPENJDK_TARGET_CPU_BITS).il \
$(BUILD_LIBMLIB_V_CFLAGS) \
$(CFLAGS_JDKLIB), \
MAPFILE := $(BUILD_LIBMLIB_IMAGE_MAPFILE), \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(BUILD_LIBMLIB_LDLIBS) -ljava -ljvm \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX_solaris := -lc, \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libmlib_image_v, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBMLIB_IMAGE_V): $(BUILD_LIBJAVA)
BUILD_LIBRARIES += $(BUILD_LIBMLIB_IMAGE_V)
endif
##########################################################################################
LIBAWT_DIRS := \
$(JDK_TOPDIR)/src/share/native/sun/awt \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/awt \
$(JDK_TOPDIR)/src/share/native/sun/awt/image \
$(JDK_TOPDIR)/src/share/native/sun/awt/image/gif \
$(JDK_TOPDIR)/src/share/native/sun/awt/image/cvutils \
$(JDK_TOPDIR)/src/share/native/sun/awt/medialib \
$(JDK_TOPDIR)/src/share/native/sun/awt/debug \
$(JDK_TOPDIR)/src/share/native/sun/awt/utility \
$(JDK_TOPDIR)/src/share/native/sun/java2d \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d \
$(JDK_TOPDIR)/src/share/native/sun/java2d/loops \
$(JDK_TOPDIR)/src/share/native/sun/java2d/pipe \
$(JDK_TOPDIR)/src/share/native/sun/awt/image \
$(JDK_TOPDIR)/src/share/native/sun/java2d/opengl \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d/opengl \
$(JDK_TOPDIR)/src/share/native/sun/font
ifeq ($(OPENJDK_TARGET_OS), windows)
LIBAWT_DIRS += \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/windows \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d/windows \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d/d3d
else ifneq ($(OPENJDK_TARGET_OS), macosx)
LIBAWT_DIRS += \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d/x11
endif
LIBAWT_CFLAGS += -D__MEDIALIB_OLD_NAMES -D__USE_J2D_NAMES \
$(X_CFLAGS) \
$(foreach dir, $(LIBAWT_DIRS), -I$(dir))
LIBAWT_FILES := \
gifdecoder.c \
imageInitIDs.c \
img_globals.c \
SurfaceData.c \
Region.c \
BufImgSurfaceData.c \
Disposer.c \
Trace.c \
GraphicsPrimitiveMgr.c \
Blit.c \
BlitBg.c \
ScaledBlit.c \
FillRect.c \
FillSpans.c \
FillParallelogram.c \
DrawParallelogram.c \
DrawLine.c \
DrawRect.c \
DrawPolygons.c \
DrawPath.c \
FillPath.c \
ProcessPath.c \
MaskBlit.c \
MaskFill.c \
TransformHelper.c \
AlphaMath.c \
AlphaMacros.c \
AnyByte.c \
ByteBinary1Bit.c \
ByteBinary2Bit.c \
ByteBinary4Bit.c \
ByteIndexed.c \
ByteGray.c \
Index8Gray.c \
Index12Gray.c \
AnyShort.c \
Ushort555Rgb.c \
Ushort565Rgb.c \
Ushort4444Argb.c \
Ushort555Rgbx.c \
UshortGray.c \
UshortIndexed.c \
Any3Byte.c \
ThreeByteBgr.c \
AnyInt.c \
IntArgb.c \
IntArgbPre.c \
IntArgbBm.c \
IntRgb.c \
IntBgr.c \
IntRgbx.c \
Any4Byte.c \
FourByteAbgr.c \
FourByteAbgrPre.c \
BufferedMaskBlit.c \
BufferedRenderPipe.c \
ShapeSpanIterator.c \
SpanClipRenderer.c \
awt_ImageRep.c \
awt_ImagingLib.c \
awt_Mlib.c \
awt_parseImage.c \
DataBufferNative.c \
dither.c \
debug_assert.c \
debug_mem.c \
debug_trace.c \
debug_util.c
ifneq (, $(filter $(OPENJDK_TARGET_OS), solaris linux))
LIBAWT_FILES += awt_LoadLibrary.c initIDs.c img_colors.c
endif
ifeq ($(OPENJDK_TARGET_OS), macosx)
LIBAWT_FILES += awt_LoadLibrary.c img_colors.c
LIBAWT_CFLAGS += -F/System/Library/Frameworks/JavaVM.framework/Frameworks
endif
ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_ARCH), solaris-sparc)
LIBAWT_CFLAGS += -DMLIB_ADD_SUFF
LIBAWT_CFLAGS += -xarch=sparcvis
LIBAWT_CFLAGS += $(JDK_TOPDIR)/src/solaris/native/sun/awt/medialib/vis_$(OPENJDK_TARGET_CPU_BITS).il
LIBAWT_CFLAGS += \
-I$(JDK_TOPDIR)/src/solaris/native/sun/awt/medialib \
-I$(JDK_TOPDIR)/src/solaris/native/sun/java2d/medialib \
-I$(JDK_TOPDIR)/src/solaris/native/sun/java2d/loops
LIBAWT_DIRS += $(JDK_TOPDIR)/src/solaris/native/sun/awt/medialib \
$(JDK_TOPDIR)/src/solaris/native/sun/java2d/loops
LIBAWT_FILES += \
vis_FuncArray.c \
java2d_Mlib.c \
mlib_ImageCreate.c \
mlib_ImageZoom_NN.c \
mlib_ImageCopy_Bit.c \
mlib_sys.c \
mlib_v_ImageClear.c \
mlib_v_ImageClear_f.c \
mlib_v_ImageConstXor.c \
mlib_v_ImageCopy.c \
mlib_v_ImageCopy_f.c \
mlib_v_ImageXor.c \
mlib_v_ImageZoom_NN_f.c \
vis_Interp.c \
vis_AlphaMacros.c \
vis_AlphaMaskBlit.c \
vis_AlphaMaskFill.c \
vis_ByteGray.c \
vis_ByteGray_FromRgb.c \
vis_ByteGray_Mask.c \
vis_ByteIndexed.c \
vis_DrawLine.c \
vis_FourByteAbgr.c \
vis_IntArgb.c \
vis_IntArgbPre.c \
vis_IntArgbPre_Mask.c \
vis_IntBgr.c \
vis_IntRgb.c \
vis_IntRgbx.c \
vis_SrcMaskFill.c \
vis_SrcOverMaskBlit.c \
vis_SrcOverMaskFill.c \
vis_FourByteAbgrPre.c \
vis_GlyphList.c \
vis_GlyphListXor.c \
vis_IntArgbBm.c \
vis_ThreeByteBgr.c \
vis_UshortGray.c \
vis_UshortGray_FromRgb.c \
vis_XorBlit.c \
mlib_v_ImageCopy_blk.s
ifeq ($(OPENJDK_TARGET_CPU), sparcv9)
LIBAWT_ASFLAGS = -P -xarch=v9a
else
LIBAWT_ASFLAGS = -P -xarch=v8plusa
endif
else
LIBAWT_FILES += MapAccelFunc.c
endif
ifneq ($(OPENJDK_TARGET_OS), solaris)
LIBAWT_CFLAGS += -DMLIB_NO_LIBSUNMATH
endif
LIBAWT_LANG := C
ifeq ($(OPENJDK_TARGET_OS), windows)
LIBAWT_FILES += AccelGlyphCache.c \
ShaderList.c \
CmdIDList.cpp \
Hashtable.cpp \
GDIHashtable.cpp \
Devices.cpp \
ObjectList.cpp \
GDIBlitLoops.cpp \
GDIRenderer.cpp \
GDIWindowSurfaceData.cpp \
WindowsFlags.cpp \
WPrinterJob.cpp \
awt_%.cpp \
D3DBlitLoops.cpp \
D3DBufImgOps.cpp \
D3DContext.cpp \
D3DGlyphCache.cpp \
D3DGraphicsDevice.cpp \
D3DMaskBlit.cpp \
D3DMaskCache.cpp \
D3DMaskFill.cpp \
D3DPipelineManager.cpp \
D3DPaints.cpp \
D3DRenderer.cpp \
D3DRenderQueue.cpp \
D3DResourceManager.cpp \
D3DSurfaceData.cpp \
D3DTextRenderer.cpp \
D3DVertexCacher.cpp \
ShellFolder2.cpp \
ThemeReader.cpp \
ComCtl32Util.cpp \
DllUtil.cpp \
initIDs.cpp \
MouseInfo.cpp \
rect.c \
OGLBlitLoops.c \
OGLBufImgOps.c \
OGLContext.c \
OGLFuncs.c \
OGLMaskBlit.c \
OGLMaskFill.c \
OGLPaints.c \
OGLRenderQueue.c \
OGLRenderer.c \
OGLSurfaceData.c \
OGLTextRenderer.c \
OGLVertexCache.c \
WGLGraphicsConfig.c \
WGLSurfaceData.c
LIBAWT_LANG := C++
LIBAWT_CFLAGS += -EHsc -DUNICODE -D_UNICODE
ifeq ($(OPENJDK_TARGET_CPU_BITS), 64)
LIBAWT_CFLAGS += -DMLIB_OS64BIT
endif
ifdef OPENJDK
LIBAWT_RC_FLAGS := -i "$(JDK_TOPDIR)/src/windows/resource/icons"
else
LIBAWT_RC_FLAGS := -i "$(JDK_TOPDIR)/src/closed/windows/native/sun/windows"
endif
LIBAWT_VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/native/sun/windows/awt.rc
endif
ifeq ($(MILESTONE), internal)
LIBAWT_CFLAGS += -DINTERNAL_BUILD
endif
LIBAWT_MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libawt/mapfile-vers
ifeq ($(OPENJDK_TARGET_OS), linux)
LIBAWT_MAPFILE :=
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBAWT, \
LIBRARY := awt, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBAWT_DIRS), \
INCLUDE_FILES := $(LIBAWT_FILES), \
LANG := $(LIBAWT_LANG), \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) $(LIBAWT_CFLAGS), \
ASFLAGS := $(LIBAWT_ASFLAGS), \
MAPFILE := $(LIBAWT_MAPFILE), \
LDFLAGS := $(LDFLAGS_JDKLIB) $(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_solaris := -R/usr/dt/lib$(OPENJDK_TARGET_CPU_ISADIR) -R$(OPENWIN_LIB)$(OPENJDK_TARGET_CPU_ISADIR), \
LDFLAGS_SUFFIX_linux := -ljvm $(LIBM) $(LIBDL) -ljava, \
LDFLAGS_SUFFIX_solaris := -ljvm $(LIBM) $(LIBDL) -ljava -lc, \
LDFLAGS_SUFFIX_macosx := -lmlib_image -ljvm $(LIBM) \
-framework Cocoa \
-framework OpenGL \
-F/System/Library/Frameworks/JavaVM.framework/Frameworks \
-framework JavaNativeFoundation \
-framework JavaRuntimeSupport \
-framework ApplicationServices \
-framework AudioToolbox \
-ljava, \
LDFLAGS_SUFFIX_windows := kernel32.lib user32.lib gdi32.lib winspool.lib \
imm32.lib ole32.lib uuid.lib shell32.lib \
comdlg32.lib winmm.lib comctl32.lib shlwapi.lib \
delayimp.lib jvm.lib $(WIN_JAVA_LIB) advapi32.lib \
-DELAYLOAD:user32.dll -DELAYLOAD:gdi32.dll \
-DELAYLOAD:shell32.dll -DELAYLOAD:winmm.dll \
-DELAYLOAD:winspool.drv -DELAYLOAD:imm32.dll \
-DELAYLOAD:ole32.dll -DELAYLOAD:comdlg32.dll \
-DELAYLOAD:comctl32.dll -DELAYLOAD:shlwapi.dll, \
VERSIONINFO_RESOURCE := $(LIBAWT_VERSIONINFO_RESOURCE), \
RC_FLAGS := $(RC_FLAGS) $(LIBAWT_RC_FLAGS) \
-D "JDK_FNAME=awt.dll" \
-D "JDK_INTERNAL_NAME=awt" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libawt, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBAWT): $(BUILD_LIBJAVA)
ifeq ($(OPENJDK_TARGET_OS), macosx)
$(BUILD_LIBAWT): $(BUILD_LIBMLIB_IMAGE)
endif
BUILD_LIBRARIES += $(BUILD_LIBAWT)
##########################################################################################
ifeq ($(findstring $(OPENJDK_TARGET_OS),windows macosx),)
ifndef BUILD_HEADLESS_ONLY
LIBAWT_XAWT_DIRS := \
$(JDK_TOPDIR)/src/share/native/sun/awt/debug \
$(JDK_TOPDIR)/src/share/native/sun/awt/utility \
$(JDK_TOPDIR)/src/share/native/sun/font \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/font \
$(JDK_TOPDIR)/src/share/native/sun/java2d/opengl \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/awt \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d/opengl \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d/x11 \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/xawt \
LIBAWT_XAWT_CFLAGS := -DXAWT -DXAWT_HACK \
-DPACKAGE_PATH=\"$(PACKAGE_PATH)\" \
$(CUPS_CFLAGS) \
$(foreach dir, $(LIBAWT_XAWT_DIRS), -I$(dir)) \
-I$(JDK_TOPDIR)/src/share/native/sun/java2d \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d \
-I$(JDK_TOPDIR)/src/share/native/sun/java2d/loops \
-I$(JDK_TOPDIR)/src/share/native/sun/java2d/pipe \
-I$(JDK_TOPDIR)/src/share/native/sun/awt/image \
-I$(JDK_TOPDIR)/src/share/native/sun/awt/image/cvutils \
-I$(JDK_TOPDIR)/src/share/native/sun/awt/debug \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/jdga
ifeq ($(OPENJDK_TARGET_OS), solaris)
LIBAWT_XAWT_CFLAGS += -DFUNCPROTO=15
endif
ifeq ($(OPENJDK_TARGET_OS), linux)
ifndef OPENJDK
include $(JDK_TOPDIR)/make/closed/xawt.gmk
endif
ifeq ($(DISABLE_XRENDER), true)
LIBAWT_XAWT_CFLAGS += -DDISABLE_XRENDER_BY_DEFAULT=true
endif
endif
ifeq ($(MILESTONE), internal)
LIBAWT_XAWT_CFLAGS += -DINTERNAL_BUILD
endif
LIBAWT_XAWT_FILES := \
XlibWrapper.c \
XWindow.c \
XToolkit.c \
X11Color.c \
X11SurfaceData.c \
awt_GraphicsEnv.c \
awt_InputMethod.c \
robot_common.c \
awt_Robot.c \
list.c \
multiVis.c \
initIDs.c \
awt_util.c \
awt_Desktop.c \
awt_UNIXToolkit.c \
X11FontScaler_md.c \
X11TextRenderer_md.c \
fontpath.c \
awt_Insets.c \
awt_Event.c \
X11Renderer.c \
X11PMBlitLoops.c \
OGLBlitLoops.c \
OGLBufImgOps.c \
OGLContext.c \
OGLFuncs.c \
OGLMaskBlit.c \
OGLMaskFill.c \
OGLPaints.c \
OGLRenderQueue.c \
OGLRenderer.c \
OGLSurfaceData.c \
OGLTextRenderer.c \
OGLVertexCache.c \
GLXGraphicsConfig.c \
GLXSurfaceData.c \
AccelGlyphCache.c \
awt_Font.c \
multi_font.c \
awt_AWTEvent.c \
awt_DrawingSurface.c \
jawt.c \
CUPSfuncs.c \
debug_assert.c \
debug_mem.c \
debug_trace.c \
debug_util.c \
awt_Plugin.c \
gnome_interface.c \
gtk2_interface.c \
swing_GTKEngine.c \
swing_GTKStyle.c \
rect.c \
sun_awt_X11_GtkFileDialogPeer.c \
XRSurfaceData.c \
XRBackendNative.c
LIBAWT_XAWT_LDFLAGS_SUFFIX := $(LIBM) -lawt -lXext -lX11 -lXrender $(LIBDL) -lXtst -lXi -ljava -ljvm -lc
ifeq ($(OPENJDK_TARGET_OS), linux)
# To match old build, add this to LDFLAGS instead of suffix.
LIBAWT_XAWT_LDFLAGS += -lpthread
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBAWT_XAWT, \
LIBRARY := awt_xawt, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBAWT_XAWT_DIRS), \
INCLUDE_FILES := $(LIBAWT_XAWT_FILES), \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) $(LIBAWT_XAWT_CFLAGS) \
$(X_CFLAGS), \
MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libawt_xawt/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(X_LIBS) $(LIBAWT_XAWT_LDFLAGS), \
LDFLAGS_linux := $(call SET_SHARED_LIBRARY_ORIGIN) \
$(call SET_SHARED_LIBRARY_ORIGIN,/..), \
LDFLAGS_solaris := -L$(OPENWIN_HOME)/sfw/lib$(OPENJDK_TARGET_CPU_ISADIR) \
-L$(OPENWIN_LIB)$(OPENJDK_TARGET_CPU_ISADIR) \
-R$(OPENWIN_HOME)/sfw/lib$(OPENJDK_TARGET_CPU_ISADIR) \
-R$(OPENWIN_LIB)$(OPENJDK_TARGET_CPU_ISADIR) \
-R/usr/dt/lib$(OPENJDK_TARGET_CPU_ISADIR) \
$(call SET_SHARED_LIBRARY_ORIGIN) \
$(call SET_SHARED_LIBRARY_ORIGIN,/..), \
LDFLAGS_SUFFIX := $(LIBAWT_XAWT_LDFLAGS_SUFFIX), \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=xawt.dll" \
-D "JDK_INTERNAL_NAME=xawt" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libawt_xawt, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBAWT_XAWT): $(BUILD_LIBJAVA)
$(BUILD_LIBAWT_XAWT): $(BUILD_LIBAWT)
BUILD_LIBRARIES += $(BUILD_LIBAWT_XAWT)
endif
endif
##########################################################################################
# TODO: Update awt lib path when awt is converted
$(eval $(call SetupNativeCompilation,BUILD_LIBLCMS, \
LIBRARY := lcms, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/share/native/sun/java2d/cmm/lcms, \
LANG := C, \
OPTIMIZATION := HIGHEST, \
CFLAGS := $(filter-out -xc99=%none, $(CFLAGS_JDKLIB)) \
$(SHARED_LIBRARY_FLAGS) \
-I$(JDK_TOPDIR)/src/share/native/sun/java2d \
-I$(JDK_TOPDIR)/src/share/native/sun/awt/debug, \
CFLAGS_solaris := -xc99=no_lib, \
CFLAGS_windows := -DCMS_IS_WINDOWS_, \
MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/liblcms/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_solaris := /usr/lib$(OPENJDK_TARGET_CPU_ISADIR)/libm.so.2, \
LDFLAGS_windows := $(WIN_AWT_LIB) $(WIN_JAVA_LIB), \
LDFLAGS_SUFFIX_solaris := -lawt -ljava -ljvm -lc, \
LDFLAGS_SUFFIX_macosx := $(LIBM) -lawt -ljava -ljvm, \
LDFLAGS_SUFFIX_linux := -lm -lawt -ljava -ljvm, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=lcms.dll" \
-D "JDK_INTERNAL_NAME=lcms" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/liblcms, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
BUILD_LIBRARIES += $(BUILD_LIBLCMS)
$(BUILD_LIBLCMS): $(BUILD_LIBAWT)
##########################################################################################
ifdef OPENJDK
BUILD_LIBJPEG_MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libjpeg/mapfile-vers
else
BUILD_LIBJPEG_MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libjpeg/mapfile-vers-closed
BUILD_LIBJPEG_CLOSED_SRC := $(JDK_TOPDIR)/src/closed/share/native/sun/awt/image/jpeg
BUILD_LIBJPEG_CLOSED_INCLUDES := -I$(BUILD_LIBJPEG_CLOSED_SRC)
endif
BUILD_LIBJPEG_REORDER :=
ifeq ($(OPENJDK_TARGET_OS), solaris)
ifneq ($(OPENJDK_TARGET_CPU), x86_64)
BUILD_LIBJPEG_REORDER := $(JDK_TOPDIR)/makefiles/mapfiles/libjpeg/reorder-$(OPENJDK_TARGET_CPU)
endif
endif
# Suppress gcc warnings like "variable might be clobbered by 'longjmp'
# or 'vfork'": this warning indicates that some variable is placed to
# a register by optimized compiler and it's value might be lost on longjmp().
# Recommended way to avoid such warning is to declare the variable as
# volatile to prevent the optimization. However, this approach does not
# work because we have to declare all variables as volatile in result.
#ifndef CROSS_COMPILE_ARCH
# CC_43_OR_NEWER := \
# $(shell $(EXPR) $(CC_MAJORVER) \> 4 \| \
# \( $(CC_MAJORVER) = 4 \& $(CC_MINORVER) \>= 3 \) )
# ifeq ($(CC_43_OR_NEWER), 1)
# BUILD_LIBJPEG_CFLAGS_linux += -Wno-clobbered
# endif
#endif
$(eval $(call SetupNativeCompilation,BUILD_LIBJPEG, \
LIBRARY := jpeg, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(BUILD_LIBJPEG_CLOSED_SRC) \
$(JDK_TOPDIR)/src/share/native/sun/awt/image/jpeg, \
LANG := C, \
OPTIMIZATION := HIGHEST, \
CFLAGS := $(CFLAGS_JDKLIB) \
$(BUILD_LIBJPEG_CLOSED_INCLUDES) \
-I$(JDK_TOPDIR)/src/share/native/sun/awt/image/jpeg, \
MAPFILE := $(BUILD_LIBJPEG_MAPFILE), \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_windows := $(WIN_JAVA_LIB) jvm.lib, \
LDFLAGS_SUFFIX := $(LDFLAGS_JDKLIB_SUFFIX), \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=jpeg.dll" \
-D "JDK_INTERNAL_NAME=jpeg" \
-D "JDK_FTYPE=0x2L", \
REORDER := $(BUILD_LIBJPEG_REORDER), \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjpeg, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBJPEG): $(BUILD_LIBJAVA)
BUILD_LIBRARIES += $(BUILD_LIBJPEG)
##########################################################################################
ifndef OPENJDK
FONT_HEADERS := -I$(JDK_TOPDIR)/src/closed/share/native/sun/font/t2k
BUILD_LIBFONTMANAGER_MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libfontmanager/mapfile-vers
LIBFONTMANAGER_EXCLUDE_FILES += freetypeScaler.c
else
FONT_HEADERS := $(FREETYPE_CFLAGS)
BUILD_LIBFONTMANAGER_MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libfontmanager/mapfile-vers.openjdk
BUILD_LIBFONTMANAGER_FONTLIB := $(FREETYPE_LIBS)
endif
LIBFONTMANAGER_OPTIMIZATION := HIGH
ifeq ($(OPENJDK_TARGET_OS), windows)
LIBFONTMANAGER_EXCLUDE_FILES += X11FontScaler.c \
X11TextRenderer.c
LIBFONTMANAGER_OPTIMIZATION := HIGHEST
else ifeq ($(OPENJDK_TARGET_OS), macosx)
LIBFONTMANAGER_EXCLUDE_FILES += X11FontScaler.c \
X11TextRenderer.c \
fontpath.c \
lcdglyph.c
else
LIBFONTMANAGER_EXCLUDE_FILES += fontpath.c \
lcdglyph.c
endif
BUILD_LIBFONTMANAGER_CFLAGS_COMMON := \
$(X_CFLAGS) \
-DLE_STANDALONE -DHEADLESS \
$(FONT_HEADERS) \
-I$(JDK_TOPDIR)/src/share/native/sun/font \
-I$(JDK_TOPDIR)/src/share/native/sun/font/layout \
-I$(JDK_TOPDIR)/src/share/native/sun/awt/image/cvutils \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/awt \
-I$(JDK_TOPDIR)/src/share/native/sun/awt/debug \
-I$(JDK_TOPDIR)/src/share/native/sun/java2d/loops \
-I$(JDK_TOPDIR)/src/share/native/sun/java2d/pipe \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d \
-I$(JDK_TOPDIR)/src/share/native/sun/java2d
# Turn off aliasing with GCC for ExtensionSubtables.cpp
ifeq ($(OPENJDK_TARGET_OS), linux)
BUILD_LIBFONTMANAGER_ExtensionSubtables.cpp_CXXFLAGS := -fno-strict-aliasing
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBFONTMANAGER, \
LIBRARY := fontmanager, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/share/native/sun/font \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/font, \
EXCLUDE_FILES := $(LIBFONTMANAGER_EXCLUDE_FILES) \
AccelGlyphCache.c, \
LANG := C++, \
CFLAGS := $(CFLAGS_JDKLIB) $(BUILD_LIBFONTMANAGER_CFLAGS_COMMON), \
CXXFLAGS := $(CXXFLAGS_JDKLIB) $(BUILD_LIBFONTMANAGER_CFLAGS_COMMON), \
OPTIMIZATION := $(LIBFONTMANAGER_OPTIMIZATION), \
CFLAGS_windows = -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/windows \
-DCC_NOEX, \
MAPFILE := $(BUILD_LIBFONTMANAGER_MAPFILE), \
LDFLAGS := $(subst -Xlinker -z -Xlinker defs,,$(LDFLAGS_JDKLIB)) $(LDFLAGS_CXX_JDK) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX := $(BUILD_LIBFONTMANAGER_FONTLIB), \
LDFLAGS_SUFFIX_linux := -lawt $(LIBM) $(LIBCXX) -ljava -ljvm -lc, \
LDFLAGS_SUFFIX_solaris := -lawt -lawt_xawt -lc $(LIBM) $(LIBCXX) -ljava -ljvm, \
LDFLAGS_SUFFIX_macosx := -lawt $(LIBM) $(LIBCXX) -undefined dynamic_lookup \
-ljava -ljvm, \
LDFLAGS_SUFFIX_windows := $(WIN_JAVA_LIB) advapi32.lib user32.lib gdi32.lib \
$(WIN_AWT_LIB), \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=fontmanager.dll" \
-D "JDK_INTERNAL_NAME=fontmanager" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libfontmanager, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBFONTMANAGER): $(BUILD_LIBAWT)
ifeq ($(OPENJDK_TARGET_OS), solaris)
$(BUILD_LIBFONTMANAGER): $(BUILD_LIBAWT_XAWT)
endif
BUILD_LIBRARIES += $(BUILD_LIBFONTMANAGER)
##########################################################################################
ifndef OPENJDK
#ifeq ($(OPENJDK_TARGET_OS), linux)
# ifeq ("$(CC_VER_MAJOR)", "3")
# OTHER_LDLIBS += -Wl,-Bstatic -lgcc_eh -Wl,-Bdynamic
# endif
#endif
#
# The resulting size of the t2k lib file is (at least on linux) dependant on the order of
# the input .o files. Because of this the new build will differ in size to the old build.
BUILD_LIBT2K_CFLAGS_COMMON := -I$(JDK_TOPDIR)/src/share/native/sun/font \
-I$(JDK_TOPDIR)/src/closed/share/native/sun/font/t2k \
-I$(JDK_TOPDIR)/src/closed/share/native/sun/font \
-I$(JDK_TOPDIR)/src/share/share/native/sun/font \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/font \
-I$(JDK_TOPDIR)/src/share/native/sun/java2d/loops \
-I$(JDK_TOPDIR)/src/share/native/sun/java2d/pipe \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d \
-I$(JDK_TOPDIR)/src/share/native/sun/java2d
$(eval $(call SetupNativeCompilation,BUILD_LIBT2K, \
LIBRARY := t2k, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/closed/share/native/sun/font \
$(JDK_TOPDIR)/src/closed/share/native/sun/font/t2k \
$(JDK_TOPDIR)/src/closed/share/native/sun/font/t2k/ttHints, \
EXCLUDE_FILES := orion.c, \
LANG := C++, \
OPTIMIZATION := HIGH, \
CFLAGS := $(CFLAGS_JDKLIB) $(BUILD_LIBT2K_CFLAGS_COMMON), \
CXXFLAGS := $(CXXFLAGS_JDKLIB) $(BUILD_LIBT2K_CFLAGS_COMMON), \
CFLAGS_windows = -DCC_NOEX, \
CXXFLAGS_windows = -DCC_NOEX, \
MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libt2k/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_windows := user32.lib $(JDK_OUTPUTDIR)/objs/libfontmanager/fontmanager.lib, \
LDFLAGS_SUFFIX_posix := $(LIBM) $(LIBCXX) -lfontmanager -ljava -ljvm -lc, \
LDFLAGS_SUFFIX_solaris := -lawt -lawt_xawt, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=t2k.dll" \
-D "JDK_INTERNAL_NAME=t2k" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libt2k, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
# t2k is linked against fontmanager
$(BUILD_LIBT2K): $(BUILD_LIBFONTMANAGER)
BUILD_LIBRARIES += $(BUILD_LIBT2K)
endif
##########################################################################################
ifeq ($(OPENJDK_TARGET_OS), windows)
ifeq ($(OPENJDK_TARGET_CPU), x86)
KERNEL32_LIB := kernel32.lib
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBJAWT, \
LIBRARY := jawt, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/windows, \
INCLUDE_FILES := jawt.cpp, \
LANG := C++, \
OPTIMIZATION := LOW, \
CFLAGS := $(CXXFLAGS_JDKLIB) \
-EHsc -DUNICODE -D_UNICODE \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/windows \
-I$(JDK_TOPDIR)/src/share/native/sun/awt/debug \
-I$(JDK_TOPDIR)/src/share/native/sun/java2d \
-I$(JDK_TOPDIR)/src/share/native/sun/awt/image/cvutils \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d/windows, \
LDFLAGS := $(LDFLAGS_JDKLIB) $(KERNEL32_LIB) $(LDFLAGS_CXX_JDK) \
advapi32.lib $(WIN_AWT_LIB), \
LDFLAGS_SUFFIX := $(LDFLAGS_JDKLIB_SUFFIX), \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=jawt.dll" \
-D "JDK_INTERNAL_NAME=jawt" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjawt, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBJAWT): $(BUILD_LIBAWT)
$(JDK_OUTPUTDIR)/lib/$(LIBRARY_PREFIX)jawt$(STATIC_LIBRARY_SUFFIX): $(BUILD_LIBJAWT)
$(ECHO) Copying $(@F)
$(CP) $(JDK_OUTPUTDIR)/objs/libjawt/$(LIBRARY_PREFIX)jawt$(STATIC_LIBRARY_SUFFIX) $@
BUILD_LIBRARIES += $(JDK_OUTPUTDIR)/lib/$(LIBRARY_PREFIX)jawt$(STATIC_LIBRARY_SUFFIX)
else # OPENJDK_TARGET_OS not windows
ifeq ($(OPENJDK_TARGET_OS), macosx)
JAWT_FILES := jawt.m
JAWT_LIBS := -lawt_lwawt
else
JAWT_FILES := jawt.c
JAWT_LIBS :=
ifneq ($(OPENJDK_TARGET_OS), solaris)
JAWT_LIBS += -lawt
endif
ifndef BUILD_HEADLESS_ONLY
JAWT_LIBS += -lawt_xawt
else
JAWT_LIBS += -lawt_headless
HEADLESS_CFLAG += -DHEADLESS
endif
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBJAWT, \
LIBRARY := jawt, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/awt \
$(JDK_TOPDIR)/src/macosx/native/sun/awt, \
INCLUDE_FILES := $(JAWT_FILES), \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB), \
CFLAGS_linux := $(HEADLESS_CFLAG), \
CFLAGS_macosx := -I$(JDK_TOPDIR)/src/solaris/native/sun/awt, \
MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libjawt/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_solaris := -L$(OPENWIN_HOME)/sfw/lib$(OPENJDK_TARGET_CPU_ISADIR) -L$(OPENWIN_LIB)$(OPENJDK_TARGET_CPU_ISADIR), \
LDFLAGS_SUFFIX_linux := $(JAWT_LIBS) $(LDFLAGS_JDKLIB_SUFFIX), \
LDFLAGS_SUFFIX_solaris := $(JAWT_LIBS) $(LDFLAGS_JDKLIB_SUFFIX) -lXrender, \
LDFLAGS_SUFFIX_macosx := -Xlinker -rpath -Xlinker @loader_path $(JAWT_LIBS) \
-framework Cocoa $(LDFLAGS_JDKLIB_SUFFIX), \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjawt, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
ifndef BUILD_HEADLESS_ONLY
$(BUILD_LIBJAWT): $(BUILD_LIBAWT_XAWT)
else
$(BUILD_LIBJAWT): $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)awt_headless$(SHARED_LIBRARY_SUFFIX)
endif
ifeq ($(OPENJDK_TARGET_OS), macosx)
$(BUILD_LIBJAWT): $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)awt_lwawt$(SHARED_LIBRARY_SUFFIX)
endif
endif # OPENJDK_TARGET_OS
BUILD_LIBRARIES += $(BUILD_LIBJAWT)
##########################################################################################
ifndef OPENJDK
BUILD_LIBKCMS_EXCLUDE_FILES :=
ifeq ($(OPENJDK_TARGET_OS), windows)
BUILD_LIBKCMS_EXCLUDE_FILES += ukcpmgr.c unixmem.c
else
BUILD_LIBKCMS_EXCLUDE_FILES += cmmdll.c registry.c spxffile.c sysinfo.c winmem.c wkcpmgr.c
endif
BUILD_LIBKCMS_FLAGS := $(CFLAGS_JDKLIB)
ifeq ($(OPENJDK_TARGET_OS), solaris)
# This particular library uses a feature called PIC_CODE_SMALL (on solaris)
# implement it like this...since it's only used here
BUILD_LIBKCMS_FLAGS := $(patsubst -KPIC, -Kpic, $(BUILD_LIBKCMS_FLAGS))
else ifeq ($(OPENJDK_TARGET_CPU_ARCH), ppc)
BUILD_LIBKCMS_FLAGS := $(patsubst -fPIC, -fpic, $(BUILD_LIBKCMS_FLAGS))
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBKCMS, \
LIBRARY := kcms, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/closed/share/native/sun/java2d/cmm/kcms, \
LANG := C, \
EXCLUDE_FILES := $(BUILD_LIBKCMS_EXCLUDE_FILES), \
OPTIMIZATION := LOW, \
CFLAGS := $(BUILD_LIBKCMS_FLAGS) \
-DJAVACMM -DFUT_CALC_EX -DNO_FUT_GCONST, \
CFLAGS_linux := -Wno-missing-field-initializers, \
MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libkcms/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX_linux := -lc -lpthread, \
LDFLAGS_SUFFIX_solaris := -lc, \
LDFLAGS_SUFFIX_windows := $(WIN_JAVA_LIB) advapi32.lib user32.lib version.lib, \
LDFLAGS_SUFFIX_posix := -lm -ljava -ljvm, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/closed/share/native/sun/java2d/cmm/kcms/cmm.rc, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/closed/share/native/sun/java2d/cmm/kcms/cmm.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=kcms.dll" \
-D "JDK_INTERNAL_NAME=kcms" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libkcms, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBKCMS): $(BUILD_LIBJAVA)
BUILD_LIBRARIES += $(BUILD_LIBKCMS)
endif
##########################################################################################
ifndef OPENJDK
ifeq ($(OPENJDK_TARGET_OS), solaris)
ifneq ($(OPENJDK_TARGET_CPU), x86_64)
ifeq ($(shell if test "$(OS_VERSION_MAJOR)" -eq 5 -a "$(OS_VERSION_MINOR)" -le 10; then $(ECHO) ok; fi), ok)
SUNWJDGA_MAPFILE :=
ifeq ($(OPENJDK_TARGET_CPU_ARCH), sparc)
SUNWJDGA_MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libjdga/mapfile-vers
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBSUNWJDGA, \
LIBRARY := sunwjdga, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/solaris/native/sun/jdga, \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
-I$(JDK_TOPDIR)/src/share/javavm/export \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/javavm/export \
-I$(OPENWIN_HOME)/include, \
MAPFILE := $(SUNWJDGA_MAPFILE), \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX := -L$(OPENWIN_LIB)$(OPENJDK_TARGET_CPU_ISADIR) -R$(OPENWIN_LIB)$(OPENJDK_TARGET_CPU_ISADIR) -ldga -lX11 $(LIBDL) -lc, \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libsunwjdga, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
BUILD_LIBRARIES += $(BUILD_LIBSUNWJDGA)
endif
endif
endif
endif
##########################################################################################
ifeq ($(BUILD_HEADLESS), true)
# Mac and Windows only use the native AWT lib, do not build libawt_headless
ifeq ($(findstring $(OPENJDK_TARGET_OS), windows macosx),)
LIBAWT_HEADLESS_DIRS := $(JDK_TOPDIR)/src/share/native/sun/font \
$(JDK_TOPDIR)/src/share/native/sun/java2d/opengl \
$(JDK_TOPDIR)/src/solaris/native/sun/font \
$(JDK_TOPDIR)/src/solaris/native/sun/awt \
$(JDK_TOPDIR)/src/solaris/native/sun/java2d/opengl \
$(JDK_TOPDIR)/src/solaris/native/sun/java2d/x11
ifeq ($(OPENJDK_TARGET_OS), macosx)
LIBAWT_HEADLESS_DIRS += $(JDK_TOPDIR)/src/macosx/native/sun/font
endif
LIBAWT_HEADLESS_CFLAGS := -DHEADLESS=true \
-DPACKAGE_PATH=\"$(PACKAGE_PATH)\" \
$(CUPS_CFLAGS) \
$(X_CFLAGS) \
-I$(JDK_TOPDIR)/src/share/native/sun/java2d \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d \
-I$(JDK_TOPDIR)/src/share/native/sun/java2d/loops \
-I$(JDK_TOPDIR)/src/share/native/sun/java2d/pipe \
-I$(JDK_TOPDIR)/src/share/native/sun/awt/image \
-I$(JDK_TOPDIR)/src/share/native/sun/awt/image/cvutils \
-I$(JDK_TOPDIR)/src/share/native/sun/awt/debug \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/jdga \
$(foreach dir, $(LIBAWT_HEADLESS_DIRS), -I$(dir))
ifeq ($(OPENJDK_TARGET_OS), macosx)
LIBAWT_HEADLESS_CFLAGS += \
-F/System/Library/Frameworks/JavaVM.framework/Frameworks \
-F/System/Library/Frameworks/ApplicationServices.framework/Frameworks
endif
LIBAWT_HEADLESS_FILES := \
awt_Font.c \
HeadlessToolkit.c \
fontpath.c \
VDrawingArea.c \
X11Color.c \
X11Renderer.c \
X11PMBlitLoops.c \
X11SurfaceData.c \
X11FontScaler_md.c \
X11TextRenderer_md.c \
OGLBlitLoops.c \
OGLBufImgOps.c \
OGLContext.c \
OGLFuncs.c \
OGLMaskBlit.c \
OGLMaskFill.c \
OGLPaints.c \
OGLRenderQueue.c \
OGLRenderer.c \
OGLSurfaceData.c \
OGLTextRenderer.c \
OGLVertexCache.c \
GLXGraphicsConfig.c \
GLXSurfaceData.c \
AccelGlyphCache.c \
CUPSfuncs.c
LIBAWT_HEADLESS_REORDER :=
ifeq ($(OPENJDK_TARGET_OS), solaris)
ifneq ($(OPENJDK_TARGET_CPU), x86_64)
LIBAWT_HEADLESS_REORDER := $(JDK_TOPDIR)/makefiles/mapfiles/libawt_headless/reorder-$(OPENJDK_TARGET_CPU)
endif
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBAWT_HEADLESS, \
LIBRARY := awt_headless, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBAWT_HEADLESS_DIRS), \
INCLUDE_FILES := $(LIBAWT_HEADLESS_FILES), \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) $(LIBAWT_HEADLESS_CFLAGS), \
MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libawt_headless/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_linux := $(call SET_SHARED_LIBRARY_ORIGIN,/..), \
LDFLAGS_solaris := $(call SET_SHARED_LIBRARY_ORIGIN,/..) \
-R/usr/dt/lib$(OPENJDK_TARGET_CPU_ISADIR) \
-R$(OPENWIN_LIB)$(OPENJDK_TARGET_CPU_ISADIR), \
LDFLAGS_macosx := $(call SET_SHARED_LIBRARY_ORIGIN)., \
REORDER := $(LIBAWT_HEADLESS_REORDER), \
LDFLAGS_SUFFIX_linux := -ljvm -lawt -lm $(LIBDL) -ljava, \
LDFLAGS_SUFFIX_solaris := $(LIBDL) -ljvm -lawt -lm -ljava $(LIBCXX) -lc, \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libawt_headless, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBAWT_HEADLESS): $(BUILD_LIBAWT)
BUILD_LIBRARIES += $(BUILD_LIBAWT_HEADLESS)
endif
endif
##########################################################################################
ifndef BUILD_HEADLESS_ONLY
LIBSPLASHSCREEN_DIRS := \
$(JDK_TOPDIR)/src/share/native/sun/awt/image/jpeg \
$(JDK_TOPDIR)/src/share/native/sun/awt/libpng \
$(JDK_TOPDIR)/src/share/native/sun/awt/splashscreen
ifeq ($(USE_EXTERNAL_LIBGIF), true)
GIFLIB_LDFLAGS := -lgif
else
LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/share/native/sun/awt/giflib
GIFLIB_CFLAGS := -I$(JDK_TOPDIR)/src/share/native/sun/awt/giflib
endif
ifneq ($(OPENJDK_TARGET_OS), macosx)
LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/awt/splashscreen
else
LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/macosx/native/sun/awt/splashscreen
endif
LIBSPLASHSCREEN_CFLAGS := -DSPLASHSCREEN -DPNG_NO_MMX_CODE \
$(foreach dir, $(LIBSPLASHSCREEN_DIRS), -I$(dir))
ifeq ($(OPENJDK_TARGET_OS), macosx)
LIBSPLASHSCREEN_CFLAGS := -I$(JDK_TOPDIR)/src/macosx/native/sun/awt/splashscreen \
$(LIBSPLASHSCREEN_CFLAGS) \
-F/System/Library/Frameworks/JavaVM.framework/Frameworks
LIBSPLASHSCREEN_CFLAGS += -DWITH_MACOSX
LIBSPLASHSCREEN_CFLAGS += -I$(JDK_TOPDIR)/src/macosx/native/sun/osxapp
LIBSPLASHSCREEN_java_awt_SplashScreen.c_CFLAGS := -x objective-c -O0
LIBSPLASHSCREEN_splashscreen_gfx_impl.c_CFLAGS := -x objective-c -O0
LIBSPLASHSCREEN_splashscreen_gif.c_CFLAGS := -x objective-c -O0
LIBSPLASHSCREEN_splashscreen_impl.c_CFLAGS := -x objective-c -O0
LIBSPLASHSCREEN_splashscreen_jpeg.c_CFLAGS := -x objective-c -O0
LIBSPLASHSCREEN_splashscreen_png.c_CFLAGS := -x objective-c -O0
LIBSPLASHSCREEN_splashscreen_sys.m_CFLAGS := -O0
else ifeq ($(OPENJDK_TARGET_OS), windows)
LIBSPLASHSCREEN_CFLAGS += -DWITH_WIN32
else ifeq ($(OPENJDK_TARGET_OS), solaris)
LIBSPLASHSCREEN_CFLAGS += -DWITH_X11 -I$(OPENWIN_HOME)/include -I$(OPENWIN_HOME)/include/X11/extensions
else
LIBSPLASHSCREEN_CFLAGS += -DWITH_X11 $(X_CFLAGS)
endif
LIBSPLASHSCREEN_LDFLAGS_SUFFIX :=
ifneq ($(USE_EXTERNAL_LIBZ), true)
LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.5
LIBSPLASHSCREEN_CFLAGS += $(ZLIB_CPPFLAGS)
endif
ifeq ($(OPENJDK_TARGET_OS), macosx)
LIBSPLASHSCREEN_LDFLAGS_SUFFIX += $(LIBM) -lpthread -liconv -losxapp \
-framework ApplicationServices \
-framework Foundation \
-framework Cocoa \
-F/System/Library/Frameworks/JavaVM.framework/Frameworks \
-framework JavaNativeFoundation
else ifeq ($(OPENJDK_TARGET_OS), windows)
LIBSPLASHSCREEN_LDFLAGS_SUFFIX += kernel32.lib user32.lib gdi32.lib delayimp.lib -DELAYLOAD:user32.dll
else ifeq ($(OPENJDK_TARGET_OS), solaris)
# Solaris still uses OPENWIN_LIB ..
LIBSPLASHSCREEN_LDFLAGS_SUFFIX += -L$(OPENWIN_LIB)$(OPENJDK_TARGET_CPU_ISADIR) -lX11 -lXext $(LIBM) -lpthread
else # .. all other Unixes can use X_LIBS
LIBSPLASHSCREEN_LDFLAGS_SUFFIX += $(X_LIBS) -lX11 -lXext $(LIBM) -lpthread
endif
$(eval $(call SetupNativeCompilation,LIBSPLASHSCREEN, \
LIBRARY := splashscreen, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBSPLASHSCREEN_DIRS), \
EXCLUDE_FILES := imageioJPEG.c jpegdecoder.c pngtest.c, \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(LIBSPLASHSCREEN_CFLAGS) $(CFLAGS_JDKLIB) $(GIFLIB_CFLAGS), \
MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libsplashscreen/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX := $(LIBSPLASHSCREEN_LDFLAGS_SUFFIX) $(LIBZ) $(GIFLIB_LDFLAGS), \
LDFLAGS_SUFFIX_solaris := -lc, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=splashscreen.dll" \
-D "JDK_INTERNAL_NAME=splashscreen" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libsplashscreen, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
BUILD_LIBRARIES += $(LIBSPLASHSCREEN)
ifeq ($(OPENJDK_TARGET_OS), macosx)
$(LIBSPLASHSCREEN): $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)osxapp$(SHARED_LIBRARY_SUFFIX)
endif
endif
##########################################################################################
ifndef OPENJDK
LIBDCPR_SRC_DIRS := \
$(JDK_TOPDIR)/src/closed/share/native/sun/dc/doe \
$(JDK_TOPDIR)/src/closed/share/native/sun/dc/path \
$(JDK_TOPDIR)/src/closed/share/native/sun/dc/pr \
$(JDK_TOPDIR)/src/closed/share/native/sun/dc/util
LIBDCPR_CFLAGS := $(foreach dir, $(LIBDCPR_SRC_DIRS), -I$(dir)) \
-I$(JDK_TOPDIR)/src/share/native/sun/java2d/pipe
$(eval $(call SetupNativeCompilation,BUILD_LIBDCPR, \
LIBRARY := dcpr, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBDCPR_SRC_DIRS), \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
$(LIBDCPR_CFLAGS), \
MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libdcpr/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX := $(LIBM) $(LDFLAGS_JDKLIB_SUFFIX), \
LDFLAGS_SUFFIX_posix := -lm, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=dcpr.dll" \
-D "JDK_INTERNAL_NAME=dcpr" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libdcpr, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBDCPR): $(BUILD_LIBJAVA)
BUILD_LIBRARIES += $(BUILD_LIBDCPR)
endif
##########################################################################################
ifeq ($(OPENJDK_TARGET_OS), macosx)
LIBAWT_LWAWT_FILES := \
awt.m \
ApplicationDelegate.m \
CFRetainedResource.m \
CGLGraphicsConfig.m \
CGLSurfaceData.m \
CGLLayer.m \
CGraphicsConfig.m \
CGraphicsDevice.m \
CGraphicsEnv.m \
CCharToGlyphMapper.m \
CSystemColors.m \
AWTFont.m \
CGGlyphOutlines.m \
CGGlyphImages.m \
CoreTextSupport.m \
AWTStrike.m \
InitIDs.m \
AWTEvent.m \
AWTView.m \
AWTWindow.m \
AWTSurfaceLayers.m \
CCursorManager.m \
CClipboard.m \
CDataTransferer.m \
CDragSource.m \
CDragSourceContextPeer.m \
CDropTarget.m \
CDropTargetContextPeer.m \
CInputMethod.m \
CDesktopPeer.m \
OSVersion.m \
DnDUtilities.m \
CFileDialog.m \
CImage.m \
CMenu.m \
CMenuBar.m \
CMenuComponent.m \
CMenuItem.m \
CPopupMenu.m \
CRobot.m \
CTrayIcon.m \
CWrapper.m \
JavaAccessibilityAction.m \
JavaAccessibilityUtilities.m \
JavaComponentAccessibility.m \
JavaTextAccessibility.m \
LWCToolkit.m \
GeomUtilities.m \
CPrinterJob.m \
PrintModel.m \
PrinterSurfaceData.m \
PrinterView.m \
QuartzSurfaceData.m \
QuartzRenderer.m \
CTextPipe.m \
ImageSurfaceData.m \
awt_DrawingSurface.m \
\
OGLBlitLoops.c \
OGLBufImgOps.c \
OGLContext.c \
OGLFuncs.c \
OGLMaskBlit.c \
OGLMaskFill.c \
OGLPaints.c \
OGLRenderQueue.c \
OGLRenderer.c \
OGLSurfaceData.c \
OGLTextRenderer.c \
OGLVertexCache.c \
AccelGlyphCache.c \
CUPSfuncs.c
LIBAWT_LWAWT_DIRS := \
$(JDK_TOPDIR)/src/macosx/native/sun/awt \
$(JDK_TOPDIR)/src/macosx/native/sun/font \
$(JDK_TOPDIR)/src/macosx/native/sun/java2d/opengl \
$(JDK_TOPDIR)/src/solaris/native/sun/awt \
$(JDK_TOPDIR)/src/share/native/sun/font \
$(JDK_TOPDIR)/src/share/native/sun/java2d/opengl \
$(eval $(call SetupNativeCompilation,BUILD_LIBAWT_LWAWT, \
LIBRARY := awt_lwawt, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBAWT_LWAWT_DIRS), \
LANG := C, \
INCLUDE_FILES := $(LIBAWT_LWAWT_FILES), \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
$(X_CFLAGS) \
$(X_LIBS) \
$(foreach dir, $(LIBAWT_LWAWT_DIRS), -I$(dir)) \
-I$(JDK_TOPDIR)/src/macosx/native/sun/osxapp \
-I$(JDK_TOPDIR)/src/share/native/sun/java2d \
-I$(JDK_TOPDIR)/src/solaris/native/sun/java2d \
-I$(JDK_TOPDIR)/src/share/native/sun/awt/image \
-I$(JDK_TOPDIR)/src/share/native/sun/awt/image/cvutils \
-I$(JDK_TOPDIR)/src/share/native/sun/java2d/loops \
-I$(JDK_TOPDIR)/src/share/native/sun/java2d/pipe \
-I$(JDK_TOPDIR)/src/share/native/sun/awt/debug \
-F/System/Library/Frameworks/JavaVM.framework/Frameworks \
-F/System/Library/Frameworks/ApplicationServices.framework/Frameworks, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX_macosx := -lawt -lmlib_image -losxapp -ljvm $(LIBM) \
-framework Accelerate \
-framework ApplicationServices \
-framework AudioToolbox \
-framework Carbon \
-framework Cocoa \
-framework Security \
-framework ExceptionHandling \
-F/System/Library/Frameworks/JavaVM.framework/Frameworks \
-framework JavaNativeFoundation \
-framework JavaRuntimeSupport \
-framework OpenGL \
-framework QuartzCore -ljava, \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libawt_lwawt, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
BUILD_LIBRARIES += $(BUILD_LIBAWT_LWAWT)
$(BUILD_LIBAWT_LWAWT): $(BUILD_LIBAWT)
$(BUILD_LIBAWT_LWAWT): $(BUILD_LIBMLIB_IMAGE)
$(BUILD_LIBAWT_LWAWT): $(BUILD_LIBOSXAPP)
$(BUILD_LIBAWT_LWAWT): $(BUILD_LIBJAVA)
endif
##########################################################################################
ifeq ($(OPENJDK_TARGET_OS), macosx)
$(eval $(call SetupNativeCompilation,BUILD_LIBOSXUI, \
LIBRARY := osxui, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/macosx/native/com/apple/laf, \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
-I$(JDK_TOPDIR)/src/macosx/native/com/apple/laf \
-I$(JDK_TOPDIR)/src/macosx/native/sun/osxapp \
-I$(JDK_TOPDIR)/src/macosx/native/sun/awt \
-F/System/Library/Frameworks/JavaVM.framework/Frameworks, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN) \
-Xlinker -rpath -Xlinker @loader_path, \
LDFLAGS_SUFFIX_macosx := -lawt -losxapp -lawt_lwawt \
-framework Cocoa \
-framework Carbon \
-framework ApplicationServices \
-F/System/Library/Frameworks/JavaVM.framework/Frameworks \
-framework JavaNativeFoundation \
-framework JavaRuntimeSupport \
-ljava -ljvm, \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libosxui, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
BUILD_LIBRARIES += $(BUILD_LIBOSXUI)
$(BUILD_LIBOSXUI): $(BUILD_LIBAWT)
$(BUILD_LIBOSXUI): $(BUILD_LIBOSXAPP)
$(BUILD_LIBOSXUI): $(BUILD_LIBAWT_LWAWT)
#$(BUILD_LIBOSXUI): $(BUILD_LIBJAVA)
endif
#
# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
WIN_VERIFY_LIB := $(JDK_OUTPUTDIR)/objs/libverify/verify.lib
##########################################################################################
BUILD_LIBFDLIBM_OPTIMIZATION := HIGH
ifneq ($(OPENJDK_TARGET_OS), solaris)
BUILD_LIBFDLIBM_OPTIMIZATION := NONE
endif
ifneq ($(OPENJDK_TARGET_OS), macosx)
$(eval $(call SetupNativeCompilation,BUILD_LIBFDLIBM, \
STATIC_LIBRARY := fdlibm, \
OUTPUT_DIR := $(JDK_OUTPUTDIR)/objs, \
SRC := $(JDK_TOPDIR)/src/share/native/java/lang/fdlibm/src, \
LANG := C, \
OPTIMIZATION := $(BUILD_LIBFDLIBM_OPTIMIZATION), \
CFLAGS := $(CFLAGS_JDKLIB) \
-I$(JDK_TOPDIR)/src/share/native/java/lang/fdlibm/include, \
CFLAGS_windows_debug := -DLOGGING, \
ARFLAGS := $(ARFLAGS), \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libfdlibm, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
else
# On macosx the old build does partial (incremental) linking of fdlibm instead of
# a plain static library.
$(eval $(call SetupNativeCompilation,BUILD_LIBFDLIBM_MAC, \
LIBRARY := fdlibm, \
OUTPUT_DIR := $(JDK_OUTPUTDIR)/objs/libfdlibm, \
SRC := $(JDK_TOPDIR)/src/share/native/java/lang/fdlibm/src, \
LANG := C, \
CFLAGS := $(CFLAGS_JDKLIB) \
-I$(JDK_TOPDIR)/src/share/native/java/lang/fdlibm/include, \
LDFLAGS := -nostdlib -r -arch x86_64, \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libfdlibm, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
BUILD_LIBFDLIBM := $(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)fdlibm$(STATIC_LIBRARY_SUFFIX)
$(BUILD_LIBFDLIBM): $(BUILD_LIBFDLIBM_MAC)
$(call install-file)
endif
BUILD_LIBRARIES += $(BUILD_LIBFDLIBM)
##########################################################################################
BUILD_LIBVERIFY_SRC := check_code.c check_format.c
ifeq ($(OPENJDK_TARGET_OS), solaris)
ifneq ($(OPENJDK_TARGET_CPU), x86_64)
BUILD_LIBVERIFY_REORDER := $(JDK_TOPDIR)/makefiles/mapfiles/libverify/reorder-$(OPENJDK_TARGET_CPU)
endif
endif
LIBVERIFY_OPTIMIZATION := HIGH
ifneq ($(findstring $(OPENJDK_TARGET_OS), solaris linux), )
ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
LIBVERIFY_OPTIMIZATION := LOW
endif
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBVERIFY, \
LIBRARY := verify, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/share/native/common, \
INCLUDE_FILES := $(BUILD_LIBVERIFY_SRC), \
LANG := C, \
OPTIMIZATION := $(LIBVERIFY_OPTIMIZATION), \
CFLAGS := $(CFLAGS_JDKLIB), \
MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libverify/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX_posix := -ljvm -lc, \
LDFLAGS_SUFFIX_windows := jvm.lib, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=verify.dll" \
-D "JDK_INTERNAL_NAME=verify" \
-D "JDK_FTYPE=0x2L", \
REORDER := $(BUILD_LIBVERIFY_REORDER), \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libverify, \
DEBUG_SYMBOLS := true))
BUILD_LIBRARIES += $(BUILD_LIBVERIFY)
##########################################################################################
LIBJAVA_SRC_DIRS := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/lang \
$(JDK_TOPDIR)/src/share/native/java/lang \
$(JDK_TOPDIR)/src/share/native/java/lang/ref \
$(JDK_TOPDIR)/src/share/native/java/lang/reflect \
$(JDK_TOPDIR)/src/share/native/java/io \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/io \
$(JDK_TOPDIR)/src/share/native/java/nio \
$(JDK_TOPDIR)/src/share/native/java/security \
$(JDK_TOPDIR)/src/share/native/common \
$(JDK_TOPDIR)/src/share/native/sun/misc \
$(JDK_TOPDIR)/src/share/native/sun/reflect \
$(JDK_TOPDIR)/src/share/native/java/util \
$(JDK_TOPDIR)/src/share/native/java/util/concurrent/atomic \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/common \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/util
ifneq ($(OPENJDK_TARGET_OS), macosx)
LIBJAVA_SRC_DIRS += $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/util/locale/provider
else
LIBJAVA_SRC_DIRS += $(JDK_TOPDIR)/src/macosx/native/sun/util/locale/provider
endif
ifeq ($(OPENJDK_TARGET_OS), windows)
LIBJAVA_SRC_DIRS += $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/provider \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/io
endif
LIBJAVA_CFLAGS := $(foreach dir, $(LIBJAVA_SRC_DIRS), -I$(dir)) \
-I$(JDK_TOPDIR)/src/share/native/java/lang/fdlibm/include \
-DARCHPROPNAME='"$(OPENJDK_TARGET_CPU_OSARCH)"'
LIBJAVA_CFLAGS += -DJDK_MAJOR_VERSION='"$(JDK_MAJOR_VERSION)"' \
-DJDK_MINOR_VERSION='"$(JDK_MINOR_VERSION)"' \
-DJDK_MICRO_VERSION='"$(JDK_MICRO_VERSION)"' \
-DJDK_BUILD_NUMBER='"$(JDK_BUILD_NUMBER)"'
ifneq (, $(JDK_UPDATE_VERSION))
LIBJAVA_CFLAGS += -DJDK_UPDATE_VERSION='"$(JDK_UPDATE_VERSION)"'
endif
LIBJAVA_EXCLUDE_FILES := check_code.c check_format.c jspawnhelper.c
ifneq ($(OPENJDK_TARGET_OS), macosx)
LIBJAVA_EXCLUDE_FILES += java_props_macosx.c
else
BUILD_LIBJAVA_java_props_md.c_CFLAGS := -x objective-c
BUILD_LIBJAVA_java_props_macosx.c_CFLAGS := -x objective-c
endif
ifeq ($(OPENJDK_TARGET_OS), windows)
LIBJAVA_EXCLUDE_FILES += \
UNIXProcess_md.c \
UnixFileSystem_md.c \
FileSystemPreferences.c
else
LIBJAVA_EXCLUDE_FILES += \
ProcessImpl_md.c \
WinNTFileSystem_md.c \
dirent_md.c \
WindowsPreferences.c \
sun/security/provider/WinCAPISeedGenerator.c \
sun/io/Win32ErrorMode.c
endif
ifeq ($(OPENJDK_TARGET_OS), solaris)
ifneq ($(OPENJDK_TARGET_CPU), x86_64)
LIBJAVA_REORDER := $(JDK_TOPDIR)/makefiles/mapfiles/libjava/reorder-$(OPENJDK_TARGET_CPU)
endif
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBJAVA, \
LIBRARY := java, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBJAVA_SRC_DIRS), \
EXCLUDES := fdlibm/src zip, \
EXCLUDE_FILES := $(LIBJAVA_EXCLUDE_FILES), \
LANG := C, \
OPTIMIZATION := HIGH, \
CFLAGS := $(CFLAGS_JDKLIB) \
$(LIBJAVA_CFLAGS), \
MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libjava/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX_posix := -ljvm -lverify, \
LDFLAGS_SUFFIX_solaris := -lsocket -lnsl -lscf $(LIBDL) $(BUILD_LIBFDLIBM) -lc, \
LDFLAGS_SUFFIX_linux := $(LIBDL) $(BUILD_LIBFDLIBM), \
LDFLAGS_SUFFIX_macosx := -L$(JDK_OUTPUTDIR)/objs/ -lfdlibm \
-framework CoreFoundation \
-framework Foundation \
-framework Security -framework SystemConfiguration, \
LDFLAGS_SUFFIX_windows := -export:winFileHandleOpen -export:handleLseek \
jvm.lib $(BUILD_LIBFDLIBM) $(WIN_VERIFY_LIB) \
shell32.lib delayimp.lib -DELAYLOAD:shell32.dll \
advapi32.lib, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=java.dll" \
-D "JDK_INTERNAL_NAME=java" \
-D "JDK_FTYPE=0x2L", \
REORDER := $(LIBJAVA_REORDER), \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjava, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
BUILD_LIBRARIES += $(BUILD_LIBJAVA)
$(BUILD_LIBJAVA): $(LIBJLI_BINARY)
$(BUILD_LIBJAVA): $(BUILD_LIBVERIFY)
$(BUILD_LIBJAVA): $(BUILD_LIBFDLIBM)
##########################################################################################
BUILD_LIBZIP_EXCLUDES :=
ifeq ($(USE_EXTERNAL_LIBZ), true)
LIBZ := -lz
LIBZIP_EXCLUDES += zlib-1.2.5
else
ZLIB_CPPFLAGS := -I$(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.5
endif
BUILD_LIBZIP_REORDER :=
ifeq ($(OPENJDK_TARGET_OS), solaris)
ifneq ($(OPENJDK_TARGET_CPU), x86_64)
BUILD_LIBZIP_REORDER := $(JDK_TOPDIR)/makefiles/mapfiles/libzip/reorder-$(OPENJDK_TARGET_CPU)
endif
endif
ifeq ($(LIBZIP_CAN_USE_MMAP), true)
BUILD_LIBZIP_MMAP := -DUSE_MMAP
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBZIP, \
LIBRARY := zip, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
LANG := C, \
OPTIMIZATION := LOW, \
SRC := $(JDK_TOPDIR)/src/share/native/java/util/zip, \
EXCLUDES := $(LIBZIP_EXCLUDES), \
CFLAGS := $(CFLAGS_JDKLIB) \
$(ZLIB_CPPFLAGS) \
-I$(JDK_TOPDIR)/src/share/native/java/io \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/io, \
CFLAGS_posix := $(BUILD_LIBZIP_MMAP) -UDEBUG, \
MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libzip/mapfile-vers, \
REORDER := $(BUILD_LIBZIP_REORDER), \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN) \
$(EXPORT_ZIP_FUNCS), \
LDFLAGS_windows := -export:ZIP_Open -export:ZIP_Close -export:ZIP_FindEntry \
-export:ZIP_ReadEntry -export:ZIP_GetNextEntry jvm.lib \
$(WIN_JAVA_LIB), \
LDFLAGS_SUFFIX_linux := -ljvm -ljava $(LIBZ), \
LDFLAGS_SUFFIX_solaris := -ljvm -ljava $(LIBZ) -lc, \
LDFLAGS_SUFFIX_macosx := $(LIBZ) -ljava -ljvm, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=zip.dll" \
-D "JDK_INTERNAL_NAME=zip" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libzip, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBZIP): $(BUILD_LIBJAVA)
BUILD_LIBRARIES += $(BUILD_LIBZIP)
##########################################################################################
$(eval $(call SetupNativeCompilation,BUILD_LIBUNPACK, \
LIBRARY := unpack, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/share/native/com/sun/java/util/jar/pack, \
EXCLUDE_FILES := main.cpp, \
LANG := C++, \
OPTIMIZATION := LOW, \
CFLAGS := $(CXXFLAGS_JDKLIB) \
-DNO_ZLIB -DUNPACK_JNI -DFULL, \
CFLAGS_release := -DPRODUCT, \
MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libunpack/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_windows := -map:$(JDK_OUTPUTDIR)/objs/unpack.map -debug \
jvm.lib $(WIN_JAVA_LIB), \
LDFLAGS_SUFFIX_posix := -ljvm $(LIBCXX) -ljava -lc, \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libunpack, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=unpack.dll" \
-D "JDK_INTERNAL_NAME=unpack" \
-D "JDK_FTYPE=0x2L", \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBUNPACK): $(BUILD_LIBJAVA)
BUILD_LIBRARIES += $(BUILD_LIBUNPACK)
ifeq ($(OPENJDK_TARGET_OS), windows)
$(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)unpack.map: $(BUILD_LIBUNPACK)
$(ECHO) Copying $(@F)
$(CP) $(patsubst %$(SHARED_LIBRARY_SUFFIX), %.map, $<) $@
$(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)unpack.pdb: $(BUILD_LIBUNPACK)
$(ECHO) Copying $(@F)
$(CP) $(patsubst %$(SHARED_LIBRARY_SUFFIX), %.pdb, $<) $@
endif
##########################################################################################
BUILD_LIBJLI_SRC_DIRS := $(JDK_TOPDIR)/src/share/bin $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/bin
LIBJLI_CFLAGS := $(CFLAGS_JDKLIB) $(foreach dir, $(BUILD_LIBJLI_SRC_DIRS), -I$(dir))
BUILD_LIBJLI_FILES := \
java.c \
splashscreen_stubs.c \
parse_manifest.c \
version_comp.c \
wildcard.c \
jli_util.c
ifeq ($(JVM_VARIANT_ZERO), true)
ERGO_FAMILY := zero
else
ifeq ($(OPENJDK_TARGET_CPU_ARCH), x86)
ERGO_FAMILY := i586
else
ERGO_FAMILY := $(OPENJDK_TARGET_CPU_ARCH)
endif
endif
ifeq ($(OPENJDK_TARGET_OS), macosx)
LIBJLI_CFLAGS += -I$(JDK_TOPDIR)/src/macosx/bin
BUILD_LIBJLI_SRC_DIRS += $(JDK_TOPDIR)/src/macosx/bin
BUILD_LIBJLI_FILES += java_md_common.c java_md_macosx.c
BUILD_LIBJLI_java_md_macosx.c_CFLAGS := -x objective-c
BUILD_LIBJLI_STATIC_java_md_macosx.c_CFLAGS := -x objective-c
endif
ifeq ($(OPENJDK_TARGET_OS), windows)
BUILD_LIBJLI_FILES += java_md.c \
cmdtoargs.c
# Staticically link with c runtime on windows.
LIBJLI_CFLAGS := $(filter-out -MD, $(LIBJLI_CFLAGS))
else ifneq ($(OPENJDK_TARGET_OS), macosx)
BUILD_LIBJLI_FILES += java_md_common.c
BUILD_LIBJLI_FILES += java_md_solinux.c ergo.c
ERGO_ARCH_FILE = ergo_$(ERGO_FAMILY).c
# if the architecture specific ergo file exists then
# use it, else use the generic definitions from ergo.c
ifneq ($(wildcard $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/bin/$(ERGO_ARCH_FILE)), )
BUILD_LIBJLI_FILES += $(ERGO_ARCH_FILE)
else # !ERGO_ARCH_FILE
LIBJLI_CFLAGS += -DUSE_GENERIC_ERGO
endif # ERGO_ARCH_FILE
endif #WINDOWS
# Append defines depending on target platform
LIBJLI_CFLAGS += $(OPENJDK_TARGET_CPU_JLI_CFLAGS)
ifeq ($(OPENJDK_TARGET_OS), macosx)
LIBJLI_CFLAGS += -DPACKAGE_PATH=\"$(PACKAGE_PATH)\"
endif
ifneq ($(USE_EXTERNAL_LIBZ), true)
BUILD_LIBJLI_SRC_DIRS += $(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.5
LIBJLI_CFLAGS += $(ZLIB_CPPFLAGS)
BUILD_LIBJLI_FILES += \
inflate.c \
inftrees.c \
inffast.c \
zadler32.c \
zcrc32.c \
zutil.c
endif
ifeq ($(OPENJDK_TARGET_OS), windows)
LIBJLI_OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE)
else
LIBJLI_OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE)/jli
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBJLI, \
LIBRARY := jli, \
OUTPUT_DIR := $(LIBJLI_OUTPUT_DIR), \
SRC := $(BUILD_LIBJLI_SRC_DIRS), \
INCLUDE_FILES := $(BUILD_LIBJLI_FILES), \
LANG := C, \
OPTIMIZATION := HIGH, \
CFLAGS := $(LIBJLI_CFLAGS), \
MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libjli/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_linux := $(call SET_SHARED_LIBRARY_ORIGIN,/..), \
LDFLAGS_solaris := $(call SET_SHARED_LIBRARY_ORIGIN,/..), \
LDFLAGS_macosx := -framework Cocoa -framework Security -framework ApplicationServices, \
LDFLAGS_SUFFIX_solaris := $(LIBZ) $(LIBDL) -lc, \
LDFLAGS_SUFFIX_linux := $(LIBZ) $(LIBDL) -lc -lpthread, \
LDFLAGS_SUFFIX_macosx := $(LIBZ), \
LDFLAGS_SUFFIX_windows := \
-export:JLI_Launch \
-export:JLI_ManifestIterate \
-export:JLI_SetTraceLauncher \
-export:JLI_ReportErrorMessage \
-export:JLI_ReportErrorMessageSys \
-export:JLI_ReportMessage \
-export:JLI_ReportExceptionDescription \
-export:JLI_MemAlloc \
-export:JLI_CmdToArgs \
-export:JLI_GetStdArgc \
-export:JLI_GetStdArgs \
advapi32.lib \
comctl32.lib \
user32.lib, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=jli.dll" \
-D "JDK_INTERNAL_NAME=jli" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjli, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
BUILD_LIBRARIES += $(BUILD_LIBJLI)
# On windows, the static library has the same suffix as the import library created by
# with the shared library, so the static library is given a different name. No harm
# in doing it for all platform to reduce complexity.
ifeq ($(OPENJDK_TARGET_OS), windows)
$(eval $(call SetupNativeCompilation,BUILD_LIBJLI_STATIC, \
STATIC_LIBRARY := jli_static, \
OUTPUT_DIR := $(JDK_OUTPUTDIR)/objs, \
SRC := $(BUILD_LIBJLI_SRC_DIRS), \
INCLUDE_FILES := $(BUILD_LIBJLI_FILES), \
LANG := C, \
OPTIMIZATION := HIGH, \
CFLAGS := $(STATIC_LIBRARY_FLAGS) $(LIBJLI_CFLAGS), \
ARFLAGS := $(ARFLAGS), \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjli_static, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
BUILD_LIBRARIES += $(BUILD_LIBJLI_STATIC)
else ifeq ($(OPENJDK_TARGET_OS), macosx)
#
# On macosx they do partial (incremental) linking of libjli_static.a
# code it here...rather than add support to NativeCompilation
# as this is first time I see it
$(eval $(call SetupNativeCompilation,BUILD_LIBJLI_STATIC, \
LIBRARY := jli_static, \
OUTPUT_DIR := $(JDK_OUTPUTDIR)/objs, \
SRC := $(BUILD_LIBJLI_SRC_DIRS), \
INCLUDE_FILES := $(BUILD_LIBJLI_FILES), \
LANG := C, \
OPTIMIZATION := HIGH, \
CFLAGS := $(CFLAGS_JDKLIB) $(LIBJLI_CFLAGS), \
LDFLAGS := -nostdlib -r, \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjli_static, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(JDK_OUTPUTDIR)/objs/libjli_static.a: $(BUILD_LIBJLI_STATIC)
$(call install-file)
BUILD_LIBRARIES += $(JDK_OUTPUTDIR)/objs/libjli_static.a
endif
##########################################################################################
$(eval $(call SetupNativeCompilation,BUILD_LIBNPT, \
LIBRARY := npt, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/share/npt $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/npt, \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
-I$(JDK_TOPDIR)/src/share/npt \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/npt, \
MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libnpt/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_macosx := -liconv, \
LDFLAGS_SUFFIX_windows := -export:nptInitialize -export:nptTerminate, \
LDFLAGS_SUFFIX_solaris := -lc, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=npt.dll" \
-D "JDK_INTERNAL_NAME=npt" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libnpt, \
DEBUG_SYMBOLS := true))
BUILD_LIBRARIES += $(BUILD_LIBNPT)
#
# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
LIBNET_SRC_DIRS := $(JDK_TOPDIR)/src/share/native/java/net \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/net \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/net/dns \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/net/spi
ifeq ($(OPENJDK_TARGET_OS), windows)
LIBNET_SRC_DIRS += $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/net/www/protocol/http/ntlm
else
LIBNET_SRC_DIRS += $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/net/sdp
endif
LIBNET_CFLAGS := $(foreach dir, $(LIBNET_SRC_DIRS), -I$(dir))
LIBNET_EXCLUDE_FILES :=
ifneq ($(OPENJDK_TARGET_OS), linux)
LIBNET_EXCLUDE_FILES += linux_close.c
endif
ifneq ($(OPENJDK_TARGET_OS), macosx)
LIBNET_EXCLUDE_FILES += bsd_close.c
endif
ifeq ($(OPENJDK_TARGET_OS), windows)
LIBNET_EXCLUDE_FILES += PlainSocketImpl.c PlainDatagramSocketImpl.c SdpSupport.c
else
LIBNET_EXCLUDE_FILES += TwoStacksPlainSocketImpl.c DualStackPlainSocketImpl.c \
TwoStacksPlainDatagramSocketImpl.c DualStackPlainDatagramSocketImpl.c \
NTLMAuthSequence.c NetworkInterface_winXP.c
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBNET, \
LIBRARY := net, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBNET_SRC_DIRS), \
EXCLUDE_FILES := $(LIBNET_EXCLUDE_FILES), \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
$(LIBNET_CFLAGS), \
MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libnet/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX_macosx := -ljvm -ljava, \
LDFLAGS_SUFFIX_solaris := -ljvm -ljava -lnsl -lsocket $(LIBDL) -lc, \
LDFLAGS_SUFFIX_linux := $(LIBDL) -ljvm -lpthread -ljava, \
LDFLAGS_SUFFIX_windows := ws2_32.lib jvm.lib secur32.lib iphlpapi.lib \
delayimp.lib $(WIN_JAVA_LIB) advapi32.lib \
-DELAYLOAD:secur32.dll -DELAYLOAD:iphlpapi.dll, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=net.dll" \
-D "JDK_INTERNAL_NAME=net" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libnet, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBNET): $(BUILD_LIBJAVA)
BUILD_LIBRARIES += $(BUILD_LIBNET)
$(JDK_OUTPUTDIR)/lib/net.properties: $(JDK_TOPDIR)/src/share/lib/net.properties
$(ECHO) $(LOG_INFO) Copying $(@F)
$(call install-file)
COPY_FILES += $(JDK_OUTPUTDIR)/lib/net.properties
ifeq ($(OPENJDK_TARGET_OS), solaris)
$(JDK_OUTPUTDIR)/lib/sdp/sdp.conf.template: $(JDK_TOPDIR)/src/${OPENJDK_TARGET_OS_API_DIR}/lib/sdp/sdp.conf.template
$(ECHO) $(LOG_INFO) Copying $(@F)
$(call install-file)
COPY_FILES += $(JDK_OUTPUTDIR)/lib/sdp/sdp.conf.template
endif
#
# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
BUILD_LIBNIO_SRC := \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/nio \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/nio/ch \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/nio/fs
BUILD_LIBNIO_CFLAGS := \
-I$(JDK_TOPDIR)/src/share/native/sun/nio/ch \
-I$(JDK_TOPDIR)/src/share/native/java/io \
-I$(JDK_TOPDIR)/src/share/native/java/net \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/net
BUILD_LIBNIO_FILES := \
DatagramChannelImpl.c \
DatagramDispatcher.c \
FileChannelImpl.c \
FileDispatcherImpl.c \
FileKey.c \
IOUtil.c \
MappedByteBuffer.c \
Net.c \
ServerSocketChannelImpl.c \
SocketChannelImpl.c \
SocketDispatcher.c
ifeq ($(OPENJDK_TARGET_OS), windows)
BUILD_LIBNIO_FILES += \
Iocp.c \
RegistryFileTypeDetector.c \
WindowsAsynchronousFileChannelImpl.c \
WindowsAsynchronousServerSocketChannelImpl.c \
WindowsAsynchronousSocketChannelImpl.c \
WindowsNativeDispatcher.c \
WindowsSelectorImpl.c
endif
ifeq ($(OPENJDK_TARGET_OS), linux)
BUILD_LIBNIO_MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libnio/mapfile-$(OPENJDK_TARGET_OS)
BUILD_LIBNIO_FILES += \
EPoll.c \
EPollArrayWrapper.c \
EPollPort.c \
InheritedChannel.c \
NativeThread.c \
PollArrayWrapper.c \
UnixAsynchronousServerSocketChannelImpl.c \
UnixAsynchronousSocketChannelImpl.c \
GnomeFileTypeDetector.c \
MagicFileTypeDetector.c \
LinuxNativeDispatcher.c \
LinuxWatchService.c \
UnixCopyFile.c \
UnixNativeDispatcher.c
endif
ifeq ($(OPENJDK_TARGET_OS), macosx)
BUILD_LIBNIO_MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libnio/mapfile-$(OPENJDK_TARGET_OS)
BUILD_LIBNIO_SRC += $(JDK_TOPDIR)/src/macosx/native/sun/nio/ch
BUILD_LIBNIO_FILES += \
InheritedChannel.c \
NativeThread.c \
PollArrayWrapper.c \
UnixAsynchronousServerSocketChannelImpl.c \
UnixAsynchronousSocketChannelImpl.c \
BsdNativeDispatcher.c \
MacOSXNativeDispatcher.c \
UnixCopyFile.c \
UnixNativeDispatcher.c \
KQueue.c \
KQueuePort.c \
KQueueArrayWrapper.c
endif
ifeq ($(OPENJDK_TARGET_OS), solaris)
BUILD_LIBNIO_MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libnio/mapfile-$(OPENJDK_TARGET_OS)
BUILD_LIBNIO_FILES += \
DevPollArrayWrapper.c \
InheritedChannel.c \
NativeThread.c \
PollArrayWrapper.c \
SolarisEventPort.c \
UnixAsynchronousServerSocketChannelImpl.c \
UnixAsynchronousSocketChannelImpl.c \
GnomeFileTypeDetector.c \
SolarisNativeDispatcher.c \
SolarisWatchService.c \
UnixCopyFile.c \
UnixNativeDispatcher.c
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBNIO, \
LIBRARY := nio, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(BUILD_LIBNIO_SRC), \
INCLUDE_FILES := $(BUILD_LIBNIO_FILES), \
LANG := C, \
OPTIMIZATION := HIGH, \
CFLAGS := $(CFLAGS_JDKLIB) \
$(BUILD_LIBNIO_CFLAGS), \
MAPFILE := $(BUILD_LIBNIO_MAPFILE), \
LDFLAGS := $(LDFLAGS_JDKLIB) $(BUILD_LIBNIO_LDFLAGS) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX_linux := -ljava -lnet -lpthread $(LIBDL), \
LDFLAGS_SUFFIX_solaris := -ljvm -lsocket -lposix4 $(LIBDL) \
-lsendfile -ljava -lnet -lc, \
LDFLAGS_SUFFIX_windows := jvm.lib ws2_32.lib $(WIN_JAVA_LIB) \
$(JDK_OUTPUTDIR)/objs/libnet/net.lib \
advapi32.lib, \
LDFLAGS_SUFFIX_macosx := -ljava -lnet -pthread -framework CoreFoundation, \
LDFLAGS_SUFFIX :=, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=nio.dll" \
-D "JDK_INTERNAL_NAME=nio" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libnio, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
BUILD_LIBRARIES += $(BUILD_LIBNIO)
$(BUILD_LIBNIO): $(BUILD_LIBNET)
##########################################################################################
ifeq ($(OPENJDK_TARGET_OS_API), posix)
ifneq ($(OPENJDK_TARGET_OS), macosx)
# Suppress unused parameters required by exported JNI functions.
SCTP_WERROR := -Werror -Wno-error=unused-parameter
ifeq ($(OPENJDK_TARGET_CPU_ARCH), ppc)
SCTP_WERROR :=
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBSCTP, \
LIBRARY := sctp, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/nio/ch/sctp, \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
-I$(JDK_TOPDIR)/src/share/native/sun/nio/ch \
-I$(JDK_TOPDIR)/src/share/native/sun/nio/ch/sctp \
-I$(JDK_TOPDIR)/src/share/native/java/net \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/nio/ch \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/net, \
CFLAGS_linux := $(SCTP_WERROR), \
MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libsctp/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX_linux := -lpthread $(LIBDL) -ljava -ljvm, \
LDFLAGS_SUFFIX_posix := -lnio -lnet, \
LDFLAGS_SUFFIX_solaris := -lsocket -ljava -ljvm -lc, \
LDFLAGS_SUFFIX_macosx := -ljava -ljvm, \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libsctp, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
BUILD_LIBRARIES += $(BUILD_LIBSCTP)
$(BUILD_LIBSCTP): $(BUILD_LIBNIO)
endif
endif
#
# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
ifeq ($(OPENJDK_TARGET_OS), macosx)
$(eval $(call SetupNativeCompilation,BUILD_LIBAPPLESCRIPTENGINE, \
LIBRARY := AppleScriptEngine, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/macosx/native/apple/applescript, \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
-I$(JDK_TOPDIR)/src/macosx/native/apple/applescript \
-F/System/Library/Frameworks/JavaVM.framework/Frameworks \
-F/System/Library/Frameworks/ApplicationServices.framework/Frameworks, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX := -framework Cocoa \
-framework Carbon \
-F/System/Library/Frameworks/JavaVM.framework/Frameworks \
-framework JavaNativeFoundation \
$(LDFLAGS_JDKLIB_SUFFIX), \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libAppleScriptEngine, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBAPPLESCRIPTENGINE): $(BUILD_LIBJAVA)
BUILD_LIBRARIES += $(BUILD_LIBAPPLESCRIPTENGINE)
endif
##########################################################################################
ifeq ($(OPENJDK_TARGET_OS), macosx)
$(eval $(call SetupNativeCompilation,BUILD_LIBOSXAPP, \
LIBRARY := osxapp, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/macosx/native/sun/osxapp, \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
-I$(JDK_TOPDIR)/src/macosx/native/sun/osxapp \
-I$(JDK_OUTPUTDIR)/gensrc/sun/osxapp \
-F/System/Library/Frameworks/JavaVM.framework/Frameworks \
-F/System/Library/Frameworks/ApplicationServices.framework/Frameworks, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX_macosx := \
-framework Accelerate \
-framework ApplicationServices \
-framework AudioToolbox \
-framework Carbon \
-framework Cocoa \
-framework Security \
-framework ExceptionHandling \
-F/System/Library/Frameworks/JavaVM.framework/Frameworks \
-framework JavaNativeFoundation \
-framework JavaRuntimeSupport \
-framework OpenGL \
-framework IOSurface \
-framework QuartzCore, \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libosxapp, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
BUILD_LIBRARIES += $(BUILD_LIBOSXAPP)
endif
##########################################################################################
ifeq ($(OPENJDK_TARGET_OS), macosx)
LIBOSX_DIRS := \
$(JDK_TOPDIR)/src/macosx/native/com/apple/concurrent \
$(JDK_TOPDIR)/src/macosx/native/java/util \
$(JDK_TOPDIR)/src/macosx/native/com/apple/eio \
$(JDK_TOPDIR)/src/macosx/native/apple/security \
$(JDK_TOPDIR)/src/macosx/native/apple/launcher
$(eval $(call SetupNativeCompilation,BUILD_LIBOSX, \
LIBRARY := osx, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBOSX_DIRS), \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
$(foreach dir, $(LIBOSX_DIRS), -I$(dir)) \
-I$(JDK_TOPDIR)/src/macosx/native/sun/osxapp \
-F/System/Library/Frameworks/JavaVM.framework/Frameworks \
-F/System/Library/Frameworks/ApplicationServices.framework/Frameworks, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX_macosx := \
-losxapp \
-framework Cocoa \
-framework ApplicationServices \
-F/System/Library/Frameworks/JavaVM.framework/Frameworks \
-framework JavaNativeFoundation \
-framework JavaRuntimeSupport \
-framework Security \
-framework SystemConfiguration \
$(LDFLAGS_JDKLIB_SUFFIX), \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libosx, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
BUILD_LIBRARIES += $(BUILD_LIBOSX)
$(BUILD_LIBOSX): $(BUILD_LIBOSXAPP)
$(BUILD_LIBOSX): $(BUILD_LIBJAVA)
endif
##########################################################################################
ifndef OPENJDK
ifeq ($(OPENJDK_TARGET_OS), windows)
ACCESSBRIDGE_SRCDIR := $(JDK_TOPDIR)/src/closed/windows/native/sun/bridge
define SetupAccessBridge
# Parameter 1 Suffix
# Parameter 2 Machine
# Parameter 3 ACCESSBRIDGE_ARCH_ suffix
$(call SetupNativeCompilation,BUILD_JAWTACCESSBRIDGE$1, \
LIBRARY = JAWTAccessBridge$1, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(ACCESSBRIDGE_SRCDIR), \
INCLUDE_FILES := JAWTAccessBridge.cpp, \
LANG := C++, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
-DACCESSBRIDGE_ARCH_$3, \
LDFLAGS := $(LDFLAGS_JDKLIB) kernel32.lib user32.lib gdi32.lib \
winspool.lib jawt.lib comdlg32.lib advapi32.lib shell32.lib \
ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib \
-subsystem:windows -machine:$2 \
-def:$(ACCESSBRIDGE_SRCDIR)/JAWTAccessBridge.DEF, \
VERSIONINFO_RESOURCE := $(ACCESSBRIDGE_SRCDIR)/AccessBridgeStatusWindow.rc, \
RC_FLAGS := $(RC_FLAGS), \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjawtaccessbridge$1, \
DEBUG_SYMBOLS := true)
$$(BUILD_JAWTACCESSBRIDGE$1): $(JDK_OUTPUTDIR)/lib/$(LIBRARY_PREFIX)jawt$(STATIC_LIBRARY_SUFFIX)
$(call SetupNativeCompilation,BUILD_JAVAACCESSBRIDGE$1, \
LIBRARY = JavaAccessBridge$1, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(ACCESSBRIDGE_SRCDIR), \
INCLUDE_FILES := AccessBridgeATInstance.cpp AccessBridgeDebug.cpp \
AccessBridgeJavaEntryPoints.cpp \
AccessBridgeMessages.cpp JavaAccessBridge.cpp, \
LANG := C++, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
-DACCESSBRIDGE_ARCH_$3, \
LDFLAGS := $(LDFLAGS_JDKLIB) kernel32.lib user32.lib gdi32.lib \
winspool.lib comdlg32.lib advapi32.lib shell32.lib \
ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib \
-subsystem:windows -machine:$2 \
-def:$(ACCESSBRIDGE_SRCDIR)/JavaAccessBridge.DEF, \
VERSIONINFO_RESOURCE := $(ACCESSBRIDGE_SRCDIR)/AccessBridgeStatusWindow.rc, \
RC_FLAGS := $(RC_FLAGS), \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjavaaccessbridge$1, \
DEBUG_SYMBOLS := true)
$(call SetupNativeCompilation,BUILD_WINDOWSACCESSBRIDGE$1, \
LIBRARY = WindowsAccessBridge$1, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(ACCESSBRIDGE_SRCDIR), \
INCLUDE_FILES := AccessBridgeJavaVMInstance.cpp AccessBridgeMessageQueue.cpp \
AccessBridgeMessages.cpp AccessBridgeWindowsEntryPoints.cpp \
WinAccessBridge.cpp AccessBridgeDebug.cpp \
AccessBridgeEventHandler.cpp, \
LANG := C++, \
OPTIMIZATION := LOW, \
CFLAGS := $(filter-out -MD, $(CFLAGS_JDKLIB)) -MT \
-DACCESSBRIDGE_ARCH_$3, \
LDFLAGS := $(LDFLAGS_JDKLIB) kernel32.lib user32.lib gdi32.lib \
winspool.lib comdlg32.lib advapi32.lib shell32.lib \
ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib \
-subsystem:windows -machine:$2 \
-def:$(ACCESSBRIDGE_SRCDIR)/WinAccessBridge.DEF, \
VERSIONINFO_RESOURCE := $(ACCESSBRIDGE_SRCDIR)/AccessBridgeStatusWindow.rc, \
RC_FLAGS := $(RC_FLAGS), \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libwindowsaccessbridge$1, \
DEBUG_SYMBOLS := true)
BUILD_LIBRARIES += $$(BUILD_JAWTACCESSBRIDGE$1) $$(BUILD_JAVAACCESSBRIDGE$1) \
$$(BUILD_WINDOWSACCESSBRIDGE$1)
endef
ifeq ($(OPENJDK_TARGET_CPU_BITS), 32)
$(eval $(call SetupAccessBridge,-32,I386,32))
$(eval $(call SetupAccessBridge,,I386,LEGACY))
else
$(eval $(call SetupAccessBridge,-64,X64,64))
endif
endif
endif
#
# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
LIBJAAS_MAPFILE :=
ifneq ($(OPENJDK_TARGET_OS), solaris)
LIBJAAS_EXCLUDE_FILES := Solaris.c
else
# only on solaris...wonder why
LIBJAAS_MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libjaas/mapfile-vers
endif
LIBJAAS_NAME := jaas_unix
ifeq ($(OPENJDK_TARGET_OS), windows)
LIBJAAS_NAME := jaas_nt
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBJAAS, \
LIBRARY := $(LIBJAAS_NAME), \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/com/sun/security/auth/module, \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB), \
MAPFILE := $(LIBJAAS_MAPFILE), \
LDFLAGS := $(filter-out -ljava, $(LDFLAGS_JDKLIB)) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_windows := netapi32.lib user32.lib mpr.lib advapi32.lib, \
LDFLAGS_SUFFIX_windows := $(LDFLAGS_JDKLIB_SUFFIX), \
LDFLAGS_SUFFIX_solaris := -lc, \
EXCLUDE_FILES := $(LIBJAAS_EXCLUDE_FILES), \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=$(LIBJAAS_NAME).dll" \
-D "JDK_INTERNAL_NAME=$(LIBJAAS_NAME)" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjaas, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBJAAS): $(BUILD_LIBJAVA)
BUILD_LIBRARIES += $(BUILD_LIBJAAS)
##########################################################################################
$(eval $(call SetupNativeCompilation,BUILD_LIBJ2PCSC, \
LIBRARY := j2pcsc, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/share/native/sun/security/smartcardio \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/smartcardio, \
LANG := C, \
CFLAGS_posix := -D__sun_jdk, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
-I$(JDK_TOPDIR)/src/share/native/sun/security/smartcardio \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/smartcardio \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/smartcardio/MUSCLE, \
MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libj2pcsc/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX_posix := $(LIBDL), \
LDFLAGS_SUFFIX_windows := winscard.lib, \
LDFLAGS_SUFFIX_solaris := -lc, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=j2pcsc.dll" \
-D "JDK_INTERNAL_NAME=j2pcsc" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libj2pcsc, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
BUILD_LIBRARIES += $(BUILD_LIBJ2PCSC)
##########################################################################################
ifneq ($(OPENJDK_TARGET_OS), windows)
$(eval $(call SetupNativeCompilation,BUILD_LIBJ2GSS, \
LIBRARY := j2gss, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/share/native/sun/security/jgss/wrapper \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/jgss/wrapper, \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
-I$(JDK_TOPDIR)/src/share/native/sun/security/jgss/wrapper \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/jgss/wrapper, \
MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libj2gss/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX := $(LIBDL), \
LDFLAGS_SUFFIX_solaris := -lc, \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libj2gss, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
BUILD_LIBRARIES += $(BUILD_LIBJ2GSS)
endif
##########################################################################################
ifneq ($(BUILD_CRYPTO), no)
BUILD_LIBKRB5_NAME :=
ifeq ($(OPENJDK_TARGET_OS), windows)
BUILD_LIBKRB5_NAME := w2k_lsa_auth
BUILD_LIBKRB5_SRC := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/krb5
BUILD_LIBKRB5_LIBS := advapi32.lib Secur32.lib netapi32.lib kernel32.lib user32.lib \
gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib \
ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib
else ifeq ($(OPENJDK_TARGET_OS), macosx)
BUILD_LIBKRB5_NAME := osxkrb5
BUILD_LIBKRB5_SRC := $(JDK_TOPDIR)/src/share/native/sun/security/krb5
BUILD_LIBKRB5_LIBS := -framework Kerberos
endif
ifneq ($(BUILD_LIBKRB5_NAME), )
$(eval $(call SetupNativeCompilation,BUILD_LIBKRB5, \
LIBRARY := $(BUILD_LIBKRB5_NAME), \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(BUILD_LIBKRB5_SRC), \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
-I$(JDK_TOPDIR)/src/share/native/sun/security/krb5 \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/krb5, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX := $(BUILD_LIBKRB5_LIBS), \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=$(BUILD_LIBKRB5_NAME).dll" \
-D "JDK_INTERNAL_NAME=$(BUILD_LIBKRB5_NAME)" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libkrb5, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
BUILD_LIBRARIES += $(BUILD_LIBKRB5)
endif
endif
##########################################################################################
ifeq ($(OPENJDK_TARGET_OS), windows)
$(eval $(call SetupNativeCompilation,BUILD_LIBSUNMSCAPI, \
LIBRARY := sunmscapi, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/mscapi, \
LANG := C++, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/mscapi, \
LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX := Crypt32.Lib advapi32.lib, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=sunmscapi.dll" \
-D "JDK_INTERNAL_NAME=sunmscapi" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libsunmscapi, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
BUILD_LIBRARIES += $(BUILD_LIBSUNMSCAPI)
endif
##########################################################################################
$(eval $(call SetupNativeCompilation,BUILD_LIBJ2PKCS11, \
LIBRARY := j2pkcs11, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/share/native/sun/security/pkcs11 \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/pkcs11 \
$(JDK_TOPDIR)/src/share/native/sun/security/pkcs11/wrapper \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/pkcs11/wrapper, \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
-I$(JDK_TOPDIR)/src/share/native/sun/security/pkcs11 \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/pkcs11 \
-I$(JDK_TOPDIR)/src/share/native/sun/security/pkcs11/wrapper \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/pkcs11/wrapper, \
MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libj2pkcs11/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX_posix := $(LIBDL), \
LDFLAGS_SUFFIX_solaris := -lc, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=j2pkcs11.dll" \
-D "JDK_INTERNAL_NAME=j2pkcs11" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libj2pkcs11, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
BUILD_LIBRARIES += $(BUILD_LIBJ2PKCS11)
##########################################################################################
ifeq ($(ENABLE_INTREE_EC), yes)
BUILD_LIBSUNEC_FLAGS := -I$(JDK_TOPDIR)/src/share/native/sun/security/ec \
-I$(JDK_TOPDIR)/src/share/native/sun/security/ec/impl
#
# On sol-sparc...all libraries are compiled with -xregs=no%appl
# (set in CFLAGS_REQUIRED_sparc)
#
# except!!! libsunec.so
#
ECC_JNI_SOLSPARC_FILTER :=
ifeq ($(OPENJDK_TARGET_CPU_ARCH), sparc)
ECC_JNI_SOLSPARC_FILTER := -xregs=no%appl
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBSUNEC, \
LIBRARY := sunec, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/share/native/sun/security/ec \
$(JDK_TOPDIR)/src/share/native/sun/security/ec/impl, \
LANG := C++, \
OPTIMIZATION := LOW, \
CFLAGS := $(filter-out $(ECC_JNI_SOLSPARC_FILTER), $(CFLAGS_JDKLIB)) \
$(BUILD_LIBSUNEC_FLAGS) \
-DMP_API_COMPATIBLE -DNSS_ECC_MORE_THAN_SUITE_B, \
CXXFLAGS := $(filter-out $(ECC_JNI_SOLSPARC_FILTER), $(CXXFLAGS_JDKLIB)) \
$(BUILD_LIBSUNEC_FLAGS), \
MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libsunec/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK), \
LDFLAGS_macosx := $(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX := $(LIBCXX), \
LDFLAGS_SUFFIX_linux := -lc, \
LDFLAGS_SUFFIX_solaris := -lc, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=sunec.dll" \
-D "JDK_INTERNAL_NAME=sunec" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libsunec, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
BUILD_LIBRARIES += $(BUILD_LIBSUNEC)
endif
##########################################################################################
ifeq ($(OPENJDK_TARGET_OS), solaris)
ifndef OPENJDK
$(eval $(call SetupNativeCompilation,BUILD_LIBJ2UCRYPTO, \
LIBRARY := j2ucrypto, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/closed/solaris/native/com/oracle/security/ucrypto, \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
-I$(JDK_TOPDIR)/src/closed/solaris/native/com/oracle/security/ucrypto, \
MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libj2ucrypto/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB), \
LDFLAGS_SUFFIX := $(LIBDL), \
LDFLAGS_SUFFIX_solaris := -lc, \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libj2ucrypto, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBJ2UCRYPTO): $(BUILD_LIBJAVA)
BUILD_LIBRARIES += $(BUILD_LIBJ2UCRYPTO)
endif
endif
#
# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
LIBATTACH_EXCLUDE_FILES :=
ifneq ($(OPENJDK_TARGET_OS), solaris)
LIBATTACH_EXCLUDE_FILES += SolarisVirtualMachine.c
endif
ifneq ($(OPENJDK_TARGET_OS), linux)
LIBATTACH_EXCLUDE_FILES += LinuxVirtualMachine.c
endif
ifneq ($(OPENJDK_TARGET_OS), macosx)
LIBATTACH_EXCLUDE_FILES += BsdVirtualMachine.c
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBATTACH, \
LIBRARY := attach, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/tools/attach, \
EXCLUDE_FILES := $(LIBATTACH_EXCLUDE_FILES), \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB), \
CFLAGS_windows := /Gy, \
MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libattach/mapfile-$(OPENJDK_TARGET_OS), \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=attach.dll" \
-D "JDK_INTERNAL_NAME=attach" \
-D "JDK_FTYPE=0x2L", \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_solaris := -ldoor, \
LDFLAGS_windows := /ORDER:@$(JDK_TOPDIR)/makefiles/mapfiles/libattach/reorder-windows-$(OPENJDK_TARGET_CPU), \
LDFLAGS_SUFFIX := $(LDFLAGS_JDKLIB_SUFFIX), \
LDFLAGS_SUFFIX_windows := $(WIN_JAVA_LIB) advapi32.lib psapi.lib, \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libattach, \
DEBUG_SYMBOLS := true))
$(BUILD_LIBATTACH): $(BUILD_LIBJAVA)
BUILD_LIBRARIES += $(BUILD_LIBATTACH)
##########################################################################################
$(eval $(call SetupNativeCompilation,BUILD_LIBDT_SOCKET, \
LIBRARY := dt_socket, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/share/transport/socket \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/transport/socket, \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) -DUSE_MMAP \
-I$(INCLUDEDIR) -I$(JDK_OUTPUTDIR)/include/$(OPENJDK_TARGET_OS) \
-I$(JDK_TOPDIR)/src/share/transport/socket \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/transport/socket \
-I$(JDK_TOPDIR)/src/share/back/export \
-I$(JDK_TOPDIR)/src/share/back, \
MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libdt_socket/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX_linux := -lpthread, \
LDFLAGS_SUFFIX_solaris := -lnsl -lsocket -lc, \
LDFLAGS_SUFFIX_windows := $(LDFLAGS_JDKLIB_SUFFIX) -export:jdwpTransport_OnLoad ws2_32.lib, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=dt_socket.dll" \
-D "JDK_INTERNAL_NAME=dt_socket" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libdt_socket, \
DEBUG_SYMBOLS := true))
$(BUILD_LIBDT_SOCKET): $(BUILD_LIBJAVA)
BUILD_LIBRARIES += $(BUILD_LIBDT_SOCKET)
##########################################################################################
ifeq ($(OPENJDK_TARGET_OS), windows)
$(eval $(call SetupNativeCompilation,BUILD_LIBDT_SHMEM, \
LIBRARY := dt_shmem, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/share/native/com/sun/tools/jdi \
$(JDK_TOPDIR)/src/share/transport/shmem \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/transport/shmem, \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) -DUSE_MMAP \
-I$(INCLUDEDIR) -I$(JDK_OUTPUTDIR)/include/$(OPENJDK_TARGET_OS) \
-I$(JDK_TOPDIR)/src/share/transport/shmem \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/transport/shmem \
-I$(JDK_TOPDIR)/src/share/back/export, \
LDFLAGS := $(LDFLAGS_JDKLIB), \
LDFLAGS_windows := -export:jdwpTransport_OnLoad, \
LDFLAGS_SUFFIX := $(LDFLAGS_JDKLIB_SUFFIX), \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=dt_shmem.dll" \
-D "JDK_INTERNAL_NAME=dt_shmem" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libdt_shmem, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
BUILD_LIBRARIES += $(BUILD_LIBDT_SHMEM)
endif # OPENJDK_TARGET_OS
##########################################################################################
# JDWP_LOGGING causes log messages to be compiled into the library.
$(eval $(call SetupNativeCompilation,BUILD_LIBJDWP, \
LIBRARY := jdwp, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/share/back $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/back, \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) -DJDWP_LOGGING \
-I$(JDK_TOPDIR)/src/share/transport/export \
-I$(JDK_TOPDIR)/src/share/back/export \
-I$(JDK_TOPDIR)/src/share/npt \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/npt \
-I$(JDK_TOPDIR)/src/share/back \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/back \
-I$(JDK_OUTPUTDIR)/gensrc_jdwp_headers, \
MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libjdwp/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX_linux := $(LIBDL), \
LDFLAGS_SUFFIX_solaris := $(LIBDL) -lc, \
LDFLAGS_SUFFIX_windows := $(LDFLAGS_JDKLIB_SUFFIX), \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=jdwp.dll" \
-D "JDK_INTERNAL_NAME=jdwp" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjdwp, \
DEBUG_SYMBOLS := true))
$(BUILD_LIBJDWP): $(BUILD_LIBJAVA)
BUILD_LIBRARIES += $(BUILD_LIBJDWP)
##########################################################################################
$(eval $(call SetupNativeCompilation,BUILD_LIBJSDT, \
LIBRARY := jsdt, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/share/native/sun/tracing/dtrace \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/tracing/dtrace, \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
-I$(JDK_TOPDIR)/src/share/native/sun/tracing/dtrace, \
MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libjsdt/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX_linux := $(LIBDL), \
LDFLAGS_SUFFIX_windows := $(LDFLAGS_JDKLIB_SUFFIX) $(LIBDL), \
LDFLAGS_SUFFIX_macosx := $(LIBDL), \
LDFLAGS_SUFFIX_solaris := -lc, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=jsdt.dll" \
-D "JDK_INTERNAL_NAME=jsdt" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjsdt, \
DEBUG_SYMBOLS := true))
$(BUILD_LIBJSDT): $(BUILD_LIBJAVA)
BUILD_LIBRARIES += $(BUILD_LIBJSDT)
##########################################################################################
LIBINSTRUMENT_SRC := $(JDK_TOPDIR)/src/share/instrument \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/io \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/instrument
LIBINSTRUMENT_FILES := \
EncodingSupport.c \
EncodingSupport_md.c \
FileSystemSupport_md.c \
InstrumentationImplNativeMethods.c \
InvocationAdapter.c \
JarFacade.c \
JPLISAgent.c \
JPLISAssert.c \
JavaExceptions.c \
PathCharsValidator.c \
Reentrancy.c \
Utilities.c \
canonicalize_md.c
LIBINSTRUMENT_DIR := $(JDK_OUTPUTDIR)/objs/libinstrument
LIBINSTRUMENT_CFLAGS := $(CFLAGS_JDKLIB) \
-I$(JDK_TOPDIR)/src/share/instrument \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/instrument \
-I$(JDK_TOPDIR)/src/share/bin
LIBINSTRUMENT_LDFLAGS :=
LIBINSTRUMENT_LDFLAGS_SUFFIX :=
ifeq ($(OPENJDK_TARGET_OS), windows)
LIBINSTRUMENT_LDFLAGS += $(JDK_OUTPUTDIR)/objs/jli_static.lib $(WIN_JAVA_LIB) \
-export:Agent_OnAttach advapi32.lib
# Statically link the C runtime so that there are not dependencies on modules
# not on the search patch when invoked from the Windows system directory
# (or elsewhere).
LIBINSTRUMENT_CFLAGS := $(filter-out -MD, $(LIBINSTRUMENT_CFLAGS))
# equivalent of strcasecmp is stricmp on Windows
LIBINSTRUMENT_CFLAGS += -Dstrcasecmp=stricmp
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBINSTRUMENT, \
LIBRARY := instrument, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBINSTRUMENT_SRC), \
INCLUDE_FILES := $(LIBINSTRUMENT_FILES), \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(LIBINSTRUMENT_CFLAGS), \
CFLAGS_debug := -DJPLIS_LOGGING, \
CFLAGS_release := -DNO_JPLIS_LOGGING, \
MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libinstrument/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN) \
$(LIBINSTRUMENT_LDFLAGS), \
LDFLAGS_linux := $(call SET_SHARED_LIBRARY_ORIGIN,/jli), \
LDFLAGS_solaris := $(call SET_SHARED_LIBRARY_ORIGIN,/jli), \
LDFLAGS_macosx := -Xlinker -all_load $(JDK_OUTPUTDIR)/objs/libjli_static.a \
-framework Cocoa -framework Security -framework ApplicationServices, \
LDFLAGS_SUFFIX := $(LIBINSTRUMENT_LDFLAGS_SUFFIX), \
LDFLAGS_SUFFIX_macosx := -liconv $(LIBZ), \
LDFLAGS_SUFFIX_solaris := $(LIBZ) -L $(INSTALL_LIBRARIES_HERE)/jli -ljli $(LIBDL) -lc, \
LDFLAGS_SUFFIX_linux := $(LIBZ) -L $(INSTALL_LIBRARIES_HERE)/jli -ljli $(LIBDL), \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=instrument.dll" \
-D "JDK_INTERNAL_NAME=instrument" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(LIBINSTRUMENT_DIR), \
DEBUG_SYMBOLS := true))
ifneq (, $(findstring $(OPENJDK_TARGET_OS), macosx windows))
$(BUILD_LIBINSTRUMENT): $(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)jli_static$(STATIC_LIBRARY_SUFFIX)
else
$(BUILD_LIBINSTRUMENT): $(INSTALL_LIBRARIES_HERE)/jli/$(LIBRARY_PREFIX)jli$(SHARED_LIBRARY_SUFFIX)
endif
$(BUILD_LIBINSTRUMENT): $(BUILD_LIBJAVA)
BUILD_LIBRARIES += $(BUILD_LIBINSTRUMENT)
##########################################################################################
BUILD_LIBMANAGEMENT_SRC := $(JDK_TOPDIR)/src/share/native/sun/management \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/management \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/com/sun/management
BUILD_LIBMANAGEMENT_EXCLUDES :=
BUILD_LIBMANAGEMENT_CFLAGS := -I$(JDK_TOPDIR)/src/share/native/sun/management
ifneq ($(OPENJDK_TARGET_OS), windows)
BUILD_LIBMANAGEMENT_EXCLUDES += OperatingSystem_md.c
else
BUILD_LIBMANAGEMENT_EXCLUDES += UnixOperatingSystem_md.c
endif
ifneq ($(OPENJDK_TARGET_OS), solaris)
BUILD_LIBMANAGEMENT_EXCLUDES += SolarisOperatingSystem.c
endif
ifneq ($(OPENJDK_TARGET_OS), linux)
BUILD_LIBMANAGEMENT_EXCLUDES += LinuxOperatingSystem.c
endif
ifneq ($(OPENJDK_TARGET_OS), macosx)
BUILD_LIBMANAGEMENT_EXCLUDES += MacosxOperatingSystem.c
endif
LIBMANAGEMENT_OPTIMIZATION := HIGH
ifneq ($(findstring $(OPENJDK_TARGET_OS), solaris linux), )
ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
LIBMANAGEMENT_OPTIMIZATION := LOW
endif
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBMANAGEMENT, \
LIBRARY := management, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(BUILD_LIBMANAGEMENT_SRC), \
EXCLUDE_FILES := $(BUILD_LIBMANAGEMENT_EXCLUDES), \
LANG := C, \
OPTIMIZATION := $(LIBMANAGEMENT_OPTIMIZATION), \
CFLAGS := $(CFLAGS_JDKLIB) $(BUILD_LIBMANAGEMENT_CFLAGS), \
MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libmanagement/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_solaris := -lkstat, \
LDFLAGS_SUFFIX := $(LDFLAGS_JDKLIB_SUFFIX), \
LDFLAGS_SUFFIX_windows := jvm.lib psapi.lib $(WIN_JAVA_LIB) advapi32.lib, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=management.dll" \
-D "JDK_INTERNAL_NAME=management" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libmanagement, \
DEBUG_SYMBOLS := true))
$(BUILD_LIBMANAGEMENT): $(BUILD_LIBJAVA)
BUILD_LIBRARIES += $(BUILD_LIBMANAGEMENT)
##########################################################################################
BUILD_LIBHPROF_SRC := $(JDK_TOPDIR)/src/share/demo/jvmti/hprof $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/demo/jvmti/hprof
BUILD_LIBHPROF_CFLAGS := -I$(JDK_TOPDIR)/src/share/demo/jvmti/hprof \
-I$(JDK_TOPDIR)/src/share/npt \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/npt \
-I$(JDK_TOPDIR)/src/share/demo/jvmti/java_crw_demo
BUILD_LIBHPROF_LDFLAGS :=
LIBHPROF_OPTIMIZATION := HIGHEST
ifneq ($(findstring $(OPENJDK_TARGET_OS), solaris linux), )
ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
LIBHPROF_OPTIMIZATION := LOW
endif
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBHPROF, \
LIBRARY := hprof, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(BUILD_LIBHPROF_SRC), \
LANG := C, \
OPTIMIZATION := $(LIBHPROF_OPTIMIZATION), \
CFLAGS := $(CFLAGS_JDKLIB) \
$(BUILD_LIBHPROF_CFLAGS), \
CFLAGS_debug := -DHPROF_LOGGING, \
MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libhprof/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_windows := wsock32.lib winmm.lib advapi32.lib, \
LDFLAGS_SUFFIX_linux := $(LIBDL), \
LDFLAGS_SUFFIX_macosx := $(LIBDL), \
LDFLAGS_SUFFIX_solaris := -lsocket -lnsl $(LIBDL) -lc, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=hprof.dll" \
-D "JDK_INTERNAL_NAME=hprof" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libhprof_jvmti, \
DEBUG_SYMBOLS := true))
BUILD_LIBRARIES += $(BUILD_LIBHPROF)
##########################################################################################
$(eval $(call SetupNativeCompilation,BUILD_LIBJAVA_CRW_DEMO, \
LIBRARY := java_crw_demo, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/share/demo/jvmti/java_crw_demo, \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
-I$(JDK_TOPDIR)/src/share/demo/jvmti/java_crw_demo, \
MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libjava_crw_demo/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX_solaris := -lc, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=java_crw_demo.dll" \
-D "JDK_INTERNAL_NAME=java_crw_demo" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjava_crw_demo, \
DEBUG_SYMBOLS := true))
BUILD_LIBRARIES += $(BUILD_LIBJAVA_CRW_DEMO)
##########################################################################################
ifndef OPENJDK
ifeq ($(ENABLE_JFR), true)
$(eval $(call SetupNativeCompilation,BUILD_LIBJFR, \
LIBRARY := jfr, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/closed/share/native/oracle/jfr, \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
-I$(JDK_TOPDIR)/src/closed/share/javavm/export, \
MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libjfr/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX_solaris := -lc, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=jfr.dll" \
-D "JDK_INTERNAL_NAME=jfr" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjfr, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
BUILD_LIBRARIES += $(BUILD_LIBJFR)
endif
endif
#
# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
LIBJSOUND_SRC_DIRS := \
$(JDK_TOPDIR)/src/share/native/com/sun/media/sound \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/com/sun/media/sound
LIBJSOUND_SRC_FILES := Utilities.c Platform.c
LIBJSOUND_LANG := C
LIBJSOUND_CFLAGS := $(foreach dir, $(LIBJSOUND_SRC_DIRS), -I$(dir))
EXTRA_SOUND_JNI_LIBS :=
LIBJSOUND_MIDIFILES := \
MidiInDevice.c \
MidiInDeviceProvider.c \
MidiOutDevice.c \
MidiOutDeviceProvider.c \
PlatformMidi.c
# files needed for ports
LIBJSOUND_PORTFILES := \
PortMixerProvider.c \
PortMixer.c
# files needed for direct audio
LIBJSOUND_DAUDIOFILES := \
DirectAudioDeviceProvider.c \
DirectAudioDevice.c
ifeq ($(OPENJDK_TARGET_OS), windows)
EXTRA_SOUND_JNI_LIBS += jsoundds
LIBJSOUND_CFLAGS += -DX_PLATFORM=X_WINDOWS \
-DUSE_PLATFORM_MIDI_OUT=TRUE \
-DUSE_PLATFORM_MIDI_IN=TRUE \
-DUSE_PORTS=TRUE
LIBJSOUND_SRC_FILES += \
PLATFORM_API_WinOS_MidiIn.cpp \
PLATFORM_API_WinOS_MidiOut.c \
PLATFORM_API_WinOS_Util.c \
PLATFORM_API_WinOS_Ports.c
LIBJSOUND_SRC_FILES += $(LIBJSOUND_MIDIFILES)
LIBJSOUND_SRC_FILES += $(LIBJSOUND_PORTFILES)
endif # OPENJDK_TARGET_OS windows
ifeq ($(OPENJDK_TARGET_OS), linux)
EXTRA_SOUND_JNI_LIBS += jsoundalsa
LIBJSOUND_CFLAGS += -DX_PLATFORM=X_LINUX
endif # OPENJDK_TARGET_OS linux
ifeq ($(OPENJDK_TARGET_OS), macosx)
LIBJSOUND_LANG := C++
LIBJSOUND_CFLAGS += -DX_PLATFORM=X_MACOSX \
-DUSE_PORTS=TRUE \
-DUSE_DAUDIO=TRUE \
-DUSE_PLATFORM_MIDI_OUT=TRUE \
-DUSE_PLATFORM_MIDI_IN=TRUE
LIBJSOUND_SRC_DIRS += $(JDK_TOPDIR)/src/macosx/native/com/sun/media/sound
LIBJSOUND_SRC_FILES += \
PLATFORM_API_MacOSX_Utils.cpp \
PLATFORM_API_MacOSX_PCM.cpp \
PLATFORM_API_MacOSX_Ports.cpp \
PLATFORM_API_MacOSX_MidiIn.c \
PLATFORM_API_MacOSX_MidiOut.c \
PLATFORM_API_MacOSX_MidiUtils.c
LIBJSOUND_SRC_FILES += $(LIBJSOUND_MIDIFILES)
LIBJSOUND_SRC_FILES += $(LIBJSOUND_PORTFILES)
LIBJSOUND_SRC_FILES += $(LIBJSOUND_DAUDIOFILES)
endif # OPENJDK_TARGET_OS macosx
ifeq ($(OPENJDK_TARGET_OS), solaris)
LIBJSOUND_CFLAGS += -DX_PLATFORM=X_SOLARIS \
-DUSE_PORTS=TRUE \
-DUSE_DAUDIO=TRUE
LIBJSOUND_SRC_FILES += \
PLATFORM_API_SolarisOS_Utils.c \
PLATFORM_API_SolarisOS_Ports.c \
PLATFORM_API_SolarisOS_PCM.c
LIBJSOUND_SRC_FILES += $(LIBJSOUND_MIDIFILES)
LIBJSOUND_SRC_FILES += $(LIBJSOUND_PORTFILES)
LIBJSOUND_SRC_FILES += $(LIBJSOUND_DAUDIOFILES)
endif # OPENJDK_TARGET_OS solaris
ifeq ($(JVM_VARIANT_ZERO), true)
LIBJSOUND_CFLAGS += -DX_ARCH=X_ZERO
else
ifeq ($(OPENJDK_TARGET_CPU), x86)
LIBJSOUND_CFLAGS += -DX_ARCH=X_I586
endif
ifeq ($(OPENJDK_TARGET_CPU), sparc)
LIBJSOUND_CFLAGS += -DX_ARCH=X_SPARC
endif
ifeq ($(OPENJDK_TARGET_CPU), sparcv9)
LIBJSOUND_CFLAGS += -DX_ARCH=X_SPARCV9
endif
ifeq ($(OPENJDK_TARGET_CPU), x86_64)
LIBJSOUND_CFLAGS += -DX_ARCH=X_AMD64
endif
ifeq ($(OPENJDK_TARGET_CPU), arm)
LIBJSOUND_CFLAGS += -DX_ARCH=X_ARM
endif
ifeq ($(OPENJDK_TARGET_CPU), ppc)
LIBJSOUND_CFLAGS += -DX_ARCH=X_PPC
endif
endif
LIBJSOUND_CFLAGS += -DEXTRA_SOUND_JNI_LIBS='"$(EXTRA_SOUND_JNI_LIBS)"'
$(eval $(call SetupNativeCompilation,BUILD_LIBJSOUND, \
LIBRARY := jsound, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBJSOUND_SRC_DIRS), \
INCLUDE_FILES := $(LIBJSOUND_SRC_FILES), \
LANG := $(LIBJSOUND_LANG), \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
$(LIBJSOUND_CFLAGS), \
CXXFLAGS := $(CXXFLAGS_JDKLIB) $(LIBJSOUND_CFLAGS), \
MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libjsound/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_macosx := -framework CoreAudio -framework CoreFoundation \
-framework CoreServices -framework AudioUnit $(LIBCXX) \
-framework CoreMIDI -framework AudioToolbox, \
LDFLAGS_windows := $(WIN_JAVA_LIB) advapi32.lib winmm.lib, \
LDFLAGS_SUFFIX_posix := -ljava -ljvm, \
LDFLAGS_SUFFIX_solaris := -lc, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=jsound.dll" \
-D "JDK_INTERNAL_NAME=jsound" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjsound, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBJSOUND): $(BUILD_LIBJAVA)
BUILD_LIBRARIES += $(BUILD_LIBJSOUND)
##########################################################################################
ifneq ($(filter jsoundalsa, $(EXTRA_SOUND_JNI_LIBS)), )
$(eval $(call SetupNativeCompilation,BUILD_LIBJSOUNDALSA, \
LIBRARY := jsoundalsa, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBJSOUND_SRC_DIRS), \
INCLUDE_FILES := Utilities.c $(LIBJSOUND_MIDIFILES) $(LIBJSOUND_PORTFILES) \
$(LIBJSOUND_DAUDIOFILES) \
PLATFORM_API_LinuxOS_ALSA_CommonUtils.c \
PLATFORM_API_LinuxOS_ALSA_PCM.c \
PLATFORM_API_LinuxOS_ALSA_PCMUtils.c \
PLATFORM_API_LinuxOS_ALSA_MidiIn.c \
PLATFORM_API_LinuxOS_ALSA_MidiOut.c \
PLATFORM_API_LinuxOS_ALSA_MidiUtils.c \
PLATFORM_API_LinuxOS_ALSA_Ports.c, \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) $(ALSA_CFLAGS) \
$(LIBJSOUND_CFLAGS) \
-DUSE_DAUDIO=TRUE \
-DUSE_PORTS=TRUE \
-DUSE_PLATFORM_MIDI_OUT=TRUE \
-DUSE_PLATFORM_MIDI_IN=TRUE, \
MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libjsoundalsa/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX := $(ALSA_LIBS) -ljava -ljvm, \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjsoundalsa, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBJSOUNDALSA): $(BUILD_LIBJAVA)
BUILD_LIBRARIES += $(BUILD_LIBJSOUNDALSA)
endif
##########################################################################################
ifneq ($(filter jsoundds, $(EXTRA_SOUND_JNI_LIBS)), )
$(eval $(call SetupNativeCompilation,BUILD_LIBJSOUNDDS, \
LIBRARY := jsoundds, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBJSOUND_SRC_DIRS), \
INCLUDE_FILES := Utilities.c $(LIBJSOUND_DAUDIOFILES) \
PLATFORM_API_WinOS_DirectSound.cpp, \
LANG := C++, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
$(LIBJSOUND_CFLAGS) \
-DUSE_DAUDIO=TRUE, \
LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX := $(LDFLAGS_JDKLIB_SUFFIX) dsound.lib winmm.lib user32.lib ole32.lib, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=jsoundds.dll" \
-D "JDK_INTERNAL_NAME=jsoundds" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjsoundds, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBJSOUNDDS): $(BUILD_LIBJAVA)
BUILD_LIBRARIES += $(BUILD_LIBJSOUNDDS)
endif
/*
* Copyright (c) 1999, 2013 Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
#ifndef _JAVASOFT_JAWT_MD_H_
#define _JAVASOFT_JAWT_MD_H_
#include "jawt.h"
#ifdef __OBJC__
#import <QuartzCore/CALayer.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
/*
* Mac OS X specific declarations for AWT native interface.
* See notes in jawt.h for an example of use.
*/
/*
* When calling JAWT_GetAWT with a JAWT version less than 1.7, you must pass this
* flag or you will not be able to get a valid drawing surface and JAWT_GetAWT will
* return false. This is to maintain compatibility with applications that used the
* interface with Java 6 which had multiple rendering models. This flag is not necessary
* when JAWT version 1.7 or greater is used as this is the only supported rendering mode.
*
* Example:
* JAWT awt;
* awt.version = JAWT_VERSION_1_4 | JAWT_MACOSX_USE_CALAYER;
* jboolean success = JAWT_GetAWT(env, &awt);
*/
#define JAWT_MACOSX_USE_CALAYER 0x80000000
/*
* When the native Cocoa toolkit is in use, the pointer stored in
* JAWT_DrawingSurfaceInfo->platformInfo points to a NSObject that conforms to the
* JAWT_SurfaceLayers protocol. Setting the layer property of this object will cause the
* specified layer to be overlaid on the Components rectangle. If the window the
* Component belongs to has a CALayer attached to it, this layer will be accessible via
* the windowLayer property.
*/
#ifdef __OBJC__
@protocol JAWT_SurfaceLayers
@property (readwrite, retain) CALayer *layer;
@property (readonly) CALayer *windowLayer;
@end
#endif
#ifdef __cplusplus
}
#endif
#endif /* !_JAVASOFT_JAWT_MD_H_ */
/*
* Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
#ifndef _JAVASOFT_JNI_MD_H_
#define _JAVASOFT_JNI_MD_H_
#define JNIEXPORT __attribute__((visibility("default")))
#define JNIIMPORT __attribute__((visibility("default")))
#define JNICALL
typedef int jint;
#ifdef _LP64 /* 64-bit */
typedef long jlong;
#else
typedef long long jlong;
#endif
typedef signed char jbyte;
#endif /* !_JAVASOFT_JNI_MD_H_ */
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
#ifndef _JAVASOFT_JVM_MD_H_
#define _JAVASOFT_JVM_MD_H_
/*
* This file is currently collecting system-specific dregs for the
* JNI conversion, which should be sorted out later.
*/
#include <dirent.h> /* For DIR */
#include <sys/param.h> /* For MAXPATHLEN */
#include <unistd.h> /* For F_OK, R_OK, W_OK */
#include <stddef.h> /* For ptrdiff_t */
#include <stdint.h> /* For uintptr_t */
#define JNI_ONLOAD_SYMBOLS {"JNI_OnLoad"}
#define JNI_ONUNLOAD_SYMBOLS {"JNI_OnUnload"}
#define JNI_LIB_PREFIX "lib"
#define JNI_LIB_SUFFIX ".dylib"
#define VERSIONED_JNI_LIB_NAME(NAME, VERSION) JNI_LIB_PREFIX NAME "." VERSION JNI_LIB_SUFFIX
#define JNI_LIB_NAME(NAME) JNI_LIB_PREFIX NAME JNI_LIB_SUFFIX
#define JVM_MAXPATHLEN MAXPATHLEN
#define JVM_R_OK R_OK
#define JVM_W_OK W_OK
#define JVM_X_OK X_OK
#define JVM_F_OK F_OK
/*
* File I/O
*/
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#include <sys/signal.h>
/* O Flags */
#define JVM_O_RDONLY O_RDONLY
#define JVM_O_WRONLY O_WRONLY
#define JVM_O_RDWR O_RDWR
#define JVM_O_O_APPEND O_APPEND
#define JVM_O_EXCL O_EXCL
#define JVM_O_CREAT O_CREAT
#define JVM_O_DELETE 0x10000
/* Signals */
#define JVM_SIGINT SIGINT
#define JVM_SIGTERM SIGTERM
#endif /* !_JAVASOFT_JVM_MD_H_ */
......@@ -23,8 +23,7 @@
* questions.
*/
// REMIND: import <jawt_md.h>
#import <JavaVM/jawt_md.h>
#import <jawt_md.h>
/*
* The CALayer-based rendering model returns an object conforming
......
......@@ -24,7 +24,7 @@
*/
#import <AppKit/AppKit.h>
#import <JavaVM/jni.h>
#import <jni.h>
@interface CMenuComponent : NSObject {
......
......@@ -25,8 +25,7 @@
#import <jawt.h>
// REMIND: import <jawt_md.h>
#import <JavaVM/jawt_md.h>
#import <jawt_md.h>
#import "awt_DrawingSurface.h"
......
......@@ -24,7 +24,7 @@
*/
#import <Cocoa/Cocoa.h>
#import <JavaVM/jni.h>
#import <jni.h>
#import <JavaRuntimeSupport/JavaRuntimeSupport.h>
#include "AWTFont.h"
......
......@@ -154,7 +154,9 @@ typedef struct jawt_DrawingSurfaceInfo {
/*
* Pointer to the platform-specific information. This can be safely
* cast to a JAWT_Win32DrawingSurfaceInfo on Windows or a
* JAWT_X11DrawingSurfaceInfo on Solaris. See jawt_md.h for details.
* JAWT_X11DrawingSurfaceInfo on Solaris. On Mac OS X this is a
* pointer to a NSObject that conforms to the JAWT_SurfaceLayers
* protocol. See jawt_md.h for details.
*/
void* platformInfo;
/* Cached pointer to the underlying drawing surface */
......
......@@ -206,6 +206,11 @@ Java_java_lang_System_initProperties(JNIEnv *env, jclass cla, jobject props)
if (sprops->awt_toolkit) {
PUTPROP(props, "awt.toolkit", sprops->awt_toolkit);
}
#ifdef MACOSX
if (sprops->awt_headless) {
PUTPROP(props, "java.awt.headless", sprops->awt_headless);
}
#endif
/* os properties */
PUTPROP(props, "os.name", sprops->os_name);
......
......@@ -116,6 +116,8 @@ typedef struct {
char *gopherPort;
char *exceptionList;
char *awt_headless /* java.awt.headless setting, if NULL (default) will not be set */
#endif
} java_props_t;
......
......@@ -105,40 +105,17 @@ char *setupMacOSXLocale(int cat) {
}
}
/* There are several toolkit options on Mac OS X, so we should try to
* pick the "best" one, given what we know about the environment Java
* is running under
*/
static PreferredToolkit getPreferredToolkitFromEnv() {
char *envVar = getenv("AWT_TOOLKIT");
if (envVar == NULL) return unset;
if (strcasecmp(envVar, "CToolkit") == 0) return CToolkit;
if (strcasecmp(envVar, "XToolkit") == 0) return XToolkit;
if (strcasecmp(envVar, "HToolkit") == 0) return HToolkit;
return unset;
}
static bool isInAquaSession() {
int isInAquaSession() {
// Is the WindowServer available?
SecuritySessionId session_id;
SessionAttributeBits session_info;
OSStatus status = SessionGetInfo(callerSecuritySession, &session_id, &session_info);
if (status != noErr) return false;
if (!(session_info & sessionHasGraphicAccess)) return false;
return true;
}
PreferredToolkit getPreferredToolkit() {
static PreferredToolkit pref = unset;
if (pref != unset) return pref;
PreferredToolkit prefFromEnv = getPreferredToolkitFromEnv();
if (prefFromEnv != unset) return pref = prefFromEnv;
if (isInAquaSession()) return pref = CToolkit;
return pref = HToolkit;
if (status == noErr) {
if (session_info & sessionHasGraphicAccess) {
return 1;
}
}
return 0;
}
void setOSNameAndVersion(java_props_t *sprops) {
......
......@@ -29,10 +29,4 @@ char *setupMacOSXLocale(int cat);
void setOSNameAndVersion(java_props_t *sprops);
void setUserHome(java_props_t *sprops);
void setProxyProperties(java_props_t *sProps);
enum PreferredToolkit_enum {
unset = 0, CToolkit, XToolkit, HToolkit
};
typedef enum PreferredToolkit_enum PreferredToolkit;
PreferredToolkit getPreferredToolkit();
int isInAquaSession();
......@@ -454,40 +454,21 @@ GetJavaProperties(JNIEnv *env)
/* patches/service packs installed */
sprops.patch_level = "unknown";
/* Java 2D properties */
/* Java 2D/AWT properties */
#ifdef MACOSX
PreferredToolkit prefToolkit = getPreferredToolkit();
switch (prefToolkit) {
case CToolkit:
case HToolkit:
// Always the same GraphicsEnvironment and Toolkit on Mac OS X
sprops.graphics_env = "sun.awt.CGraphicsEnvironment";
break;
case XToolkit:
#endif
sprops.awt_toolkit = "sun.lwawt.macosx.LWCToolkit";
// check if we're in a GUI login session and set java.awt.headless=true if not
sprops.awt_headless = isInAquaSession() ? NULL : "true";
#else
sprops.graphics_env = "sun.awt.X11GraphicsEnvironment";
#ifdef MACOSX
break;
}
#endif
/* AWT properties */
#ifdef JAVASE_EMBEDDED
sprops.awt_toolkit = getEmbeddedToolkit();
if (sprops.awt_toolkit == NULL) // default as below
#endif
#ifdef MACOSX
switch (prefToolkit) {
case CToolkit:
sprops.awt_toolkit = "sun.lwawt.macosx.LWCToolkit";
break;
case XToolkit:
#endif
sprops.awt_toolkit = "sun.awt.X11.XToolkit";
#ifdef MACOSX
break;
default:
sprops.awt_toolkit = "sun.awt.HToolkit";
break;
}
#endif
/* This is used only for debugging of font problems. */
......
......@@ -23,7 +23,7 @@
* questions.
*/
#if defined(__linux__) || defined(MACOSX)
#if defined(__linux__)
#include <string.h>
#endif /* __linux__ */
#include <stdio.h>
......@@ -59,26 +59,12 @@
extern Display *awt_display;
#endif /* !HEADLESS */
#ifdef MACOSX
//
// XXXDARWIN: Hard-code the path to Apple's fontconfig, as it is
// not included in the dyld search path by default, and 10.4
// does not support -rpath.
//
// This ignores the build time setting of ALT_FREETYPE_LIB_PATH,
// and should be replaced with -rpath/@rpath support on 10.5 or later,
// or via support for a the FREETYPE_LIB_PATH define.
#define FONTCONFIG_DLL_VERSIONED X11_PATH "/lib/" VERSIONED_JNI_LIB_NAME("fontconfig", "1")
#define FONTCONFIG_DLL X11_PATH "/lib/" JNI_LIB_NAME("fontconfig")
#else
#define FONTCONFIG_DLL_VERSIONED VERSIONED_JNI_LIB_NAME("fontconfig", "1")
#define FONTCONFIG_DLL JNI_LIB_NAME("fontconfig")
#endif
#define MAXFDIRS 512 /* Max number of directories that contain fonts */
#if !defined(__linux__) && !defined(MACOSX)
#if !defined(__linux__)
/*
* This can be set in the makefile to "/usr/X11" if so desired.
*/
......@@ -128,22 +114,6 @@ static char *fullSolarisFontPath[] = {
NULL, /* terminates the list */
};
#elif MACOSX
static char *full_MACOSX_X11FontPath[] = {
X11_PATH "/lib/X11/fonts/TrueType",
X11_PATH "/lib/X11/fonts/truetype",
X11_PATH "/lib/X11/fonts/tt",
X11_PATH "/lib/X11/fonts/TTF",
X11_PATH "/lib/X11/fonts/OTF",
PACKAGE_PATH "/share/fonts/TrueType",
PACKAGE_PATH "/share/fonts/truetype",
PACKAGE_PATH "/share/fonts/tt",
PACKAGE_PATH "/share/fonts/TTF",
PACKAGE_PATH "/share/fonts/OTF",
X11_PATH "/lib/X11/fonts/Type1",
PACKAGE_PATH "/share/fonts/Type1",
NULL, /* terminates the list */
};
#else /* __linux */
/* All the known interesting locations we have discovered on
* various flavors of Linux
......@@ -400,7 +370,7 @@ static char **getX11FontPath ()
#endif /* !HEADLESS */
#if defined(__linux__) || defined(MACOSX)
#if defined(__linux__)
/* from awt_LoadLibrary.c */
JNIEXPORT jboolean JNICALL AWTIsHeadless();
#endif
......@@ -527,8 +497,6 @@ static char *getPlatformFontPathChars(JNIEnv *env, jboolean noType1) {
#if defined(__linux__)
knowndirs = fullLinuxFontPath;
#elif defined(MACOSX)
knowndirs = full_MACOSX_X11FontPath;
#else /* IF SOLARIS */
knowndirs = fullSolarisFontPath;
#endif
......@@ -539,7 +507,7 @@ static char *getPlatformFontPathChars(JNIEnv *env, jboolean noType1) {
* be initialised.
*/
#ifndef HEADLESS
#if defined(__linux__) || defined(MACOSX)
#if defined(__linux__)
/* There's no headless build on linux ... */
if (!AWTIsHeadless()) { /* .. so need to call a function to check */
#endif
......@@ -555,7 +523,7 @@ static char *getPlatformFontPathChars(JNIEnv *env, jboolean noType1) {
x11dirs = getX11FontPath();
}
AWT_UNLOCK();
#if defined(__linux__) || defined(MACOSX)
#if defined(__linux__)
}
#endif
#endif /* !HEADLESS */
......
......@@ -77,6 +77,12 @@ case "$OS" in
FILESEP="\\"
;;
Darwin)
VAR="Lets not forget about Mac"
DEFAULT_JDK=$(/usr/libexec/java_home)
FILESEP="/"
;;
# catch all other OSs
* )
echo "Unrecognized system! $OS"
......@@ -171,6 +177,22 @@ case "$OS" in
fi
;;
Darwin)
${TESTJAVA}/bin/java -Djava.awt.headless=true \
TestWrapped sun.lwawt.macosx.LWCToolkit
status=$?
if [ ! $status -eq "0" ]; then
fail "Test FAILED: toolkit wrapped into HeadlessToolkit is not an instance of sun.lwawt.macosx.LWCToolkit";
fi
${TESTJAVA}/bin/java -Djava.awt.headless=true \
-Dawt.toolkit=sun.lwawt.macosx.LWCToolkit \
TestWrapped sun.lwawt.macosx.LWCToolkit
status=$?
if [ ! $status -eq "0" ]; then
fail "Test FAILED: toolkit wrapped into HeadlessToolkit is not an instance of sun.lwawt.macosx.LWCToolkit";
fi
;;
esac
pass "All the tests are PASSED";
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册