author | prr |
Thu, 05 Apr 2012 15:17:19 -0700 | |
changeset 12392 | af6c2083c5d7 |
parent 12047 | 320a714614e9 |
child 12394 | 7ded3320efee |
permissions | -rw-r--r-- |
2 | 1 |
# |
9035
1255eb81cc2f
7033660: Update copyright year to 2011 on any files changed in 2011
ohair
parents:
8583
diff
changeset
|
2 |
# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. |
2 | 3 |
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
# |
|
5 |
# This code is free software; you can redistribute it and/or modify it |
|
6 |
# under the terms of the GNU General Public License version 2 only, as |
|
5506 | 7 |
# published by the Free Software Foundation. Oracle designates this |
2 | 8 |
# particular file as subject to the "Classpath" exception as provided |
5506 | 9 |
# by Oracle in the LICENSE file that accompanied this code. |
2 | 10 |
# |
11 |
# This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 |
# version 2 for more details (a copy is included in the LICENSE file that |
|
15 |
# accompanied this code). |
|
16 |
# |
|
17 |
# You should have received a copy of the GNU General Public License version |
|
18 |
# 2 along with this work; if not, write to the Free Software Foundation, |
|
19 |
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 |
# |
|
5506 | 21 |
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
22 |
# or visit www.oracle.com if you need additional information or have any |
|
23 |
# questions. |
|
2 | 24 |
# |
25 |
||
26 |
# |
|
27 |
# Makefile for building all of font tools |
|
28 |
# |
|
29 |
||
30 |
BUILDDIR = ../.. |
|
31 |
PACKAGE = sun.font |
|
32 |
LIBRARY = fontmanager |
|
33 |
PRODUCT = sun |
|
34 |
||
35 |
# Indicate we want the C++ compiler to do the linking. |
|
36 |
CPLUSPLUSLIBRARY=true |
|
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 | 41 |
include $(BUILDDIR)/common/Defs.gmk |
42 |
||
43 |
# |
|
44 |
# Created without -z defs on linux |
|
45 |
# |
|
46 |
ifeq ($(PLATFORM), linux) |
|
47 |
LDFLAGS_DEFS_OPTION = |
|
48 |
endif |
|
49 |
||
50 |
# |
|
51 |
# Files |
|
52 |
# |
|
53 |
||
54 |
include FILES_c.gmk |
|
55 |
||
56 |
AUTO_FILES_JAVA_DIRS = sun/font |
|
57 |
FILES_java += java/awt/Font.java java/text/Bidi.java |
|
58 |
||
59 |
FILES_export = \ |
|
60 |
sun/font/SunLayoutEngine.java \ |
|
61 |
java/awt/Font.java \ |
|
62 |
java/text/Bidi.java \ |
|
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 \ |
12392
af6c2083c5d7
7159136: JDK 7 font manager refactoring left JNI header generation and inclusion out of sync
prr
parents:
12047
diff
changeset
|
65 |
sun/font/SunFontManager.java \ |
2 | 66 |
sun/font/GlyphList.java \ |
67 |
sun/font/NativeFont.java \ |
|
68 |
sun/font/StrikeCache.java \ |
|
69 |
sun/font/NullFontScaler.java \ |
|
70 |
sun/font/FreetypeFontScaler.java \ |
|
71 |
sun/java2d/loops/DrawGlyphList.java \ |
|
72 |
sun/java2d/loops/DrawGlyphListAA.java \ |
|
73 |
sun/java2d/loops/DrawGlyphListLCD.java \ |
|
74 |
sun/java2d/loops/GraphicsPrimitive.java |
|
75 |
||
76 |
ifeq ($(PLATFORM), windows) |
|
77 |
||
78 |
LDLIBS += user32.lib gdi32.lib $(OBJDIR)/../../../sun.awt/awt/$(OBJDIRNAME)/awt.lib |
|
79 |
||
80 |
OTHER_CFLAGS += -DCC_NOEX |
|
81 |
OTHER_CXXFLAGS += -DCC_NOEX |
|
82 |
||
83 |
else # PLATFORM unix |
|
84 |
||
85 |
FILES_export += \ |
|
86 |
sun/font/NativeStrike.java \ |
|
87 |
sun/font/NativeStrikeDisposer.java \ |
|
88 |
sun/font/X11TextRenderer.java \ |
|
89 |
sun/awt/X11GraphicsEnvironment.java |
|
90 |
||
91 |
endif # PLATFORM |
|
92 |
||
93 |
#In the non-OpenJDK mode we need to build T2K |
|
94 |
ifndef OPENJDK |
|
95 |
t2k: |
|
96 |
$(ECHO) "lib=" $(ACTUAL_LIBRARY) |
|
97 |
$(MAKE) -C t2k |
|
98 |
||
99 |
all build: t2k |
|
100 |
t2k: library |
|
101 |
clean clobber:: |
|
102 |
$(MAKE) -C t2k clean |
|
103 |
else |
|
104 |
||
105 |
FILES_m=mapfile-vers.openjdk |
|
106 |
||
107 |
#make sure freetype dll will be available at runtime as well as link time |
|
108 |
# |
|
109 |
#NB: Default freetype build system uses -h linker option and |
|
110 |
# result .so contains hardcoded library name that is later |
|
111 |
# used for adding dependencies to other objects |
|
112 |
# (e.g. libfontmanager.so). |
|
113 |
# |
|
114 |
# It is not obvious how to extract that hardcoded name (libfreetype.so.6) |
|
115 |
# without overcomplicating logic here. |
|
116 |
# To workaround this we hardcode .6 suffix for now. |
|
117 |
# |
|
118 |
# Note that .so.6 library will not be found by System.loadLibrary() |
|
119 |
# but fortunately we need to load FreeType library explicitly |
|
120 |
# on windows only |
|
121 |
# |
|
122 |
#TODO: rework this to avoid hardcoding library name in the makefile |
|
123 |
# |
|
124 |
ifeq ($(PLATFORM), windows) |
|
4665
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
3935
diff
changeset
|
125 |
FREETYPE_LIB = $(LIB_LOCATION)/$(LIB_PREFIX)freetype.$(LIBRARY_SUFFIX) |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
3935
diff
changeset
|
126 |
OTHER_LDLIBS += $(FREETYPE_LIB_PATH)/freetype.lib |
2 | 127 |
else |
128 |
ifeq ($(USING_SYSTEM_FT_LIB), false) |
|
4665
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
3935
diff
changeset
|
129 |
FREETYPE_LIB = $(LIB_LOCATION)/$(LIB_PREFIX)freetype.$(LIBRARY_SUFFIX).6 |
2 | 130 |
endif |
4665
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
3935
diff
changeset
|
131 |
OTHER_LDLIBS += -L$(FREETYPE_LIB_PATH) -lfreetype |
2 | 132 |
endif |
4665
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
3935
diff
changeset
|
133 |
|
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
3935
diff
changeset
|
134 |
library:: $(FREETYPE_LIB) |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
3935
diff
changeset
|
135 |
|
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
3935
diff
changeset
|
136 |
$(FREETYPE_LIB): |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
3935
diff
changeset
|
137 |
$(CP) $(FREETYPE_LIB_PATH)/$(LIB_PREFIX)freetype.$(LIBRARY_SUFFIX) $@ |
2 | 138 |
endif |
139 |
||
140 |
#ifeq ($(PLATFORM), solaris) |
|
141 |
# FILES_reorder += reorder-$(ARCH) |
|
142 |
#endif |
|
143 |
include $(BUILDDIR)/common/Mapfile-vers.gmk |
|
144 |
include $(BUILDDIR)/common/Library.gmk |
|
145 |
||
146 |
.PHONY: t2k build all clean clobber |
|
147 |
||
148 |
# |
|
149 |
# Add to the ambient vpath to pick up files in subdirectories |
|
150 |
# |
|
151 |
vpath %.c $(PLATFORM_SRC)/native/$(PKGDIR) |
|
152 |
vpath %.cpp $(SHARE_SRC)/native/$(PKGDIR)/layout |
|
153 |
vpath %.cpp $(SHARE_SRC)/native/$(PKGDIR) |
|
154 |
||
155 |
# |
|
156 |
# Fontmanager is headless (independent of X/Motif) |
|
157 |
# |
|
158 |
CFLAGS += -DHEADLESS |
|
159 |
CXXFLAGS += -DHEADLESS |
|
160 |
||
161 |
ifndef OPENJDK |
|
162 |
CPPFLAGS += -I$(CLOSED_SRC)/share/native/$(PKGDIR)/t2k |
|
163 |
else |
|
164 |
CPPFLAGS += -I$(FREETYPE_HEADERS_PATH) -I$(FREETYPE_HEADERS_PATH)/freetype2 |
|
165 |
endif |
|
166 |
||
167 |
ifeq ($(PLATFORM), windows) |
|
168 |
vpath %.cpp $(PLATFORM_SRC)/native/sun/windows |
|
169 |
else # PLATFORM |
|
170 |
||
171 |
# |
|
172 |
# Libraries to link, and other C flags. |
|
173 |
# |
|
174 |
||
12047
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
11665
diff
changeset
|
175 |
ifeq ($(PLATFORM), macosx)) |
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
11665
diff
changeset
|
176 |
OTHER_INCLUDES += -I$(X11_PATH)/include |
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
11665
diff
changeset
|
177 |
OTHER_LDLIBS += -lawt $(LIBM) $(LIBCXX) |
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
11665
diff
changeset
|
178 |
ifeq ($(OS_VENDOR),Apple) |
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
11665
diff
changeset
|
179 |
# XXXDARWIN Match BSD/Linux behavior -- the mawt.dylib symbols will |
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
11665
diff
changeset
|
180 |
# be available at runtime. |
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
11665
diff
changeset
|
181 |
OTHER_LDLIBS += -undefined dynamic_lookup |
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
11665
diff
changeset
|
182 |
endif |
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
11665
diff
changeset
|
183 |
else |
2 | 184 |
ifeq ($(PLATFORM), solaris) |
185 |
# Note that on Solaris, fontmanager is built against the headless library. |
|
186 |
LDFLAGS += -L$(LIBDIR)/$(LIBARCH)/headless |
|
11665
98dad53a8ba1
7110002: Rename xawt/libmawt.so and headless/libmawt.so so they can be colocated with libawt
chegar
parents:
9035
diff
changeset
|
187 |
OTHER_LDLIBS += -lawt -lawt_xawt -lc $(LIBM) $(LIBCXX) |
2 | 188 |
else # PLATFORM is linux |
189 |
OTHER_LDLIBS += -lawt $(LIBM) $(LIBCXX) |
|
190 |
ifeq ("$(CC_VER_MAJOR)", "3") |
|
191 |
OTHER_LDLIBS += -Wl,-Bstatic -lgcc_eh -Wl,-Bdynamic |
|
192 |
endif |
|
193 |
endif |
|
12047
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
11665
diff
changeset
|
194 |
endif |
2 | 195 |
|
196 |
endif # PLATFORM |
|
197 |
||
198 |
# set up compile flags.. |
|
199 |
||
12047
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
11665
diff
changeset
|
200 |
ifeq ($(PLATFORM), macosx)) |
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
11665
diff
changeset
|
201 |
CPPFLAGS += -I$(CLASSHDRDIR) |
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
11665
diff
changeset
|
202 |
endif |
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
11665
diff
changeset
|
203 |
|
2 | 204 |
CPPFLAGS += -I$(SHARE_SRC)/native/$(PKGDIR) \ |
205 |
-I$(SHARE_SRC)/native/$(PKGDIR)/layout \ |
|
206 |
-I$(SHARE_SRC)/native/sun/awt/image/cvutils \ |
|
207 |
-I$(PLATFORM_SRC)/native/sun/awt \ |
|
208 |
-I$(SHARE_SRC)/native/sun/awt/debug \ |
|
209 |
-I$(SHARE_SRC)/native/sun/java2d/loops \ |
|
210 |
-I$(SHARE_SRC)/native/sun/java2d/pipe \ |
|
211 |
-I$(PLATFORM_SRC)/native/sun/java2d \ |
|
212 |
-I$(SHARE_SRC)/native/sun/java2d \ |
|
213 |
-I$(TEMPDIR)/../../sun.awt/awt/CClassHeaders |
|
214 |
||
215 |
ifeq ($(PLATFORM), windows) |
|
887 | 216 |
CPPFLAGS += -I$(PLATFORM_SRC)/native/sun/windows |
2 | 217 |
endif |
218 |
||
3935
afcdb712a9c5
6501644: sync LayoutEngine *code* structure to match ICU
srl
parents:
2956
diff
changeset
|
219 |
# Make the Layout Engine build standalone |
afcdb712a9c5
6501644: sync LayoutEngine *code* structure to match ICU
srl
parents:
2956
diff
changeset
|
220 |
CPPFLAGS += -DLE_STANDALONE |
afcdb712a9c5
6501644: sync LayoutEngine *code* structure to match ICU
srl
parents:
2956
diff
changeset
|
221 |
|
afcdb712a9c5
6501644: sync LayoutEngine *code* structure to match ICU
srl
parents:
2956
diff
changeset
|
222 |