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