annotate make/sun/font/Makefile @ 0:37a05a11f281

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