jdk/make/sun/font/Makefile
author xdono
Wed, 02 Jul 2008 12:55:45 -0700
changeset 715 f16baef3a20e
parent 550 e85f91b9bb95
child 849 be386e469547
child 889 6549643c008c
child 917 75261da60fff
permissions -rw-r--r--
6719955: Update copyright year Summary: Update copyright year for files that have been modified in 2008 Reviewed-by: ohair, tbell
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
#
715
f16baef3a20e 6719955: Update copyright year
xdono
parents: 550
diff changeset
     2
# Copyright 1997-2008 Sun Microsystems, Inc.  All Rights Reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
90ce3da70b43 Initial load
duke
parents:
diff changeset
     7
# published by the Free Software Foundation.  Sun designates this
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
90ce3da70b43 Initial load
duke
parents:
diff changeset
     9
# by Sun in the LICENSE file that accompanied this code.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
# accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    21
# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    22
# CA 95054 USA or visit www.sun.com if you need additional information or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    23
# have any questions.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
# Makefile for building all of font tools
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
BUILDDIR = ../..
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
PACKAGE = sun.font
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
LIBRARY = fontmanager
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
PRODUCT = sun
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
# Indicate we want the C++ compiler to do the linking.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
CPLUSPLUSLIBRARY=true
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
include $(BUILDDIR)/common/Defs.gmk
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
# Created without -z defs on linux
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
ifeq ($(PLATFORM), linux)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
  LDFLAGS_DEFS_OPTION =
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
# Files
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
# Use higher optimization level
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
_OPT = $(CC_HIGHER_OPT)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
include FILES_c.gmk
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
AUTO_FILES_JAVA_DIRS = sun/font
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
FILES_java += java/awt/Font.java java/text/Bidi.java 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
FILES_export = \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
    sun/font/SunLayoutEngine.java \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
    java/awt/Font.java \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
    java/text/Bidi.java \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
    sun/font/FileFont.java \
550
e85f91b9bb95 6656651: Windows Look and Feel LCD glyph images have some differences from native applications.
prr
parents: 2
diff changeset
    66
    sun/font/FileFontStrike.java \
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
    sun/font/FontManager.java \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
    sun/font/GlyphList.java \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
    sun/font/NativeFont.java \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
    sun/font/StrikeCache.java \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
    sun/font/NullFontScaler.java \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
    sun/font/FreetypeFontScaler.java \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
    sun/java2d/loops/DrawGlyphList.java \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
    sun/java2d/loops/DrawGlyphListAA.java \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
    sun/java2d/loops/DrawGlyphListLCD.java \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
    sun/java2d/loops/GraphicsPrimitive.java
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
ifeq ($(PLATFORM), windows)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
  # Files built here do not compile with warning level 3 if warnings are fatal
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
  COMPILER_WARNINGS_FATAL=false
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
  LDLIBS += user32.lib gdi32.lib $(OBJDIR)/../../../sun.awt/awt/$(OBJDIRNAME)/awt.lib  
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
  OTHER_CFLAGS += -DCC_NOEX
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
  OTHER_CXXFLAGS += -DCC_NOEX
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
  FILES_export += sun/java2d/d3d/D3DTextRenderer.java
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
else # PLATFORM unix
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
  FILES_export += \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
    sun/font/NativeStrike.java \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
    sun/font/NativeStrikeDisposer.java \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
    sun/font/X11TextRenderer.java \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
    sun/awt/X11GraphicsEnvironment.java 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
endif # PLATFORM
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
#In the non-OpenJDK mode we need to build T2K
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
ifndef OPENJDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
t2k:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
	$(ECHO) "lib=" $(ACTUAL_LIBRARY)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
	$(MAKE) -C t2k
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
all build: t2k
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
t2k: library
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
clean clobber::
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
	$(MAKE) -C t2k clean
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
FILES_m=mapfile-vers.openjdk
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
#make sure freetype dll will be available at runtime as well as link time
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
#NB: Default freetype build system uses -h linker option and 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
#   result .so contains hardcoded library name that is later 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
#   used for adding dependencies to other objects 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
#   (e.g. libfontmanager.so).
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
#   
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
#   It is not obvious how to extract that hardcoded name (libfreetype.so.6)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
#   without overcomplicating logic here.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
#   To workaround this we hardcode .6 suffix for now.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
#   Note that .so.6 library will not be found by System.loadLibrary()
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
#        but fortunately we need to load FreeType library explicitly 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
#        on windows only  
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
#TODO: rework this to avoid hardcoding library name in the makefile
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
library:: $(LIB_LOCATION)/$(LIB_PREFIX)freetype.$(LIBRARY_SUFFIX)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
$(LIB_LOCATION)/$(LIB_PREFIX)freetype.$(LIBRARY_SUFFIX):
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
ifeq ($(PLATFORM), windows)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
	$(CP) $(FREETYPE_LIB_PATH)/$(LIB_PREFIX)freetype.$(LIBRARY_SUFFIX) $@
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
else 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
  ifeq ($(USING_SYSTEM_FT_LIB), false)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
	$(CP) $(FREETYPE_LIB_PATH)/$(LIB_PREFIX)freetype.$(LIBRARY_SUFFIX) $@.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
endif 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
#ifeq ($(PLATFORM), solaris)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
#  FILES_reorder += reorder-$(ARCH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
#endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
include $(BUILDDIR)/common/Mapfile-vers.gmk
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
include $(BUILDDIR)/common/Library.gmk
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
.PHONY: t2k build all clean clobber
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
# Add to the ambient vpath to pick up files in subdirectories
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
vpath %.c   $(PLATFORM_SRC)/native/$(PKGDIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
vpath %.c   $(SHARE_SRC)/native/$(PKGDIR)/bidi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
vpath %.cpp   $(SHARE_SRC)/native/$(PKGDIR)/layout
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
vpath %.cpp   $(SHARE_SRC)/native/$(PKGDIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
# Fontmanager is headless (independent of X/Motif)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
CFLAGS       += -DHEADLESS
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
CXXFLAGS     += -DHEADLESS
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
ifndef OPENJDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
  CPPFLAGS += -I$(CLOSED_SRC)/share/native/$(PKGDIR)/t2k
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
  CPPFLAGS += -I$(FREETYPE_HEADERS_PATH) -I$(FREETYPE_HEADERS_PATH)/freetype2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
  OTHER_LDLIBS += $(FREETYPE_LIB)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
ifeq ($(PLATFORM), windows)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
vpath %.cpp   $(PLATFORM_SRC)/native/sun/windows
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
vpath %.cpp   $(PLATFORM_SRC)/native/sun/java2d/d3d
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
else # PLATFORM
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
# Libraries to link, and other C flags.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
ifeq ($(PLATFORM), solaris)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
  # Note that on Solaris, fontmanager is built against the headless library.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
  LDFLAGS      += -L$(LIBDIR)/$(LIBARCH)/headless
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
  OTHER_LDLIBS += -lawt -L$(LIBDIR)/$(LIBARCH)/xawt -lmawt -lc $(LIBM) $(LIBCXX)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
else # PLATFORM is linux
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
 OTHER_LDLIBS  += -lawt $(LIBM) $(LIBCXX)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
  ifeq ("$(CC_VER_MAJOR)", "3")
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
    OTHER_LDLIBS  += -Wl,-Bstatic -lgcc_eh -Wl,-Bdynamic
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
  endif                           
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
endif # PLATFORM
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
# set up compile flags..
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
CPPFLAGS += -I$(SHARE_SRC)/native/$(PKGDIR) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
            -I$(SHARE_SRC)/native/$(PKGDIR)/layout \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
            -I$(SHARE_SRC)/native/$(PKGDIR)/bidi \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
	    -I$(SHARE_SRC)/native/sun/awt/image/cvutils \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
	    -I$(PLATFORM_SRC)/native/sun/awt \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
	    -I$(SHARE_SRC)/native/sun/awt/debug \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
	    -I$(SHARE_SRC)/native/sun/java2d/loops \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
	    -I$(SHARE_SRC)/native/sun/java2d/pipe \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
            -I$(PLATFORM_SRC)/native/sun/java2d \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
	    -I$(SHARE_SRC)/native/sun/java2d \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
	    -I$(TEMPDIR)/../../sun.awt/awt/CClassHeaders
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
ifeq ($(PLATFORM), windows)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
CPPFLAGS += -I$(PLATFORM_SRC)/native/sun/windows \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
	    -I$(PLATFORM_SRC)/native/sun/java2d/d3d
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212