Makefile 3.8 KB
Newer Older
D
duke 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126
#
# Copyright 2007 Sun Microsystems, Inc.  All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation.  Sun designates this
# particular file as subject to the "Classpath" exception as provided
# by Sun in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
# CA 95054 USA or visit www.sun.com if you need additional information or
# have any questions.
#

# WARNING: Make sure the OPENJDK plugs are up-to-date, see make/common/internal/BinaryPlugs.gmk

#
# Makefile for building t2k rasteriser.
#

BUILDDIR = ../../..
PACKAGE = sun.font
LIBRARY = t2k
PRODUCT = sun

# Indicate we want the C++ compiler to do the linking.
CPLUSPLUSLIBRARY=true

# Part of the sun.font package, but doesn't rebuild classes (except
# for a few ones with native methods) so shouldn't clobber them.
DONT_CLOBBER_CLASSES=true

include $(BUILDDIR)/common/Defs.gmk

#
# Use higher optimization level
#
_OPT = $(CC_HIGHER_OPT)

#
# Files
#
include FILES_c.gmk

FILES_export = \
    java/awt/Font.java \
    sun/font/FileFont.java \
    sun/font/FontManager.java \
    sun/font/GlyphList.java \
    sun/font/NativeFont.java \
    sun/font/StrikeCache.java \
    sun/font/T2KFontScaler.java 

ifeq ($(PLATFORM), windows)

  # Files built here do not compile with warning level 3 if warnings are fatal
  COMPILER_WARNINGS_FATAL=false

  # t2k imports several shared methods from fontmanager.dll
  LDLIBS += user32.lib $(OBJDIR)/../../../sun.font/fontmanager/$(OBJDIRNAME)/fontmanager.lib

  OTHER_CFLAGS += -DCC_NOEX
  OTHER_CXXFLAGS += -DCC_NOEX

endif # PLATFORM

#
# In the OpenJDK mode we are not building anything
#
ifndef OPENJDK
include $(BUILDDIR)/common/Mapfile-vers.gmk
include $(BUILDDIR)/common/Library.gmk
endif 

#
# Add to the ambient vpath to pick up files in subdirectories
#
vpath %.c   $(SHARE_SRC)/share/native/$(PKGDIR)
vpath %.c   $(PLATFORM_SRC)/native/$(PKGDIR)
vpath %.c   $(CLOSED_SRC)/share/native/$(PKGDIR)
vpath %.c   $(CLOSED_SRC)/share/native/$(PKGDIR)/t2k
vpath %.c   $(CLOSED_SRC)/share/native/$(PKGDIR)/t2k/ttHints

vpath %.cpp   $(SHARE_SRC)/native/$(PKGDIR)
vpath %.cpp   $(CLOSED_SRC)/share/native/$(PKGDIR)

# Libraries to link, and other C flags.
#
# setup the list of libraries to link in...
ifneq ($(PLATFORM), windows)
  OTHER_LDLIBS  +=  $(LIBM) $(LIBCXX) -lfontmanager
  ifeq ($(PLATFORM), linux)
    ifeq ("$(CC_VER_MAJOR)", "3")
      OTHER_LDLIBS  += -Wl,-Bstatic -lgcc_eh -Wl,-Bdynamic
    endif                           
  else
    ifeq ($(PLATFORM), solaris)
      OTHER_LDLIBS += -lawt -L$(LIBDIR)/$(LIBARCH)/xawt -lmawt
    endif
  endif
endif


# set up compile flags..

CPPFLAGS += -I$(SHARE_SRC)/native/$(PKGDIR) \
            -I$(CLOSED_SRC)/share/native/$(PKGDIR)/t2k \
            -I$(CLOSED_SRC)/share/native/$(PKGDIR) \
            -I$(SHARE_SRC)/share/native/$(PKGDIR) \
            -I$(PLATFORM_SRC)/native/$(PKGDIR) \
            -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)/../fontmanager/CClassHeaders