--- a/jdk/make/sun/xawt/Makefile Tue Mar 06 10:25:45 2012 +0800
+++ b/jdk/make/sun/xawt/Makefile Tue Mar 06 20:34:38 2012 +0000
@@ -28,6 +28,10 @@
LIBRARY = awt_xawt
PRODUCT = sun
+ifeq ($(PLATFORM), macosx)
+LIB_LOCATION = $(LIBDIR)/xawt
+endif
+
include $(BUILDDIR)/common/Defs.gmk
GEN_DIR=$(GENSRCDIR)/sun/awt/X11
@@ -56,6 +60,11 @@
dummy := $(shell $(MKDIR) -p $(LIB_LOCATION))
endif
+ifeq ($(PLATFORM), macosx))
+LDFLAGS += -pthread
+dummy := $(shell $(MKDIR) -p $(LIB_LOCATION))
+endif
+
# Since this library will be living in a subdirectory below the other libraries
# we need to add an extra runpath so that libraries in the upper directory
# are found at runtime.
@@ -90,7 +99,7 @@
vpath %.c $(PLATFORM_SRC)/native/sun/java2d/opengl
vpath %.c $(PLATFORM_SRC)/native/sun/java2d/x11
-OTHER_LDLIBS = $(LIBM) -lawt -lXext -lX11 -lXrender -ldl \
+OTHER_LDLIBS = $(LIBM) -lawt -lXext -lX11 -lXrender $(LIBDL) \
$(LDFLAGS_COMMON) $(AWT_RUNPATH) $(OTHER_LDFLAGS) -lXtst -lXi
ifeq ($(PLATFORM), solaris)
@@ -161,6 +170,10 @@
endif
endif
+ifeq ($(PLATFORM), macosx)
+ CPPFLAGS += -DX11_PATH=\"$(X11_PATH)\" -DPACKAGE_PATH=\"$(PACKAGE_PATH)\"
+endif
+
ifeq ($(MILESTONE), internal)
CPPFLAGS += -DINTERNAL_BUILD
endif
@@ -205,6 +218,13 @@
else # !solaris
+ifeq ($(PLATFORM), macosx)
+CFLAGS_32=-arch i386
+SIZERS = $(SIZER).32 $(SIZER).64
+SIZERS_C = $(SIZER_32_C) $(SIZER_64_C)
+SIZES = $(WRAPPER_GENERATOR_DIR)/sizes.32 $(WRAPPER_GENERATOR_DIR)/sizes.64
+CFLAGS_64=-arch x86_64
+else # !macosx
ifeq ($(ARCH_DATA_MODEL), 32)
SIZERS = $(SIZER).32
SIZERS_C = $(SIZER_32_C)
@@ -214,7 +234,7 @@
SIZERS_C = $(SIZER_64_C)
SIZES = $(WRAPPER_GENERATOR_DIR)/sizes.64
endif # 32
-
+endif # !macosx
endif # solaris
# XXX Hack for 6185483 - use hard-coded sizes.