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