Makefile revision 493
4117N/A#
4117N/A# Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
4117N/A# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4117N/A#
4117N/A# This code is free software; you can redistribute it and/or modify it
4117N/A# under the terms of the GNU General Public License version 2 only, as
4117N/A# published by the Free Software Foundation. Sun designates this
4117N/A# particular file as subject to the "Classpath" exception as provided
4117N/A# by Sun in the LICENSE file that accompanied this code.
4117N/A#
4117N/A# This code is distributed in the hope that it will be useful, but WITHOUT
4117N/A# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4117N/A# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
4117N/A# version 2 for more details (a copy is included in the LICENSE file that
4117N/A# accompanied this code).
4117N/A#
4117N/A# You should have received a copy of the GNU General Public License version
4117N/A# 2 along with this work; if not, write to the Free Software Foundation,
4117N/A# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4117N/A#
5680N/A# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
5680N/A# CA 95054 USA or visit www.sun.com if you need additional information or
5402N/A# have any questions.
4117N/A#
5680N/A
4117N/A#
4117N/A# Makefile for building all of font tools
4117N/A#
5248N/A
4117N/ABUILDDIR = ../..
5248N/APACKAGE = sun.font
4117N/ALIBRARY = fontmanager
4117N/APRODUCT = sun
5248N/A
4117N/A# Indicate we want the C++ compiler to do the linking.
5680N/ACPLUSPLUSLIBRARY=true
5680N/A
5680N/Ainclude $(BUILDDIR)/common/Defs.gmk
4117N/A
5402N/A#
5402N/A# Created without -z defs on linux
5402N/A#
5402N/Aifeq ($(PLATFORM), linux)
5402N/A LDFLAGS_DEFS_OPTION =
5402N/Aendif
5402N/A
5402N/A#
5402N/A# Files
5402N/A#
5402N/A
5402N/A#
5402N/A# Use higher optimization level
4156N/A#
4156N/A_OPT = $(CC_HIGHER_OPT)
4156N/A
5248N/Ainclude FILES_c.gmk
4156N/A
4156N/AAUTO_FILES_JAVA_DIRS = sun/font
4156N/AFILES_java += java/awt/Font.java java/text/Bidi.java
4156N/A
4156N/AFILES_export = \
5248N/A sun/font/SunLayoutEngine.java \
5248N/A java/awt/Font.java \
5248N/A java/text/Bidi.java \
5248N/A sun/font/FileFont.java \
5248N/A sun/font/FileFontStrike.java \
5248N/A sun/font/FontManager.java \
5248N/A sun/font/GlyphList.java \
4156N/A sun/font/NativeFont.java \
4156N/A sun/font/StrikeCache.java \
4117N/A sun/font/NullFontScaler.java \
4117N/A sun/font/FreetypeFontScaler.java \
4117N/A sun/java2d/loops/DrawGlyphList.java \
4117N/A sun/java2d/loops/DrawGlyphListAA.java \
4117N/A sun/java2d/loops/DrawGlyphListLCD.java \
4117N/A sun/java2d/loops/GraphicsPrimitive.java
4117N/A
4117N/Aifeq ($(PLATFORM), windows)
4117N/A
4117N/A LDLIBS += user32.lib gdi32.lib $(OBJDIR)/../../../sun.awt/awt/$(OBJDIRNAME)/awt.lib
5680N/A
5680N/A OTHER_CFLAGS += -DCC_NOEX
4117N/A OTHER_CXXFLAGS += -DCC_NOEX
4117N/A
4117N/Aelse # PLATFORM unix
4117N/A
4117N/A FILES_export += \
4117N/A sun/font/NativeStrike.java \
4117N/A sun/font/NativeStrikeDisposer.java \
4745N/A sun/font/X11TextRenderer.java \
4745N/A sun/awt/X11GraphicsEnvironment.java
4117N/A
4117N/Aendif # PLATFORM
4117N/A
4117N/A#In the non-OpenJDK mode we need to build T2K
4117N/Aifndef OPENJDK
4117N/At2k:
4117N/A $(ECHO) "lib=" $(ACTUAL_LIBRARY)
4117N/A $(MAKE) -C t2k
4117N/A
4117N/Aall build: t2k
4745N/At2k: library
4745N/Aclean clobber::
4745N/A $(MAKE) -C t2k clean
4745N/Aelse
4745N/A
4117N/AFILES_m=mapfile-vers.openjdk
4117N/A
4745N/A#make sure freetype dll will be available at runtime as well as link time
4745N/A#
4745N/A#NB: Default freetype build system uses -h linker option and
4745N/A# result .so contains hardcoded library name that is later
4745N/A# used for adding dependencies to other objects
4117N/A# (e.g. libfontmanager.so).
4117N/A#
4117N/A# It is not obvious how to extract that hardcoded name (libfreetype.so.6)
4117N/A# without overcomplicating logic here.
4117N/A# To workaround this we hardcode .6 suffix for now.
4117N/A#
4117N/A# Note that .so.6 library will not be found by System.loadLibrary()
4117N/A# but fortunately we need to load FreeType library explicitly
4117N/A# on windows only
4117N/A#
4156N/A#TODO: rework this to avoid hardcoding library name in the makefile
4156N/A#
4156N/Alibrary:: $(LIB_LOCATION)/$(LIB_PREFIX)freetype.$(LIBRARY_SUFFIX)
4156N/A
4156N/A$(LIB_LOCATION)/$(LIB_PREFIX)freetype.$(LIBRARY_SUFFIX):
4156N/Aifeq ($(PLATFORM), windows)
4745N/A $(CP) $(FREETYPE_LIB_PATH)/$(LIB_PREFIX)freetype.$(LIBRARY_SUFFIX) $@
4117N/Aelse
4745N/A ifeq ($(USING_SYSTEM_FT_LIB), false)
4337N/A $(CP) $(FREETYPE_LIB_PATH)/$(LIB_PREFIX)freetype.$(LIBRARY_SUFFIX) $@.6
4117N/A endif
4117N/Aendif
4117N/Aendif
4117N/A
#ifeq ($(PLATFORM), solaris)
# FILES_reorder += reorder-$(ARCH)
#endif
include $(BUILDDIR)/common/Mapfile-vers.gmk
include $(BUILDDIR)/common/Library.gmk
.PHONY: t2k build all clean clobber
#
# Add to the ambient vpath to pick up files in subdirectories
#
vpath %.c $(PLATFORM_SRC)/native/$(PKGDIR)
vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/bidi
vpath %.cpp $(SHARE_SRC)/native/$(PKGDIR)/layout
vpath %.cpp $(SHARE_SRC)/native/$(PKGDIR)
#
# Fontmanager is headless (independent of X/Motif)
#
CFLAGS += -DHEADLESS
CXXFLAGS += -DHEADLESS
ifndef OPENJDK
CPPFLAGS += -I$(CLOSED_SRC)/share/native/$(PKGDIR)/t2k
else
CPPFLAGS += -I$(FREETYPE_HEADERS_PATH) -I$(FREETYPE_HEADERS_PATH)/freetype2
OTHER_LDLIBS += $(FREETYPE_LIB)
endif
ifeq ($(PLATFORM), windows)
vpath %.cpp $(PLATFORM_SRC)/native/sun/windows
else # PLATFORM
#
# Libraries to link, and other C flags.
#
ifeq ($(PLATFORM), solaris)
# Note that on Solaris, fontmanager is built against the headless library.
LDFLAGS += -L$(LIBDIR)/$(LIBARCH)/headless
OTHER_LDLIBS += -lawt -L$(LIBDIR)/$(LIBARCH)/xawt -lmawt -lc $(LIBM) $(LIBCXX)
else # PLATFORM is linux
OTHER_LDLIBS += -lawt $(LIBM) $(LIBCXX)
ifeq ("$(CC_VER_MAJOR)", "3")
OTHER_LDLIBS += -Wl,-Bstatic -lgcc_eh -Wl,-Bdynamic
endif
endif
endif # PLATFORM
# set up compile flags..
CPPFLAGS += -I$(SHARE_SRC)/native/$(PKGDIR) \
-I$(SHARE_SRC)/native/$(PKGDIR)/layout \
-I$(SHARE_SRC)/native/$(PKGDIR)/bidi \
-I$(SHARE_SRC)/native/sun/awt/image/cvutils \
-I$(PLATFORM_SRC)/native/sun/awt \
-I$(SHARE_SRC)/native/sun/awt/debug \
-I$(SHARE_SRC)/native/sun/java2d/loops \
-I$(SHARE_SRC)/native/sun/java2d/pipe \
-I$(PLATFORM_SRC)/native/sun/java2d \
-I$(SHARE_SRC)/native/sun/java2d \
-I$(TEMPDIR)/../../sun.awt/awt/CClassHeaders
ifeq ($(PLATFORM), windows)
CPPFLAGS += -I$(PLATFORM_SRC)/native/sun/windows
endif