jdk/make/sun/font/Makefile
author lana
Tue, 05 Aug 2008 17:44:17 -0700
changeset 890 7336798a900d
parent 889 6549643c008c
parent 849 be386e469547
child 922 8725ccb1a22d
permissions -rw-r--r--
Merge
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
  LDLIBS += user32.lib gdi32.lib $(OBJDIR)/../../../sun.awt/awt/$(OBJDIRNAME)/awt.lib  
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
  OTHER_CFLAGS += -DCC_NOEX
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
  OTHER_CXXFLAGS += -DCC_NOEX
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
else # PLATFORM unix
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
  FILES_export += \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
    sun/font/NativeStrike.java \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
    sun/font/NativeStrikeDisposer.java \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
    sun/font/X11TextRenderer.java \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
    sun/awt/X11GraphicsEnvironment.java 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
endif # PLATFORM
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
#In the non-OpenJDK mode we need to build T2K
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
ifndef OPENJDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
t2k:
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
	$(ECHO) "lib=" $(ACTUAL_LIBRARY)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
	$(MAKE) -C t2k
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
all build: t2k
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
t2k: library
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
clean clobber::
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
	$(MAKE) -C t2k clean
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
FILES_m=mapfile-vers.openjdk
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
#make sure freetype dll will be available at runtime as well as link time
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
#NB: Default freetype build system uses -h linker option and 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
#   result .so contains hardcoded library name that is later 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
#   used for adding dependencies to other objects 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
#   (e.g. libfontmanager.so).
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
#   
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
#   It is not obvious how to extract that hardcoded name (libfreetype.so.6)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
#   without overcomplicating logic here.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
#   To workaround this we hardcode .6 suffix for now.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
#   Note that .so.6 library will not be found by System.loadLibrary()
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
#        but fortunately we need to load FreeType library explicitly 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
#        on windows only  
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
#TODO: rework this to avoid hardcoding library name in the makefile
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
library:: $(LIB_LOCATION)/$(LIB_PREFIX)freetype.$(LIBRARY_SUFFIX)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
$(LIB_LOCATION)/$(LIB_PREFIX)freetype.$(LIBRARY_SUFFIX):
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
ifeq ($(PLATFORM), windows)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
	$(CP) $(FREETYPE_LIB_PATH)/$(LIB_PREFIX)freetype.$(LIBRARY_SUFFIX) $@
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
else 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
  ifeq ($(USING_SYSTEM_FT_LIB), false)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
	$(CP) $(FREETYPE_LIB_PATH)/$(LIB_PREFIX)freetype.$(LIBRARY_SUFFIX) $@.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
endif 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
#ifeq ($(PLATFORM), solaris)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
#  FILES_reorder += reorder-$(ARCH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
#endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
include $(BUILDDIR)/common/Mapfile-vers.gmk
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
include $(BUILDDIR)/common/Library.gmk
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
.PHONY: t2k build all clean clobber
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
# Add to the ambient vpath to pick up files in subdirectories
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
vpath %.c   $(PLATFORM_SRC)/native/$(PKGDIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
vpath %.c   $(SHARE_SRC)/native/$(PKGDIR)/bidi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
vpath %.cpp   $(SHARE_SRC)/native/$(PKGDIR)/layout
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
vpath %.cpp   $(SHARE_SRC)/native/$(PKGDIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
# Fontmanager is headless (independent of X/Motif)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
CFLAGS       += -DHEADLESS
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
CXXFLAGS     += -DHEADLESS
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
ifndef OPENJDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
  CPPFLAGS += -I$(CLOSED_SRC)/share/native/$(PKGDIR)/t2k
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
  CPPFLAGS += -I$(FREETYPE_HEADERS_PATH) -I$(FREETYPE_HEADERS_PATH)/freetype2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
  OTHER_LDLIBS += $(FREETYPE_LIB)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
ifeq ($(PLATFORM), windows)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
vpath %.cpp   $(PLATFORM_SRC)/native/sun/windows
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
else # PLATFORM
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
# Libraries to link, and other C flags.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
ifeq ($(PLATFORM), solaris)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
  # Note that on Solaris, fontmanager is built against the headless library.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
  LDFLAGS      += -L$(LIBDIR)/$(LIBARCH)/headless
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
  OTHER_LDLIBS += -lawt -L$(LIBDIR)/$(LIBARCH)/xawt -lmawt -lc $(LIBM) $(LIBCXX)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
else # PLATFORM is linux
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
 OTHER_LDLIBS  += -lawt $(LIBM) $(LIBCXX)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
  ifeq ("$(CC_VER_MAJOR)", "3")
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
    OTHER_LDLIBS  += -Wl,-Bstatic -lgcc_eh -Wl,-Bdynamic
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
  endif                           
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
endif # PLATFORM
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
# set up compile flags..
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
CPPFLAGS += -I$(SHARE_SRC)/native/$(PKGDIR) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
            -I$(SHARE_SRC)/native/$(PKGDIR)/layout \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
            -I$(SHARE_SRC)/native/$(PKGDIR)/bidi \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
	    -I$(SHARE_SRC)/native/sun/awt/image/cvutils \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
	    -I$(PLATFORM_SRC)/native/sun/awt \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
	    -I$(SHARE_SRC)/native/sun/awt/debug \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
	    -I$(SHARE_SRC)/native/sun/java2d/loops \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
	    -I$(SHARE_SRC)/native/sun/java2d/pipe \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
            -I$(PLATFORM_SRC)/native/sun/java2d \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
	    -I$(SHARE_SRC)/native/sun/java2d \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
	    -I$(TEMPDIR)/../../sun.awt/awt/CClassHeaders
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
ifeq ($(PLATFORM), windows)
887
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 550
diff changeset
   203
CPPFLAGS += -I$(PLATFORM_SRC)/native/sun/windows
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205