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