Makefile revision 3909
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# 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# 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# 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# 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# Makefile for building all of font tools
c869993e79c1eafbec61a56bf6cea848fe754c71xy# Indicate we want the C++ compiler to do the linking.
c869993e79c1eafbec61a56bf6cea848fe754c71xy# Use higher optimization level
c869993e79c1eafbec61a56bf6cea848fe754c71xy# Created without -z defs on linux
c869993e79c1eafbec61a56bf6cea848fe754c71xy LDLIBS += user32.lib gdi32.lib $(OBJDIR)/../../../sun.awt/awt/$(OBJDIRNAME)/awt.lib
c869993e79c1eafbec61a56bf6cea848fe754c71xyelse # PLATFORM unix
c869993e79c1eafbec61a56bf6cea848fe754c71xy#In the non-OpenJDK mode we need to build T2K
8bb4b220fdb894543e41a5f9037898cf3c3f312bgl#make sure freetype dll will be available at runtime as well as link time
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# 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# 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#TODO: rework this to avoid hardcoding library name in the makefile
c869993e79c1eafbec61a56bf6cea848fe754c71xy FREETYPE_LIB = $(LIB_LOCATION)/$(LIB_PREFIX)freetype.$(LIBRARY_SUFFIX)
c869993e79c1eafbec61a56bf6cea848fe754c71xy FREETYPE_LIB = $(LIB_LOCATION)/$(LIB_PREFIX)freetype.$(LIBRARY_SUFFIX).6
c869993e79c1eafbec61a56bf6cea848fe754c71xy $(CP) $(FREETYPE_LIB_PATH)/$(LIB_PREFIX)freetype.$(LIBRARY_SUFFIX) $@
c869993e79c1eafbec61a56bf6cea848fe754c71xy#ifeq ($(PLATFORM), solaris)
c869993e79c1eafbec61a56bf6cea848fe754c71xy# FILES_reorder += reorder-$(ARCH)
c869993e79c1eafbec61a56bf6cea848fe754c71xy# Add to the ambient vpath to pick up files in subdirectories
c869993e79c1eafbec61a56bf6cea848fe754c71xy# Fontmanager is headless (independent of X/Motif)
c869993e79c1eafbec61a56bf6cea848fe754c71xy CPPFLAGS += -I$(FREETYPE_HEADERS_PATH) -I$(FREETYPE_HEADERS_PATH)/freetype2
c869993e79c1eafbec61a56bf6cea848fe754c71xyelse # PLATFORM
c869993e79c1eafbec61a56bf6cea848fe754c71xy# Libraries to link, and other C flags.
c869993e79c1eafbec61a56bf6cea848fe754c71xy # Note that on Solaris, fontmanager is built against the headless library.
c869993e79c1eafbec61a56bf6cea848fe754c71xy OTHER_LDLIBS += -lawt -L$(LIBDIR)/$(LIBARCH)/xawt -lmawt -lc $(LIBM) $(LIBCXX)
c869993e79c1eafbec61a56bf6cea848fe754c71xyelse # PLATFORM is linux
c869993e79c1eafbec61a56bf6cea848fe754c71xy# set up compile flags..
c869993e79c1eafbec61a56bf6cea848fe754c71xy# Make the Layout Engine build standalone