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