jdk/make/sun/font/Makefile
author xdono
Tue, 12 Aug 2008 15:17:12 -0700
changeset 922 8725ccb1a22d
parent 919 909db04edd73
parent 890 7336798a900d
child 2956 931f209e57a9
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
917
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
    38
# Use higher optimization level
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
    39
OPTIMIZATION_LEVEL = HIGHER
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
    40
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
include $(BUILDDIR)/common/Defs.gmk
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
# Created without -z defs on linux
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
ifeq ($(PLATFORM), linux)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
  LDFLAGS_DEFS_OPTION =
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
# Files
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
include FILES_c.gmk
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
AUTO_FILES_JAVA_DIRS = sun/font
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
FILES_java += java/awt/Font.java java/text/Bidi.java 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
FILES_export = \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
    sun/font/SunLayoutEngine.java \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
    java/awt/Font.java \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
    java/text/Bidi.java \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
    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
    64
    sun/font/FileFontStrike.java \
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
    sun/font/FontManager.java \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
    sun/font/GlyphList.java \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
    sun/font/NativeFont.java \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
    sun/font/StrikeCache.java \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
    sun/font/NullFontScaler.java \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
    sun/font/FreetypeFontScaler.java \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
    sun/java2d/loops/DrawGlyphList.java \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
    sun/java2d/loops/DrawGlyphListAA.java \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
    sun/java2d/loops/DrawGlyphListLCD.java \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
    sun/java2d/loops/GraphicsPrimitive.java
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
ifeq ($(PLATFORM), windows)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
  LDLIBS += user32.lib gdi32.lib $(OBJDIR)/../../../sun.awt/awt/$(OBJDIRNAME)/awt.lib  
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
  OTHER_CFLAGS += -DCC_NOEX
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
  OTHER_CXXFLAGS += -DCC_NOEX
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
else # PLATFORM unix
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
  FILES_export += \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
    sun/font/NativeStrike.java \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
    sun/font/NativeStrikeDisposer.java \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
    sun/font/X11TextRenderer.java \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
    sun/awt/X11GraphicsEnvironment.java 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
endif # PLATFORM
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
#In the non-OpenJDK mode we need to build T2K
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
ifndef OPENJDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
t2k:
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
	$(ECHO) "lib=" $(ACTUAL_LIBRARY)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
	$(MAKE) -C t2k
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
all build: t2k
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
t2k: library
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
clean clobber::
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
	$(MAKE) -C t2k clean
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
FILES_m=mapfile-vers.openjdk
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
#make sure freetype dll will be available at runtime as well as link time
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
#NB: Default freetype build system uses -h linker option and 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
#   result .so contains hardcoded library name that is later 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
#   used for adding dependencies to other objects 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
#   (e.g. libfontmanager.so).
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
#   
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
#   It is not obvious how to extract that hardcoded name (libfreetype.so.6)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
#   without overcomplicating logic here.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
#   To workaround this we hardcode .6 suffix for now.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
#   Note that .so.6 library will not be found by System.loadLibrary()
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
#        but fortunately we need to load FreeType library explicitly 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
#        on windows only  
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
#TODO: rework this to avoid hardcoding library name in the makefile
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
library:: $(LIB_LOCATION)/$(LIB_PREFIX)freetype.$(LIBRARY_SUFFIX)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
$(LIB_LOCATION)/$(LIB_PREFIX)freetype.$(LIBRARY_SUFFIX):
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
ifeq ($(PLATFORM), windows)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
	$(CP) $(FREETYPE_LIB_PATH)/$(LIB_PREFIX)freetype.$(LIBRARY_SUFFIX) $@
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
else 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
  ifeq ($(USING_SYSTEM_FT_LIB), false)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
	$(CP) $(FREETYPE_LIB_PATH)/$(LIB_PREFIX)freetype.$(LIBRARY_SUFFIX) $@.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
endif 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
#ifeq ($(PLATFORM), solaris)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
#  FILES_reorder += reorder-$(ARCH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
#endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
include $(BUILDDIR)/common/Mapfile-vers.gmk
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
include $(BUILDDIR)/common/Library.gmk
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
.PHONY: t2k build all clean clobber
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
# Add to the ambient vpath to pick up files in subdirectories
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
vpath %.c   $(PLATFORM_SRC)/native/$(PKGDIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
vpath %.c   $(SHARE_SRC)/native/$(PKGDIR)/bidi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
vpath %.cpp   $(SHARE_SRC)/native/$(PKGDIR)/layout
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
vpath %.cpp   $(SHARE_SRC)/native/$(PKGDIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
# Fontmanager is headless (independent of X/Motif)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
CFLAGS       += -DHEADLESS
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
CXXFLAGS     += -DHEADLESS
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
ifndef OPENJDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
  CPPFLAGS += -I$(CLOSED_SRC)/share/native/$(PKGDIR)/t2k
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
  CPPFLAGS += -I$(FREETYPE_HEADERS_PATH) -I$(FREETYPE_HEADERS_PATH)/freetype2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
  OTHER_LDLIBS += $(FREETYPE_LIB)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
ifeq ($(PLATFORM), windows)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
vpath %.cpp   $(PLATFORM_SRC)/native/sun/windows
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
else # PLATFORM
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
# Libraries to link, and other C flags.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
ifeq ($(PLATFORM), solaris)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
  # Note that on Solaris, fontmanager is built against the headless library.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
  LDFLAGS      += -L$(LIBDIR)/$(LIBARCH)/headless
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
  OTHER_LDLIBS += -lawt -L$(LIBDIR)/$(LIBARCH)/xawt -lmawt -lc $(LIBM) $(LIBCXX)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
else # PLATFORM is linux
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
 OTHER_LDLIBS  += -lawt $(LIBM) $(LIBCXX)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
  ifeq ("$(CC_VER_MAJOR)", "3")
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
    OTHER_LDLIBS  += -Wl,-Bstatic -lgcc_eh -Wl,-Bdynamic
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
  endif                           
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
endif # PLATFORM
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
# set up compile flags..
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
CPPFLAGS += -I$(SHARE_SRC)/native/$(PKGDIR) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
            -I$(SHARE_SRC)/native/$(PKGDIR)/layout \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
            -I$(SHARE_SRC)/native/$(PKGDIR)/bidi \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
	    -I$(SHARE_SRC)/native/sun/awt/image/cvutils \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
	    -I$(PLATFORM_SRC)/native/sun/awt \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
	    -I$(SHARE_SRC)/native/sun/awt/debug \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
	    -I$(SHARE_SRC)/native/sun/java2d/loops \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
	    -I$(SHARE_SRC)/native/sun/java2d/pipe \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
            -I$(PLATFORM_SRC)/native/sun/java2d \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
	    -I$(SHARE_SRC)/native/sun/java2d \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
	    -I$(TEMPDIR)/../../sun.awt/awt/CClassHeaders
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
ifeq ($(PLATFORM), windows)
887
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents: 550
diff changeset
   201
CPPFLAGS += -I$(PLATFORM_SRC)/native/sun/windows
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203