8012629: java.lang.UnsatisfiedLinkError exception throw by getAllFonts() on MacOSX
Reviewed-by: bae, prr
diff --git a/make/sun/awt/mawt.gmk b/make/sun/awt/mawt.gmk
index 5abf993..7ca0520 100644
--- a/make/sun/awt/mawt.gmk
+++ b/make/sun/awt/mawt.gmk
@@ -43,6 +43,10 @@
# compiled based on the motif version.
FILES_c = $(FILES_NO_MOTIF_c)
+ifeq ($(PLATFORM), macosx)
+FILES_objc = $(FILES_NO_MOTIF_objc)
+endif # PLATFORM
+
ifeq ($(PLATFORM), solaris)
ifneq ($(ARCH), amd64)
FILES_reorder += reorder-$(ARCH)
@@ -97,6 +101,10 @@
vpath %.cpp $(SHARE_SRC)/native/$(PKGDIR)/image
vpath %.c $(PLATFORM_SRC)/native/$(PKGDIR)/robot_child
+ifeq ($(PLATFORM), macosx)
+vpath %.m $(call NativeSrcDirList,,native/sun/font)
+endif # PLATFORM
+
#
# Libraries to link in.
#
@@ -192,13 +200,21 @@
$(EVENT_MODEL)
ifeq ($(PLATFORM), macosx)
-CPPFLAGS += -I$(CUPS_HEADERS_PATH)
+CPPFLAGS += -I$(CUPS_HEADERS_PATH) \
+ $(call NativeSrcDirList,-I,native/sun/awt) \
+ $(call NativeSrcDirList,-I,native/sun/font)
ifndef HEADLESS
CPPFLAGS += -I$(MOTIF_DIR)/include \
-I$(OPENWIN_HOME)/include
LDFLAGS += -L$(MOTIF_LIB) -L$(OPENWIN_LIB)
-
+else
+LDFLAGS += -framework Accelerate \
+ -framework ApplicationServices \
+ -framework Cocoa \
+ -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
+ -framework JavaNativeFoundation \
+ -framework JavaRuntimeSupport
endif # !HEADLESS
endif # PLATFORM