Makefile revision 2362
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# This code is free software; you can redistribute it and/or modify it
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# under the terms of the GNU General Public License version 2 only, as
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# published by the Free Software Foundation. Oracle designates this
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# particular file as subject to the "Classpath" exception as provided
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# by Oracle in the LICENSE file that accompanied this code.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# This code is distributed in the hope that it will be useful, but WITHOUT
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov# version 2 for more details (a copy is included in the LICENSE file that
5dbfd19ad5fcc2b779f40f80fa05c1bd28fd0b4eTheo Schlossnagle# accompanied this code).
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov# You should have received a copy of the GNU General Public License version
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# 2 along with this work; if not, write to the Free Software Foundation,
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# or visit www.oracle.com if you need additional information or have any
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# Makefile for building all of font tools
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# Indicate we want the C++ compiler to do the linking.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# Use higher optimization level
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# Created without -z defs on linux
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweFILES_java += java/awt/Font.java java/text/Bidi.java
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe LDLIBS += user32.lib gdi32.lib $(OBJDIR)/../../../sun.awt/awt/$(OBJDIRNAME)/awt.lib
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweelse # PLATFORM unix
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#In the non-OpenJDK mode we need to build T2K
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#make sure freetype dll will be available at runtime as well as link time
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#NB: Default freetype build system uses -h linker option and
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# result .so contains hardcoded library name that is later
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# used for adding dependencies to other objects
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# It is not obvious how to extract that hardcoded name (libfreetype.so.6)
ce83b99835cc4643ab0fefd88dea62427d9ced5eRobert Mustacchi# without overcomplicating logic here.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# To workaround this we hardcode .6 suffix for now.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# Note that .so.6 library will not be found by System.loadLibrary()
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# but fortunately we need to load FreeType library explicitly
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# on windows only
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#TODO: rework this to avoid hardcoding library name in the makefile
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe FREETYPE_LIB = $(LIB_LOCATION)/$(LIB_PREFIX)freetype.$(LIBRARY_SUFFIX)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe OTHER_LDLIBS += $(FREETYPE_LIB_PATH)/freetype.lib
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe FREETYPE_LIB = $(LIB_LOCATION)/$(LIB_PREFIX)freetype.$(LIBRARY_SUFFIX).6
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe OTHER_LDLIBS += -L$(FREETYPE_LIB_PATH) -lfreetype
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(CP) $(FREETYPE_LIB_PATH)/$(LIB_PREFIX)freetype.$(LIBRARY_SUFFIX) $@
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#ifeq ($(PLATFORM), solaris)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# FILES_reorder += reorder-$(ARCH)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# Add to the ambient vpath to pick up files in subdirectories
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowevpath %.cpp $(SHARE_SRC)/native/$(PKGDIR)/layout
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# Fontmanager is headless (independent of X/Motif)
d2b9ba291ef0d1dc8807b6d46996674c723924d0Robert Mustacchi CPPFLAGS += -I$(CLOSED_SRC)/share/native/$(PKGDIR)/t2k
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe CPPFLAGS += -I$(FREETYPE_HEADERS_PATH) -I$(FREETYPE_HEADERS_PATH)/freetype2
b65dd972486b1f5913d705d2a0cb9c3fb189a9e0Robert Mustacchielse # PLATFORM
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# Libraries to link, and other C flags.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe # Note that on Solaris, fontmanager is built against the headless library.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe OTHER_LDLIBS += -lawt -L$(LIBDIR)/$(LIBARCH)/xawt -lmawt -lc $(LIBM) $(LIBCXX)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweelse # PLATFORM is linux
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe OTHER_LDLIBS += -Wl,-Bstatic -lgcc_eh -Wl,-Bdynamic
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# set up compile flags..
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCPPFLAGS += -I$(PLATFORM_SRC)/native/sun/windows
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# Make the Layout Engine build standalone