jdk/makefiles/CompileNativeLibraries.gmk

Print this page
rev 7322 : [mq]: system-icu

@@ -1341,19 +1341,26 @@
 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
 
+ifeq ($(USE_EXTERNAL_ICU_LE),true)
+    BUILD_LIBFONTMANAGER_CFLAGS_COMMON+=\
+                        -DUSE_EXTERNAL_ICU_LE
+else
+    BUILD_LIBFONTMANAGER_CFLAGS_COMMON+=\
+                        -I$(JDK_TOPDIR)/src/share/native/sun/font/layout
+endif
+
 # Turn off aliasing with GCC for ExtensionSubtables.cpp
 ifeq ($(OPENJDK_TARGET_OS), linux)
     BUILD_LIBFONTMANAGER_ExtensionSubtables.cpp_CXXFLAGS:=-fno-strict-aliasing
 endif
 

@@ -1363,19 +1370,19 @@
                 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),\
+                CFLAGS:=$(CFLAGS_JDKLIB) $(BUILD_LIBFONTMANAGER_CFLAGS_COMMON) $(ICU_LE_CFLAGS),\
+                CXXFLAGS:=$(CXXFLAGS_JDKLIB) $(BUILD_LIBFONTMANAGER_CFLAGS_COMMON) $(ICU_LE_CFLAGS),\
                 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:=$(BUILD_LIBFONTMANAGER_FONTLIB) $(ICU_LE_LIBS),\
                 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 \