--- a/jdk/make/lib/Awt2dLibraries.gmk Tue Feb 03 11:51:30 2015 +0400
+++ b/jdk/make/lib/Awt2dLibraries.gmk Tue Feb 03 09:28:21 2015 -0800
@@ -515,6 +515,77 @@
################################################################################
+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/java.desktop/unix/native/libawt_headless/awt \
+ $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/common/awt \
+ $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/common/java2d/opengl \
+ $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/common/java2d/x11 \
+ $(JDK_TOPDIR)/src/java.desktop/share/native/common/java2d/opengl \
+ $(JDK_TOPDIR)/src/java.desktop/share/native/common/font \
+ #
+
+ LIBAWT_HEADLESS_EXCLUDES := medialib
+ LIBAWT_HEADLESS_CFLAGS := -I$(SUPPORT_OUTPUTDIR)/headers/java.desktop \
+ $(addprefix -I, $(LIBAWT_HEADLESS_DIRS)) \
+ -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/java2d \
+ -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/java2d/loops \
+ -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/awt/image/cvutils \
+ -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/java2d/pipe \
+ -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/awt/image \
+ -I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/libawt/java2d \
+ -I$(JDK_TOPDIR)/src/java.desktop/share/native/common/font \
+ -I$(JDK_TOPDIR)/src/java.desktop/share/native/common/awt/debug \
+ -I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/common/font \
+ -I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/libsunwjdga/ \
+ $(LIBJAVA_HEADER_FLAGS) \
+ #
+
+ LIBAWT_HEADLESS_REORDER :=
+ ifeq ($(OPENJDK_TARGET_OS), solaris)
+ ifneq ($(OPENJDK_TARGET_CPU), x86_64)
+ LIBAWT_HEADLESS_REORDER := $(JDK_TOPDIR)/make/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), \
+ EXCLUDES := $(LIBAWT_HEADLESS_EXCLUDES), \
+ LANG := C, \
+ OPTIMIZATION := LOW, \
+ CFLAGS := $(CFLAGS_JDKLIB) \
+ -DHEADLESS=true \
+ -DPACKAGE_PATH=\"$(PACKAGE_PATH)\" \
+ $(CUPS_CFLAGS) \
+ $(X_CFLAGS) \
+ $(LIBAWT_HEADLESS_CFLAGS), \
+ MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libawt_headless/mapfile-vers, \
+ LDFLAGS := $(LDFLAGS_JDKLIB) \
+ $(call SET_SHARED_LIBRARY_ORIGIN), \
+ LDFLAGS_unix := -L$(INSTALL_LIBRARIES_HERE), \
+ LDFLAGS_linux := $(call SET_SHARED_LIBRARY_ORIGIN,/..), \
+ LDFLAGS_solaris := $(call SET_SHARED_LIBRARY_ORIGIN,/..), \
+ LDFLAGS_macosx := $(call SET_SHARED_LIBRARY_ORIGIN)., \
+ REORDER := $(LIBAWT_HEADLESS_REORDER), \
+ LDFLAGS_SUFFIX_linux := -ljvm -lawt -lm $(LIBDL) -ljava, \
+ LDFLAGS_SUFFIX_aix := -ljvm -lawt -ljava,\
+ LDFLAGS_SUFFIX_solaris := $(LIBDL) -ljvm -lawt -lm -ljava $(LIBCXX) -lc, \
+ OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libawt_headless, \
+ DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+
+ $(BUILD_LIBAWT_HEADLESS): $(BUILD_LIBAWT)
+
+ TARGETS += $(BUILD_LIBAWT_HEADLESS)
+
+ endif
+endif
+
+################################################################################
+
LIBFONTMANAGER_SRC := $(JDK_TOPDIR)/src/java.desktop/share/native/libfontmanager \
$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/libfontmanager
LIBFONTMANAGER_CFLAGS := \
@@ -718,77 +789,6 @@
################################################################################
-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/java.desktop/unix/native/libawt_headless/awt \
- $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/common/awt \
- $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/common/java2d/opengl \
- $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/common/java2d/x11 \
- $(JDK_TOPDIR)/src/java.desktop/share/native/common/java2d/opengl \
- $(JDK_TOPDIR)/src/java.desktop/share/native/common/font \
- #
-
- LIBAWT_HEADLESS_EXCLUDES := medialib
- LIBAWT_HEADLESS_CFLAGS := -I$(SUPPORT_OUTPUTDIR)/headers/java.desktop \
- $(addprefix -I, $(LIBAWT_HEADLESS_DIRS)) \
- -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/java2d \
- -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/java2d/loops \
- -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/awt/image/cvutils \
- -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/java2d/pipe \
- -I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/awt/image \
- -I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/libawt/java2d \
- -I$(JDK_TOPDIR)/src/java.desktop/share/native/common/font \
- -I$(JDK_TOPDIR)/src/java.desktop/share/native/common/awt/debug \
- -I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/common/font \
- -I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/libsunwjdga/ \
- $(LIBJAVA_HEADER_FLAGS) \
- #
-
- LIBAWT_HEADLESS_REORDER :=
- ifeq ($(OPENJDK_TARGET_OS), solaris)
- ifneq ($(OPENJDK_TARGET_CPU), x86_64)
- LIBAWT_HEADLESS_REORDER := $(JDK_TOPDIR)/make/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), \
- EXCLUDES := $(LIBAWT_HEADLESS_EXCLUDES), \
- LANG := C, \
- OPTIMIZATION := LOW, \
- CFLAGS := $(CFLAGS_JDKLIB) \
- -DHEADLESS=true \
- -DPACKAGE_PATH=\"$(PACKAGE_PATH)\" \
- $(CUPS_CFLAGS) \
- $(X_CFLAGS) \
- $(LIBAWT_HEADLESS_CFLAGS), \
- MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libawt_headless/mapfile-vers, \
- LDFLAGS := $(LDFLAGS_JDKLIB) \
- $(call SET_SHARED_LIBRARY_ORIGIN), \
- LDFLAGS_unix := -L$(INSTALL_LIBRARIES_HERE), \
- LDFLAGS_linux := $(call SET_SHARED_LIBRARY_ORIGIN,/..), \
- LDFLAGS_solaris := $(call SET_SHARED_LIBRARY_ORIGIN,/..), \
- LDFLAGS_macosx := $(call SET_SHARED_LIBRARY_ORIGIN)., \
- REORDER := $(LIBAWT_HEADLESS_REORDER), \
- LDFLAGS_SUFFIX_linux := -ljvm -lawt -lm $(LIBDL) -ljava, \
- LDFLAGS_SUFFIX_aix := -ljvm -lawt -ljava,\
- LDFLAGS_SUFFIX_solaris := $(LIBDL) -ljvm -lawt -lm -ljava $(LIBCXX) -lc, \
- OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libawt_headless, \
- DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
-
- $(BUILD_LIBAWT_HEADLESS): $(BUILD_LIBAWT)
-
- TARGETS += $(BUILD_LIBAWT_HEADLESS)
-
- endif
-endif
-
-################################################################################
-
ifndef BUILD_HEADLESS_ONLY
LIBSPLASHSCREEN_DIRS := \