make/lib/Awt2dLibraries.gmk

Print this page

        

@@ -666,21 +666,60 @@
   endif
 endif
 
 ##########################################################################################
 
-# TODO: Update awt lib path when awt is converted
-$(eval $(call SetupNativeCompilation,BUILD_LIBLCMS, \
+LIBLCMS_DIR := $(JDK_TOPDIR)/src/share/native/sun/java2d/cmm/lcms
+
+ifeq ($(USE_EXTERNAL_LCMS), true)
+
+    # TODO: Update awt lib path when awt is converted
+    $(eval $(call SetupNativeCompilation,BUILD_LIBLCMS, \
+        LIBRARY := lcms, \
+        OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
+        SRC := $(LIBLCMS_DIR), \
+        INCLUDE_FILES := LCMS.c, \
+        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 \
+            $(LCMS_CFLAGS), \
+        CFLAGS_solaris := -xc99=no_lib, \
+        CFLAGS_windows := -DCMS_IS_WINDOWS_, \
+        MAPFILE := $(JDK_TOPDIR)/make/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 $(LCMS_LIBS), \
+        LDFLAGS_SUFFIX_macosx := $(LIBM) -lawt -ljava -ljvm $(LCMS_LIBS), \
+        LDFLAGS_SUFFIX_linux := -lm -lawt -ljava -ljvm $(LCMS_LIBS), \
+        LDFLAGS_SUFFIX_aix := -lm -lawt -ljava -ljvm $(LCMS_LIBS),\
+        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)))
+
+else
+
+    # 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, \
+            -I$(JDK_TOPDIR)/src/share/native/sun/awt/debug \
+            -I$(LIBLCMS_DIR), \
     CFLAGS_solaris := -xc99=no_lib, \
     CFLAGS_windows := -DCMS_IS_WINDOWS_, \
     MAPFILE := $(JDK_TOPDIR)/make/mapfiles/liblcms/mapfile-vers, \
     LDFLAGS := $(LDFLAGS_JDKLIB) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \

@@ -696,10 +735,12 @@
         -D "JDK_INTERNAL_NAME=lcms" \
         -D "JDK_FTYPE=0x2L", \
     OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/liblcms, \
     DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
 
+endif
+
 BUILD_LIBRARIES += $(BUILD_LIBLCMS)
 
 $(BUILD_LIBLCMS): $(BUILD_LIBAWT)
 
 ##########################################################################################