changeset 8334:f002f5f3a16c jdk8-b112

Merge
author katleman
date Wed, 16 Oct 2013 12:02:43 -0700
parents 575d4bc3bcae eef656e1bdeb
children bef8f6d429de a5b57fca66da
files makefiles/CompileJavaClasses.gmk makefiles/CreateJars.gmk makefiles/GendataBreakIterator.gmk makefiles/GendataFontConfig.gmk makefiles/GendataHtml32dtd.gmk makefiles/GendataTZDB.gmk makefiles/GendataTimeZone.gmk makefiles/GenerateJavaSources.gmk makefiles/GensrcBuffer.gmk makefiles/GensrcCLDR.gmk makefiles/GensrcCharacterData.gmk makefiles/GensrcCharsetCoder.gmk makefiles/GensrcCharsetMapping.gmk makefiles/GensrcExceptions.gmk makefiles/GensrcIcons.gmk makefiles/GensrcJDWP.gmk makefiles/GensrcJObjC.gmk makefiles/GensrcLocaleDataMetaInfo.gmk makefiles/GensrcMisc.gmk makefiles/GensrcProperties.gmk makefiles/GensrcSwing.gmk makefiles/GensrcX11Wrappers.gmk makefiles/Profiles.gmk makefiles/profile-includes.txt src/solaris/doc/sun/man/man1/ja/javaws.1 src/solaris/doc/sun/man/man1/javaws.1
diffstat 88 files changed, 9597 insertions(+), 10081 deletions(-) [+]
line wrap: on
line diff
--- a/make/common/shared/Compiler-msvc.gmk	Fri Oct 11 03:06:10 2013 -0700
+++ b/make/common/shared/Compiler-msvc.gmk	Wed Oct 16 12:02:43 2013 -0700
@@ -53,7 +53,7 @@
   
   # The VS2010 compiler is the same one used on both 32bit and 64bit
   ifeq ($(CC_MAJORVER), 16)
-    COMPILER_NAME=Microsoft Visual Studio 10 (16.00.30319.01)
+    COMPILER_NAME=Microsoft Visual Studio 10 (16.00.40219.01)
     COMPILER_VERSION=VS2010
     ifeq ($(WINDOWSSDKDIR),)
       WINDOWSSDKDIR := $(error WINDOWSSDKDIR cannot be empty here)
--- a/make/common/shared/Defs-versions.gmk	Fri Oct 11 03:06:10 2013 -0700
+++ b/make/common/shared/Defs-versions.gmk	Wed Oct 16 12:02:43 2013 -0700
@@ -86,19 +86,17 @@
 # REQUIRED_MAKE_VER
 #   The minimum version of GNU make.
 #
-# REQUIRED_MKS_VER
-#   Windows only: If MKS used instead of CYGWIN, the minimum version of MKS.
-#
 # REQUIRED_OS_VARIANT_NAME
 #   The OS variation name required.
 #     Solaris: Solaris or OpenSolaris
-#     Windows: Windows2000, WindowsXP, Windows2003, etc.
+#     Windows: Windows2000, WindowsXP, Windows2003, Windows2008R2, etc.
 #     Linux: Fedora, RedHat, SuSE, Ubuntu, etc.
 #
 # REQUIRED_OS_VARIANT_VERSION
 #   The version number associated with the above OS variant name.
 #     Solaris: output of uname -r
-#     Windows: 5.0 for Windows2000, 5.1 for WindowsXP, 5.2 for Windows2003, etc.
+#     Windows: 5.0 for Windows2000, 5.1 for WindowsXP,
+#              5.2 for Windows2003, 6.1 for Windows2008R2, etc.
 #     Linux: number for the variant, e.g. 9 for Fedora 9
 #
 # REQUIRED_OS_VERSION
@@ -180,21 +178,15 @@
 # Windows specific
 ifeq ($(PLATFORM), windows)
   REQUIRED_OS_NAME            = Windows
-  ifeq ($(ARCH_DATA_MODEL),64)
-    REQUIRED_OS_VERSION       = 5.2
-    REQUIRED_OS_VARIANT_NAME  = Windows2003
-  else
-    REQUIRED_OS_VERSION       = 5.1
-    REQUIRED_OS_VARIANT_NAME  = WindowsXP
-  endif
+  REQUIRED_OS_VERSION         = 6.1
+  REQUIRED_OS_VARIANT_NAME    = Windows2008R2
   REQUIRED_OS_VARIANT_VERSION = $(REQUIRED_OS_VERSION)
   REQUIRED_CYGWIN_VER         = 4.0
-  REQUIRED_MKS_VER            = 6.1
   ifeq ($(CC_VERSION),msvc)
     REQUIRED_COMPILER_NAME    = Visual Studio 10
     REQUIRED_COMPILER_VERSION = VS2010
-    REQUIRED_CC_VER           = 16.00.30319.01
-    REQUIRED_LINK_VER         = 10.00.30319.01
+    REQUIRED_CC_VER           = 16.00.40219.01
+    REQUIRED_LINK_VER         = 10.00.40219.01
   endif
   ifeq ($(CC_VERSION),gcc)
     REQUIRED_CC_VER           = 3.4.3
--- a/make/common/shared/Sanity.gmk	Fri Oct 11 03:06:10 2013 -0700
+++ b/make/common/shared/Sanity.gmk	Wed Oct 16 12:02:43 2013 -0700
@@ -121,11 +121,13 @@
 endif
 
 ifeq ($(PLATFORM), windows)
-  # Windows 2000 is 5.0, Windows XP is 5.1, Windows 2003 is 5.2
+  # Windows 2000 is 5.0, Windows XP is 5.1,
+  # Windows 2003 is 5.2, Windows 7 and 2008R2 are 6.1
   #    Assume 5.0 (Windows 2000) if systeminfo does not help
   WINDOWS_MAPPING-5.0 := Windows2000
   WINDOWS_MAPPING-5.1 := WindowsXP
   WINDOWS_MAPPING-5.2 := Windows2003
+  WINDOWS_MAPPING-6.1 := Windows2008R2
   # What kind of system we are using (Variation is the common name)
   _OS_VERSION := \
     $(shell systeminfo 2> $(DEV_NULL) | \
@@ -180,7 +182,6 @@
 	sane-linux \
 	sane-cygwin \
 	sane-cygwin-shell \
-	sane-mks \
 	sane-arch_data_model \
 	sane-os_patch_level \
 	sane-classpath \
@@ -317,7 +318,7 @@
 endif # OPENJDK
 
 ifeq ($(PLATFORM), windows)
-  sane-os_version:: sane-cygwin sane-mks sane-cygwin-shell
+  sane-os_version:: sane-cygwin sane-cygwin-shell
 endif
 
 ######################################################
@@ -387,22 +388,6 @@
 endif
 
 ######################################################
-# Check the Windows mks version
-######################################################
-ifeq ($(PLATFORM), windows)
-    MKS_CHECK :=$(call CheckVersions,$(MKS_VER),$(REQUIRED_MKS_VER))
-sane-mks:
-  ifdef USING_MKS
-    ifeq ($(MKS_CHECK),missing)
-	@$(call OfficialErrorMessage,MKS version,$(MKS_VER),$(REQUIRED_MKS_VER))
-    endif
-    ifeq ($(MKS_CHECK),older)
-	@$(call OfficialErrorMessage,MKS version,$(MKS_VER),$(REQUIRED_MKS_VER))
-    endif
-  endif
-endif
-
-######################################################
 # Get list of installed patches (this file has a particular format)
 ######################################################
 $(INSTALL_PATCHES_FILE):
--- a/make/tools/manifest.mf	Fri Oct 11 03:06:10 2013 -0700
+++ b/make/tools/manifest.mf	Wed Oct 16 12:02:43 2013 -0700
@@ -1,6 +1,6 @@
 Manifest-Version: 1.0
 Specification-Title: Java Platform API Specification
-Specification-Version: 1.7
+Specification-Version: 1.8
 Specification-Vendor: Oracle Corporation
 Implementation-Title: Java Runtime Environment
 Implementation-Version: @@RELEASE@@
--- a/makefiles/BuildJdk.gmk	Fri Oct 11 03:06:10 2013 -0700
+++ b/makefiles/BuildJdk.gmk	Wed Oct 16 12:02:43 2013 -0700
@@ -47,13 +47,13 @@
 
 import: import-only
 import-only:
-#       Import (corba jaxp jaxws langtools hotspot)
+        # Import (corba jaxp jaxws langtools hotspot)
 	+$(MAKE) -f Import.gmk
 
 gensrc: import gensrc-only
 gensrc-only:
-	+$(MAKE) -f GenerateJavaSources.gmk
-#       Ok, now gensrc is fully populated.
+	+$(MAKE) -f GenerateSources.gmk
+        # Ok, now gensrc is fully populated.
 
 gendata: gensrc gendata-only
 gendata-only:
@@ -62,8 +62,8 @@
 classes: gendata classes-only
 classes-only:
 	+$(MAKE) -f CompileJavaClasses.gmk
-#       The classes are now built and
-#       any javah files have now been generated.
+        # The classes are now built and
+        # any javah files have now been generated.
 
 libs: classes libs-only
 libs-only:
@@ -71,23 +71,23 @@
 
 launchers: libs launchers-only
 launchers-only:
-#       Finally compile the launchers.
+        # Finally compile the launchers.
 	+$(MAKE) -f CompileLaunchers.gmk
 
 genclasses: launchers genclasses-only
 genclasses-only:
-#	Generate classes that have other sources. Needs
-#       to execute launchers.
+        # Generate classes that have other sources. Needs
+        # to execute launchers.
 	+$(MAKE) -f GenerateClasses.gmk
 
 jdk: genclasses
-#       Now we have a complete jdk, which you can run.
-#       It is not yet wrapped up as an installed image.
+        # Now we have a complete jdk, which you can run.
+        # It is not yet wrapped up as an installed image.
 
 demos:
-#       The demos are compiled against this jdk.
+        # The demos are compiled against this jdk.
 	+$(MAKE) -f CompileDemos.gmk
-#	Now copy the sample sources into the jdk.
+        # Now copy the sample sources into the jdk.
 	+$(MAKE) -f CopySamples.gmk
 
 # Create the final jdk and jre images, to be wrapped up
@@ -96,9 +96,9 @@
 images:
 	+$(MAKE) PROFILE="" -f CreateJars.gmk
 	+$(MAKE) PROFILE="" -f Images.gmk
-ifeq ($(OPENJDK_TARGET_OS), macosx)
-	+$(MAKE) -f Bundles.gmk
-endif
+        ifeq ($(OPENJDK_TARGET_OS), macosx)
+	  +$(MAKE) -f Bundles.gmk
+        endif
 
 overlay-images:
 	+$(MAKE) -f CompileLaunchers.gmk OVERLAY_IMAGES=true
@@ -114,8 +114,8 @@
 sign-jars:
 	+$(MAKE) -f SignJars.gmk
 
-BINARIES:=$(notdir $(wildcard $(JDK_IMAGE_DIR)/bin/*))
-INSTALLDIR:=openjdk-$(RELEASE)
+BINARIES := $(notdir $(wildcard $(JDK_IMAGE_DIR)/bin/*))
+INSTALLDIR := openjdk-$(RELEASE)
 
 # Install the jdk image, in a very crude way. Not taking into
 # account, how to install properly on macosx or windows etc.
@@ -126,8 +126,8 @@
 	$(RM) -r $(INSTALL_PREFIX)/jvm/$(INSTALLDIR)/*
 	$(CP) -rp $(JDK_IMAGE_DIR)/* $(INSTALL_PREFIX)/jvm/$(INSTALLDIR)
 	$(MKDIR) -p $(INSTALL_PREFIX)/bin
-	$(RM) $(addprefix $(INSTALL_PREFIX)/bin/,$(BINARIES))
-	$(foreach b,$(BINARIES),$(LN) -s $(INSTALL_PREFIX)/jvm/$(INSTALLDIR)/bin/$b $(INSTALL_PREFIX)/bin/$b &&) true
+	$(RM) $(addprefix $(INSTALL_PREFIX)/bin/, $(BINARIES))
+	$(foreach b, $(BINARIES), $(LN) -s $(INSTALL_PREFIX)/jvm/$(INSTALLDIR)/bin/$b $(INSTALL_PREFIX)/bin/$b &&) true
 
 # The all target builds the JDK, but not the images
 all: jdk
--- a/makefiles/Bundles.gmk	Fri Oct 11 03:06:10 2013 -0700
+++ b/makefiles/Bundles.gmk	Wed Oct 16 12:02:43 2013 -0700
@@ -31,108 +31,108 @@
 # Only macosx has bundles defined.
 ifeq ($(OPENJDK_TARGET_OS), macosx)
 
-bundles: jre-bundle jdk-bundle
+  bundles: jre-bundle jdk-bundle
 
-# JDK_BUNDLE_DIR and JRE_BUNDLE_DIR are defined in SPEC.
+  # JDK_BUNDLE_DIR and JRE_BUNDLE_DIR are defined in SPEC.
 
-MACOSX_SRC := $(JDK_TOPDIR)/src/macosx
+  MACOSX_SRC := $(JDK_TOPDIR)/src/macosx
 
-# All these OPENJDK checks are needed since there is no coherency between
-# these values in open and closed. Should probably be fixed.
-ifndef OPENJDK
+  # All these OPENJDK checks are needed since there is no coherency between
+  # these values in open and closed. Should probably be fixed.
+  ifndef OPENJDK
     BUNDLE_ID := $(MACOSX_BUNDLE_ID_BASE).$(JDK_MINOR_VERSION)u$(JDK_UPDATE_VERSION)
-else
+  else
     BUNDLE_ID := $(MACOSX_BUNDLE_ID_BASE)
-endif
-BUNDLE_ID_JRE := $(BUNDLE_ID).jre
-BUNDLE_ID_JDK := $(BUNDLE_ID).jdk
+  endif
+  BUNDLE_ID_JRE := $(BUNDLE_ID).jre
+  BUNDLE_ID_JDK := $(BUNDLE_ID).jdk
 
-BUNDLE_NAME := $(MACOSX_BUNDLE_NAME_BASE) $(JDK_MINOR_VERSION)
-BUNDLE_NAME_JRE := $(BUNDLE_NAME)
-BUNDLE_NAME_JDK := $(BUNDLE_NAME)
+  BUNDLE_NAME := $(MACOSX_BUNDLE_NAME_BASE) $(JDK_MINOR_VERSION)
+  BUNDLE_NAME_JRE := $(BUNDLE_NAME)
+  BUNDLE_NAME_JDK := $(BUNDLE_NAME)
 
-ifndef OPENJDK
+  ifndef OPENJDK
     BUNDLE_INFO := $(MACOSX_BUNDLE_NAME_BASE) $(JDK_VERSION)
-else
+  else
     BUNDLE_INFO := $(MACOSX_BUNDLE_NAME_BASE) ($(JDK_VERSION))
-endif
-BUNDLE_INFO_JRE := $(BUNDLE_INFO)
-BUNDLE_INFO_JDK := $(BUNDLE_INFO)
+  endif
+  BUNDLE_INFO_JRE := $(BUNDLE_INFO)
+  BUNDLE_INFO_JDK := $(BUNDLE_INFO)
 
-BUNDLE_PLATFORM_VERSION := $(JDK_MAJOR_VERSION).$(JDK_MINOR_VERSION)
-BUNDLE_VERSION := $(JDK_VERSION)
-ifeq ($(COMPANY_NAME),N/A)
+  BUNDLE_PLATFORM_VERSION := $(JDK_MAJOR_VERSION).$(JDK_MINOR_VERSION)
+  BUNDLE_VERSION := $(JDK_VERSION)
+  ifeq ($(COMPANY_NAME), N/A)
     BUNDLE_VENDOR := UNDEFINED
-else
+  else
     BUNDLE_VENDOR := $(COMPANY_NAME)
-endif
+  endif
 
 
-JDK_FILE_LIST := $(shell $(FIND) $(JDK_IMAGE_DIR))
-JRE_FILE_LIST := $(shell $(FIND) $(JRE_IMAGE_DIR))
+  JDK_FILE_LIST := $(shell $(FIND) $(JDK_IMAGE_DIR))
+  JRE_FILE_LIST := $(shell $(FIND) $(JRE_IMAGE_DIR))
 
-JDK_TARGET_LIST := $(subst $(JDK_IMAGE_DIR)/,$(JDK_BUNDLE_DIR)/Home/,$(JDK_FILE_LIST))
-JRE_TARGET_LIST := $(subst $(JRE_IMAGE_DIR)/,$(JRE_BUNDLE_DIR)/Home/,$(JRE_FILE_LIST))
+  JDK_TARGET_LIST := $(subst $(JDK_IMAGE_DIR)/,$(JDK_BUNDLE_DIR)/Home/,$(JDK_FILE_LIST))
+  JRE_TARGET_LIST := $(subst $(JRE_IMAGE_DIR)/,$(JRE_BUNDLE_DIR)/Home/,$(JRE_FILE_LIST))
 
-# The old builds implementation of this did not preserve symlinks so
-# make sure they are followed and the contents copied instead.
-# To fix this, remove -L
-# Copy empty directories (jre/lib/applet).
-$(JDK_BUNDLE_DIR)/Home/%: $(JDK_IMAGE_DIR)/%
+  # The old builds implementation of this did not preserve symlinks so
+  # make sure they are followed and the contents copied instead.
+  # To fix this, remove -L
+  # Copy empty directories (jre/lib/applet).
+  $(JDK_BUNDLE_DIR)/Home/%: $(JDK_IMAGE_DIR)/%
 	$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
 	$(MKDIR) -p $(@D)
 	if [ -d "$<" ]; then $(MKDIR) -p $@; else $(CP) -f -R -L '$<' '$@'; fi
 
-$(JRE_BUNDLE_DIR)/Home/%: $(JRE_IMAGE_DIR)/%
+  $(JRE_BUNDLE_DIR)/Home/%: $(JRE_IMAGE_DIR)/%
 	$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
 	$(MKDIR) -p $(@D)
 	if [ -d "$<" ]; then $(MKDIR) -p $@; else $(CP) -f -R -L '$<' '$@'; fi
 
-$(JDK_BUNDLE_DIR)/MacOS/libjli.dylib:
+  $(JDK_BUNDLE_DIR)/MacOS/libjli.dylib:
 	$(ECHO) Creating link $(patsubst $(OUTPUT_ROOT)/%,%,$@)
 	$(MKDIR) -p $(@D)
 	$(RM) $@
 	$(LN) -s ../Home/jre/lib/jli/libjli.dylib $@
 
-$(JRE_BUNDLE_DIR)/MacOS/libjli.dylib:
+  $(JRE_BUNDLE_DIR)/MacOS/libjli.dylib:
 	$(ECHO) Creating link $(patsubst $(OUTPUT_ROOT)/%,%,$@)
 	$(MKDIR) -p $(@D)
 	$(RM) $@
 	$(LN) -s ../Home/lib/jli/libjli.dylib $@
 
-$(JDK_BUNDLE_DIR)/Info.plist: $(SPEC)
+  $(JDK_BUNDLE_DIR)/Info.plist: $(SPEC)
 	$(ECHO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
 	$(MKDIR) -p $(@D)
-	$(SED)  -e "s/@@ID@@/$(BUNDLE_ID_JDK)/g" \
-		-e "s/@@NAME@@/$(BUNDLE_NAME_JDK)/g" \
-		-e "s/@@INFO@@/$(BUNDLE_INFO_JDK)/g" \
-		-e "s/@@PLATFORM_VERSION@@/$(BUNDLE_PLATFORM_VERSION)/g" \
-		-e "s/@@VERSION@@/$(BUNDLE_VERSION)/g" \
-		-e "s/@@VENDOR@@/$(BUNDLE_VENDOR)/g" \
-		< $(MACOSX_SRC)/bundle/JDK-Info.plist > $@
+	$(SED) -e "s/@@ID@@/$(BUNDLE_ID_JDK)/g" \
+	    -e "s/@@NAME@@/$(BUNDLE_NAME_JDK)/g" \
+	    -e "s/@@INFO@@/$(BUNDLE_INFO_JDK)/g" \
+	    -e "s/@@PLATFORM_VERSION@@/$(BUNDLE_PLATFORM_VERSION)/g" \
+	    -e "s/@@VERSION@@/$(BUNDLE_VERSION)/g" \
+	    -e "s/@@VENDOR@@/$(BUNDLE_VENDOR)/g" \
+	    < $(MACOSX_SRC)/bundle/JDK-Info.plist > $@
 
-$(JRE_BUNDLE_DIR)/Info.plist: $(SPEC)
+  $(JRE_BUNDLE_DIR)/Info.plist: $(SPEC)
 	$(ECHO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
 	$(MKDIR) -p $(@D)
-	$(SED)  -e "s/@@ID@@/$(BUNDLE_ID_JRE)/g" \
-		-e "s/@@NAME@@/$(BUNDLE_NAME_JRE)/g" \
-		-e "s/@@INFO@@/$(BUNDLE_INFO_JRE)/g" \
-		-e "s/@@PLATFORM_VERSION@@/$(BUNDLE_PLATFORM_VERSION)/g" \
-		-e "s/@@VERSION@@/$(BUNDLE_VERSION)/g" \
-		-e "s/@@VENDOR@@/$(BUNDLE_VENDOR)/g" \
-		< $(MACOSX_SRC)/bundle/JRE-Info.plist > $@
+	$(SED) -e "s/@@ID@@/$(BUNDLE_ID_JRE)/g" \
+	    -e "s/@@NAME@@/$(BUNDLE_NAME_JRE)/g" \
+	    -e "s/@@INFO@@/$(BUNDLE_INFO_JRE)/g" \
+	    -e "s/@@PLATFORM_VERSION@@/$(BUNDLE_PLATFORM_VERSION)/g" \
+	    -e "s/@@VERSION@@/$(BUNDLE_VERSION)/g" \
+	    -e "s/@@VENDOR@@/$(BUNDLE_VENDOR)/g" \
+	    < $(MACOSX_SRC)/bundle/JRE-Info.plist > $@
 
-jdk-bundle: $(JDK_TARGET_LIST) $(JDK_BUNDLE_DIR)/MacOS/libjli.dylib \
-		$(JDK_BUNDLE_DIR)/Info.plist
+  jdk-bundle: $(JDK_TARGET_LIST) $(JDK_BUNDLE_DIR)/MacOS/libjli.dylib \
+      $(JDK_BUNDLE_DIR)/Info.plist
 	$(SETFILE) -a B $(dir $(JDK_BUNDLE_DIR))
 
-jre-bundle: $(JRE_TARGET_LIST) $(JRE_BUNDLE_DIR)/MacOS/libjli.dylib \
-		$(JRE_BUNDLE_DIR)/Info.plist
+  jre-bundle: $(JRE_TARGET_LIST) $(JRE_BUNDLE_DIR)/MacOS/libjli.dylib \
+      $(JRE_BUNDLE_DIR)/Info.plist
 	$(SETFILE) -a B $(dir $(JRE_BUNDLE_DIR))
 
 else # Not macosx
 
-bundles:
+  bundles:
 	$(ECHO) "No bundles defined for $(OPENJDK_TARGET_OS)"
 
 endif # macosx
--- a/makefiles/CompileDemos.gmk	Fri Oct 11 03:06:10 2013 -0700
+++ b/makefiles/CompileDemos.gmk	Wed Oct 16 12:02:43 2013 -0700
@@ -35,10 +35,10 @@
 include Setup.gmk
 
 # Prepare the find cache. Only used if running on windows.
-$(eval $(call FillCacheFind,$(JDK_TOPDIR)/src))
+$(eval $(call FillCacheFind, $(JDK_TOPDIR)/src))
 
 # Append demo goals to this variable.
-BUILD_DEMOS=
+BUILD_DEMOS =
 
 # The demo structure and contents should really be cleaned up.
 # Now every other demo has its own quirks where to put the
@@ -47,13 +47,13 @@
 ##################################################################################################
 
 define SetupAppletDemo
-     $$(eval $$(call SetupJavaCompilation,BUILD_DEMO_APPLET_$1,\
-                SETUP:=GENERATE_USINGJDKBYTECODE,\
-		SRC:=$(JDK_TOPDIR)/src/$3share/demo/applets/$1,\
-		BIN:=$(JDK_OUTPUTDIR)/demo/applets/$1,\
-		COPY:=.html .java .xyz .obj .au .gif,\
-		DISABLE_SJAVAC:=$2))
-     BUILD_DEMOS += $$(BUILD_DEMO_APPLET_$1)
+  $$(eval $$(call SetupJavaCompilation,BUILD_DEMO_APPLET_$1, \
+      SETUP := GENERATE_USINGJDKBYTECODE, \
+      SRC := $(JDK_TOPDIR)/src/$3share/demo/applets/$1, \
+      BIN := $(JDK_OUTPUTDIR)/demo/applets/$1, \
+      COPY := .html .java .xyz .obj .au .gif, \
+      DISABLE_SJAVAC := $2))
+      BUILD_DEMOS += $$(BUILD_DEMO_APPLET_$1)
 endef
 
 $(eval $(call SetupAppletDemo,ArcTest))
@@ -71,91 +71,91 @@
 $(eval $(call SetupAppletDemo,SpreadSheet))
 
 ifndef OPENJDK
-    $(eval $(call SetupAppletDemo,Animator,,closed/))
-    $(eval $(call SetupAppletDemo,GraphLayout,true,closed/))
-    $(eval $(call SetupAppletDemo,JumpingBox,,closed/))
-    $(eval $(call SetupAppletDemo,TicTacToe,,closed/))
+  $(eval $(call SetupAppletDemo,Animator,,closed/))
+  $(eval $(call SetupAppletDemo,GraphLayout,true,closed/))
+  $(eval $(call SetupAppletDemo,JumpingBox,,closed/))
+  $(eval $(call SetupAppletDemo,TicTacToe,,closed/))
 endif
 
 ##################################################################################################
 
-PATTERNS_TO_COPY=.html .txt .properties .js .gif .jpg .theme .data .opt README .c .h .png .ttf .xyz .obj
+PATTERNS_TO_COPY = .html .txt .properties .js .gif .jpg .theme .data .opt README .c .h .png .ttf .xyz .obj
 
 define SetupDemo
-    # Param 1 = Name of the demo
-    # Param 2 = Subdirectory of the demo below the demo directory.
-    # Param 3 = Additional javac flags.
-    # Param 4 = The main class for the jar.
-    # Param 5 = Additional source directory.
-    # Param 6 = Extra dir below $(JDK_TOPDIR)/src (closed)
-    # Param 7 = List of files to copy
-    # Param 8 = Base name of jar file. Defaults to $1
-    # Param 9 = Exclude list
-    # Param 10 = Extra copy patterns
-    # Param 11 = Extra manifest attribute
-    # Param 12 = Suffix for compiler setup name
+  # Param 1 = Name of the demo
+  # Param 2 = Subdirectory of the demo below the demo directory.
+  # Param 3 = Additional javac flags.
+  # Param 4 = The main class for the jar.
+  # Param 5 = Additional source directory.
+  # Param 6 = Extra dir below $(JDK_TOPDIR)/src (closed)
+  # Param 7 = List of files to copy
+  # Param 8 = Base name of jar file. Defaults to $1
+  # Param 9 = Exclude list
+  # Param 10 = Extra copy patterns
+  # Param 11 = Extra manifest attribute
+  # Param 12 = Suffix for compiler setup name
 
-    # In some demos the source is found in a subdir called src.
-    $1_MAIN_SRC:=$$(wildcard $(JDK_TOPDIR)/src/$6share/demo/$2/$1/src)
-    ifeq ($$($1_MAIN_SRC),)
-        $1_MAIN_SRC:=$(JDK_TOPDIR)/src/$6share/demo/$2/$1
-    endif
+  # In some demos the source is found in a subdir called src.
+  $1_MAIN_SRC := $$(wildcard $(JDK_TOPDIR)/src/$6share/demo/$2/$1/src)
+  ifeq ($$($1_MAIN_SRC), )
+    $1_MAIN_SRC := $(JDK_TOPDIR)/src/$6share/demo/$2/$1
+  endif
 
-    ifneq ($8,)
-        $1_JARFILE := $8.jar
-    else
-        $1_JARFILE := $1.jar
-    endif
+  ifneq ($8, )
+    $1_JARFILE := $8.jar
+  else
+    $1_JARFILE := $1.jar
+  endif
 
-    ifeq ($(findstring $1,Laffy SwingSet3),)
-        $$(eval $$(call SetupJavaCompilation,BUILD_DEMO_$1,\
-                SETUP:=GENERATE_USINGJDKBYTECODE,\
-                ADD_JAVAC_FLAGS:=$3,\
-		SRC:=$$($1_MAIN_SRC) $5,\
-		BIN:=$(JDK_OUTPUTDIR)/democlasses/$2/$1,\
-		COPY:=$(PATTERNS_TO_COPY) $(10),\
-		JAR:=$(JDK_OUTPUTDIR)/demo/$2/$1/$$($1_JARFILE),\
-		JARMAIN:=$4,\
-		MANIFEST:=$(JDK_TOPDIR)/make/tools/manifest.mf,\
-		EXTRA_MANIFEST_ATTR:=$(11),\
-		SRCZIP:=$(JDK_OUTPUTDIR)/demo/$2/$1/src.zip,\
-		EXCLUDE_FILES:=$9,\
-		DISABLE_SJAVAC:=$(12)))
+  ifeq ($(findstring $1,Laffy SwingSet3), )
+    $$(eval $$(call SetupJavaCompilation,BUILD_DEMO_$1, \
+        SETUP := GENERATE_USINGJDKBYTECODE, \
+        ADD_JAVAC_FLAGS := $3, \
+        SRC := $$($1_MAIN_SRC) $5, \
+        BIN := $(JDK_OUTPUTDIR)/democlasses/$2/$1, \
+        COPY := $(PATTERNS_TO_COPY) $(10), \
+        JAR := $(JDK_OUTPUTDIR)/demo/$2/$1/$$($1_JARFILE), \
+        JARMAIN := $4, \
+        MANIFEST := $(JDK_TOPDIR)/make/tools/manifest.mf, \
+        EXTRA_MANIFEST_ATTR := $(11), \
+        SRCZIP := $(JDK_OUTPUTDIR)/demo/$2/$1/src.zip, \
+        EXCLUDE_FILES := $9, \
+        DISABLE_SJAVAC := $(12)))
 
-        BUILD_DEMOS +=  $$(BUILD_DEMO_$1) \
-			$(JDK_OUTPUTDIR)/demo/$2/$1/$$($1_JARFILE) \
-			$(JDK_OUTPUTDIR)/demo/$2/$1/src.zip 
-    endif
+    BUILD_DEMOS += $$(BUILD_DEMO_$1) \
+        $(JDK_OUTPUTDIR)/demo/$2/$1/$$($1_JARFILE) \
+        $(JDK_OUTPUTDIR)/demo/$2/$1/src.zip
+  endif
 
-    # Copy files.
-    $1_COPY_TARGETS :=  $$(patsubst $(JDK_TOPDIR)/src/$6share/demo/$2/$1/%,\
-			$(JDK_OUTPUTDIR)/demo/$2/$1/%,\
-			$$(wildcard $$(addprefix $(JDK_TOPDIR)/src/$6share/demo/$2/$1/,$7)))
-    ifneq ($7,)
-        $(JDK_OUTPUTDIR)/demo/$2/$1/% : $(JDK_TOPDIR)/src/$6share/demo/$2/$1/%
-		$$(call install-file)
-		$(CHMOD) -f ug+w $$@
+  # Copy files.
+  $1_COPY_TARGETS := $$(patsubst $(JDK_TOPDIR)/src/$6share/demo/$2/$1/%, \
+      $(JDK_OUTPUTDIR)/demo/$2/$1/%, \
+      $$(wildcard $$(addprefix $(JDK_TOPDIR)/src/$6share/demo/$2/$1/, $7)))
+  ifneq ($7, )
+    $(JDK_OUTPUTDIR)/demo/$2/$1/%: $(JDK_TOPDIR)/src/$6share/demo/$2/$1/%
+	$$(call install-file)
+	$(CHMOD) -f ug+w $$@
 
-        BUILD_DEMOS += $$($1_COPY_TARGETS)
-    endif
+    BUILD_DEMOS += $$($1_COPY_TARGETS)
+  endif
 
 endef
 
 $(eval $(call SetupDemo,CodePointIM,jfc,,CodePointIM,,,*.html))
-$(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/_the.services : \
-			$(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/CodePointIM.jar \
-			$(JDK_TOPDIR)/src/share/demo/jfc/CodePointIM/java.awt.im.spi.InputMethodDescriptor
+$(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/_the.services: \
+    $(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/CodePointIM.jar \
+    $(JDK_TOPDIR)/src/share/demo/jfc/CodePointIM/java.awt.im.spi.InputMethodDescriptor
 	(cd $(JDK_OUTPUTDIR)/demo/jfc/CodePointIM && \
-		$(MKDIR) -p _the.tmp/META-INF/services && \
-		$(CP) $(JDK_TOPDIR)/src/share/demo/jfc/CodePointIM/java.awt.im.spi.InputMethodDescriptor _the.tmp/META-INF/services && \
-		cd _the.tmp && \
-		$(JAR) uf $(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/CodePointIM.jar META-INF/services/java.awt.im.spi.InputMethodDescriptor && \
-		cd META-INF/services && \
-		$(JAR) uf $(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/CodePointIM.jar java.awt.im.spi.InputMethodDescriptor)
+	$(MKDIR) -p _the.tmp/META-INF/services && \
+	$(CP) $(JDK_TOPDIR)/src/share/demo/jfc/CodePointIM/java.awt.im.spi.InputMethodDescriptor _the.tmp/META-INF/services && \
+	cd _the.tmp && \
+	$(JAR) uf $(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/CodePointIM.jar META-INF/services/java.awt.im.spi.InputMethodDescriptor && \
+	cd META-INF/services && \
+	$(JAR) uf $(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/CodePointIM.jar java.awt.im.spi.InputMethodDescriptor)
 	$(RM) -r $(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/_the.tmp
 	$(TOUCH) $@
 
-BUILD_DEMOS+=$(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/_the.services
+BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/_the.services
 
 $(eval $(call SetupDemo,MoleculeViewer,applets,,XYZChemModel,,,example*.html XYZApp.java))
 $(eval $(call SetupDemo,WireFrame,applets,,ThreeD,,,example*.html ThreeD.java))
@@ -175,193 +175,194 @@
 $(eval $(call SetupDemo,zipfs,nio,,,,,README* *.java,,,,Main-Class: \n))
 
 ifndef OPENJDK
-    $(eval $(call SetupDemo,Laffy,jfc,,,,closed/,*))
-    $(eval $(call SetupDemo,SwingSet3,jfc,,,,closed/,*))
+  $(eval $(call SetupDemo,Laffy,jfc,,,,closed/,*))
+  $(eval $(call SetupDemo,SwingSet3,jfc,,,,closed/,*))
 
-    $(eval $(call SetupDemo,Java2D,jfc,,java2d.Java2Demo,,closed/,*.html README*,Java2Demo))
-    $(eval $(call SetupDemo,Stylepad,jfc,,Stylepad,\
-		$(JDK_TOPDIR)/src/share/demo/jfc/Notepad,closed/,*.txt,,$(JDK_TOPDIR)/src/share/demo/jfc/Notepad/README.txt))
-    $(eval $(call SetupDemo,SwingSet2,jfc,,SwingSet2,,closed/,README* *.html,,,.java COPYRIGHT,\
-		SplashScreen-Image: resources/images/splash.png,true))
+  $(eval $(call SetupDemo,Java2D,jfc,,java2d.Java2Demo,,closed/,*.html README*,Java2Demo))
+  $(eval $(call SetupDemo,Stylepad,jfc,,Stylepad, \
+      $(JDK_TOPDIR)/src/share/demo/jfc/Notepad,closed/,*.txt,,$(JDK_TOPDIR)/src/share/demo/jfc/Notepad/README.txt))
+  $(eval $(call SetupDemo,SwingSet2,jfc,,SwingSet2,,closed/,README* *.html,,,.java COPYRIGHT, \
+      SplashScreen-Image: resources/images/splash.png,true))
 
-    BUILD_DEMOS += $(patsubst $(JDK_TOPDIR)/src/closed/share/demo/nbproject/%,\
-			$(JDK_OUTPUTDIR)/demo/nbproject/%,\
-			$(call CacheFind,$(JDK_TOPDIR)/src/closed/share/demo/nbproject))
-    $(JDK_OUTPUTDIR)/demo/nbproject/% : $(JDK_TOPDIR)/src/closed/share/demo/nbproject/%
-		$(call install-file)
-		$(CHMOD) -f ug+w $@
+  BUILD_DEMOS += $(patsubst $(JDK_TOPDIR)/src/closed/share/demo/nbproject/%, \
+      $(JDK_OUTPUTDIR)/demo/nbproject/%, \
+      $(call CacheFind, $(JDK_TOPDIR)/src/closed/share/demo/nbproject))
+
+  $(JDK_OUTPUTDIR)/demo/nbproject/%: $(JDK_TOPDIR)/src/closed/share/demo/nbproject/%
+	$(call install-file)
+	$(CHMOD) -f ug+w $@
 endif
 
 ##################################################################################################
 
-# In the old makefiles, j2dbench was not compiled. 
-#$(eval $(call SetupDemo,J2DBench,java2d,/src,,j2dbench/J2DBench))
+# In the old makefiles, j2dbench was not compiled.
+#$(eval $(call SetupDemo,J2DBench, java2d, /src, , j2dbench/J2DBench))
 
 # JVMTI demos are a bit strange and share some files, but be careful the
-#    shared files are just the *.c and *.h files, not the README or sample
-#    makefiles. So we always exclude the README.txt and sample.makefile.txt
-#    from the extra sources.
+# shared files are just the *.c and *.h files, not the README or sample
+# makefiles. So we always exclude the README.txt and sample.makefile.txt
+# from the extra sources.
 define SetupJVMTIDemo
-     # Param 1 = Name of the demo
-     # Param 2 = add these directories to the includes, default is agent_util
-     # Param 3 = extra CFLAGS
-     # Param 4 = C or C++ (defaults to C)
-     # Param 5 = libs for posix
-     # Param 6 = libs for windows
-     # Param 7 = libs for solaris
-     BUILD_DEMO_JVMTI_$1_EXTRA_SRC:= \
-        $$(wildcard $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/demo/jvmti/$1) \
-	$$(wildcard $$(addprefix $(JDK_TOPDIR)/src/share/demo/jvmti/,$2))
-     BUILD_DEMO_JVMTI_$1_EXTRA_SRC_EXCLUDE:= \
-	$$(wildcard $$(addprefix $(JDK_TOPDIR)/src/share/demo/jvmti/,$2)/README.txt) \
-	$$(wildcard $$(addprefix $(JDK_TOPDIR)/src/share/demo/jvmti/,$2)/sample.makefile.txt)
-     BUILD_DEMO_JVMTI_$1_EXTRA_INC:=$$(addprefix -I,$$(BUILD_DEMO_JVMTI_$1_EXTRA_SRC))
-     BUILD_DEMO_JVMTI_$1_LANG:=C
-     ifneq (,$4)
-         BUILD_DEMO_JVMTI_$1_LANG:=$4
-     endif
-     ifeq (C++,$4)
-         $1_EXTRA_CXX:=$(LDFLAGS_CXX_JDK) $(LIBCXX)
-     endif
+  # Param 1 = Name of the demo
+  # Param 2 = add these directories to the includes, default is agent_util
+  # Param 3 = extra CFLAGS
+  # Param 4 = C or C++ (defaults to C)
+  # Param 5 = libs for posix
+  # Param 6 = libs for windows
+  # Param 7 = libs for solaris
+  BUILD_DEMO_JVMTI_$1_EXTRA_SRC := \
+      $$(wildcard $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/demo/jvmti/$1) \
+      $$(wildcard $$(addprefix $(JDK_TOPDIR)/src/share/demo/jvmti/, $2))
+  BUILD_DEMO_JVMTI_$1_EXTRA_SRC_EXCLUDE := \
+      $$(wildcard $$(addprefix $(JDK_TOPDIR)/src/share/demo/jvmti/, $2)/README.txt) \
+      $$(wildcard $$(addprefix $(JDK_TOPDIR)/src/share/demo/jvmti/, $2)/sample.makefile.txt)
+  BUILD_DEMO_JVMTI_$1_EXTRA_INC := $$(addprefix -I, $$(BUILD_DEMO_JVMTI_$1_EXTRA_SRC))
+  BUILD_DEMO_JVMTI_$1_LANG := C
+  ifneq (, $4)
+    BUILD_DEMO_JVMTI_$1_LANG := $4
+  endif
+  ifeq (C++, $4)
+    $1_EXTRA_CXX := $(LDFLAGS_CXX_JDK) $(LIBCXX)
+  endif
 
-     $1_CXXFLAGS:=$(CXXFLAGS_JDKLIB) -I$(JDK_TOPDIR)/src/share/demo/jvmti/$1 \
-		  $$(BUILD_DEMO_JVMTI_$1_EXTRA_INC) $3 \
-		  $(CXXFLAGS_DEBUG_SYMBOLS)
-     ifeq ($1-$(OPENJDK_TARGET_CPU_ARCH),waiters-sparc)
-         $1_FILTER:=-xregs=no%appl
-         $1_CXXFLAGS:=$$(filter-out $$($1_FILTER),$$($1_CXXFLAGS))
-     endif
+  $1_CXXFLAGS := $(CXXFLAGS_JDKLIB) -I$(JDK_TOPDIR)/src/share/demo/jvmti/$1 \
+      $$(BUILD_DEMO_JVMTI_$1_EXTRA_INC) $3 \
+      $(CXXFLAGS_DEBUG_SYMBOLS)
+  ifeq ($1-$(OPENJDK_TARGET_CPU_ARCH), waiters-sparc)
+    $1_FILTER := -xregs=no%appl
+    $1_CXXFLAGS := $$(filter-out $$($1_FILTER), $$($1_CXXFLAGS))
+  endif
 
-     # Workaround for CFLAGS_JDKLIB containing ',' on solaris. If this is added as 'CFLAGS' to the
-     # eval call below, the comma gets expanded too early.
-     BUILD_DEMO_JVMTI_$1_CFLAGS:=$(CFLAGS_JDKLIB) $(CFLAGS_DEBUG_SYMBOLS) \
-		-I$(JDK_TOPDIR)/src/share/demo/jvmti/$1 $$(BUILD_DEMO_JVMTI_$1_EXTRA_INC) $3
+  # Workaround for CFLAGS_JDKLIB containing ',' on solaris. If this is added as 'CFLAGS' to the
+  # eval call below, the comma gets expanded too early.
+  BUILD_DEMO_JVMTI_$1_CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_DEBUG_SYMBOLS) \
+      -I$(JDK_TOPDIR)/src/share/demo/jvmti/$1 $$(BUILD_DEMO_JVMTI_$1_EXTRA_INC) $3
 
-     # Remove the -incremental:no setting to get .ilk-files like in the old build.
-     $$(eval $$(call SetupNativeCompilation,BUILD_DEMO_JVMTI_$1,\
-		SRC:=$(JDK_TOPDIR)/src/share/demo/jvmti/$1 $$(BUILD_DEMO_JVMTI_$1_EXTRA_SRC),\
-		LANG:=$$(BUILD_DEMO_JVMTI_$1_LANG),\
-		OPTIMIZATION:=LOW,\
-		CXXFLAGS:=$$($1_CXXFLAGS),\
-		LDFLAGS:=$(filter-out -incremental:no -opt:ref,$(LDFLAGS_JDKLIB)),\
-		LDFLAGS_macosx:=$(call SET_EXECUTABLE_ORIGIN),\
-		LDFLAGS_SUFFIX:=$$($1_EXTRA_CXX),\
-		LDFLAGS_SUFFIX_posix:=$5,\
-		LDFLAGS_SUFFIX_windows:=$6,\
-		LDFLAGS_SUFFIX_solaris:=$7 -lc,\
-		LDFLAGS_SUFFIX_linux:=$8,\
-		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
-		RC_FLAGS:=$$(RC_FLAGS) \
-			  -D "JDK_FNAME=$1.dll" \
-			  -D "JDK_INTERNAL_NAME=$1" \
-			  -D "JDK_FTYPE=0x2L",\
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/demoobjs/jvmti/$1,\
-		OUTPUT_DIR:=$(JDK_OUTPUTDIR)/demo/jvmti/$1/lib,\
-		LIBRARY:=$1))
+  # Remove the -incremental:no setting to get .ilk-files like in the old build.
+  $$(eval $$(call SetupNativeCompilation,BUILD_DEMO_JVMTI_$1, \
+      SRC := $(JDK_TOPDIR)/src/share/demo/jvmti/$1 $$(BUILD_DEMO_JVMTI_$1_EXTRA_SRC), \
+      LANG := $$(BUILD_DEMO_JVMTI_$1_LANG), \
+      OPTIMIZATION := LOW, \
+      CXXFLAGS := $$($1_CXXFLAGS), \
+      LDFLAGS := $(filter-out -incremental:no -opt:ref, $(LDFLAGS_JDKLIB)), \
+      LDFLAGS_macosx := $(call SET_EXECUTABLE_ORIGIN), \
+      LDFLAGS_SUFFIX := $$($1_EXTRA_CXX), \
+      LDFLAGS_SUFFIX_posix := $5, \
+      LDFLAGS_SUFFIX_windows := $6, \
+      LDFLAGS_SUFFIX_solaris := $7 -lc, \
+      LDFLAGS_SUFFIX_linux := $8, \
+      VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
+      RC_FLAGS := $$(RC_FLAGS) \
+          -D "JDK_FNAME=$1.dll" \
+          -D "JDK_INTERNAL_NAME=$1" \
+          -D "JDK_FTYPE=0x2L", \
+      OBJECT_DIR := $(JDK_OUTPUTDIR)/demoobjs/jvmti/$1, \
+      OUTPUT_DIR := $(JDK_OUTPUTDIR)/demo/jvmti/$1/lib, \
+      LIBRARY := $1))
 
-    $$(eval $$(call SetupZipArchive,BUILD_DEMO_JVMTI_SRC_$1,\
-		SRC:=$(JDK_TOPDIR)/src/share/demo/jvmti/$1 $$(BUILD_DEMO_JVMTI_$1_EXTRA_SRC),\
-		EXCLUDE_FILES:=$$(BUILD_DEMO_JVMTI_$1_EXTRA_SRC_EXCLUDE), \
-		ZIP:=$(JDK_OUTPUTDIR)/demo/jvmti/$1/src.zip))
+  $$(eval $$(call SetupZipArchive,BUILD_DEMO_JVMTI_SRC_$1, \
+      SRC := $(JDK_TOPDIR)/src/share/demo/jvmti/$1 $$(BUILD_DEMO_JVMTI_$1_EXTRA_SRC), \
+      EXCLUDE_FILES := $$(BUILD_DEMO_JVMTI_$1_EXTRA_SRC_EXCLUDE), \
+      ZIP := $(JDK_OUTPUTDIR)/demo/jvmti/$1/src.zip))
 
-     $(JDK_OUTPUTDIR)/demo/jvmti/$1/README.txt : $(JDK_TOPDIR)/src/share/demo/jvmti/$1/README.txt
-		$$(call install-file)
-		$(CHMOD) -f ug+w $$@
+  $(JDK_OUTPUTDIR)/demo/jvmti/$1/README.txt: $(JDK_TOPDIR)/src/share/demo/jvmti/$1/README.txt
+	$$(call install-file)
+	$(CHMOD) -f ug+w $$@
 
-     ifneq (,$$(wildcard $(JDK_TOPDIR)/src/share/demo/jvmti/$1/*.java))
-         $$(eval $$(call SetupJavaCompilation,BUILD_DEMO_JVMTI_$1_JAVA,\
-                SETUP:=GENERATE_USINGJDKBYTECODE,\
-		SRC:=$(JDK_TOPDIR)/src/share/demo/jvmti/$1,\
-		BIN:=$(JDK_OUTPUTDIR)/democlasses/jvmti/$1,\
-		COPY:=$(PATTERNS_TO_COPY),\
-		JAR:=$(JDK_OUTPUTDIR)/demo/jvmti/$1/$1.jar,\
-		EXTRA_MANIFEST_ATTR:=Main-Class: \n,\
-		MANIFEST:=$(JDK_TOPDIR)/make/tools/manifest.mf))
+  ifneq (, $$(wildcard $(JDK_TOPDIR)/src/share/demo/jvmti/$1/*.java))
+    $$(eval $$(call SetupJavaCompilation,BUILD_DEMO_JVMTI_$1_JAVA, \
+        SETUP := GENERATE_USINGJDKBYTECODE, \
+        SRC := $(JDK_TOPDIR)/src/share/demo/jvmti/$1, \
+        BIN := $(JDK_OUTPUTDIR)/democlasses/jvmti/$1, \
+        COPY := $(PATTERNS_TO_COPY), \
+        JAR := $(JDK_OUTPUTDIR)/demo/jvmti/$1/$1.jar, \
+        EXTRA_MANIFEST_ATTR := Main-Class: \n, \
+        MANIFEST := $(JDK_TOPDIR)/make/tools/manifest.mf))
 
-         BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/jvmti/$1/$1.jar
-     endif
+    BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/jvmti/$1/$1.jar
+  endif
 
-     BUILD_DEMOS += 	$$(BUILD_DEMO_JVMTI_$1) \
-			$(JDK_OUTPUTDIR)/demo/jvmti/$1/src.zip \
-			$(JDK_OUTPUTDIR)/demo/jvmti/$1/README.txt
+  BUILD_DEMOS += $$(BUILD_DEMO_JVMTI_$1) \
+      $(JDK_OUTPUTDIR)/demo/jvmti/$1/src.zip \
+      $(JDK_OUTPUTDIR)/demo/jvmti/$1/README.txt
 
-     ifeq ($(OPENJDK_TARGET_OS),windows)
-         # These files normally end up in OBJECT_DIR but for demos they
-         # are supposed to be included in the distro.
-         $(JDK_OUTPUTDIR)/demo/jvmti/$1/lib/$1.lib: $$(BUILD_DEMO_JVMTI_$1)
-		$(CP) $(JDK_OUTPUTDIR)/demoobjs/jvmti/$1/$1.lib $$@
+  ifeq ($(OPENJDK_TARGET_OS), windows)
+    # These files normally end up in OBJECT_DIR but for demos they
+    # are supposed to be included in the distro.
+    $(JDK_OUTPUTDIR)/demo/jvmti/$1/lib/$1.lib: $$(BUILD_DEMO_JVMTI_$1)
+	$(CP) $(JDK_OUTPUTDIR)/demoobjs/jvmti/$1/$1.lib $$@
 
-         $(JDK_OUTPUTDIR)/demo/jvmti/$1/lib/$1.exp: $$(BUILD_DEMO_JVMTI_$1)
-		$(CP) $(JDK_OUTPUTDIR)/demoobjs/jvmti/$1/$1.exp $$@
+    $(JDK_OUTPUTDIR)/demo/jvmti/$1/lib/$1.exp: $$(BUILD_DEMO_JVMTI_$1)
+	$(CP) $(JDK_OUTPUTDIR)/demoobjs/jvmti/$1/$1.exp $$@
 
-         BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/jvmti/$1/lib/$1.lib \
-			$(JDK_OUTPUTDIR)/demo/jvmti/$1/lib/$1.exp
-     endif
+    BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/jvmti/$1/lib/$1.lib \
+        $(JDK_OUTPUTDIR)/demo/jvmti/$1/lib/$1.exp
+  endif
 endef
 
-$(eval $(call SetupJVMTIDemo,compiledMethodLoad,	agent_util))
-$(eval $(call SetupJVMTIDemo,gctest,			agent_util))
-$(eval $(call SetupJVMTIDemo,heapTracker,		agent_util java_crw_demo))
-$(eval $(call SetupJVMTIDemo,heapViewer,		agent_util))
-$(eval $(call SetupJVMTIDemo,hprof,			java_crw_demo,\
-		-I$(JDK_TOPDIR)/src/share/npt -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/npt,C,\
-		-ldl,ws2_32.lib winmm.lib,-lsocket -lnsl,-lpthread))
+$(eval $(call SetupJVMTIDemo,compiledMethodLoad, agent_util))
+$(eval $(call SetupJVMTIDemo,gctest, agent_util))
+$(eval $(call SetupJVMTIDemo,heapTracker, agent_util java_crw_demo))
+$(eval $(call SetupJVMTIDemo,heapViewer, agent_util))
+$(eval $(call SetupJVMTIDemo,hprof, java_crw_demo, \
+    -I$(JDK_TOPDIR)/src/share/npt -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/npt, C, \
+    -ldl, ws2_32.lib winmm.lib, -lsocket -lnsl, -lpthread))
 
-$(eval $(call SetupJVMTIDemo,minst,			agent_util java_crw_demo))
-$(eval $(call SetupJVMTIDemo,mtrace,			agent_util java_crw_demo))
-$(eval $(call SetupJVMTIDemo,waiters,			agent_util,,C++))
-$(eval $(call SetupJVMTIDemo,versionCheck,		agent_util))
+$(eval $(call SetupJVMTIDemo,minst, agent_util java_crw_demo))
+$(eval $(call SetupJVMTIDemo,mtrace, agent_util java_crw_demo))
+$(eval $(call SetupJVMTIDemo,waiters, agent_util, , C++))
+$(eval $(call SetupJVMTIDemo,versionCheck, agent_util))
 
 ##################################################################################################
 
 # The jpda demo (com/sun/tools/example) is oddly enough stored in src/share/classes.
 # At least, we do not need to compile the jpda demo, just jar/zip up the sources.
-JPDA_SOURCES:=$(call CacheFind,$(JDK_TOPDIR)/src/share/classes/com/sun/tools/example)
+JPDA_SOURCES := $(call CacheFind, $(JDK_TOPDIR)/src/share/classes/com/sun/tools/example)
 # The number of files are few enough so that we can use echo safely below to list them.
-JPDA_FILES:=$(subst $(JDK_TOPDIR)/src/share/classes/,,$(JPDA_SOURCES))
+JPDA_FILES := $(subst $(JDK_TOPDIR)/src/share/classes/,,$(JPDA_SOURCES))
 
-$(JDK_OUTPUTDIR)/demo/jpda/src.zip : $(JPDA_SOURCES)
+$(JDK_OUTPUTDIR)/demo/jpda/src.zip: $(JPDA_SOURCES)
 	$(MKDIR) -p $(@D)
 	(cd $(JDK_TOPDIR)/src/share/classes && $(ZIP) -qru $@ com -i "com/sun/tools/example/*")
 
-$(JDK_OUTPUTDIR)/demo/jpda/examples.jar : $(JPDA_SOURCES)
+$(JDK_OUTPUTDIR)/demo/jpda/examples.jar: $(JPDA_SOURCES)
 	$(MKDIR) -p $(@D)
 	$(RM) $(@D)/_the.sources
 	$(call ListPathsSafely,JPDA_FILES,\n, >> $(@D)/_the.sources)
-	$(SED) -e "s#@@RELEASE@@#$(RELEASE)#" 		\
-	       -e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" $(JDK_TOPDIR)/make/tools/manifest.mf > $(@D)/_the.manifest
+	$(SED) -e "s#@@RELEASE@@#$(RELEASE)#" \
+	    -e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" $(JDK_TOPDIR)/make/tools/manifest.mf > $(@D)/_the.manifest
 	$(ECHO) "Main-Class: " >> $(@D)/_the.manifest
-	(cd $(JDK_TOPDIR)/src/share/classes && $(JAR) cfm  $@ $(@D)/_the.manifest @$(@D)/_the.sources)
+	(cd $(JDK_TOPDIR)/src/share/classes && $(JAR) cfm $@ $(@D)/_the.manifest @$(@D)/_the.sources)
 	(cd $(JDK_TOPDIR)/src/share/classes/com/sun/tools/example && $(JAR) uf $@ README)
 
-$(JDK_OUTPUTDIR)/demo/jpda/com/sun/tools/example/README : $(JDK_TOPDIR)/src/share/classes/com/sun/tools/example/README
+$(JDK_OUTPUTDIR)/demo/jpda/com/sun/tools/example/README: $(JDK_TOPDIR)/src/share/classes/com/sun/tools/example/README
 	$(call install-file)
 	$(CHMOD) -f ug+w $@
 
 BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/jpda/src.zip $(JDK_OUTPUTDIR)/demo/jpda/examples.jar \
-		$(JDK_OUTPUTDIR)/demo/jpda/com/sun/tools/example/README
+    $(JDK_OUTPUTDIR)/demo/jpda/com/sun/tools/example/README
 
 ##################################################################################################
 
-$(JDK_OUTPUTDIR)/demo/management/index.html : $(JDK_TOPDIR)/src/share/demo/management/index.html
+$(JDK_OUTPUTDIR)/demo/management/index.html: $(JDK_TOPDIR)/src/share/demo/management/index.html
 	$(call install-file)
 	$(CHMOD) -f ug+w $@
 
-$(JDK_OUTPUTDIR)/demo/jvmti/index.html : $(JDK_TOPDIR)/src/share/demo/jvmti/index.html
+$(JDK_OUTPUTDIR)/demo/jvmti/index.html: $(JDK_TOPDIR)/src/share/demo/jvmti/index.html
 	$(call install-file)
 	$(CHMOD) -f ug+w $@
 
 BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/management/index.html \
-		$(JDK_OUTPUTDIR)/demo/jvmti/index.html
+    $(JDK_OUTPUTDIR)/demo/jvmti/index.html
 
 ##################################################################################################
 
 # The netbeans project files are copied into the demo directory.
-BUILD_DEMOS += $(patsubst $(JDK_TOPDIR)/src/share/demo/nbproject/%,\
-		$(JDK_OUTPUTDIR)/demo/nbproject/%,\
-		$(call CacheFind,$(JDK_TOPDIR)/src/share/demo/nbproject))
+BUILD_DEMOS += $(patsubst $(JDK_TOPDIR)/src/share/demo/nbproject/%, \
+    $(JDK_OUTPUTDIR)/demo/nbproject/%, \
+    $(call CacheFind, $(JDK_TOPDIR)/src/share/demo/nbproject))
 
-$(JDK_OUTPUTDIR)/demo/nbproject/% : $(JDK_TOPDIR)/src/share/demo/nbproject/%
+$(JDK_OUTPUTDIR)/demo/nbproject/%: $(JDK_TOPDIR)/src/share/demo/nbproject/%
 	$(call install-file)
 	$(CHMOD) -f ug+w $@
 
@@ -376,64 +377,64 @@
 
 ifeq ($(OPENJDK_TARGET_OS), solaris)
 
-$(JDK_OUTPUTDIR)/democlasses/jni/Poller/% : $(JDK_TOPDIR)/src/solaris/demo/jni/Poller/%
+  $(JDK_OUTPUTDIR)/democlasses/jni/Poller/%: $(JDK_TOPDIR)/src/solaris/demo/jni/Poller/%
 	$(call install-file)
 	$(CHMOD) -f ug+w $@
 
-$(JDK_OUTPUTDIR)/demo/jni/Poller/README.txt : $(JDK_TOPDIR)/src/solaris/demo/jni/Poller/README.txt
+  $(JDK_OUTPUTDIR)/demo/jni/Poller/README.txt: $(JDK_TOPDIR)/src/solaris/demo/jni/Poller/README.txt
 	$(call install-file)
 	$(CHMOD) -f ug+w $@
 
-$(JDK_OUTPUTDIR)/demo/jni/Poller/Poller.jar : \
-  $(JDK_OUTPUTDIR)/democlasses/jni/Poller/README.txt $(JDK_OUTPUTDIR)/democlasses/jni/Poller/Poller.c
+  $(JDK_OUTPUTDIR)/demo/jni/Poller/Poller.jar: \
+      $(JDK_OUTPUTDIR)/democlasses/jni/Poller/README.txt $(JDK_OUTPUTDIR)/democlasses/jni/Poller/Poller.c
 
-$(eval $(call SetupJavaCompilation,BUILD_DEMO_POLLER_JAR,\
-		SETUP:=GENERATE_USINGJDKBYTECODE, \
-		SRC:=$(JDK_TOPDIR)/src/solaris/demo/jni/Poller, \
-		BIN:=$(JDK_OUTPUTDIR)/democlasses/jni/Poller, \
-		HEADERS:=$(JDK_OUTPUTDIR)/democlasses/jni/Poller, \
-		JAR:=$(JDK_OUTPUTDIR)/demo/jni/Poller/Poller.jar, \
-		MANIFEST:=$(JDK_TOPDIR)/make/tools/manifest.mf, \
-		SRCZIP:=$(JDK_OUTPUTDIR)/demo/jni/Poller/src.zip, \
-		COPY:=README.txt Poller.c, \
-		JARMAIN:=Client))
+  $(eval $(call SetupJavaCompilation,BUILD_DEMO_POLLER_JAR, \
+      SETUP := GENERATE_USINGJDKBYTECODE, \
+      SRC := $(JDK_TOPDIR)/src/solaris/demo/jni/Poller, \
+      BIN := $(JDK_OUTPUTDIR)/democlasses/jni/Poller, \
+      HEADERS := $(JDK_OUTPUTDIR)/democlasses/jni/Poller, \
+      JAR := $(JDK_OUTPUTDIR)/demo/jni/Poller/Poller.jar, \
+      MANIFEST := $(JDK_TOPDIR)/make/tools/manifest.mf, \
+      SRCZIP := $(JDK_OUTPUTDIR)/demo/jni/Poller/src.zip, \
+      COPY := README.txt Poller.c, \
+      JARMAIN := Client))
 
 
 
-BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/jni/Poller/Poller.jar $(JDK_OUTPUTDIR)/demo/jni/Poller/src.zip \
-               $(JDK_OUTPUTDIR)/demo/jni/Poller/README.txt
+  BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/jni/Poller/Poller.jar $(JDK_OUTPUTDIR)/demo/jni/Poller/src.zip \
+      $(JDK_OUTPUTDIR)/demo/jni/Poller/README.txt
 
-$(eval $(call SetupNativeCompilation,BUILD_LIBPOLLER,\
-		SRC:=$(JDK_TOPDIR)/src/solaris/demo/jni/Poller, \
-		LANG:=C,\
-		OPTIMIZATION:=LOW,\
-		CFLAGS:=$(CFLAGS_JDKLIB) $(SHARED_LIBRARY_FLAGS) \
-                        -I$(JDK_OUTPUTDIR)/democlasses/jni/Poller, \
-		LDFLAGS:=$(LDFLAGS_JDKLIB), \
-		LDFLAGS_SUFFIX_solaris:=-lc,\
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/demoobjs/jni/Poller,\
-                OUTPUT_DIR:=$(JDK_OUTPUTDIR)/demoobjs, \
-		LIBRARY:=Poller))
+  $(eval $(call SetupNativeCompilation,BUILD_LIBPOLLER, \
+      SRC := $(JDK_TOPDIR)/src/solaris/demo/jni/Poller, \
+      LANG := C, \
+      OPTIMIZATION := LOW, \
+      CFLAGS := $(CFLAGS_JDKLIB) $(SHARED_LIBRARY_FLAGS) \
+          -I$(JDK_OUTPUTDIR)/democlasses/jni/Poller, \
+      LDFLAGS := $(LDFLAGS_JDKLIB), \
+      LDFLAGS_SUFFIX_solaris := -lc, \
+      OBJECT_DIR := $(JDK_OUTPUTDIR)/demoobjs/jni/Poller, \
+      OUTPUT_DIR := $(JDK_OUTPUTDIR)/demoobjs, \
+      LIBRARY := Poller))
 
-#
-# We can only compile native code after jar has been build (since we depend on generated .h files)
-#
-$(JDK_OUTPUTDIR)/demoobjs/jni/Poller/Poller.o : $(JDK_OUTPUTDIR)/demo/jni/Poller/Poller.jar
+  #
+  # We can only compile native code after jar has been build (since we depend on generated .h files)
+  #
+  $(JDK_OUTPUTDIR)/demoobjs/jni/Poller/Poller.o: $(JDK_OUTPUTDIR)/demo/jni/Poller/Poller.jar
 
-$(JDK_OUTPUTDIR)/demo/jni/Poller/lib/$(LIBRARY_PREFIX)Poller$(SHARED_LIBRARY_SUFFIX) : \
-  $(JDK_OUTPUTDIR)/demoobjs/$(LIBRARY_PREFIX)Poller$(SHARED_LIBRARY_SUFFIX)
+  $(JDK_OUTPUTDIR)/demo/jni/Poller/lib/$(LIBRARY_PREFIX)Poller$(SHARED_LIBRARY_SUFFIX): \
+      $(JDK_OUTPUTDIR)/demoobjs/$(LIBRARY_PREFIX)Poller$(SHARED_LIBRARY_SUFFIX)
 	$(call install-file)
 
-BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/jni/Poller/lib/$(LIBRARY_PREFIX)Poller$(SHARED_LIBRARY_SUFFIX)
+  BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/jni/Poller/lib/$(LIBRARY_PREFIX)Poller$(SHARED_LIBRARY_SUFFIX)
 
 endif
 
 ##################################################################################################
 
 ifndef OPENJDK
-    DB_DEMO_ZIPFILE := $(wildcard $(JDK_TOPDIR)/src/closed/share/db/*.zip)
+  DB_DEMO_ZIPFILE := $(wildcard $(JDK_TOPDIR)/src/closed/share/db/*.zip)
 
-    $(JDK_OUTPUTDIR)/demo/_the.db.unzipped: $(DB_DEMO_ZIPFILE)
+  $(JDK_OUTPUTDIR)/demo/_the.db.unzipped: $(DB_DEMO_ZIPFILE)
 	$(MKDIR) -p $(@D)
 	$(RM) -r $(JDK_OUTPUTDIR)/demo/db $(JDK_OUTPUTDIR)/demo/demo
 	$(CD) $(JDK_OUTPUTDIR)/demo && $(UNZIP) -q -o $<
@@ -441,14 +442,14 @@
 	$(CD) $(JDK_OUTPUTDIR)/demo && $(RM) -r db-derby-*-bin
 	$(TOUCH) $@
 
-#    Copy this after the unzip above to avoid race with directory creation and mv command.
-     $(JDK_OUTPUTDIR)/demo/db/README-JDK-DEMOS.html: \
-		$(JDK_TOPDIR)/src/closed/share/db/README-JDK-DEMOS.html \
-		| $(JDK_OUTPUTDIR)/demo/_the.db.unzipped
+  # Copy this after the unzip above to avoid race with directory creation and mv command.
+  $(JDK_OUTPUTDIR)/demo/db/README-JDK-DEMOS.html: \
+      $(JDK_TOPDIR)/src/closed/share/db/README-JDK-DEMOS.html \
+      | $(JDK_OUTPUTDIR)/demo/_the.db.unzipped
 	$(MKDIR) -p $(@D)
 	$(CAT) $< | $(SED) "s/XXXX/$(shell cat $(JDK_TOPDIR)/src/closed/share/db/COPYRIGHTYEAR)/" > $@
 
-     BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/_the.db.unzipped $(JDK_OUTPUTDIR)/demo/db/README-JDK-DEMOS.html
+  BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/_the.db.unzipped $(JDK_OUTPUTDIR)/demo/db/README-JDK-DEMOS.html
 endif
 
 ##################################################################################################
--- a/makefiles/CompileJavaClasses.gmk	Fri Oct 11 03:06:10 2013 -0700
+++ b/makefiles/CompileJavaClasses.gmk	Wed Oct 16 12:02:43 2013 -0700
@@ -38,201 +38,201 @@
 
 ##########################################################################################
 
-EXCLUDES +=	com/sun/pept \
-		com/sun/tools/example/trace\
-		com/sun/tools/example/debug/bdi\
-		com/sun/tools/example/debug/event\
-		com/sun/tools/example/debug/gui
+EXCLUDES += com/sun/pept \
+    com/sun/tools/example/trace \
+    com/sun/tools/example/debug/bdi \
+    com/sun/tools/example/debug/event \
+    com/sun/tools/example/debug/gui
 
 ifdef OPENJDK
-    EXCLUDES+=	sun/dc \
-		com/sun/jmx/snmp \
-		sun/management/snmp \
-		com/sun/script
+  EXCLUDES += sun/dc \
+      com/sun/jmx/snmp \
+      sun/management/snmp \
+      com/sun/script
 endif
 
 ifndef OPENJDK
-   # There exists two versions of this file...
-   EXFILES := $(JDK_TOPDIR)/src/share/classes/javax/crypto/JarVerifier.java
+  # There exists two versions of this file...
+  EXFILES := $(JDK_TOPDIR)/src/share/classes/javax/crypto/JarVerifier.java
 
-   ifeq ($(OPENJDK_TARGET_OS),windows)
-      # This gets built on unix platforms implicitly in the old build even though
-      # it's excluded in the closed build.
-      EXCLUDES+=sun/java2d/pisces
+  ifeq ($(OPENJDK_TARGET_OS), windows)
+    # This gets built on unix platforms implicitly in the old build even though
+    # it's excluded in the closed build.
+    EXCLUDES += sun/java2d/pisces
 
-      # AccessBridge is compiled separately below.
-      EXFILES += AccessBridge.java \
-		 AccessBridgeLoader.java \
-		 com/sun/java/accessibility/util/java/awt/ChoiceTranslator.java
-      # This seems to never be built
-      EXCLUDES += com/sun/java/accessibility/extensions
-   endif
+    # AccessBridge is compiled separately below.
+    EXFILES += AccessBridge.java \
+        AccessBridgeLoader.java \
+        com/sun/java/accessibility/util/java/awt/ChoiceTranslator.java
+    # This seems to never be built
+    EXCLUDES += com/sun/java/accessibility/extensions
+  endif
 
 endif
 
-ifneq ($(OPENJDK_TARGET_OS),solaris)
-   # Exclude Solaris nio and two security related files in src/share/classes
-   EXFILES += SolarisAclFileAttributeView.java \
-	SolarisFileStore.java \
-	SolarisFileSystem.java \
-	SolarisFileSystemProvider.java \
-	SolarisNativeDispatcher.java \
-	SolarisUserDefinedFileAttributeView.java \
-	SolarisWatchService.java \
-	SolarisAclFileAttributeView.java \
-	SolarisLoginModule.java \
-	SolarisSystem.java \
-        sun/nio/ch/DevPollArrayWrapper.java \
-        sun/nio/ch/DevPollSelectorImpl.java \
-        sun/nio/ch/DevPollSelectorProvider.java \
-	sun/nio/ch/EventPortSelectorImpl.java \
-	sun/nio/ch/EventPortSelectorProvider.java \
-	sun/nio/ch/EventPortWrapper.java \
-        sun/nio/ch/SolarisAsynchronousChannelProvider.java \
-        sun/nio/ch/SolarisEventPort.java \
-	sun/tools/attach/SolarisAttachProvider.java \
-	sun/tools/attach/SolarisVirtualMachine.java
+ifneq ($(OPENJDK_TARGET_OS), solaris)
+  # Exclude Solaris nio and two security related files in src/share/classes
+  EXFILES += SolarisAclFileAttributeView.java \
+      SolarisFileStore.java \
+      SolarisFileSystem.java \
+      SolarisFileSystemProvider.java \
+      SolarisNativeDispatcher.java \
+      SolarisUserDefinedFileAttributeView.java \
+      SolarisWatchService.java \
+      SolarisAclFileAttributeView.java \
+      SolarisLoginModule.java \
+      SolarisSystem.java \
+      sun/nio/ch/DevPollArrayWrapper.java \
+      sun/nio/ch/DevPollSelectorImpl.java \
+      sun/nio/ch/DevPollSelectorProvider.java \
+      sun/nio/ch/EventPortSelectorImpl.java \
+      sun/nio/ch/EventPortSelectorProvider.java \
+      sun/nio/ch/EventPortWrapper.java \
+      sun/nio/ch/SolarisAsynchronousChannelProvider.java \
+      sun/nio/ch/SolarisEventPort.java \
+      sun/tools/attach/SolarisAttachProvider.java \
+      sun/tools/attach/SolarisVirtualMachine.java
 
-   EXCLUDES += com/oracle/security
+  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
+ifneq ($(OPENJDK_TARGET_OS), macosx)
+  EXFILES += WrapperGenerator.java
 endif
 
-ifneq ($(OPENJDK_TARGET_OS),windows)
-    # Exclude Window security related files in src/share/classes
-    EXFILES+=NTLoginModule.java \
-             NTSystem.java
+ifneq ($(OPENJDK_TARGET_OS), windows)
+  # Exclude Window security related files in src/share/classes
+  EXFILES += NTLoginModule.java \
+      NTSystem.java
 else
-    EXFILES+=UnixLoginModule.java \
-	     UnixSystem.java
+  EXFILES += UnixLoginModule.java \
+      UnixSystem.java
 endif
 
-ifeq ($(OPENJDK_TARGET_OS),windows)
-    # Don't build GTK L&F on Windows
-    EXCLUDES+=com/sun/java/swing/plaf/gtk
+ifeq ($(OPENJDK_TARGET_OS), windows)
+  # Don't build GTK L&F on Windows
+  EXCLUDES += com/sun/java/swing/plaf/gtk
 endif
 
-ifneq ($(OPENJDK_TARGET_OS),linux)
-    EXFILES+=sun/tools/attach/LinuxAttachProvider.java \
-	     sun/tools/attach/LinuxVirtualMachine.java \
-             sun/nio/ch/EPoll.java \
-             sun/nio/ch/EPollArrayWrapper.java \
-             sun/nio/ch/EPollPort.java \
-             sun/nio/ch/EPollSelectorImpl.java \
-             sun/nio/ch/EPollSelectorProvider.java \
-             sun/nio/ch/LinuxAsynchronousChannelProvider.java \
-	     sun/nio/fs/LinuxDosFileAttributeView.java \
-	     sun/nio/fs/LinuxFileStore.java \
-	     sun/nio/fs/LinuxFileSystem.java \
-	     sun/nio/fs/LinuxFileSystemProvider.java \
-	     sun/nio/fs/MagicFileTypeDetector.java \
-	     sun/nio/fs/LinuxNativeDispatcher.java \
-	     sun/nio/fs/LinuxUserDefinedFileAttributeView.java \
-	     sun/nio/fs/LinuxWatchService.java
+ifneq ($(OPENJDK_TARGET_OS), linux)
+  EXFILES += sun/tools/attach/LinuxAttachProvider.java \
+      sun/tools/attach/LinuxVirtualMachine.java \
+      sun/nio/ch/EPoll.java \
+      sun/nio/ch/EPollArrayWrapper.java \
+      sun/nio/ch/EPollPort.java \
+      sun/nio/ch/EPollSelectorImpl.java \
+      sun/nio/ch/EPollSelectorProvider.java \
+      sun/nio/ch/LinuxAsynchronousChannelProvider.java \
+      sun/nio/fs/LinuxDosFileAttributeView.java \
+      sun/nio/fs/LinuxFileStore.java \
+      sun/nio/fs/LinuxFileSystem.java \
+      sun/nio/fs/LinuxFileSystemProvider.java \
+      sun/nio/fs/MagicFileTypeDetector.java \
+      sun/nio/fs/LinuxNativeDispatcher.java \
+      sun/nio/fs/LinuxUserDefinedFileAttributeView.java \
+      sun/nio/fs/LinuxWatchService.java
 endif
 
-ifneq ($(OPENJDK_TARGET_OS),macosx)
-    EXFILES+=sun/nio/ch/BsdAsynchronousChannelProvider.java \
-             sun/nio/ch/KQueue.java \
-             sun/nio/ch/KQueuePort.java \
-             sun/nio/fs/BsdFileStore.java \
-	     sun/nio/fs/BsdFileSystem.java \
-             sun/nio/fs/BsdFileSystemProvider.java \
-             sun/nio/fs/BsdNativeDispatcher.java \
-             sun/nio/fs/MacOSXFileSystemProvider.java \
-             sun/nio/fs/MacOSXFileSystem.java \
-             sun/nio/fs/MacOSXNativeDispatcher.java \
-             sun/tools/attach/BsdAttachProvider.java \
-             sun/tools/attach/BsdVirtualMachine.java
+ifneq ($(OPENJDK_TARGET_OS), macosx)
+  EXFILES += sun/nio/ch/BsdAsynchronousChannelProvider.java \
+      sun/nio/ch/KQueue.java \
+      sun/nio/ch/KQueuePort.java \
+      sun/nio/fs/BsdFileStore.java \
+      sun/nio/fs/BsdFileSystem.java \
+      sun/nio/fs/BsdFileSystemProvider.java \
+      sun/nio/fs/BsdNativeDispatcher.java \
+      sun/nio/fs/MacOSXFileSystemProvider.java \
+      sun/nio/fs/MacOSXFileSystem.java \
+      sun/nio/fs/MacOSXNativeDispatcher.java \
+      sun/tools/attach/BsdAttachProvider.java \
+      sun/tools/attach/BsdVirtualMachine.java
 endif
 
 # Exclude BreakIterator classes that are just used in compile process to generate
 # data files and shouldn't go in the product
-EXFILES+=sun/text/resources/BreakIteratorRules.java \
-	 sun/text/resources/BreakIteratorRules_th.java
+EXFILES += sun/text/resources/BreakIteratorRules.java \
+    sun/text/resources/BreakIteratorRules_th.java
 
 # TODO: Add BUILD_HEADLESS_ONLY to configure?
 ifdef BUILD_HEADLESS_ONLY
-    EXCLUDES+=sun/applet
+  EXCLUDES += sun/applet
 endif
 
 ifdef OPENJDK
-    EXCLUDES+=sun/java2d/cmm/kcms
+  EXCLUDES += sun/java2d/cmm/kcms
 endif
 
 # Used on windows and macosx
-ifeq (,$(filter $(OPENJDK_TARGET_OS), windows macosx))
-    EXFILES+=sun/awt/AWTCharset.java
+ifeq (, $(filter $(OPENJDK_TARGET_OS), windows macosx))
+  EXFILES += sun/awt/AWTCharset.java
 endif
 
 ifneq ($(OPENJDK_TARGET_OS), macosx)
-    EXFILES+=sun/awt/X11/ScreenFormat.java \
-             sun/awt/X11/XArc.java \
-             sun/awt/X11/XChar2b.java \
-             sun/awt/X11/XCharStruct.java \
-             sun/awt/X11/XClassHint.java \
-             sun/awt/X11/XComposeStatus.java \
-             sun/awt/X11/XExtCodes.java \
-             sun/awt/X11/XFontProp.java \
-             sun/awt/X11/XFontSetExtents.java \
-             sun/awt/X11/XFontStruct.java \
-             sun/awt/X11/XGCValues.java \
-             sun/awt/X11/XHostAddress.java \
-             sun/awt/X11/XIMCallback.java \
-             sun/awt/X11/XIMHotKeyTrigger.java \
-             sun/awt/X11/XIMHotKeyTriggers.java \
-             sun/awt/X11/XIMPreeditCaretCallbackStruct.java \
-             sun/awt/X11/XIMPreeditDrawCallbackStruct.java \
-             sun/awt/X11/XIMPreeditStateNotifyCallbackStruct.java \
-             sun/awt/X11/XIMStatusDrawCallbackStruct.java \
-             sun/awt/X11/XIMStringConversionCallbackStruct.java \
-             sun/awt/X11/XIMStringConversionText.java \
-             sun/awt/X11/XIMStyles.java \
-             sun/awt/X11/XIMText.java \
-             sun/awt/X11/XIMValuesList.java \
-             sun/awt/X11/XImage.java \
-             sun/awt/X11/XKeyboardControl.java \
-             sun/awt/X11/XKeyboardState.java \
-             sun/awt/X11/XOMCharSetList.java \
-             sun/awt/X11/XOMFontInfo.java \
-             sun/awt/X11/XOMOrientation.java \
-             sun/awt/X11/XPoint.java \
-             sun/awt/X11/XRectangle.java \
-             sun/awt/X11/XSegment.java \
-             sun/awt/X11/XStandardColormap.java \
-             sun/awt/X11/XTextItem.java \
-             sun/awt/X11/XTextItem16.java \
-             sun/awt/X11/XTextProperty.java \
-             sun/awt/X11/XTimeCoord.java \
-             sun/awt/X11/XWindowChanges.java \
-             sun/awt/X11/XdbeSwapInfo.java \
-             sun/awt/X11/XmbTextItem.java \
-             sun/awt/X11/XwcTextItem.java
+  EXFILES += sun/awt/X11/ScreenFormat.java \
+      sun/awt/X11/XArc.java \
+      sun/awt/X11/XChar2b.java \
+      sun/awt/X11/XCharStruct.java \
+      sun/awt/X11/XClassHint.java \
+      sun/awt/X11/XComposeStatus.java \
+      sun/awt/X11/XExtCodes.java \
+      sun/awt/X11/XFontProp.java \
+      sun/awt/X11/XFontSetExtents.java \
+      sun/awt/X11/XFontStruct.java \
+      sun/awt/X11/XGCValues.java \
+      sun/awt/X11/XHostAddress.java \
+      sun/awt/X11/XIMCallback.java \
+      sun/awt/X11/XIMHotKeyTrigger.java \
+      sun/awt/X11/XIMHotKeyTriggers.java \
+      sun/awt/X11/XIMPreeditCaretCallbackStruct.java \
+      sun/awt/X11/XIMPreeditDrawCallbackStruct.java \
+      sun/awt/X11/XIMPreeditStateNotifyCallbackStruct.java \
+      sun/awt/X11/XIMStatusDrawCallbackStruct.java \
+      sun/awt/X11/XIMStringConversionCallbackStruct.java \
+      sun/awt/X11/XIMStringConversionText.java \
+      sun/awt/X11/XIMStyles.java \
+      sun/awt/X11/XIMText.java \
+      sun/awt/X11/XIMValuesList.java \
+      sun/awt/X11/XImage.java \
+      sun/awt/X11/XKeyboardControl.java \
+      sun/awt/X11/XKeyboardState.java \
+      sun/awt/X11/XOMCharSetList.java \
+      sun/awt/X11/XOMFontInfo.java \
+      sun/awt/X11/XOMOrientation.java \
+      sun/awt/X11/XPoint.java \
+      sun/awt/X11/XRectangle.java \
+      sun/awt/X11/XSegment.java \
+      sun/awt/X11/XStandardColormap.java \
+      sun/awt/X11/XTextItem.java \
+      sun/awt/X11/XTextItem16.java \
+      sun/awt/X11/XTextProperty.java \
+      sun/awt/X11/XTimeCoord.java \
+      sun/awt/X11/XWindowChanges.java \
+      sun/awt/X11/XdbeSwapInfo.java \
+      sun/awt/X11/XmbTextItem.java \
+      sun/awt/X11/XwcTextItem.java
 endif
 
 # Exclude another implicitly not included file.
-EXFILES+=sun/util/locale/AsciiUtil.java
+EXFILES += sun/util/locale/AsciiUtil.java
 
-ifeq (,$(filter $(OPENJDK_TARGET_OS), solaris macosx))
-#
-# only solaris and macosx
-#
-    EXFILES+=sun/nio/fs/PollingWatchService.java
+ifeq (, $(filter $(OPENJDK_TARGET_OS), solaris macosx))
+  #
+  # only solaris and macosx
+  #
+  EXFILES += sun/nio/fs/PollingWatchService.java
 endif
 
 # TODO: Fix when converting NIO
 # Exclude *-linux-arm.java and *-linux-ppc.java from closed.
-EXFILES+=-linux-arm.java \
-	 -linux-ppc.java
+EXFILES += -linux-arm.java \
+    -linux-ppc.java
 
 ifeq ($(OPENJDK_TARGET_OS), windows)
-    EXFILES+=sun/nio/ch/AbstractPollSelectorImpl.java \
-        sun/nio/ch/PollSelectorProvider.java \
-	sun/nio/ch/SimpleAsynchronousFileChannelImpl.java
+  EXFILES += sun/nio/ch/AbstractPollSelectorImpl.java \
+      sun/nio/ch/PollSelectorProvider.java \
+      sun/nio/ch/SimpleAsynchronousFileChannelImpl.java
 endif
 
 # These files do not appear in the build result of the old build. This
@@ -242,40 +242,40 @@
 # be picked up by implicit compilation. On a rebuild, they are picked up
 # and compiled. Exclude them here to produce the same rt.jar as the old
 # build does when building just once.
-EXFILES+=javax/swing/plaf/nimbus/InternalFrameTitlePanePainter.java \
-	 javax/swing/plaf/nimbus/OptionPaneMessageAreaPainter.java \
-	 javax/swing/plaf/nimbus/ScrollBarPainter.java \
-	 javax/swing/plaf/nimbus/SliderPainter.java \
-	 javax/swing/plaf/nimbus/SpinnerPainter.java \
-	 javax/swing/plaf/nimbus/SplitPanePainter.java \
-	 javax/swing/plaf/nimbus/TabbedPanePainter.java
+EXFILES += javax/swing/plaf/nimbus/InternalFrameTitlePanePainter.java \
+    javax/swing/plaf/nimbus/OptionPaneMessageAreaPainter.java \
+    javax/swing/plaf/nimbus/ScrollBarPainter.java \
+    javax/swing/plaf/nimbus/SliderPainter.java \
+    javax/swing/plaf/nimbus/SpinnerPainter.java \
+    javax/swing/plaf/nimbus/SplitPanePainter.java \
+    javax/swing/plaf/nimbus/TabbedPanePainter.java
 
 # Acquire a list of files that should be copied straight over to the classes.
 include CopyIntoClasses.gmk
 # Now we have COPY_PATTERNS, COPY_FILES and COPY_EXTRA
 
 ifndef OPENJDK
-    CLOSED_SRC_DIRS:=$(JDK_TOPDIR)/src/closed/share/classes \
-		     $(JDK_TOPDIR)/src/closed/$(OPENJDK_TARGET_OS_API_DIR)/classes
+  CLOSED_SRC_DIRS := $(JDK_TOPDIR)/src/closed/share/classes \
+      $(JDK_TOPDIR)/src/closed/$(OPENJDK_TARGET_OS_API_DIR)/classes
 endif
 
 MACOSX_SRC_DIRS :=
-ifeq ($(OPENJDK_TARGET_OS),macosx)
-     MACOSX_SRC_DIRS += $(JDK_TOPDIR)/src/macosx/classes
+ifeq ($(OPENJDK_TARGET_OS), macosx)
+  MACOSX_SRC_DIRS += $(JDK_TOPDIR)/src/macosx/classes
 
-     # this files are duplicated in MACOSX_SRC_DIRS
-     EXFILES+= $(JDK_TOPDIR)/src/solaris/classes/sun/nio/ch/DefaultSelectorProvider.java \
-               $(JDK_TOPDIR)/src/solaris/classes/sun/java2d/BackBufferCapsProvider.java \
-               $(JDK_TOPDIR)/src/solaris/classes/java/net/DefaultInterface.java \
-               $(JDK_TOPDIR)/src/solaris/classes/java/lang/ClassLoaderHelper.java \
-               $(JDK_TOPDIR)/src/solaris/classes/sun/util/locale/provider/HostLocaleProviderAdapterImpl.java \
-               $(JDK_TOPDIR)/src/solaris/classes/sun/nio/fs/GnomeFileTypeDetector.java
+  # this files are duplicated in MACOSX_SRC_DIRS
+  EXFILES += $(JDK_TOPDIR)/src/solaris/classes/sun/nio/ch/DefaultSelectorProvider.java \
+      $(JDK_TOPDIR)/src/solaris/classes/sun/java2d/BackBufferCapsProvider.java \
+      $(JDK_TOPDIR)/src/solaris/classes/java/net/DefaultInterface.java \
+      $(JDK_TOPDIR)/src/solaris/classes/java/lang/ClassLoaderHelper.java \
+      $(JDK_TOPDIR)/src/solaris/classes/sun/util/locale/provider/HostLocaleProviderAdapterImpl.java \
+      $(JDK_TOPDIR)/src/solaris/classes/sun/nio/fs/GnomeFileTypeDetector.java
 
-     # JObjC.jar contains 1.5 byte-code...so skip it here :-(
-     # MACOSX_SRC_DIRS += $(JDK_TOPDIR)/src/macosx/native/jobjc/src
-     # EXCLUDES+= tests/java/com/apple/jobjc
+  # JObjC.jar contains 1.5 byte-code...so skip it here :-(
+  # MACOSX_SRC_DIRS += $(JDK_TOPDIR)/src/macosx/native/jobjc/src
+  # EXCLUDES += tests/java/com/apple/jobjc
 
-     EXCLUDES+= com/apple/jobjc
+  EXCLUDES += com/apple/jobjc
 endif
 
 # The exception handling of swing beaninfo
@@ -288,23 +288,23 @@
 # JDK_FILTER at the make command line, only a subset of the JDK java files will
 # be recompiled. If multiple paths are separated by comma, convert that into a
 # space separated list.
-JDK_USER_DEFINED_FILTER:=$(strip $(subst $(COMMA),$(SPACE),$(JDK_FILTER)))
+JDK_USER_DEFINED_FILTER := $(strip $(subst $(COMMA),$(SPACE), $(JDK_FILTER)))
 
-$(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),\
-		EXCLUDE_FILES:=$(EXFILES),\
-		BIN:=$(JDK_OUTPUTDIR)/classes,\
-		COPY:=$(COPY_PATTERNS),\
-		COPY_FILES:=$(COPY_FILES),\
-		HEADERS:=$(JDK_OUTPUTDIR)/gensrc_headers))
+$(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), \
+    EXCLUDE_FILES := $(EXFILES), \
+    BIN := $(JDK_OUTPUTDIR)/classes, \
+    COPY := $(COPY_PATTERNS), \
+    COPY_FILES := $(COPY_FILES), \
+    HEADERS := $(JDK_OUTPUTDIR)/gensrc_headers))
 
 ##########################################################################################
 
@@ -314,85 +314,85 @@
 
 ##########################################################################################
 
-ifeq ($(OPENJDK_TARGET_OS),macosx)
-#
-# JObjC.jar is compiled with BOOT_JAVAC which (may) not support the "-h" flag.
-#   so we first compile classes with BOOT_JAVAC and then with JDK_JAVAC :-(
-#
-$(eval $(call SetupJavaCompiler,GENERATE_15BYTECODE,\
-     JAVAC:=$(JAVAC),\
-     FLAGS:=-source 1.5 -target 1.5 -g -bootclasspath $(BOOT_RTJAR) -cp $(JDK_OUTPUTDIR)/../langtools/dist/lib/classes.jar $(DISABLE_WARNINGS),\
-     SERVER_DIR:=$(SJAVAC_SERVER_DIR),\
-     SERVER_JVM:=$(SJAVAC_SERVER_JAVA)))
+ifeq ($(OPENJDK_TARGET_OS), macosx)
+  #
+  # JObjC.jar is compiled with BOOT_JAVAC which (may) not support the "-h" flag.
+  # so we first compile classes with BOOT_JAVAC and then with JDK_JAVAC :-(
+  #
+  $(eval $(call SetupJavaCompiler,GENERATE_15BYTECODE, \
+      JAVAC := $(JAVAC), \
+      FLAGS := -source 1.5 -target 1.5 -g -bootclasspath $(BOOT_RTJAR) -cp $(JDK_OUTPUTDIR)/../langtools/dist/lib/classes.jar $(DISABLE_WARNINGS), \
+      SERVER_DIR := $(SJAVAC_SERVER_DIR), \
+      SERVER_JVM := $(SJAVAC_SERVER_JAVA)))
 
-$(eval $(call SetupJavaCompilation,BUILD_JOBJC,\
-		SETUP:=GENERATE_15BYTECODE,\
-		DISABLE_SJAVAC:=true,\
-		SRC:=$(JDK_TOPDIR)/src/macosx/native/jobjc/src/core/java \
-		     $(JDK_TOPDIR)/src/macosx/native/jobjc/src/runtime-additions/java \
-		     $(JDK_OUTPUTDIR)/gensrc_jobjc/src, \
-		INCLUDES := com/apple/jobjc,\
-                EXCLUDES := tests/java/com/apple/jobjc,\
-		BIN:=$(JDK_OUTPUTDIR)/jobjc_classes,\
-		JAR:=$(JDK_OUTPUTDIR)/lib/JObjC.jar, \
-		JARINDEX := true))
+  $(eval $(call SetupJavaCompilation,BUILD_JOBJC, \
+      SETUP := GENERATE_15BYTECODE, \
+      DISABLE_SJAVAC := true, \
+      SRC := $(JDK_TOPDIR)/src/macosx/native/jobjc/src/core/java \
+          $(JDK_TOPDIR)/src/macosx/native/jobjc/src/runtime-additions/java \
+          $(JDK_OUTPUTDIR)/gensrc_jobjc/src, \
+      INCLUDES := com/apple/jobjc, \
+      EXCLUDES := tests/java/com/apple/jobjc, \
+      BIN := $(JDK_OUTPUTDIR)/jobjc_classes, \
+      JAR := $(JDK_OUTPUTDIR)/lib/JObjC.jar, \
+      JARINDEX := true))
 
-$(BUILD_JOBJC) : $(BUILD_JDK)
+  $(BUILD_JOBJC): $(BUILD_JDK)
 
-$(eval $(call SetupJavaCompilation,BUILD_JOBJC_HEADERS,\
-		SETUP:=GENERATE_JDKBYTECODE,\
-		SRC:=$(JDK_TOPDIR)/src/macosx/native/jobjc/src/core/java \
-		     $(JDK_TOPDIR)/src/macosx/native/jobjc/src/runtime-additions/java \
-		     $(JDK_OUTPUTDIR)/gensrc_jobjc/src, \
-		INCLUDES := com/apple/jobjc,\
-                EXCLUDES := tests/java/com/apple/jobjc,\
-		BIN:=$(JDK_OUTPUTDIR)/jobjc_classes_headers,\
-		HEADERS:=$(JDK_OUTPUTDIR)/gensrc_headers_jobjc))
+  $(eval $(call SetupJavaCompilation,BUILD_JOBJC_HEADERS, \
+      SETUP := GENERATE_JDKBYTECODE, \
+      SRC := $(JDK_TOPDIR)/src/macosx/native/jobjc/src/core/java \
+          $(JDK_TOPDIR)/src/macosx/native/jobjc/src/runtime-additions/java \
+          $(JDK_OUTPUTDIR)/gensrc_jobjc/src, \
+      INCLUDES := com/apple/jobjc, \
+      EXCLUDES := tests/java/com/apple/jobjc, \
+      BIN := $(JDK_OUTPUTDIR)/jobjc_classes_headers, \
+      HEADERS := $(JDK_OUTPUTDIR)/gensrc_headers_jobjc))
 
-$(BUILD_JOBJC_HEADERS) : $(BUILD_JDK)
+$(BUILD_JOBJC_HEADERS): $(BUILD_JDK)
 
 endif
 
 ##########################################################################################
 
 ifndef OPENJDK
-ifeq ($(OPENJDK_TARGET_OS), windows)
-ifeq ($(OPENJDK_TARGET_CPU_BITS), 32)
-    $(eval $(call SetupJavaCompilation,BUILD_ACCESSBRIDGE_32,\
-		SETUP:=GENERATE_JDKBYTECODE,\
-		JAVAC_FLAGS:=-cp $(JDK_OUTPUTDIR)/classes,\
-		SRC:=$(JDK_OUTPUTDIR)/gensrc_ab/32bit,\
-		BIN:=$(JDK_OUTPUTDIR)/classes_ab/32bit))
+  ifeq ($(OPENJDK_TARGET_OS), windows)
+    ifeq ($(OPENJDK_TARGET_CPU_BITS), 32)
+      $(eval $(call SetupJavaCompilation,BUILD_ACCESSBRIDGE_32, \
+          SETUP := GENERATE_JDKBYTECODE, \
+          JAVAC_FLAGS := -cp $(JDK_OUTPUTDIR)/classes, \
+          SRC := $(JDK_OUTPUTDIR)/gensrc_ab/32bit, \
+          BIN := $(JDK_OUTPUTDIR)/classes_ab/32bit))
 
-    $(BUILD_ACCESSBRIDGE_32): $(BUILD_JDK)
+      $(BUILD_ACCESSBRIDGE_32): $(BUILD_JDK)
 
-    $(eval $(call SetupJavaCompilation,BUILD_ACCESSBRIDGE_LEGACY,\
-		SETUP:=GENERATE_JDKBYTECODE,\
-		JAVAC_FLAGS:=-cp $(JDK_OUTPUTDIR)/classes,\
-		SRC:=$(JDK_OUTPUTDIR)/gensrc_ab/legacy,\
-		BIN:=$(JDK_OUTPUTDIR)/classes_ab/legacy))
+      $(eval $(call SetupJavaCompilation,BUILD_ACCESSBRIDGE_LEGACY, \
+          SETUP := GENERATE_JDKBYTECODE, \
+          JAVAC_FLAGS := -cp $(JDK_OUTPUTDIR)/classes, \
+          SRC := $(JDK_OUTPUTDIR)/gensrc_ab/legacy, \
+          BIN := $(JDK_OUTPUTDIR)/classes_ab/legacy))
 
-    $(BUILD_ACCESSBRIDGE_LEGACY): $(BUILD_JDK)
+      $(BUILD_ACCESSBRIDGE_LEGACY): $(BUILD_JDK)
 
-else
+    else
 
-    $(eval $(call SetupJavaCompilation,BUILD_ACCESSBRIDGE_64,\
-		SETUP:=GENERATE_JDKBYTECODE,\
-		JAVAC_FLAGS:=-cp $(JDK_OUTPUTDIR)/classes,\
-		SRC:=$(JDK_OUTPUTDIR)/gensrc_ab/64bit,\
-		BIN:=$(JDK_OUTPUTDIR)/classes_ab/64bit))
+      $(eval $(call SetupJavaCompilation,BUILD_ACCESSBRIDGE_64, \
+          SETUP := GENERATE_JDKBYTECODE, \
+          JAVAC_FLAGS := -cp $(JDK_OUTPUTDIR)/classes, \
+          SRC := $(JDK_OUTPUTDIR)/gensrc_ab/64bit, \
+          BIN := $(JDK_OUTPUTDIR)/classes_ab/64bit))
 
-    $(BUILD_ACCESSBRIDGE_64): $(BUILD_JDK)
+      $(BUILD_ACCESSBRIDGE_64): $(BUILD_JDK)
 
-endif
-endif
+    endif
+  endif
 endif
 
 ##########################################################################################
 
 all: $(BUILD_JDK) $(BUILD_JOBJC) $(BUILD_JOBJC_HEADERS) $(COPY_EXTRA) \
-	$(JDK_OUTPUTDIR)/classes/META-INF/services/com.sun.tools.xjc.Plugin \
-	$(BUILD_ACCESSBRIDGE_32) $(BUILD_ACCESSBRIDGE_64) \
-	$(BUILD_ACCESSBRIDGE_LEGACY)
+    $(JDK_OUTPUTDIR)/classes/META-INF/services/com.sun.tools.xjc.Plugin \
+    $(BUILD_ACCESSBRIDGE_32) $(BUILD_ACCESSBRIDGE_64) \
+    $(BUILD_ACCESSBRIDGE_LEGACY)
 
 .PHONY: all
--- a/makefiles/CompileLaunchers.gmk	Fri Oct 11 03:06:10 2013 -0700
+++ b/makefiles/CompileLaunchers.gmk	Wed Oct 16 12:02:43 2013 -0700
@@ -33,27 +33,27 @@
 include Setup.gmk
 
 # Prepare the find cache. Only used on windows.
-$(eval $(call FillCacheFind,$(JDK_TOPDIR)/src/share/bin))
+$(eval $(call FillCacheFind, $(JDK_TOPDIR)/src/share/bin))
 
 # Build tools
 include Tools.gmk
 
-BUILD_LAUNCHERS=
+BUILD_LAUNCHERS =
 
 # When building a legacy overlay image (on solaris 64 bit), the launchers
 # need to be built with a different rpath and a different output dir.
-ifeq ($(OVERLAY_IMAGES),true)
-    ORIGIN_ROOT:=/../..
-    OUTPUT_SUBDIR:=$(OPENJDK_TARGET_CPU_ISADIR)
+ifeq ($(OVERLAY_IMAGES), true)
+  ORIGIN_ROOT := /../..
+  OUTPUT_SUBDIR := $(OPENJDK_TARGET_CPU_ISADIR)
 else
-    ORIGIN_ROOT:=/..
+  ORIGIN_ROOT := /..
 endif
 
 ifeq ($(OPENJDK_TARGET_OS), macosx)
-    ORIGIN_ARG:=$(call SET_EXECUTABLE_ORIGIN)
+  ORIGIN_ARG := $(call SET_EXECUTABLE_ORIGIN)
 else
-    ORIGIN_ARG:=$(call SET_EXECUTABLE_ORIGIN,$(ORIGIN_ROOT)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/jli) \
-                $(call SET_EXECUTABLE_ORIGIN,$(ORIGIN_ROOT)/jre/lib$(OPENJDK_TARGET_CPU_LIBDIR)/jli)
+  ORIGIN_ARG := $(call SET_EXECUTABLE_ORIGIN,$(ORIGIN_ROOT)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/jli) \
+      $(call SET_EXECUTABLE_ORIGIN,$(ORIGIN_ROOT)/jre/lib$(OPENJDK_TARGET_CPU_LIBDIR)/jli)
 endif
 
 #
@@ -61,158 +61,158 @@
 # System.loadLibrary("jawt") first. This was the behaviour described in the
 # devloper documentation of JAWT and what worked with OpenJDK6.
 #
-ifneq ($(findstring $(OPENJDK_TARGET_OS), linux solaris),)
-    ORIGIN_ARG+=$(call SET_EXECUTABLE_ORIGIN,$(ORIGIN_ROOT)/lib$(OPENJDK_TARGET_CPU_LIBDIR)) \
-                $(call SET_EXECUTABLE_ORIGIN,$(ORIGIN_ROOT)/jre/lib$(OPENJDK_TARGET_CPU_LIBDIR))
+ifneq ($(findstring $(OPENJDK_TARGET_OS), linux solaris), )
+  ORIGIN_ARG += $(call SET_EXECUTABLE_ORIGIN,$(ORIGIN_ROOT)/lib$(OPENJDK_TARGET_CPU_LIBDIR)) \
+      $(call SET_EXECUTABLE_ORIGIN,$(ORIGIN_ROOT)/jre/lib$(OPENJDK_TARGET_CPU_LIBDIR))
 endif
 
 define SetupLauncher
-    # TODO: Fix mapfile on solaris. Won't work with ld as linker.
-    # Parameter 1 is the name of the launcher (java,javac,jar...)
-    # Parameter 2 is extra CFLAGS
-    # Parameter 3 is extra LDFLAGS
-    # Parameter 4 is extra LDFLAGS_SUFFIX_posix
-    # Parameter 5 is extra LDFLAGS_SUFFIX_windows
-    # Parameter 6 is optional Windows JLI library (full path)
-    # Parameter 7 is optional Windows resource (RC) flags
-    # Parameter 8 is optional Windows version resource file (.rc)
-    # Parameter 9  is different output dir
-    # Parameter 10 if set, link statically with c runtime on windows.
-    # Parameter 11 if set, override plist file on macosx.
+  # TODO: Fix mapfile on solaris. Won't work with ld as linker.
+  # Parameter 1 is the name of the launcher (java, javac, jar...)
+  # Parameter 2 is extra CFLAGS
+  # Parameter 3 is extra LDFLAGS
+  # Parameter 4 is extra LDFLAGS_SUFFIX_posix
+  # Parameter 5 is extra LDFLAGS_SUFFIX_windows
+  # Parameter 6 is optional Windows JLI library (full path)
+  # Parameter 7 is optional Windows resource (RC) flags
+  # Parameter 8 is optional Windows version resource file (.rc)
+  # Parameter 9 is different output dir
+  # Parameter 10 if set, link statically with c runtime on windows.
+  # Parameter 11 if set, override plist file on macosx.
 
-    $1_WINDOWS_JLI_LIB:=$(JDK_OUTPUTDIR)/objs/libjli/jli.lib
-    ifneq ($6,)
-        $1_WINDOWS_JLI_LIB:=$6
-    endif
-    $1_VERSION_INFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc
-    ifneq ($8,)
-        $1_VERSION_INFO_RESOURCE:=$8
+  $1_WINDOWS_JLI_LIB := $(JDK_OUTPUTDIR)/objs/libjli/jli.lib
+  ifneq ($6, )
+    $1_WINDOWS_JLI_LIB := $6
+  endif
+  $1_VERSION_INFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc
+  ifneq ($8, )
+    $1_VERSION_INFO_RESOURCE := $8
+  endif
+
+  $1_LDFLAGS := $3
+  $1_LDFLAGS_SUFFIX :=
+  ifeq ($(OPENJDK_TARGET_OS), macosx)
+    $1_PLIST_FILE := Info-cmdline.plist
+    ifneq ($(11), )
+      $1_PLIST_FILE := $(11)
+      ifneq ($$(findstring privileged, $$($1_PLIST_FILE)), )
+        $1_CODESIGN := true
+      endif
     endif
 
-    $1_LDFLAGS := $3
-    $1_LDFLAGS_SUFFIX :=
-    ifeq ($(OPENJDK_TARGET_OS), macosx)
-        $1_PLIST_FILE:=Info-cmdline.plist
-        ifneq ($(11),)
-            $1_PLIST_FILE:=$(11)
-            ifneq ($$(findstring privileged,$$($1_PLIST_FILE)),)
-                $1_CODESIGN:=true
-            endif
-        endif
+    $1_LDFLAGS += -Wl,-all_load $(JDK_OUTPUTDIR)/objs/libjli_static.a \
+        -framework Cocoa -framework Security -framework ApplicationServices \
+        -sectcreate __TEXT __info_plist $(JDK_TOPDIR)/src/macosx/lib/$$($1_PLIST_FILE)
+        $1_LDFLAGS_SUFFIX += -pthread
+  endif
 
-        $1_LDFLAGS += -Wl,-all_load $(JDK_OUTPUTDIR)/objs/libjli_static.a \
-                      -framework Cocoa -framework Security -framework ApplicationServices \
-                      -sectcreate __TEXT __info_plist $(JDK_TOPDIR)/src/macosx/lib/$$($1_PLIST_FILE)
-        $1_LDFLAGS_SUFFIX += -pthread
-    endif
+  ifeq ($(USE_EXTERNAL_LIBZ), true)
+    $1_LDFLAGS_SUFFIX += -lz
+  endif
 
-    ifeq ($(USE_EXTERNAL_LIBZ), true)
-        $1_LDFLAGS_SUFFIX += -lz
-    endif
+  $1_OUTPUT_DIR_ARG := $9
+  ifeq (, $$($1_OUTPUT_DIR_ARG))
+    $1_OUTPUT_DIR_ARG := $(JDK_OUTPUTDIR)/bin
+  endif
 
-    $1_OUTPUT_DIR_ARG:=$9
-    ifeq (,$$($1_OUTPUT_DIR_ARG))
-        $1_OUTPUT_DIR_ARG:=$(JDK_OUTPUTDIR)/bin
-    endif
+  # TODO: maybe it's better to move this if-statement out of this function
+  ifeq ($1, java)
+    $1_OPTIMIZATION_ARG := HIGH
+    $1_LDFLAGS_solaris := -R$(OPENWIN_HOME)/lib$(OPENJDK_TARGET_CPU_ISADIR)
+  else
+  $1_OPTIMIZATION_ARG := LOW
+  endif
 
-    # TODO: maybe it's better to move this if-statement out of this function
-    ifeq ($1,java)
-        $1_OPTIMIZATION_ARG:=HIGH
-	$1_LDFLAGS_solaris:=-R$(OPENWIN_HOME)/lib$(OPENJDK_TARGET_CPU_ISADIR)
-    else
-        $1_OPTIMIZATION_ARG:=LOW
-    endif
+  $1_CFLAGS := $(CFLAGS_JDKEXE)
+  ifeq ($(10), true)
+    $1_CFLAGS := $(filter-out -MD, $(CFLAGS_JDKEXE))
+  endif
 
-    $1_CFLAGS:=$(CFLAGS_JDKEXE)
-    ifeq ($(10),true)
-        $1_CFLAGS:=$(filter-out -MD,$(CFLAGS_JDKEXE))
-    endif
+  ifneq ($(wildcard $(JDK_TOPDIR)/makefiles/mapfiles/launchers/mapfile-$(OPENJDK_TARGET_CPU)), )
+    $1_MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/launchers/mapfile-$(OPENJDK_TARGET_CPU)
+  else
+    $1_MAPFILE :=
+  endif
 
-    ifneq ($(wildcard $(JDK_TOPDIR)/makefiles/mapfiles/launchers/mapfile-$(OPENJDK_TARGET_CPU)),)
-        $1_MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/launchers/mapfile-$(OPENJDK_TARGET_CPU)
-    else
-        $1_MAPFILE:=
-    endif
+  $(call SetupNativeCompilation,BUILD_LAUNCHER_$1, \
+      SRC := $(JDK_TOPDIR)/src/share/bin, \
+      INCLUDE_FILES := main.c, \
+      LANG := C, \
+      OPTIMIZATION := $$($1_OPTIMIZATION_ARG), \
+      CFLAGS := $$($1_CFLAGS) \
+          -I$(JDK_TOPDIR)/src/share/bin \
+          -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/bin \
+          -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS)/bin \
+          -DFULL_VERSION='"$(FULL_VERSION)"' \
+          -DJDK_MAJOR_VERSION='"$(JDK_MAJOR_VERSION)"' \
+          -DJDK_MINOR_VERSION='"$(JDK_MINOR_VERSION)"' \
+          -DLIBARCHNAME='"$(OPENJDK_TARGET_CPU_LEGACY)"' \
+          -DLAUNCHER_NAME='"$(LAUNCHER_NAME)"' \
+          -DPROGNAME='"$1"' $(DPACKAGEPATH) \
+          $2, \
+      CFLAGS_linux := -fPIC, \
+      CFLAGS_solaris := -KPIC -DHAVE_GETHRTIME, \
+      LDFLAGS := $(LDFLAGS_JDKEXE) \
+          $(ORIGIN_ARG) \
+          $$($1_LDFLAGS), \
+      LDFLAGS_macosx := $(call SET_SHARED_LIBRARY_NAME,$1), \
+      LDFLAGS_linux := -lpthread \
+          $(call SET_SHARED_LIBRARY_NAME,$(LIBRARY_PREFIX)$(SHARED_LIBRARY_SUFFIX)), \
+      LDFLAGS_solaris := $$($1_LDFLAGS_solaris) \
+          $(call SET_SHARED_LIBRARY_NAME,$(LIBRARY_PREFIX)$(SHARED_LIBRARY_SUFFIX)), \
+      MAPFILE := $$($1_MAPFILE), \
+      LDFLAGS_SUFFIX := $(LDFLAGS_JDKEXE_SUFFIX) $$($1_LDFLAGS_SUFFIX), \
+      LDFLAGS_SUFFIX_posix := $4, \
+      LDFLAGS_SUFFIX_windows := $$($1_WINDOWS_JLI_LIB) \
+          $(JDK_OUTPUTDIR)/objs/libjava/java.lib advapi32.lib $5, \
+      LDFLAGS_SUFFIX_linux := -L$(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/jli -ljli $(LIBDL) -lc, \
+      LDFLAGS_SUFFIX_solaris := -L$(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/jli -ljli -lthread $(LIBDL) -lc, \
+      OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/$1_objs$(OUTPUT_SUBDIR), \
+      OUTPUT_DIR := $$($1_OUTPUT_DIR_ARG)$(OUTPUT_SUBDIR), \
+      PROGRAM := $1, \
+      DEBUG_SYMBOLS := true, \
+      VERSIONINFO_RESOURCE := $$($1_VERSION_INFO_RESOURCE), \
+      RC_FLAGS := $(RC_FLAGS) \
+          -D "JDK_FNAME=$1$(EXE_SUFFIX)" \
+          -D "JDK_INTERNAL_NAME=$1" \
+          -D "JDK_FTYPE=0x1L" \
+          $7, \
+      MANIFEST := $(JDK_TOPDIR)/src/windows/resource/java.manifest, \
+      CODESIGN := $$($1_CODESIGN))
 
-    $(call SetupNativeCompilation,BUILD_LAUNCHER_$1,\
-	SRC:=$(JDK_TOPDIR)/src/share/bin,\
-	INCLUDE_FILES:=main.c,\
-	LANG:=C,\
-	OPTIMIZATION:=$$($1_OPTIMIZATION_ARG), \
-	CFLAGS:=$$($1_CFLAGS) \
-		-I$(JDK_TOPDIR)/src/share/bin \
-		-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/bin \
-		-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS)/bin \
-                -DFULL_VERSION='"$(FULL_VERSION)"' \
-                -DJDK_MAJOR_VERSION='"$(JDK_MAJOR_VERSION)"' \
-                -DJDK_MINOR_VERSION='"$(JDK_MINOR_VERSION)"' \
-		-DLIBARCHNAME='"$(OPENJDK_TARGET_CPU_LEGACY)"' \
-		-DLAUNCHER_NAME='"$(LAUNCHER_NAME)"' \
-		-DPROGNAME='"$1"' $(DPACKAGEPATH) \
-		$2,\
-	CFLAGS_linux:=-fPIC,\
-        CFLAGS_solaris:=-KPIC -DHAVE_GETHRTIME,\
-	LDFLAGS:=$(LDFLAGS_JDKEXE) \
-                 $(ORIGIN_ARG) \
-		 $$($1_LDFLAGS),\
-	LDFLAGS_macosx:=$(call SET_SHARED_LIBRARY_NAME,$1),\
-	LDFLAGS_linux:=-lpthread \
-                       $(call SET_SHARED_LIBRARY_NAME,$(LIBRARY_PREFIX)$(SHARED_LIBRARY_SUFFIX)),\
-	LDFLAGS_solaris:=$$($1_LDFLAGS_solaris) \
-                       $(call SET_SHARED_LIBRARY_NAME,$(LIBRARY_PREFIX)$(SHARED_LIBRARY_SUFFIX)),\
-	MAPFILE := $$($1_MAPFILE), \
-        LDFLAGS_SUFFIX:=$(LDFLAGS_JDKEXE_SUFFIX) $$($1_LDFLAGS_SUFFIX),\
-	LDFLAGS_SUFFIX_posix:=$4,\
-	LDFLAGS_SUFFIX_windows:=$$($1_WINDOWS_JLI_LIB) \
-			       $(JDK_OUTPUTDIR)/objs/libjava/java.lib advapi32.lib $5,\
-	LDFLAGS_SUFFIX_linux:=-L$(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/jli -ljli $(LIBDL) -lc, \
-	LDFLAGS_SUFFIX_solaris:=-L$(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/jli -ljli -lthread $(LIBDL) -lc, \
-	OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/$1_objs$(OUTPUT_SUBDIR),\
-	OUTPUT_DIR:=$$($1_OUTPUT_DIR_ARG)$(OUTPUT_SUBDIR),\
-	PROGRAM:=$1,\
-	DEBUG_SYMBOLS:=true,\
-	VERSIONINFO_RESOURCE:=$$($1_VERSION_INFO_RESOURCE),\
-	RC_FLAGS:=$(RC_FLAGS)\
-		  -D "JDK_FNAME=$1$(EXE_SUFFIX)" \
-		  -D "JDK_INTERNAL_NAME=$1" \
-		  -D "JDK_FTYPE=0x1L" \
-		  $7,\
-	MANIFEST:=$(JDK_TOPDIR)/src/windows/resource/java.manifest,\
-	CODESIGN:=$$($1_CODESIGN))
+  BUILD_LAUNCHERS += $$(BUILD_LAUNCHER_$1)
 
-    BUILD_LAUNCHERS += $$(BUILD_LAUNCHER_$1)
+  ifeq ($(OPENJDK_TARGET_OS), macosx)
+    $$(BUILD_LAUNCHER_$1): $(JDK_OUTPUTDIR)/objs/libjli_static.a
+  endif
 
-    ifeq ($(OPENJDK_TARGET_OS),macosx)
-        $$(BUILD_LAUNCHER_$1) : $(JDK_OUTPUTDIR)/objs/libjli_static.a
-    endif
-
-    ifeq ($(OPENJDK_TARGET_OS),windows)
-        $$(BUILD_LAUNCHER_$1) : $(JDK_OUTPUTDIR)/objs/libjava/java.lib \
-				$$($1_WINDOWS_JLI_LIB)
-    endif
+  ifeq ($(OPENJDK_TARGET_OS), windows)
+    $$(BUILD_LAUNCHER_$1): $(JDK_OUTPUTDIR)/objs/libjava/java.lib \
+        $$($1_WINDOWS_JLI_LIB)
+  endif
 endef
 
 ##########################################################################################
 
-XLIBS:=$(X_LIBS) -lX11
-ifeq ($(OPENJDK_TARGET_OS),macosx)
-    DPACKAGEPATH:=-DPACKAGE_PATH='"$(PACKAGE_PATH)"'
-    XLIBS:=
+XLIBS := $(X_LIBS) -lX11
+ifeq ($(OPENJDK_TARGET_OS), macosx)
+  DPACKAGEPATH := -DPACKAGE_PATH='"$(PACKAGE_PATH)"'
+  XLIBS :=
 endif
 
 ifdef OPENJDK
-    JAVA_RC_FLAGS += -i "$(JDK_TOPDIR)/src/windows/resource/icons"
+  JAVA_RC_FLAGS += -i "$(JDK_TOPDIR)/src/windows/resource/icons"
 else
-    JAVA_RC_FLAGS += -i "$(JDK_TOPDIR)/src/closed/windows/native/sun/windows"
+  JAVA_RC_FLAGS += -i "$(JDK_TOPDIR)/src/closed/windows/native/sun/windows"
 endif
 
 # On windows, the debuginfo files get the same name as for java.dll. Build
 # into another dir and copy selectively so debuginfo for java.dll isn't
 # overwritten.
-$(eval $(call SetupLauncher,java,\
-    -DEXPAND_CLASSPATH_WILDCARDS,,,user32.lib comctl32.lib,\
-    $(JDK_OUTPUTDIR)/objs/jli_static.lib,$(JAVA_RC_FLAGS),\
-    $(JDK_TOPDIR)/src/windows/resource/java.rc,$(JDK_OUTPUTDIR)/objs/java_objs,true))
+$(eval $(call SetupLauncher,java, \
+    -DEXPAND_CLASSPATH_WILDCARDS,,,user32.lib comctl32.lib, \
+    $(JDK_OUTPUTDIR)/objs/jli_static.lib, $(JAVA_RC_FLAGS), \
+    $(JDK_TOPDIR)/src/windows/resource/java.rc, $(JDK_OUTPUTDIR)/objs/java_objs,true))
 
 $(JDK_OUTPUTDIR)/bin$(OUTPUT_SUBDIR)/java$(EXE_SUFFIX): $(BUILD_LAUNCHER_java)
 	$(MKDIR) -p $(@D)
@@ -221,271 +221,271 @@
 
 BUILD_LAUNCHERS += $(JDK_OUTPUTDIR)/bin$(OUTPUT_SUBDIR)/java$(EXE_SUFFIX)
 
-ifeq ($(OPENJDK_TARGET_OS),windows)
-    $(eval $(call SetupLauncher,javaw,\
-        -DJAVAW -DEXPAND_CLASSPATH_WILDCARDS,,,user32.lib comctl32.lib,\
-        $(JDK_OUTPUTDIR)/objs/jli_static.lib,$(JAVA_RC_FLAGS),\
-        $(JDK_TOPDIR)/src/windows/resource/java.rc,,true))
+ifeq ($(OPENJDK_TARGET_OS), windows)
+  $(eval $(call SetupLauncher,javaw, \
+      -DJAVAW -DEXPAND_CLASSPATH_WILDCARDS,,,user32.lib comctl32.lib, \
+      $(JDK_OUTPUTDIR)/objs/jli_static.lib, $(JAVA_RC_FLAGS), \
+      $(JDK_TOPDIR)/src/windows/resource/java.rc,,true))
 endif
 
 
 ifndef BUILD_HEADLESS_ONLY
-$(eval $(call SetupLauncher,appletviewer,\
-    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.applet.Main"$(COMMA) }',,\
-    $(XLIBS)))
+  $(eval $(call SetupLauncher,appletviewer, \
+      -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.applet.Main"$(COMMA) }',, \
+      $(XLIBS)))
 endif
 
-$(eval $(call SetupLauncher,extcheck,\
+$(eval $(call SetupLauncher,extcheck, \
     -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.extcheck.Main"$(COMMA) }'))
 
-$(eval $(call SetupLauncher,idlj,\
+$(eval $(call SetupLauncher,idlj, \
     -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.corba.se.idl.toJavaPortable.Compile"$(COMMA) }'))
 
-$(eval $(call SetupLauncher,jar,\
+$(eval $(call SetupLauncher,jar, \
     -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.jar.Main"$(COMMA) }'))
 
-$(eval $(call SetupLauncher,jarsigner,\
+$(eval $(call SetupLauncher,jarsigner, \
     -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.security.tools.jarsigner.Main"$(COMMA) }'))
 
-$(eval $(call SetupLauncher,javac,\
+$(eval $(call SetupLauncher,javac, \
     -DEXPAND_CLASSPATH_WILDCARDS \
     -DNEVER_ACT_AS_SERVER_CLASS_MACHINE \
     -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.javac.Main"$(COMMA) }'))
 
-ifeq ($(ENABLE_SJAVAC),yes)
-$(eval $(call SetupLauncher,sjavac,\
-    -DEXPAND_CLASSPATH_WILDCARDS \
-    -DNEVER_ACT_AS_SERVER_CLASS_MACHINE \
-    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.sjavac.Main"$(COMMA) }'))
+ifeq ($(ENABLE_SJAVAC), yes)
+  $(eval $(call SetupLauncher,sjavac, \
+      -DEXPAND_CLASSPATH_WILDCARDS \
+      -DNEVER_ACT_AS_SERVER_CLASS_MACHINE \
+      -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.sjavac.Main"$(COMMA) }'))
 endif
 
-$(eval $(call SetupLauncher,javadoc,\
+$(eval $(call SetupLauncher,javadoc, \
     -DEXPAND_CLASSPATH_WILDCARDS \
     -DNEVER_ACT_AS_SERVER_CLASS_MACHINE \
     -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.javadoc.Main"$(COMMA) }'))
 
-$(eval $(call SetupLauncher,javah,\
+$(eval $(call SetupLauncher,javah, \
     -DEXPAND_CLASSPATH_WILDCARDS \
     -DNEVER_ACT_AS_SERVER_CLASS_MACHINE \
     -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.javah.Main"$(COMMA) }'))
 
-$(eval $(call SetupLauncher,javap,\
+$(eval $(call SetupLauncher,javap, \
     -DEXPAND_CLASSPATH_WILDCARDS \
     -DNEVER_ACT_AS_SERVER_CLASS_MACHINE \
     -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.javap.Main"$(COMMA) }'))
 
-$(eval $(call SetupLauncher,jdeps,\
+$(eval $(call SetupLauncher,jdeps, \
     -DEXPAND_CLASSPATH_WILDCARDS \
     -DNEVER_ACT_AS_SERVER_CLASS_MACHINE \
     -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.jdeps.Main"$(COMMA) }'))
 
-BUILD_LAUNCHER_jconsole_CFLAGS_windows:=-DJAVAW
-BUILD_LAUNCHER_jconsole_LDFLAGS_windows:=user32.lib
+BUILD_LAUNCHER_jconsole_CFLAGS_windows := -DJAVAW
+BUILD_LAUNCHER_jconsole_LDFLAGS_windows := user32.lib
 
-$(eval $(call SetupLauncher,jconsole,\
+$(eval $(call SetupLauncher,jconsole, \
     -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "-J-Djconsole.showOutputViewer"$(COMMA) "sun.tools.jconsole.JConsole"$(COMMA) }' \
     -DAPP_CLASSPATH='{ "/lib/jconsole.jar"$(COMMA) "/lib/tools.jar"$(COMMA) "/classes" }'))
 
-$(eval $(call SetupLauncher,jdb,\
+$(eval $(call SetupLauncher,jdb, \
     -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.example.debug.tty.TTY"$(COMMA) }' \
     -DAPP_CLASSPATH='{ "/lib/tools.jar"$(COMMA) "/lib/sa-jdi.jar"$(COMMA) "/classes" }'))
 
-$(eval $(call SetupLauncher,jhat,\
+$(eval $(call SetupLauncher,jhat, \
     -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.hat.Main"$(COMMA) }'))
 
-$(eval $(call SetupLauncher,jinfo,\
+$(eval $(call SetupLauncher,jinfo, \
     -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) \
-		   "-J-Dsun.jvm.hotspot.debugger.useProcDebugger"$(COMMA) \
-		   "-J-Dsun.jvm.hotspot.debugger.useWindbgDebugger"$(COMMA) \
-		   "sun.tools.jinfo.JInfo"$(COMMA) }' \
+        "-J-Dsun.jvm.hotspot.debugger.useProcDebugger"$(COMMA) \
+        "-J-Dsun.jvm.hotspot.debugger.useWindbgDebugger"$(COMMA) \
+        "sun.tools.jinfo.JInfo"$(COMMA) }' \
     -DAPP_CLASSPATH='{ "/lib/tools.jar"$(COMMA) "/lib/sa-jdi.jar"$(COMMA) "/classes" }' \
     ,,,,,,,,,Info-privileged.plist))
 
-$(eval $(call SetupLauncher,jmap,\
+$(eval $(call SetupLauncher,jmap, \
     -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) \
-		   "-J-Dsun.jvm.hotspot.debugger.useProcDebugger"$(COMMA) \
-		   "-J-Dsun.jvm.hotspot.debugger.useWindbgDebugger"$(COMMA) \
-		   "sun.tools.jmap.JMap"$(COMMA) }' \
+        "-J-Dsun.jvm.hotspot.debugger.useProcDebugger"$(COMMA) \
+        "-J-Dsun.jvm.hotspot.debugger.useWindbgDebugger"$(COMMA) \
+        "sun.tools.jmap.JMap"$(COMMA) }' \
     -DAPP_CLASSPATH='{ "/lib/tools.jar"$(COMMA) "/lib/sa-jdi.jar"$(COMMA) "/classes" }' \
     ,,,,,,,,,Info-privileged.plist))
 
-$(eval $(call SetupLauncher,jps,\
+$(eval $(call SetupLauncher,jps, \
     -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.jps.Jps"$(COMMA) }'))
 
-$(eval $(call SetupLauncher,jrunscript,\
+$(eval $(call SetupLauncher,jrunscript, \
     -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.script.shell.Main"$(COMMA) }'))
 
-$(eval $(call SetupLauncher,jjs,\
-    -DJAVA_ARGS='{  "-J-ms8m"$(COMMA) "jdk.nashorn.tools.Shell"$(COMMA) }'))
+$(eval $(call SetupLauncher,jjs, \
+    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "jdk.nashorn.tools.Shell"$(COMMA) }'))
 
-$(eval $(call SetupLauncher,jsadebugd,\
+$(eval $(call SetupLauncher,jsadebugd, \
     -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.jvm.hotspot.jdi.SADebugServer"$(COMMA) }' \
     -DAPP_CLASSPATH='{ "/lib/tools.jar"$(COMMA) "/lib/sa-jdi.jar"$(COMMA) "/classes" }' \
     ,,,,,,,,,Info-privileged.plist))
 
-$(eval $(call SetupLauncher,jstack,\
+$(eval $(call SetupLauncher,jstack, \
     -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) \
-		   "-J-Dsun.jvm.hotspot.debugger.useProcDebugger"$(COMMA) \
-		   "-J-Dsun.jvm.hotspot.debugger.useWindbgDebugger"$(COMMA) \
-		   "sun.tools.jstack.JStack"$(COMMA) }' \
+        "-J-Dsun.jvm.hotspot.debugger.useProcDebugger"$(COMMA) \
+        "-J-Dsun.jvm.hotspot.debugger.useWindbgDebugger"$(COMMA) \
+        "sun.tools.jstack.JStack"$(COMMA) }' \
     -DAPP_CLASSPATH='{ "/lib/tools.jar"$(COMMA) "/lib/sa-jdi.jar"$(COMMA) "/classes" }' \
     ,,,,,,,,,Info-privileged.plist))
 
-$(eval $(call SetupLauncher,jstat,\
+$(eval $(call SetupLauncher,jstat, \
     -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.jstat.Jstat"$(COMMA) }'))
 
-$(eval $(call SetupLauncher,jstatd,\
+$(eval $(call SetupLauncher,jstatd, \
     -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.jstatd.Jstatd"$(COMMA) }'))
 
-$(eval $(call SetupLauncher,keytool,\
+$(eval $(call SetupLauncher,keytool, \
     -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.security.tools.keytool.Main"$(COMMA) }'))
 
-$(eval $(call SetupLauncher,native2ascii,\
+$(eval $(call SetupLauncher,native2ascii, \
     -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.native2ascii.Main"$(COMMA) }'))
 
 ifndef BUILD_HEADLESS_ONLY
-$(eval $(call SetupLauncher,policytool,\
-    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.security.tools.policytool.PolicyTool"$(COMMA) }',,\
-    $(XLIBS)))
+  $(eval $(call SetupLauncher,policytool, \
+      -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.security.tools.policytool.PolicyTool"$(COMMA) }',, \
+      $(XLIBS)))
 endif
 
-$(eval $(call SetupLauncher,rmic,\
+$(eval $(call SetupLauncher,rmic, \
     -DEXPAND_CLASSPATH_WILDCARDS \
     -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.rmi.rmic.Main"$(COMMA) }'))
 
-$(eval $(call SetupLauncher,schemagen,\
+$(eval $(call SetupLauncher,schemagen, \
     -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.internal.jxc.SchemaGenerator"$(COMMA) }'))
 
-$(eval $(call SetupLauncher,serialver,\
+$(eval $(call SetupLauncher,serialver, \
     -DEXPAND_CLASSPATH_WILDCARDS \
     -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.serialver.SerialVer"$(COMMA) }'))
 
-$(eval $(call SetupLauncher,xjc,\
+$(eval $(call SetupLauncher,xjc, \
     -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.internal.xjc.Driver"$(COMMA) }'))
 
-$(eval $(call SetupLauncher,wsgen,\
+$(eval $(call SetupLauncher,wsgen, \
     -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.internal.ws.WsGen"$(COMMA) }'))
 
-$(eval $(call SetupLauncher,wsimport,\
+$(eval $(call SetupLauncher,wsimport, \
     -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.internal.ws.WsImport"$(COMMA) }'))
 
-$(eval $(call SetupLauncher,orbd,\
-    -DJAVA_ARGS='{ 	"-J-ms8m"$(COMMA) \
-			"-J-Dcom.sun.CORBA.activation.DbDir=./orb.db"$(COMMA) \
-			"-J-Dcom.sun.CORBA.activation.Port=1049"$(COMMA) \
-			"-J-Dcom.sun.CORBA.POA.ORBServerId=1"$(COMMA) \
-			"com.sun.corba.se.impl.activation.ORBD"$(COMMA) }'))
+$(eval $(call SetupLauncher,orbd, \
+    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) \
+        "-J-Dcom.sun.CORBA.activation.DbDir=./orb.db"$(COMMA) \
+        "-J-Dcom.sun.CORBA.activation.Port=1049"$(COMMA) \
+        "-J-Dcom.sun.CORBA.POA.ORBServerId=1"$(COMMA) \
+        "com.sun.corba.se.impl.activation.ORBD"$(COMMA) }'))
 
-$(eval $(call SetupLauncher,servertool,\
+$(eval $(call SetupLauncher,servertool, \
     -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.corba.se.impl.activation.ServerTool"$(COMMA) }'))
 
-$(eval $(call SetupLauncher,tnameserv,\
-    -DJAVA_ARGS='{ 	"-J-ms8m"$(COMMA) \
-			"-J-Dcom.sun.CORBA.activation.DbDir=./orb.db"$(COMMA) \
-			"-J-Djava.util.logging.LoggingPermission=contol"$(COMMA) \
-			"-J-Dcom.sun.CORBA.POA.ORBServerId=1"$(COMMA) \
-			"com.sun.corba.se.impl.naming.cosnaming.TransientNameServer"$(COMMA) }'))
+$(eval $(call SetupLauncher,tnameserv, \
+    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) \
+        "-J-Dcom.sun.CORBA.activation.DbDir=./orb.db"$(COMMA) \
+        "-J-Djava.util.logging.LoggingPermission=contol"$(COMMA) \
+        "-J-Dcom.sun.CORBA.POA.ORBServerId=1"$(COMMA) \
+        "com.sun.corba.se.impl.naming.cosnaming.TransientNameServer"$(COMMA) }'))
 
-$(eval $(call SetupLauncher,pack200,\
-    -DJAVA_ARGS='{	"-J-ms8m"$(COMMA) "com.sun.java.util.jar.pack.Driver"$(COMMA) "--pack" }'))
+$(eval $(call SetupLauncher,pack200, \
+    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.java.util.jar.pack.Driver"$(COMMA) "--pack" }'))
 
-$(eval $(call SetupLauncher,rmid,\
-    -DJAVA_ARGS='{	"-J-ms8m"$(COMMA) "sun.rmi.server.Activation"$(COMMA) }'))
+$(eval $(call SetupLauncher,rmid, \
+    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.rmi.server.Activation"$(COMMA) }'))
 
-$(eval $(call SetupLauncher,rmiregistry,\
-    -DJAVA_ARGS='{	"-J-ms8m"$(COMMA) "sun.rmi.registry.RegistryImpl"$(COMMA) }'))
+$(eval $(call SetupLauncher,rmiregistry, \
+    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.rmi.registry.RegistryImpl"$(COMMA) }'))
 
-$(eval $(call SetupLauncher,jcmd,\
-    -DJAVA_ARGS='{	"-J-ms8m"$(COMMA) "sun.tools.jcmd.JCmd"$(COMMA) }'))
+$(eval $(call SetupLauncher,jcmd, \
+    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.jcmd.JCmd"$(COMMA) }'))
 
-ifeq ($(OPENJDK_TARGET_OS),windows)
-    $(eval $(call SetupLauncher,kinit,\
-        -DJAVA_ARGS='{	"-J-ms8m"$(COMMA) "sun.security.krb5.internal.tools.Kinit"$(COMMA) }'))
+ifeq ($(OPENJDK_TARGET_OS), windows)
+  $(eval $(call SetupLauncher,kinit, \
+      -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.security.krb5.internal.tools.Kinit"$(COMMA) }'))
 
-    $(eval $(call SetupLauncher,klist,\
-        -DJAVA_ARGS='{	"-J-ms8m"$(COMMA) "sun.security.krb5.internal.tools.Klist"$(COMMA) }'))
+  $(eval $(call SetupLauncher,klist, \
+      -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.security.krb5.internal.tools.Klist"$(COMMA) }'))
 
-    $(eval $(call SetupLauncher,ktab,\
-        -DJAVA_ARGS='{	"-J-ms8m"$(COMMA) "sun.security.krb5.internal.tools.Ktab"$(COMMA) }'))
+  $(eval $(call SetupLauncher,ktab, \
+      -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.security.krb5.internal.tools.Ktab"$(COMMA) }'))
 endif
 
 ##########################################################################################
 # The order of the object files on the link command line affects the size of the resulting
 # binary (at least on linux) which causes the size to differ between old and new build.
 ifeq ($(USE_EXTERNAL_LIBZ), true)
-UNPACKEXE_CFLAGS := -DSYSTEM_ZLIB
-UNPACKEXE_ZIPOBJS := -lz
+  UNPACKEXE_CFLAGS := -DSYSTEM_ZLIB
+  UNPACKEXE_ZIPOBJS := -lz
 else
-UNPACKEXE_CFLAGS := -I$(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.5
-UNPACKEXE_ZIPOBJS := 	$(JDK_OUTPUTDIR)/objs/libzip/zcrc32$(OBJ_SUFFIX) \
-		     	$(JDK_OUTPUTDIR)/objs/libzip/deflate$(OBJ_SUFFIX) \
-			$(JDK_OUTPUTDIR)/objs/libzip/trees$(OBJ_SUFFIX) \
-			$(JDK_OUTPUTDIR)/objs/libzip/zadler32$(OBJ_SUFFIX) \
-			$(JDK_OUTPUTDIR)/objs/libzip/compress$(OBJ_SUFFIX) \
-			$(JDK_OUTPUTDIR)/objs/libzip/zutil$(OBJ_SUFFIX) \
-			$(JDK_OUTPUTDIR)/objs/libzip/inflate$(OBJ_SUFFIX) \
-			$(JDK_OUTPUTDIR)/objs/libzip/infback$(OBJ_SUFFIX) \
-			$(JDK_OUTPUTDIR)/objs/libzip/inftrees$(OBJ_SUFFIX) \
-			$(JDK_OUTPUTDIR)/objs/libzip/inffast$(OBJ_SUFFIX)
+  UNPACKEXE_CFLAGS := -I$(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.5
+  UNPACKEXE_ZIPOBJS := $(JDK_OUTPUTDIR)/objs/libzip/zcrc32$(OBJ_SUFFIX) \
+      $(JDK_OUTPUTDIR)/objs/libzip/deflate$(OBJ_SUFFIX) \
+      $(JDK_OUTPUTDIR)/objs/libzip/trees$(OBJ_SUFFIX) \
+      $(JDK_OUTPUTDIR)/objs/libzip/zadler32$(OBJ_SUFFIX) \
+      $(JDK_OUTPUTDIR)/objs/libzip/compress$(OBJ_SUFFIX) \
+      $(JDK_OUTPUTDIR)/objs/libzip/zutil$(OBJ_SUFFIX) \
+      $(JDK_OUTPUTDIR)/objs/libzip/inflate$(OBJ_SUFFIX) \
+      $(JDK_OUTPUTDIR)/objs/libzip/infback$(OBJ_SUFFIX) \
+      $(JDK_OUTPUTDIR)/objs/libzip/inftrees$(OBJ_SUFFIX) \
+      $(JDK_OUTPUTDIR)/objs/libzip/inffast$(OBJ_SUFFIX)
 
 endif
 
 ifeq ($(OPENJDK_TARGET_CPU_ARCH), sparc)
-    UNPACKEXE_CFLAGS += -xregs=no%appl
-    UNPACKEXE_LDFLAGS_solaris += -xmemalign=4s
+  UNPACKEXE_CFLAGS += -xregs=no%appl
+  UNPACKEXE_LDFLAGS_solaris += -xmemalign=4s
 endif
 
-UNPACKEXE_LANG:=C
-ifeq ($(OPENJDK_TARGET_OS),solaris)
-    UNPACKEXE_LANG:=C++
+UNPACKEXE_LANG := C
+ifeq ($(OPENJDK_TARGET_OS), solaris)
+  UNPACKEXE_LANG := C++
 endif
 # On windows, unpack200 is linked completely differently to all other
 # executables, using the compiler with the compiler arguments.
 # It's also linked incrementally, producing a .ilk file that needs to
 # be kept away.
-ifeq ($(OPENJDK_TARGET_OS),windows)
-    BUILD_UNPACKEXE_LDEXE:=$(CC)
-    EXE_OUT_OPTION_save:=$(EXE_OUT_OPTION)
-    EXE_OUT_OPTION:=-Fe
+ifeq ($(OPENJDK_TARGET_OS), windows)
+  BUILD_UNPACKEXE_LDEXE := $(CC)
+  EXE_OUT_OPTION_save := $(EXE_OUT_OPTION)
+  EXE_OUT_OPTION := -Fe
 endif
-$(eval $(call SetupNativeCompilation,BUILD_UNPACKEXE,\
-                SRC:=$(JDK_TOPDIR)/src/share/native/com/sun/java/util/jar/pack,\
-		EXCLUDE_FILES:=jni.cpp,\
-		LANG:=$(UNPACKEXE_LANG),\
-		OPTIMIZATION:=LOW, \
-		CFLAGS:=$(UNPACKEXE_CFLAGS) $(CXXFLAGS_JDKEXE)\
-                        -DFULL, \
-		CFLAGS_release:=-DPRODUCT,\
-		CFLAGS_linux:=-fPIC,\
-		CFLAGS_solaris:=-KPIC, \
-		CFLAGS_macosx:=-fPIC, \
-		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libunpack/mapfile-vers-unpack200,\
-		LDFLAGS:=$(UNPACKEXE_ZIPOBJS),\
-		LDFLAGS_windows:=$(CXXFLAGS_JDKEXE),\
-		LDFLAGS_posix:=$(LDFLAGS_JDKEXE) $(LDFLAGS_CXX_JDK) \
-			 $(call SET_SHARED_LIBRARY_NAME,$(LIBRARY_PREFIX)unpack$(SHARED_LIBRARY_SUFFIX)) \
-			 $(call SET_SHARED_LIBRARY_ORIGIN),\
-		LDFLAGS_linux:=-lc,\
-		LDFLAGS_solaris:=$(UNPACKEXE_LDFLAGS_solaris) -lc,\
-		LDFLAGS_SUFFIX:=$(LIBCXX),\
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/unpackexe$(OUTPUT_SUBDIR),\
-		OUTPUT_DIR:=$(JDK_OUTPUTDIR)/objs/unpackexe$(OUTPUT_SUBDIR),\
-		PROGRAM:=unpack200,\
-		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
-		RC_FLAGS:=$(RC_FLAGS)\
-			  -D "JDK_FNAME=unpack200.exe" \
-			  -D "JDK_INTERNAL_NAME=unpack200" \
-			  -D "JDK_FTYPE=0x1L",\
-	        DEBUG_SYMBOLS:=true,\
-		MANIFEST:=$(JDK_TOPDIR)/src/windows/resource/unpack200_proto.exe.manifest))
+$(eval $(call SetupNativeCompilation,BUILD_UNPACKEXE, \
+    SRC := $(JDK_TOPDIR)/src/share/native/com/sun/java/util/jar/pack, \
+    EXCLUDE_FILES := jni.cpp, \
+    LANG := $(UNPACKEXE_LANG), \
+    OPTIMIZATION := LOW, \
+    CFLAGS := $(UNPACKEXE_CFLAGS) $(CXXFLAGS_JDKEXE) \
+        -DFULL, \
+    CFLAGS_release := -DPRODUCT, \
+    CFLAGS_linux := -fPIC, \
+    CFLAGS_solaris := -KPIC, \
+    CFLAGS_macosx := -fPIC, \
+    MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libunpack/mapfile-vers-unpack200, \
+    LDFLAGS := $(UNPACKEXE_ZIPOBJS), \
+    LDFLAGS_windows := $(CXXFLAGS_JDKEXE), \
+    LDFLAGS_posix := $(LDFLAGS_JDKEXE) $(LDFLAGS_CXX_JDK) \
+        $(call SET_SHARED_LIBRARY_NAME,$(LIBRARY_PREFIX)unpack$(SHARED_LIBRARY_SUFFIX)) \
+        $(call SET_SHARED_LIBRARY_ORIGIN), \
+    LDFLAGS_linux := -lc, \
+    LDFLAGS_solaris := $(UNPACKEXE_LDFLAGS_solaris) -lc, \
+    LDFLAGS_SUFFIX := $(LIBCXX), \
+    OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/unpackexe$(OUTPUT_SUBDIR), \
+    OUTPUT_DIR := $(JDK_OUTPUTDIR)/objs/unpackexe$(OUTPUT_SUBDIR), \
+    PROGRAM := unpack200, \
+    VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
+    RC_FLAGS := $(RC_FLAGS) \
+        -D "JDK_FNAME=unpack200.exe" \
+        -D "JDK_INTERNAL_NAME=unpack200" \
+        -D "JDK_FTYPE=0x1L", \
+    DEBUG_SYMBOLS := true, \
+    MANIFEST := $(JDK_TOPDIR)/src/windows/resource/unpack200_proto.exe.manifest))
 
-ifeq ($(OPENJDK_TARGET_OS),windows)
-    EXE_OUT_OPTION:=$(EXE_OUT_OPTION_save)
+ifeq ($(OPENJDK_TARGET_OS), windows)
+  EXE_OUT_OPTION := $(EXE_OUT_OPTION_save)
 endif
 
 ifneq ($(USE_EXTERNAL_LIBZ), true)
 
-$(BUILD_UNPACKEXE) : $(UNPACKEXE_ZIPOBJS)
+  $(BUILD_UNPACKEXE): $(UNPACKEXE_ZIPOBJS)
 
 endif
 
@@ -515,13 +515,13 @@
 # jdk/make/java/Makefile
 #
 ifeq ($(OPENJDK_TARGET_OS), solaris)
-	ifeq ($(OPENJDK_TARGET_CPU_BITS), 32)
-		BUILD_JEXEC := 1
-	endif
+  ifeq ($(OPENJDK_TARGET_CPU_BITS), 32)
+    BUILD_JEXEC := 1
+  endif
 endif
 
 ifeq ($(OPENJDK_TARGET_OS), linux)
-	BUILD_JEXEC := 1
+  BUILD_JEXEC := 1
 endif # OPENJDK_TARGET_OS
 
 #
@@ -529,41 +529,41 @@
 #
 ifeq ($(BUILD_JEXEC), 1)
 
-	ifeq ($(OPENJDK_TARGET_OS),windows)
-	else ifeq ($(OPENJDK_TARGET_OS),macosx)
-		BUILD_JEXEC_SRC := $(JDK_TOPDIR)/src/macosx/bin
-	else
-		BUILD_JEXEC_SRC := $(JDK_TOPDIR)/src/solaris/bin
-	endif
+  ifeq ($(OPENJDK_TARGET_OS), windows)
+  else ifeq ($(OPENJDK_TARGET_OS), macosx)
+    BUILD_JEXEC_SRC := $(JDK_TOPDIR)/src/macosx/bin
+  else
+    BUILD_JEXEC_SRC := $(JDK_TOPDIR)/src/solaris/bin
+  endif
 
-	ifeq ($(OPENJDK_TARGET_OS), linux)
-                BUILD_JEXEC_DST_DIR := $(JDK_OUTPUTDIR)/lib
-		BUILD_JEXEC_INC += -I$(JDK_TOPDIR)/src/share/bin
-	endif
+  ifeq ($(OPENJDK_TARGET_OS), linux)
+    BUILD_JEXEC_DST_DIR := $(JDK_OUTPUTDIR)/lib
+    BUILD_JEXEC_INC += -I$(JDK_TOPDIR)/src/share/bin
+  endif
 endif
 
 #
 # Note that the two Makefile's seems to contradict each other,
-#   and that src/macosx/bin/jexec.c seems unused
+# and that src/macosx/bin/jexec.c seems unused
 #
-ifneq ($(BUILD_JEXEC_SRC),)
-        $(eval $(call SetupNativeCompilation,BUILD_JEXEC,\
-		SRC:=$(BUILD_JEXEC_SRC),\
-		INCLUDE_FILES:=jexec.c,\
-		LANG:=C,\
-		OPTIMIZATION := LOW, \
-		CFLAGS:=$(CFLAGS_JDKEXE)\
-                        $(BUILD_JEXEC_INC), \
-		CFLAGS_linux:=-fPIC,\
-		CFLAGS_solaris:=-KPIC,\
-		LDFLAGS:=$(LDFLAGS_JDKEXE) \
-			 $(call SET_SHARED_LIBRARY_NAME,$(LIBRARY_PREFIX)$(SHARED_LIBRARY_SUFFIX)), \
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/jexec_obj,\
-		OUTPUT_DIR:=$(BUILD_JEXEC_DST_DIR),\
-		DEBUG_SYMBOLS:=true,\
-		PROGRAM:=jexec))
+ifneq ($(BUILD_JEXEC_SRC), )
+  $(eval $(call SetupNativeCompilation,BUILD_JEXEC, \
+      SRC := $(BUILD_JEXEC_SRC), \
+      INCLUDE_FILES := jexec.c, \
+      LANG := C, \
+      OPTIMIZATION := LOW, \
+      CFLAGS := $(CFLAGS_JDKEXE) \
+          $(BUILD_JEXEC_INC), \
+      CFLAGS_linux := -fPIC, \
+      CFLAGS_solaris := -KPIC, \
+      LDFLAGS := $(LDFLAGS_JDKEXE) \
+          $(call SET_SHARED_LIBRARY_NAME,$(LIBRARY_PREFIX)$(SHARED_LIBRARY_SUFFIX)), \
+      OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/jexec_obj, \
+      OUTPUT_DIR := $(BUILD_JEXEC_DST_DIR), \
+      DEBUG_SYMBOLS := true, \
+      PROGRAM := jexec))
 
-	BUILD_LAUNCHERS += $(BUILD_JEXEC)
+  BUILD_LAUNCHERS += $(BUILD_JEXEC)
 endif
 
 ##########################################################################################
@@ -571,7 +571,7 @@
 #
 # The java-rmi.cgi script in bin/ only gets delivered in certain situations
 #
-JAVA_RMI_CGI:=$(JDK_OUTPUTDIR)/bin$(OUTPUT_SUBDIR)/java-rmi.cgi
+JAVA_RMI_CGI := $(JDK_OUTPUTDIR)/bin$(OUTPUT_SUBDIR)/java-rmi.cgi
 ifeq ($(OPENJDK_TARGET_OS), linux)
   BUILD_LAUNCHERS += $(JAVA_RMI_CGI)
 endif
@@ -588,11 +588,11 @@
 # the final images bin dir. This weird behavior is mimicked here in the converted
 # makefiles for now. Should probably just be deleted.
 # http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6512052
-ifeq ($(OPENJDK_TARGET_OS),windows)
-    $(eval $(call SetupLauncher,java-rmi,,\
-        $(call SET_SHARED_LIBRARY_MAPFILE,$(JDK_TOPDIR)/makefiles/java/main/java/mapfile-$(OPENJDK_TARGET_CPU))))
+ifeq ($(OPENJDK_TARGET_OS), windows)
+  $(eval $(call SetupLauncher,java-rmi, , \
+      $(call SET_SHARED_LIBRARY_MAPFILE,$(JDK_TOPDIR)/makefiles/java/main/java/mapfile-$(OPENJDK_TARGET_CPU))))
 else
-    $(JAVA_RMI_CGI): $(JDK_TOPDIR)/src/solaris/bin/java-rmi.cgi.sh
+  $(JAVA_RMI_CGI): $(JDK_TOPDIR)/src/solaris/bin/java-rmi.cgi.sh
 	$(call install-file)
 	$(CHMOD) a+x $@
 endif
@@ -605,67 +605,67 @@
 LINK_JSPAWNHELPER_OBJECTS := $(JDK_OUTPUTDIR)/objs/libjava/childproc.o
 LINK_JSPAWNHELPER_FLAGS :=
 
-ifneq ($(findstring $(OPENJDK_TARGET_OS), macosx solaris),)
-    BUILD_JSPAWNHELPER := 1
+ifneq ($(findstring $(OPENJDK_TARGET_OS), macosx solaris), )
+  BUILD_JSPAWNHELPER := 1
 endif
 
 ifeq ($(OPENJDK_TARGET_OS), macosx)
-    BUILD_JSPAWNHELPER_DST_DIR := $(JDK_OUTPUTDIR)/lib
+  BUILD_JSPAWNHELPER_DST_DIR := $(JDK_OUTPUTDIR)/lib
 endif
 
 ifeq ($(OPENJDK_TARGET_CPU_BITS), 64)
-    LINK_JSPAWNHELPER_FLAGS += -m64
+  LINK_JSPAWNHELPER_FLAGS += -m64
 endif
 
 ifeq ($(BUILD_JSPAWNHELPER), 1)
-    $(eval $(call SetupNativeCompilation,BUILD_JSPAWNHELPER,\
-        SRC:=$(BUILD_JSPAWNHELPER_SRC),\
-        INCLUDE_FILES:=jspawnhelper.c,\
-        LANG:=C,\
-        OPTIMIZATION := LOW, \
-        CFLAGS:=$(CFLAGS_JDKEXE), \
-        LDFLAGS:=$(LDFLAGS_JDKEXE) $(LINK_JSPAWNHELPER_FLAGS), \
-        LDFLAGS_SUFFIX:= $(LINK_JSPAWNHELPER_OBJECTS), \
-        OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/jspawnhelper,\
-        OUTPUT_DIR:=$(BUILD_JSPAWNHELPER_DST_DIR),\
-        PROGRAM:=jspawnhelper))
+  $(eval $(call SetupNativeCompilation,BUILD_JSPAWNHELPER, \
+      SRC := $(BUILD_JSPAWNHELPER_SRC), \
+      INCLUDE_FILES := jspawnhelper.c, \
+      LANG := C, \
+      OPTIMIZATION := LOW, \
+      CFLAGS := $(CFLAGS_JDKEXE), \
+      LDFLAGS := $(LDFLAGS_JDKEXE) $(LINK_JSPAWNHELPER_FLAGS), \
+      LDFLAGS_SUFFIX := $(LINK_JSPAWNHELPER_OBJECTS), \
+      OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/jspawnhelper, \
+      OUTPUT_DIR := $(BUILD_JSPAWNHELPER_DST_DIR), \
+      PROGRAM := jspawnhelper))
 
-    $(BUILD_JSPAWNHELPER): $(LINK_JSPAWNHELPER_OBJECTS)
+  $(BUILD_JSPAWNHELPER): $(LINK_JSPAWNHELPER_OBJECTS)
 
-    BUILD_LAUNCHERS += $(BUILD_JSPAWNHELPER)
+  BUILD_LAUNCHERS += $(BUILD_JSPAWNHELPER)
 endif
 
 ##########################################################################################
 # jabswitch
 
 ifndef OPENJDK
-ifeq ($(OPENJDK_TARGET_OS),windows)
+  ifeq ($(OPENJDK_TARGET_OS), windows)
 
-    $(eval $(call SetupNativeCompilation,BUILD_JABSWITCH,\
-		SRC:=$(JDK_TOPDIR)/src/closed/windows/native/sun/bridge,\
-		INCLUDE_FILES:=jabswitch.cpp,\
-		LANG:=C++,\
-		CFLAGS:=$(filter-out -Zc:wchar_t-,$(CFLAGS_JDKEXE)) -Zc:wchar_t \
-			-analyze- -Od -Gd -D_WINDOWS \
-			-D_UNICODE -DUNICODE -RTC1 -EHsc,\
-		LDFLAGS:=$(LDFLAGS_JDKEXE) \
-			 Advapi32.lib Version.lib User32.lib,\
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/jabswitch,\
-		OUTPUT_DIR:=$(JDK_OUTPUTDIR)/bin,\
-		PROGRAM:=jabswitch,\
-		DEBUG_SYMBOLS:=true,\
-		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/closed/windows/native/sun/bridge/AccessBridgeStatusWindow.rc,\
-		RC_FLAGS:=$(RC_FLAGS),\
-		MANIFEST:=$(JDK_TOPDIR)/src/closed/windows/native/sun/bridge/jabswitch.manifest))
+    $(eval $(call SetupNativeCompilation,BUILD_JABSWITCH, \
+        SRC := $(JDK_TOPDIR)/src/closed/windows/native/sun/bridge, \
+        INCLUDE_FILES := jabswitch.cpp, \
+        LANG := C++, \
+        CFLAGS := $(filter-out -Zc:wchar_t-, $(CFLAGS_JDKEXE)) -Zc:wchar_t \
+            -analyze- -Od -Gd -D_WINDOWS \
+            -D_UNICODE -DUNICODE -RTC1 -EHsc, \
+        LDFLAGS := $(LDFLAGS_JDKEXE) \
+            Advapi32.lib Version.lib User32.lib, \
+        OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/jabswitch, \
+        OUTPUT_DIR := $(JDK_OUTPUTDIR)/bin, \
+        PROGRAM := jabswitch, \
+        DEBUG_SYMBOLS := true, \
+        VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/closed/windows/native/sun/bridge/AccessBridgeStatusWindow.rc, \
+        RC_FLAGS := $(RC_FLAGS), \
+        MANIFEST := $(JDK_TOPDIR)/src/closed/windows/native/sun/bridge/jabswitch.manifest))
 
     BUILD_LAUNCHERS += $(BUILD_JABSWITCH)
 
-endif
+  endif
 endif
 
 ##########################################################################################
 
-$(BUILD_LAUNCHERS) : $(JDK_TOPDIR)/makefiles/CompileLaunchers.gmk
+$(BUILD_LAUNCHERS): $(JDK_TOPDIR)/makefiles/CompileLaunchers.gmk
 
 all: $(BUILD_LAUNCHERS)
 
--- a/makefiles/CompileNativeLibraries.gmk	Fri Oct 11 03:06:10 2013 -0700
+++ b/makefiles/CompileNativeLibraries.gmk	Wed Oct 16 12:02:43 2013 -0700
@@ -36,7 +36,7 @@
 include CopyFiles.gmk
 
 # Prepare the find cache. Only used if running on windows.
-$(eval $(call FillCacheFind,$(JDK_TOPDIR)/src))
+$(eval $(call FillCacheFind, $(JDK_TOPDIR)/src))
 
 # Build tools
 include Tools.gmk
@@ -46,13 +46,13 @@
 CXXFLAGS_JDKLIB += -I$(JDK_OUTPUTDIR)/gensrc_headers
 
 # Put the libraries here. Different locations for different target apis.
-ifeq ($(OPENJDK_TARGET_OS_API),posix)
-    INSTALL_LIBRARIES_HERE:=$(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)
+ifeq ($(OPENJDK_TARGET_OS_API), posix)
+  INSTALL_LIBRARIES_HERE := $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)
 else
-    INSTALL_LIBRARIES_HERE:=$(JDK_OUTPUTDIR)/bin
+  INSTALL_LIBRARIES_HERE := $(JDK_OUTPUTDIR)/bin
 endif
 
-BUILD_LIBRARIES=
+BUILD_LIBRARIES =
 
 # Absolute paths to lib files on windows for use in LDFLAGS. Should figure out a more
 # elegant solution to this.
@@ -63,59 +63,59 @@
 # Use this variable to set DEBUG_SYMBOLS true on windows for all libraries, but
 # not on other platforms.
 ifeq ($(OPENJDK_TARGET_OS), windows)
-    DEBUG_ALL_BINARIES := true
+  DEBUG_ALL_BINARIES := true
 endif
 
 # Build everything with debugging on OpenJDK
 ifdef OPENJDK
-    DEBUG_ALL_BINARIES := true
+  DEBUG_ALL_BINARIES := true
 endif
 
 #
 # TODO replace with X_FLAGS / X_LIBS
-#   and add them to configure
+# and add them to configure
 #
-OPENWIN_LIB:=$(OPENWIN_HOME)/lib
+OPENWIN_LIB := $(OPENWIN_HOME)/lib
 
 ##########################################################################################
 
-BUILD_LIBFDLIBM_OPTIMIZATION:=HIGH
+BUILD_LIBFDLIBM_OPTIMIZATION := HIGH
 
 ifneq ($(OPENJDK_TARGET_OS), solaris)
-      BUILD_LIBFDLIBM_OPTIMIZATION:=NONE
+  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)))
+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)
+  $(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
@@ -123,637 +123,638 @@
 
 ##########################################################################################
 
-BUILD_LIBVERIFY_SRC:=check_code.c check_format.c
+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
+  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
+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))
+$(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
+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
+  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
+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 := $(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)"'
+    -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
+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
+  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
+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
+  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
+  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)))
+$(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_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_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
+  BUILD_LIBMLIB_CFLAGS += -DMLIB_OS64BIT
 endif
 
 ifneq ($(OPENJDK_TARGET_OS), windows)
-	BUILD_LIBMLIB_LDLIBS += $(LIBM) $(LIBDL)
+  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)
+$(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)
+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
+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
+  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
+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_DIRS += $(JDK_TOPDIR)/src/macosx/native/com/apple/resources
-	LIBAWT_FILES += awt_LoadLibrary.c MacOSXResourceBundle.m
-	LIBAWT_CFLAGS += -F/System/Library/Frameworks/JavaVM.framework/Frameworks
-
-	LIBAWT_MacOSXResourceBundle.m_CFLAGS:=-O0
+ifeq ($(OPENJDK_TARGET_OS), macosx)
+  LIBAWT_FILES += awt_LoadLibrary.c img_colors.c
+  LIBAWT_DIRS += $(JDK_TOPDIR)/src/macosx/native/com/apple/resources
+  LIBAWT_FILES += awt_LoadLibrary.c MacOSXResourceBundle.m
+  LIBAWT_CFLAGS += -F/System/Library/Frameworks/JavaVM.framework/Frameworks
+
+  LIBAWT_MacOSXResourceBundle.m_CFLAGS := -O0
 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
+  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
+  LIBAWT_FILES += MapAccelFunc.c
 endif
 
-ifneq ($(OPENJDK_TARGET_OS),solaris)
-	LIBAWT_CFLAGS += -DMLIB_NO_LIBSUNMATH
+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
+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
+  LIBAWT_CFLAGS += -DINTERNAL_BUILD
 endif
 
-LIBAWT_MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libawt/mapfile-vers
-ifeq ($(OPENJDK_TARGET_OS),linux)
-	LIBAWT_MAPFILE:=
+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)
+$(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)
+  $(BUILD_LIBAWT): $(BUILD_LIBMLIB_IMAGE)
 endif
 
 BUILD_LIBRARIES += $(BUILD_LIBAWT)
@@ -766,1601 +767,76 @@
 #
 # It's used for libawt_headless _and_ libawt_xawt
 #
-X11_PATH:=/usr/X11R6
+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 \
+  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 \
+        $(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 \
+        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 \
@@ -2376,812 +852,1517 @@
         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)
+        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
 
 ##########################################################################################
 
-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)
+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
 
-##########################################################################################
-
-$(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
-
+BUILD_LIBZIP_REORDER :=
 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
+  ifneq ($(OPENJDK_TARGET_CPU), x86_64)
+    BUILD_LIBZIP_REORDER := $(JDK_TOPDIR)/makefiles/mapfiles/libzip/reorder-$(OPENJDK_TARGET_CPU)
   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)
+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)
 
 ##########################################################################################
 
-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)
-
+$(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
 
 ##########################################################################################
 
-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)
-
+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
-
-$(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)
-
+  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)
-
-$(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)
-
+  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)
-
-$(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)
-
+  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
+
 ##########################################################################################
 
-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)
+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
 
 ##########################################################################################
 
-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 \
-        \
+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 \
@@ -3194,264 +2375,1085 @@
         OGLSurfaceData.c \
         OGLTextRenderer.c \
         OGLVertexCache.c \
+        GLXGraphicsConfig.c \
+        GLXSurfaceData.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
-
-##########################################################################################
-
-ifeq ($(OPENJDK_TARGET_OS), macosx)
-
-# Ugly hack to mimic behaviour in old build where this is built as an xcode project.
-SET_SHARED_LIBRARY_NAME=-Xlinker -install_name -Xlinker /usr/local/lib/libJObjC.dylib
-
-$(eval $(call SetupNativeCompilation,BUILD_LIBJOBJC32,\
-		LIBRARY:=JObjC,\
-                OUTPUT_DIR:=$(JDK_OUTPUTDIR)/objs/libjobjc32,\
-		SRC:=$(JDK_TOPDIR)/src/macosx/native/jobjc/src/core/native \
-                     $(JDK_TOPDIR)/src/macosx/native/jobjc/src/runtime-additions/native ,\
-		LANG:=C,\
-		OPTIMIZATION:=LOW, \
-		CFLAGS:=-fpascal-strings \
-                        -fobjc-gc \
-                        -gdwarf-2 \
-                        $(CFLAGS_JDKLIB) -I$(JDK_OUTPUTDIR)/gensrc_headers_jobjc \
-                        -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
-			-m32,\
-		LDFLAGS:=$(LDFLAGS_JDKLIB)\
-			-m32, \
-		LDFLAGS_SUFFIX:=-framework Foundation -framework JavaVM \
-                                  -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
-                                  -framework JavaNativeFoundation \
-                                  -lffi, \
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libjobjc32,\
-		DEBUG_SYMBOLS:=$(DEBUG_ALL_BINARIES)))
-
-$(eval $(call SetupNativeCompilation,BUILD_LIBJOBJC64,\
-		LIBRARY:=JObjC,\
-                OUTPUT_DIR:=$(JDK_OUTPUTDIR)/objs/libjobjc64,\
-		SRC:=$(JDK_TOPDIR)/src/macosx/native/jobjc/src/core/native \
-                     $(JDK_TOPDIR)/src/macosx/native/jobjc/src/runtime-additions/native ,\
-		LANG:=C,\
-		OPTIMIZATION:=LOW, \
-		CFLAGS:=-fpascal-strings \
-                        -fobjc-gc \
-                        -gdwarf-2 \
-                        $(CFLAGS_JDKLIB) -I$(JDK_OUTPUTDIR)/gensrc_headers_jobjc \
-                        -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
-			, \
-		LDFLAGS:=-fpascal-strings \
-                         -fobjc-gc \
-                         -gdwarf-2 \
-                         $(LDFLAGS_JDKLIB)\
-			 $(call SET_SHARED_LIBRARY_ORIGIN), \
-		LDFLAGS_SUFFIX:=-framework Foundation -framework JavaVM \
-                                  -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
-                                  -framework JavaNativeFoundation \
-                                  -lffi, \
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libjobjc64,\
-		DEBUG_SYMBOLS:=$(DEBUG_ALL_BINARIES)))
-
-$(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)JObjC$(SHARED_LIBRARY_SUFFIX): $(BUILD_LIBJOBJC32) $(BUILD_LIBJOBJC64)
-	$(LIPO) -create -output $@ $(BUILD_LIBJOBJC32) $(BUILD_LIBJOBJC64)
-
-BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)JObjC$(SHARED_LIBRARY_SUFFIX)
-
-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))
+    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
+
+##########################################################################################
+
+ifeq ($(OPENJDK_TARGET_OS), macosx)
+
+  # Ugly hack to mimic behaviour in old build where this is built as an xcode project.
+  SET_SHARED_LIBRARY_NAME = -Xlinker -install_name -Xlinker /usr/local/lib/libJObjC.dylib
+
+  $(eval $(call SetupNativeCompilation,BUILD_LIBJOBJC32, \
+      LIBRARY := JObjC, \
+      OUTPUT_DIR := $(JDK_OUTPUTDIR)/objs/libjobjc32, \
+      SRC := $(JDK_TOPDIR)/src/macosx/native/jobjc/src/core/native \
+          $(JDK_TOPDIR)/src/macosx/native/jobjc/src/runtime-additions/native, \
+      LANG := C, \
+      OPTIMIZATION := LOW, \
+      CFLAGS := -fpascal-strings \
+          -fobjc-gc \
+          -gdwarf-2 \
+          $(CFLAGS_JDKLIB) -I$(JDK_OUTPUTDIR)/gensrc_headers_jobjc \
+          -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
+          -m32, \
+      LDFLAGS := $(LDFLAGS_JDKLIB) \
+          -m32, \
+      LDFLAGS_SUFFIX := -framework Foundation -framework JavaVM \
+          -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
+          -framework JavaNativeFoundation \
+          -lffi, \
+      OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjobjc32, \
+      DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+
+  $(eval $(call SetupNativeCompilation,BUILD_LIBJOBJC64, \
+      LIBRARY := JObjC, \
+      OUTPUT_DIR := $(JDK_OUTPUTDIR)/objs/libjobjc64, \
+      SRC := $(JDK_TOPDIR)/src/macosx/native/jobjc/src/core/native \
+          $(JDK_TOPDIR)/src/macosx/native/jobjc/src/runtime-additions/native, \
+      LANG := C, \
+      OPTIMIZATION := LOW, \
+      CFLAGS := -fpascal-strings \
+          -fobjc-gc \
+          -gdwarf-2 \
+          $(CFLAGS_JDKLIB) -I$(JDK_OUTPUTDIR)/gensrc_headers_jobjc \
+          -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
+          , \
+      LDFLAGS := -fpascal-strings \
+          -fobjc-gc \
+          -gdwarf-2 \
+          $(LDFLAGS_JDKLIB) \
+          $(call SET_SHARED_LIBRARY_ORIGIN), \
+      LDFLAGS_SUFFIX := -framework Foundation -framework JavaVM \
+          -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
+          -framework JavaNativeFoundation \
+          -lffi, \
+      OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjobjc64, \
+      DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+
+  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)JObjC$(SHARED_LIBRARY_SUFFIX): $(BUILD_LIBJOBJC32) $(BUILD_LIBJOBJC64)
+	$(LIPO) -create -output $@ $(BUILD_LIBJOBJC32) $(BUILD_LIBJOBJC64)
+
+  BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)JObjC$(SHARED_LIBRARY_SUFFIX)
+
+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
+
+
+##########################################################################################
+
 all: $(COPY_FILES) $(BUILD_LIBRARIES)
 
 .PHONY: all
--- a/makefiles/CopyFiles.gmk	Fri Oct 11 03:06:10 2013 -0700
+++ b/makefiles/CopyFiles.gmk	Wed Oct 16 12:02:43 2013 -0700
@@ -28,22 +28,22 @@
 OPENJDK_TARGET_OS_INCLUDE = $(INCLUDEDIR)/$(OPENJDK_TARGET_OS)
 
 ifeq ($(OPENJDK_TARGET_OS), windows)
-     OPENJDK_TARGET_OS_INCLUDE = $(INCLUDEDIR)/win32
+  OPENJDK_TARGET_OS_INCLUDE = $(INCLUDEDIR)/win32
 else ifeq ($(OPENJDK_TARGET_OS), macosx)
-     OPENJDK_TARGET_OS_INCLUDE = $(INCLUDEDIR)/darwin
+  OPENJDK_TARGET_OS_INCLUDE = $(INCLUDEDIR)/darwin
 endif
 
 #
 # Copy exported header files to outputdir.
 #
-H_TARGET_FILES =$(INCLUDEDIR)/jdwpTransport.h		\
-		$(INCLUDEDIR)/jni.h 			\
-		$(INCLUDEDIR)/jvmti.h			\
-		$(INCLUDEDIR)/jvmticmlr.h		\
-		$(INCLUDEDIR)/classfile_constants.h	\
-		$(INCLUDEDIR)/jawt.h			\
-		$(OPENJDK_TARGET_OS_INCLUDE)/jni_md.h	\
-		$(OPENJDK_TARGET_OS_INCLUDE)/jawt_md.h
+H_TARGET_FILES = $(INCLUDEDIR)/jdwpTransport.h \
+    $(INCLUDEDIR)/jni.h \
+    $(INCLUDEDIR)/jvmti.h \
+    $(INCLUDEDIR)/jvmticmlr.h \
+    $(INCLUDEDIR)/classfile_constants.h \
+    $(INCLUDEDIR)/jawt.h \
+    $(OPENJDK_TARGET_OS_INCLUDE)/jni_md.h \
+    $(OPENJDK_TARGET_OS_INCLUDE)/jawt_md.h
 
 $(INCLUDEDIR)/%.h: $(JDK_TOPDIR)/src/share/javavm/export/%.h
 	$(call install-file)
@@ -56,22 +56,22 @@
 ##########################################################################################
 
 ifndef OPENJDK
-ifeq ($(OPENJDK_TARGET_OS), windows)
+  ifeq ($(OPENJDK_TARGET_OS), windows)
     COPY_FILES += $(OPENJDK_TARGET_OS_INCLUDE)/bridge/AccessBridgeCallbacks.h \
-		  $(OPENJDK_TARGET_OS_INCLUDE)/bridge/AccessBridgeCalls.h \
-		  $(OPENJDK_TARGET_OS_INCLUDE)/bridge/AccessBridgePackages.h \
-		  $(OPENJDK_TARGET_OS_INCLUDE)/bridge/AccessBridgeCalls.c \
-		  $(JDK_OUTPUTDIR)/lib/accessibility.properties
+        $(OPENJDK_TARGET_OS_INCLUDE)/bridge/AccessBridgeCalls.h \
+        $(OPENJDK_TARGET_OS_INCLUDE)/bridge/AccessBridgePackages.h \
+        $(OPENJDK_TARGET_OS_INCLUDE)/bridge/AccessBridgeCalls.c \
+        $(JDK_OUTPUTDIR)/lib/accessibility.properties
 
     $(OPENJDK_TARGET_OS_INCLUDE)/bridge/%: \
-		$(JDK_TOPDIR)/src/closed/windows/native/sun/bridge/%
-	$(install-file)
+        $(JDK_TOPDIR)/src/closed/windows/native/sun/bridge/%
+		$(install-file)
 
     $(JDK_OUTPUTDIR)/lib/accessibility.properties: \
-		$(JDK_TOPDIR)/src/closed/windows/native/sun/bridge/accessibility.properties
-	$(install-file)
+        $(JDK_TOPDIR)/src/closed/windows/native/sun/bridge/accessibility.properties
+		$(install-file)
 
-endif
+  endif
 endif
 
 ##########################################################################################
@@ -125,9 +125,9 @@
 # Copy flavormap.properties, cursor.properties and cursors gif files to LIBDIR
 #
 ifneq ($(OPENJDK_TARGET_OS), macosx)
-OPENJDK_TARGET_OS_LIB_SRC = $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/lib
+  OPENJDK_TARGET_OS_LIB_SRC = $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/lib
 else
-OPENJDK_TARGET_OS_LIB_SRC = $(JDK_TOPDIR)/src/macosx/lib
+  OPENJDK_TARGET_OS_LIB_SRC = $(JDK_TOPDIR)/src/macosx/lib
 endif
 
 $(LIBDIR)/flavormap.properties: $(OPENJDK_TARGET_OS_LIB_SRC)/flavormap.properties
@@ -145,11 +145,11 @@
 
 CURSORS_LIB_SRC = $(JDK_TOPDIR)/src/share/lib/images/cursors
 ifeq ($(OPENJDK_TARGET_OS), windows)
-CURSORS_SRC_FILES = $(CURSORS_LIB_SRC)/invalid32x32.gif $(wildcard $(CURSORS_LIB_SRC)/win32_*.gif)
+  CURSORS_SRC_FILES = $(CURSORS_LIB_SRC)/invalid32x32.gif $(wildcard $(CURSORS_LIB_SRC)/win32_*.gif)
 else # OPENJDK_TARGET_OS
-CURSORS_SRC_FILES = $(CURSORS_LIB_SRC)/invalid32x32.gif $(wildcard $(CURSORS_LIB_SRC)/motif_*.gif)
+  CURSORS_SRC_FILES = $(CURSORS_LIB_SRC)/invalid32x32.gif $(wildcard $(CURSORS_LIB_SRC)/motif_*.gif)
 endif # OPENJDK_TARGET_OS
-CURSORS_TARGET_FILES =  $(subst $(CURSORS_LIB_SRC),$(CURSORS_DEST_DIR),$(CURSORS_SRC_FILES))
+CURSORS_TARGET_FILES = $(subst $(CURSORS_LIB_SRC),$(CURSORS_DEST_DIR),$(CURSORS_SRC_FILES))
 
 $(CURSORS_DEST_DIR)/%: $(CURSORS_LIB_SRC)/%
 	$(call install-file)
@@ -158,7 +158,7 @@
 
 ##########################################################################################
 
-CONTENT_TYPES_SRC=$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/lib
+CONTENT_TYPES_SRC = $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/lib
 
 $(LIBDIR)/content-types.properties: $(CONTENT_TYPES_SRC)/content-types.properties
 	$(call install-file)
@@ -183,14 +183,14 @@
 
 ##########################################################################################
 
-ifeq ($(OPENJDK_TARGET_OS),windows)
+ifeq ($(OPENJDK_TARGET_OS), windows)
 
-TZMAPPINGS_SRC := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/lib
+  TZMAPPINGS_SRC := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/lib
 
-$(LIBDIR)/tzmappings: $(TZMAPPINGS_SRC)/tzmappings
+  $(LIBDIR)/tzmappings: $(TZMAPPINGS_SRC)/tzmappings
 	$(call install-file)
 
-COPY_FILES += $(LIBDIR)/tzmappings
+  COPY_FILES += $(LIBDIR)/tzmappings
 
 endif
 
@@ -199,13 +199,13 @@
 ICCPROFILE_DEST_DIR := $(LIBDIR)/cmm
 
 ifdef OPENJDK
-    ICCPROFILE_SRC_DIR := $(JDK_TOPDIR)/src/share/lib/cmm/lcms
+  ICCPROFILE_SRC_DIR := $(JDK_TOPDIR)/src/share/lib/cmm/lcms
 else
-    ICCPROFILE_SRC_DIR := $(JDK_TOPDIR)/src/closed/share/lib/cmm/kcms
+  ICCPROFILE_SRC_DIR := $(JDK_TOPDIR)/src/closed/share/lib/cmm/kcms
 endif
 
-ICCPROFILE_SRCS:=$(wildcard $(ICCPROFILE_SRC_DIR)/*.pf)
-ICCPROFILE_TARGET_FILES:=$(subst $(ICCPROFILE_SRC_DIR),$(ICCPROFILE_DEST_DIR),$(ICCPROFILE_SRCS))
+ICCPROFILE_SRCS := $(wildcard $(ICCPROFILE_SRC_DIR)/*.pf)
+ICCPROFILE_TARGET_FILES := $(subst $(ICCPROFILE_SRC_DIR),$(ICCPROFILE_DEST_DIR),$(ICCPROFILE_SRCS))
 
 $(ICCPROFILE_DEST_DIR)%.pf: $(ICCPROFILE_SRC_DIR)%.pf
 	$(call install-file)
@@ -215,60 +215,60 @@
 
 ##########################################################################################
 
-#make sure freetype dll will be available at runtime as well as link time
+# 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).
+# 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.
+# 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
+# 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
-    ifeq ($(OPENJDK_TARGET_OS), windows)
-        FREETYPE_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
+  ifeq ($(OPENJDK_TARGET_OS), windows)
+    FREETYPE_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
+  endif
+
+  $(FREETYPE_LIB): $(FREETYPE2_LIB_PATH)/$(call SHARED_LIBRARY,freetype)
+	$(CP) $(FREETYPE2_LIB_PATH)/$(call SHARED_LIBRARY,freetype) $@
+        ifeq ($(OPENJDK_BUILD_OS), windows)
+	  $(CHMOD) +rx $@
         endif
-    endif
 
-    $(FREETYPE_LIB): $(FREETYPE2_LIB_PATH)/$(call SHARED_LIBRARY,freetype)
-	$(CP) $(FREETYPE2_LIB_PATH)/$(call SHARED_LIBRARY,freetype) $@
-    ifeq ($(OPENJDK_BUILD_OS), windows)
-	$(CHMOD) +rx $@
-    endif
-
-    COPY_FILES += $(FREETYPE_LIB)
+  COPY_FILES += $(FREETYPE_LIB)
 endif
 
 ##########################################################################################
 
 # Copy msvcrXX.dll on windows
 
-ifeq ($(OPENJDK_TARGET_OS),windows)
-    MSVCR_TARGET := $(JDK_OUTPUTDIR)/bin/$(notdir $(MSVCR_DLL))
-    # Chmod to avoid permission issues if bundles are unpacked on unix platforms.
-    $(MSVCR_TARGET): $(MSVCR_DLL)
+ifeq ($(OPENJDK_TARGET_OS), windows)
+  MSVCR_TARGET := $(JDK_OUTPUTDIR)/bin/$(notdir $(MSVCR_DLL))
+  # Chmod to avoid permission issues if bundles are unpacked on unix platforms.
+  $(MSVCR_TARGET): $(MSVCR_DLL)
 	$(call install-file)
 	$(CHMOD) a+rx $@
 
-    COPY_FILES += $(MSVCR_TARGET)
+  COPY_FILES += $(MSVCR_TARGET)
 endif
 
 ##########################################################################################
 
-HPROF_SRC=$(JDK_TOPDIR)/src/share/demo/jvmti/hprof/jvm.hprof.txt
+HPROF_SRC = $(JDK_TOPDIR)/src/share/demo/jvmti/hprof/jvm.hprof.txt
 
-$(LIBDIR)/jvm.hprof.txt : $(HPROF_SRC)
+$(LIBDIR)/jvm.hprof.txt: $(HPROF_SRC)
 	$(call install-file)
 
 COPY_FILES += $(LIBDIR)/jvm.hprof.txt
@@ -279,12 +279,12 @@
 # How to install jvm.cfg.
 #
 ifeq ($(JVM_VARIANT_ZERO), true)
-    JVMCFG_ARCH := zero
+  JVMCFG_ARCH := zero
 else
-    JVMCFG_ARCH := $(OPENJDK_TARGET_CPU_LEGACY)
+  JVMCFG_ARCH := $(OPENJDK_TARGET_CPU_LEGACY)
 endif
 
-ifeq ($(OPENJDK_TARGET_OS),macosx)
+ifeq ($(OPENJDK_TARGET_OS), macosx)
   JVMCFG_SRC := $(JDK_TOPDIR)/src/macosx/bin/$(JVMCFG_ARCH)/jvm.cfg
 else
   JVMCFG_SRC := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/bin/$(JVMCFG_ARCH)/jvm.cfg
@@ -294,7 +294,7 @@
 
 # To do: should this also support -zeroshark?
 
-ifeq ($(OPENJDK_TARGET_CPU_BITS),64)
+ifeq ($(OPENJDK_TARGET_CPU_BITS), 64)
   COPY_JVM_CFG_FILE := true
 else
   # On 32-bit machines we have three potential VMs: client, server and minimal.
@@ -305,7 +305,7 @@
   # The main problem is deciding whether to use aliases for the VMs that are not
   # present and the current position is that we add aliases for client and server, but
   # not for minimal.
-  CLIENT_AND_SERVER := $(and $(findstring true,$(JVM_VARIANT_SERVER)),$(findstring true,$(JVM_VARIANT_CLIENT)))
+  CLIENT_AND_SERVER := $(and $(findstring true, $(JVM_VARIANT_SERVER)), $(findstring true, $(JVM_VARIANT_CLIENT)))
   ifeq ($(CLIENT_AND_SERVER), true)
     COPY_JVM_CFG_FILE := true
   else
@@ -317,35 +317,34 @@
 endif
 
 ifeq ($(COPY_JVM_CFG_FILE), true)
-    $(JVMCFG): $(JVMCFG_SRC)
+  $(JVMCFG): $(JVMCFG_SRC)
 	$(call install-file)
 else
-    $(JVMCFG):
+  $(JVMCFG):
 	$(MKDIR) -p $(@D)
 	$(RM) $(@)
-
-    # Now check for other permutations
-    ifeq ($(JVM_VARIANT_SERVER), true)
-	$(PRINTF) "-server KNOWN\n">>$(@)
-	$(PRINTF) "-client ALIASED_TO -server\n">>$(@)
-        ifeq ($(JVM_VARIANT_MINIMAL1), true)
+        # Now check for other permutations
+        ifeq ($(JVM_VARIANT_SERVER), true)
+	  $(PRINTF) "-server KNOWN\n">>$(@)
+	  $(PRINTF) "-client ALIASED_TO -server\n">>$(@)
+          ifeq ($(JVM_VARIANT_MINIMAL1), true)
 	    $(PRINTF) "-minimal KNOWN\n">>$(@)
-        endif
-    else
-        ifeq ($(JVM_VARIANT_CLIENT), true)
+          endif
+        else
+          ifeq ($(JVM_VARIANT_CLIENT), true)
 	    $(PRINTF) "-client KNOWN\n">>$(@)
 	    $(PRINTF) "-server ALIASED_TO -client\n">>$(@)
             ifeq ($(JVM_VARIANT_MINIMAL1), true)
-	        $(PRINTF) "-minimal KNOWN\n">>$(@)
+	      $(PRINTF) "-minimal KNOWN\n">>$(@)
             endif
-        else
+          else
             ifeq ($(JVM_VARIANT_MINIMAL1), true)
-	        $(PRINTF) "-minimal KNOWN\n">>$(@)
-	        $(PRINTF) "-server ALIASED_TO -minimal\n">>$(@)
-	        $(PRINTF) "-client ALIASED_TO -minimal\n">>$(@)
+	      $(PRINTF) "-minimal KNOWN\n">>$(@)
+	      $(PRINTF) "-server ALIASED_TO -minimal\n">>$(@)
+	      $(PRINTF) "-client ALIASED_TO -minimal\n">>$(@)
             endif
+          endif
         endif
-    endif
 endif
 
 COPY_FILES += $(JVMCFG)
@@ -387,23 +386,23 @@
 
 ifndef OPENJDK
 
-BLACKLIST_SRC   := $(JDK_TOPDIR)/src/closed/share/lib/security/blacklist
-BLACKLIST_DST   := $(JDK_OUTPUTDIR)/lib/security/blacklist
+  BLACKLIST_SRC := $(JDK_TOPDIR)/src/closed/share/lib/security/blacklist
+  BLACKLIST_DST := $(JDK_OUTPUTDIR)/lib/security/blacklist
 
-BLACKLISTED_CERTS_SRC += $(wildcard $(JDK_TOPDIR)/src/closed/share/lib/security/blacklisted.certs)
+  BLACKLISTED_CERTS_SRC += $(wildcard $(JDK_TOPDIR)/src/closed/share/lib/security/blacklisted.certs)
 
-TRUSTEDLIBS_SRC := $(JDK_TOPDIR)/src/closed/share/lib/security/trusted.libraries
-TRUSTEDLIBS_DST := $(JDK_OUTPUTDIR)/lib/security/trusted.libraries
+  TRUSTEDLIBS_SRC := $(JDK_TOPDIR)/src/closed/share/lib/security/trusted.libraries
+  TRUSTEDLIBS_DST := $(JDK_OUTPUTDIR)/lib/security/trusted.libraries
 
-$(BLACKLIST_DST): $(BLACKLIST_SRC)
+  $(BLACKLIST_DST): $(BLACKLIST_SRC)
 	$(call install-file)
 
-COPY_FILES += $(BLACKLIST_DST)
+  COPY_FILES += $(BLACKLIST_DST)
 
-$(TRUSTEDLIBS_DST): $(TRUSTEDLIBS_SRC)
+  $(TRUSTEDLIBS_DST): $(TRUSTEDLIBS_SRC)
 	$(call install-file)
 
-COPY_FILES += $(TRUSTEDLIBS_DST)
+  COPY_FILES += $(TRUSTEDLIBS_DST)
 
 endif
 
@@ -425,98 +424,98 @@
 
 ifndef OPENJDK
 
-SHARED_FONTS_SRC_DIR := $(JDK_TOPDIR)/src/closed/share/lib/fonts
-SHARED_FONTS_DST_DIR := $(JDK_OUTPUTDIR)/lib/fonts
-SHARED_FONTS_FILES   := \
-	LucidaTypewriterRegular.ttf	\
-	LucidaTypewriterBold.ttf        \
-	LucidaBrightRegular.ttf         \
-	LucidaBrightDemiBold.ttf        \
-	LucidaBrightItalic.ttf          \
-	LucidaBrightDemiItalic.ttf	\
-	LucidaSansRegular.ttf       	\
-	LucidaSansDemiBold.ttf       	\
+  SHARED_FONTS_SRC_DIR := $(JDK_TOPDIR)/src/closed/share/lib/fonts
+  SHARED_FONTS_DST_DIR := $(JDK_OUTPUTDIR)/lib/fonts
+  SHARED_FONTS_FILES := \
+      LucidaTypewriterRegular.ttf \
+      LucidaTypewriterBold.ttf \
+      LucidaBrightRegular.ttf \
+      LucidaBrightDemiBold.ttf \
+      LucidaBrightItalic.ttf \
+      LucidaBrightDemiItalic.ttf \
+      LucidaSansRegular.ttf \
+      LucidaSansDemiBold.ttf \
 
-SHARED_FONTS_SRC := $(foreach F,$(SHARED_FONTS_FILES),$(SHARED_FONTS_SRC_DIR)/$(F))
-SHARED_FONTS_DST := $(foreach F,$(SHARED_FONTS_FILES),$(SHARED_FONTS_DST_DIR)/$(F))
+  SHARED_FONTS_SRC := $(foreach F, $(SHARED_FONTS_FILES), $(SHARED_FONTS_SRC_DIR)/$(F))
+  SHARED_FONTS_DST := $(foreach F, $(SHARED_FONTS_FILES), $(SHARED_FONTS_DST_DIR)/$(F))
 
-$(SHARED_FONTS_DST_DIR)/%.ttf : $(SHARED_FONTS_SRC_DIR)/%.ttf
+  $(SHARED_FONTS_DST_DIR)/%.ttf: $(SHARED_FONTS_SRC_DIR)/%.ttf
 	$(call install-file)
 
-$(SHARED_FONTS_DST_DIR)/fonts.dir : $(JDK_TOPDIR)/src/solaris/classes/sun/awt/motif/java.fonts.dir
+  $(SHARED_FONTS_DST_DIR)/fonts.dir: $(JDK_TOPDIR)/src/solaris/classes/sun/awt/motif/java.fonts.dir
 	$(call install-file)
 
-COPY_FILES += $(SHARED_FONTS_DST)
+  COPY_FILES += $(SHARED_FONTS_DST)
 
-ifneq ($(OPENJDK_TARGET_OS), windows)
+  ifneq ($(OPENJDK_TARGET_OS), windows)
     COPY_FILES += $(SHARED_FONTS_DST_DIR)/fonts.dir
-endif
+  endif
 
-ifeq ($(OPENJDK_TARGET_OS), linux)
+  ifeq ($(OPENJDK_TARGET_OS), linux)
 
-# The oblique fonts are only needed/wanted on Linux.
+  # The oblique fonts are only needed/wanted on Linux.
 
-OBL_FONTS_SRC_DIR := $(JDK_TOPDIR)/src/closed/share/lib/fonts/oblique
-OBL_FONTS_DST_DIR := $(JDK_OUTPUTDIR)/lib/oblique-fonts
-OBL_FONTS_FILES   := LucidaTypewriterOblique.ttf LucidaTypewriterBoldOblique.ttf \
-                    LucidaSansOblique.ttf LucidaSansDemiOblique.ttf
+    OBL_FONTS_SRC_DIR := $(JDK_TOPDIR)/src/closed/share/lib/fonts/oblique
+    OBL_FONTS_DST_DIR := $(JDK_OUTPUTDIR)/lib/oblique-fonts
+    OBL_FONTS_FILES := LucidaTypewriterOblique.ttf LucidaTypewriterBoldOblique.ttf \
+        LucidaSansOblique.ttf LucidaSansDemiOblique.ttf
 
-OBL_FONTS_SRC := $(foreach F,$(OBL_FONTS_FILES),$(OBL_FONTS_SRC_DIR)/$(F))
-OBL_FONTS_DST := $(foreach F,$(OBL_FONTS_FILES),$(OBL_FONTS_DST_DIR)/$(F))
+    OBL_FONTS_SRC := $(foreach F, $(OBL_FONTS_FILES), $(OBL_FONTS_SRC_DIR)/$(F))
+    OBL_FONTS_DST := $(foreach F, $(OBL_FONTS_FILES), $(OBL_FONTS_DST_DIR)/$(F))
 
-$(OBL_FONTS_DST_DIR)/%.ttf : $(OBL_FONTS_SRC_DIR)/%.ttf
+    $(OBL_FONTS_DST_DIR)/%.ttf: $(OBL_FONTS_SRC_DIR)/%.ttf
 	$(call install-file)
 
-$(OBL_FONTS_DST_DIR)/fonts.dir : $(JDK_TOPDIR)/src/solaris/classes/sun/awt/motif/java.oblique-fonts.dir
+    $(OBL_FONTS_DST_DIR)/fonts.dir: $(JDK_TOPDIR)/src/solaris/classes/sun/awt/motif/java.oblique-fonts.dir
 	$(call install-file)
 
-COPY_FILES += $(OBL_FONTS_DST) $(OBL_FONTS_DST_DIR)/fonts.dir
+    COPY_FILES += $(OBL_FONTS_DST) $(OBL_FONTS_DST_DIR)/fonts.dir
 
-endif # linux
+  endif # linux
 endif # OPENJDK
 
 ##########################################################################################
 
 ifndef OPENJDK
 
-#
-# Solaris X11 Direct Graphics Access library
-#
+  #
+  # Solaris X11 Direct Graphics Access library
+  #
 
-_DGALIBS_sparc = \
-	libxinerama.so \
-	libjdgaSUNWcg6.so \
-	libjdgaSUNWffb.so \
-	libjdgaSUNWm64.so \
-	libjdgaSUNWafb.so
+  _DGALIBS_sparc = \
+      libxinerama.so \
+      libjdgaSUNWcg6.so \
+      libjdgaSUNWffb.so \
+      libjdgaSUNWm64.so \
+      libjdgaSUNWafb.so
 
-_DGALIBS_sparcv9 = \
-	libxinerama.so \
-	libjdgaSUNWcg6.so \
-	libjdgaSUNWffb.so \
-	libjdgaSUNWm64.so \
-	libjdgaSUNWafb.so
+  _DGALIBS_sparcv9 = \
+      libxinerama.so \
+      libjdgaSUNWcg6.so \
+      libjdgaSUNWffb.so \
+      libjdgaSUNWm64.so \
+      libjdgaSUNWafb.so
 
-_DGALIBS_i586 = 	# no i586 library yet
+  _DGALIBS_i586 = # no i586 library yet
 
-_DGALIBS_amd64 = 	# no amd64 library yet
+  _DGALIBS_amd64 = # no amd64 library yet
 
-DGALIBS = $(_DGALIBS_$(OPENJDK_TARGET_CPU_LEGACY):%=$(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/%)
+  DGALIBS = $(_DGALIBS_$(OPENJDK_TARGET_CPU_LEGACY):%=$(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/%)
 
-$(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libxinerama.so: $(JDK_TOPDIR)/src/closed/solaris/lib/$(OPENJDK_TARGET_CPU_LEGACY)/libxinerama.so
+  $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libxinerama.so: $(JDK_TOPDIR)/src/closed/solaris/lib/$(OPENJDK_TARGET_CPU_LEGACY)/libxinerama.so
 	$(call install-file)
 	$(CHMOD) 755 $@
 
-$(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjdgaSUNW%.so: $(JDK_TOPDIR)/src/closed/solaris/lib/$(OPENJDK_TARGET_CPU_LEGACY)/libjdgaSUNW%.so
+  $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjdgaSUNW%.so: $(JDK_TOPDIR)/src/closed/solaris/lib/$(OPENJDK_TARGET_CPU_LEGACY)/libjdgaSUNW%.so
 	$(call install-file)
 	$(CHMOD) 755 $@
 
-$(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjdgaSUNWafb.so: $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjdgaSUNWffb.so
+  $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjdgaSUNWafb.so: $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjdgaSUNWffb.so
 	$(MKDIR) -p $(@D)
 	$(RM) $@
 	$(LN) -s $(<F) $@
 
-COPY_FILES += $(DGALIBS)
+  COPY_FILES += $(DGALIBS)
 
 endif
 
@@ -524,35 +523,35 @@
 
 ifeq ($(OPENJDK_TARGET_OS), solaris)
 
-SUNPKCS11_CFG_SRC := $(JDK_TOPDIR)/src/share/lib/security/sunpkcs11-solaris.cfg
-SUNPKCS11_CFG_DST := $(JDK_OUTPUTDIR)/lib/security/sunpkcs11-solaris.cfg
+  SUNPKCS11_CFG_SRC := $(JDK_TOPDIR)/src/share/lib/security/sunpkcs11-solaris.cfg
+  SUNPKCS11_CFG_DST := $(JDK_OUTPUTDIR)/lib/security/sunpkcs11-solaris.cfg
 
-$(SUNPKCS11_CFG_DST) : $(SUNPKCS11_CFG_SRC)