author | malenkov |
Wed, 19 Jun 2013 14:28:44 +0400 | |
changeset 18134 | af8df2260431 |
parent 12749 | edd0b9d5e304 |
child 18241 | 3e009b5be123 |
permissions | -rw-r--r-- |
2 | 1 |
# |
12749
edd0b9d5e304
7171653: 32-bit cross-compile on 64-bit build host generates 64-bit data for awt/X11 leading to crash
dholmes
parents:
12292
diff
changeset
|
2 |
# Copyright (c) 2002, 2012, 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 |
BUILDDIR = ../.. |
|
27 |
PACKAGE = sun.awt.X11 |
|
11665
98dad53a8ba1
7110002: Rename xawt/libmawt.so and headless/libmawt.so so they can be colocated with libawt
chegar
parents:
9050
diff
changeset
|
28 |
LIBRARY = awt_xawt |
2 | 29 |
PRODUCT = sun |
30 |
||
31 |
include $(BUILDDIR)/common/Defs.gmk |
|
32 |
||
33 |
GEN_DIR=$(GENSRCDIR)/sun/awt/X11 |
|
34 |
||
35 |
CLASSES_INIT += $(TEMPDIR)/.gen.wrappers $(TEMPDIR)/.gen_icons touch.wrappers |
|
36 |
||
37 |
.PHONY: generated.clean |
|
38 |
||
39 |
# |
|
40 |
# Files |
|
41 |
# |
|
42 |
include FILES_c_unix.gmk |
|
43 |
include FILES_export_unix.gmk |
|
44 |
AUTO_FILES_JAVA_DIRS = sun/awt/X11 |
|
45 |
AUTO_JAVA_PRUNE = WrapperGenerator.java |
|
46 |
||
47 |
LDFLAGS += -L$(OPENWIN_LIB) |
|
48 |
||
5579
1a5e995a710b
6307603: [X11] Use RENDER extension for complex operations done in software
ceisserer
parents:
4665
diff
changeset
|
49 |
# For Xrender extension. |
1a5e995a710b
6307603: [X11] Use RENDER extension for complex operations done in software
ceisserer
parents:
4665
diff
changeset
|
50 |
ifeq ($(PLATFORM), solaris) |
1a5e995a710b
6307603: [X11] Use RENDER extension for complex operations done in software
ceisserer
parents:
4665
diff
changeset
|
51 |
LDFLAGS += -L/usr/openwin/sfw/lib$(ISA_DIR) -R/usr/openwin/sfw/lib$(ISA_DIR) |
1a5e995a710b
6307603: [X11] Use RENDER extension for complex operations done in software
ceisserer
parents:
4665
diff
changeset
|
52 |
endif |
1a5e995a710b
6307603: [X11] Use RENDER extension for complex operations done in software
ceisserer
parents:
4665
diff
changeset
|
53 |
|
2 | 54 |
ifeq ($(PLATFORM), linux) |
55 |
LDFLAGS += -lpthread |
|
56 |
dummy := $(shell $(MKDIR) -p $(LIB_LOCATION)) |
|
57 |
endif |
|
58 |
||
12292 | 59 |
ifeq ($(PLATFORM), macosx) |
12047
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
12044
diff
changeset
|
60 |
LDFLAGS += -pthread |
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
12044
diff
changeset
|
61 |
dummy := $(shell $(MKDIR) -p $(LIB_LOCATION)) |
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
12044
diff
changeset
|
62 |
endif |
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
12044
diff
changeset
|
63 |
|
2 | 64 |
# Since this library will be living in a subdirectory below the other libraries |
65 |
# we need to add an extra runpath so that libraries in the upper directory |
|
66 |
# are found at runtime. |
|
67 |
LD_RUNPATH_EXTRAS = .. |
|
68 |
||
69 |
# |
|
70 |
# Rules. |
|
71 |
# |
|
72 |
include $(BUILDDIR)/common/Mapfile-vers.gmk |
|
73 |
include $(BUILDDIR)/common/Library.gmk |
|
74 |
||
75 |
# |
|
76 |
# Add to the ambient vpath to pick up files in subdirectories |
|
77 |
# |
|
78 |
vpath %.c $(SHARE_SRC)/native/sunawt/alphacomposite |
|
79 |
vpath %.c $(PLATFORM_SRC)/native/sun/xawt |
|
80 |
vpath %.c $(PLATFORM_SRC)/native/sun/awt |
|
81 |
vpath %.c $(SHARE_SRC)/native/sun/awt/debug |
|
82 |
vpath %.c $(SHARE_SRC)/native/sun/awt/image |
|
83 |
vpath %.c $(SHARE_SRC)/native/sun/awt/image/gif |
|
84 |
vpath %.c $(SHARE_SRC)/native/sun/awt/image/cvutils |
|
85 |
vpath %.c $(SHARE_SRC)/native/sun/awt/shell |
|
86 |
vpath %.c $(SHARE_SRC)/native/sun/java2d |
|
87 |
vpath %.c $(SHARE_SRC)/native/sun/java2d/loops |
|
88 |
vpath %.c $(SHARE_SRC)/native/sun/java2d/pipe |
|
89 |
vpath %.c $(SHARE_SRC)/native/sun/awt/medialib |
|
2472
b7aba00cabb6
6693253: Security Warning appearance requires enhancements
anthony
parents:
133
diff
changeset
|
90 |
vpath %.c $(SHARE_SRC)/native/sun/awt/utility |
2 | 91 |
vpath %.cpp $(SHARE_SRC)/native/sun/image |
92 |
vpath %.c $(SHARE_SRC)/native/sun/font |
|
93 |
vpath %.c $(PLATFORM_SRC)/native/sun/awt/robot_child |
|
94 |
vpath %.c $(SHARE_SRC)/native/sun/java2d/opengl |
|
95 |
vpath %.c $(PLATFORM_SRC)/native/sun/java2d/opengl |
|
96 |
vpath %.c $(PLATFORM_SRC)/native/sun/java2d/x11 |
|
97 |
||
12047
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
12044
diff
changeset
|
98 |
OTHER_LDLIBS = $(LIBM) -lawt -lXext -lX11 -lXrender $(LIBDL) \ |
2 | 99 |
$(LDFLAGS_COMMON) $(AWT_RUNPATH) $(OTHER_LDFLAGS) -lXtst -lXi |
100 |
||
101 |
ifeq ($(PLATFORM), solaris) |
|
102 |
CPPFLAGS += -DFUNCPROTO=15 |
|
103 |
dummy := $(shell $(MKDIR) -p $(LIB_LOCATION)) |
|
104 |
endif |
|
105 |
||
106 |
CPPFLAGS += -I$(CUPS_HEADERS_PATH) |
|
107 |
||
108 |
CPPFLAGS += -DXAWT -DXAWT_HACK \ |
|
109 |
-I$(TEMPDIR)/../../sun.awt/awt/CClassHeaders \ |
|
110 |
-I$(PLATFORM_SRC)/native/sun/awt \ |
|
111 |
-I$(PLATFORM_SRC)/native/sun/xawt \ |
|
112 |
-I$(PLATFORM_SRC)/native/sun/jdga \ |
|
113 |
-I$(SHARE_SRC)/native/sun/awt/debug \ |
|
114 |
-I$(SHARE_SRC)/native/sun/awt/image/cvutils \ |
|
115 |
-I$(SHARE_SRC)/native/sun/java2d \ |
|
116 |
-I$(SHARE_SRC)/native/sun/java2d/loops \ |
|
117 |
-I$(SHARE_SRC)/native/sun/awt/image/cvutils \ |
|
118 |
-I$(SHARE_SRC)/native/sun/awt/image \ |
|
119 |
-I$(SHARE_SRC)/native/sun/font \ |
|
120 |
-I$(PLATFORM_SRC)/native/sun/java2d \ |
|
121 |
-I$(SHARE_SRC)/native/sun/java2d/pipe \ |
|
122 |
-I$(SHARE_SRC)/native/sun/java2d/opengl \ |
|
123 |
-I$(PLATFORM_SRC)/native/sun/java2d/opengl \ |
|
124 |
-I$(PLATFORM_SRC)/native/sun/java2d/x11 \ |
|
125 |
-I$(SHARE_SRC)/native/sun/dc/path \ |
|
126 |
-I$(SHARE_SRC)/native/sun/dc/doe \ |
|
127 |
-I$(SHARE_SRC)/native/sun/awt/alphacomposite \ |
|
128 |
-I$(SHARE_SRC)/native/sun/awt/medialib \ |
|
129 |
-I$(PLATFORM_SRC)/native/sun/awt/medialib \ |
|
130 |
-I$(PLATFORM_SRC)/native/sun/font \ |
|
131 |
-I$(SHARE_SRC)/native/sun/awt \ |
|
5579
1a5e995a710b
6307603: [X11] Use RENDER extension for complex operations done in software
ceisserer
parents:
4665
diff
changeset
|
132 |
-I$(PLATFORM_SRC)/native/sun/awt |
2 | 133 |
|
134 |
ifeq ($(PLATFORM), linux) |
|
9002 | 135 |
ifndef CROSS_COMPILE_ARCH |
136 |
# Allows for builds on Debian GNU Linux, X11 is in a different place |
|
137 |
# This should really be handled at a higher-level so we don't have to |
|
138 |
# work-around this when cross-compiling |
|
139 |
CPPFLAGS += -I/usr/X11R6/include/X11/extensions \ |
|
140 |
-I/usr/include/X11/extensions \ |
|
141 |
-I$(OPENWIN_HOME)/include |
|
142 |
else |
|
143 |
CPPFLAGS += -I$(OPENWIN_HOME)/include/X11/extensions \ |
|
144 |
-I$(OPENWIN_HOME)/include |
|
145 |
endif |
|
2 | 146 |
endif |
147 |
||
7933
afae9398b405
7001056: JDK 7 fails on to build on Solaris 10 update 9 - updated Xrender header files
prr
parents:
7668
diff
changeset
|
148 |
# We have some odd logic here because some Solaris 10 updates |
afae9398b405
7001056: JDK 7 fails on to build on Solaris 10 update 9 - updated Xrender header files
prr
parents:
7668
diff
changeset
|
149 |
# have a render.h file that suggests gradients are supported, but |
afae9398b405
7001056: JDK 7 fails on to build on Solaris 10 update 9 - updated Xrender header files
prr
parents:
7668
diff
changeset
|
150 |
# the Xrender.h doesn't have the corresponding type definitions. |
afae9398b405
7001056: JDK 7 fails on to build on Solaris 10 update 9 - updated Xrender header files
prr
parents:
7668
diff
changeset
|
151 |
# Earlier updates have neither. We'd like to know if there's a mismatch. |
afae9398b405
7001056: JDK 7 fails on to build on Solaris 10 update 9 - updated Xrender header files
prr
parents:
7668
diff
changeset
|
152 |
# Whilst in the C preprocessor we can tell if the render.h define's are set |
afae9398b405
7001056: JDK 7 fails on to build on Solaris 10 update 9 - updated Xrender header files
prr
parents:
7668
diff
changeset
|
153 |
# we can't tell anything about C declarations. |
afae9398b405
7001056: JDK 7 fails on to build on Solaris 10 update 9 - updated Xrender header files
prr
parents:
7668
diff
changeset
|
154 |
# A grep of Xrender.h is the only way to know this. If they are absent |
afae9398b405
7001056: JDK 7 fails on to build on Solaris 10 update 9 - updated Xrender header files
prr
parents:
7668
diff
changeset
|
155 |
# we will set a flag indicating this mismatch and the JDK source file |
afae9398b405
7001056: JDK 7 fails on to build on Solaris 10 update 9 - updated Xrender header files
prr
parents:
7668
diff
changeset
|
156 |
# will interpret it to resolve the problem. |
2 | 157 |
ifeq ($(PLATFORM), solaris) |
158 |
CPPFLAGS += -I$(OPENWIN_HOME)/include/X11/extensions |
|
7933
afae9398b405
7001056: JDK 7 fails on to build on Solaris 10 update 9 - updated Xrender header files
prr
parents:
7668
diff
changeset
|
159 |
OS_VERSION := $(shell uname -r) |
afae9398b405
7001056: JDK 7 fails on to build on Solaris 10 update 9 - updated Xrender header files
prr
parents:
7668
diff
changeset
|
160 |
XRENDER_H := $(OPENWIN_HOME)/share/include/X11/extensions/Xrender.h |
afae9398b405
7001056: JDK 7 fails on to build on Solaris 10 update 9 - updated Xrender header files
prr
parents:
7668
diff
changeset
|
161 |
ifeq ($(OS_VERSION),5.10) |
afae9398b405
7001056: JDK 7 fails on to build on Solaris 10 update 9 - updated Xrender header files
prr
parents:
7668
diff
changeset
|
162 |
LINEARGRADIENT_CNT := $(shell $(EGREP) -c XLinearGradient $(XRENDER_H)) |
afae9398b405
7001056: JDK 7 fails on to build on Solaris 10 update 9 - updated Xrender header files
prr
parents:
7668
diff
changeset
|
163 |
ifeq ($(LINEARGRADIENT_CNT),0) |
afae9398b405
7001056: JDK 7 fails on to build on Solaris 10 update 9 - updated Xrender header files
prr
parents:
7668
diff
changeset
|
164 |
CFLAGS+= -DSOLARIS10_NO_XRENDER_STRUCTS |
afae9398b405
7001056: JDK 7 fails on to build on Solaris 10 update 9 - updated Xrender header files
prr
parents:
7668
diff
changeset
|
165 |
endif |
afae9398b405
7001056: JDK 7 fails on to build on Solaris 10 update 9 - updated Xrender header files
prr
parents:
7668
diff
changeset
|
166 |
endif |
2 | 167 |
endif |
168 |
||
12047
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
12044
diff
changeset
|
169 |
ifeq ($(PLATFORM), macosx) |
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
12044
diff
changeset
|
170 |
CPPFLAGS += -DX11_PATH=\"$(X11_PATH)\" -DPACKAGE_PATH=\"$(PACKAGE_PATH)\" |
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
12044
diff
changeset
|
171 |
endif |
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
12044
diff
changeset
|
172 |
|
2 | 173 |
ifeq ($(MILESTONE), internal) |
174 |
CPPFLAGS += -DINTERNAL_BUILD |
|
175 |
endif |
|
176 |
||
177 |
# |
|
178 |
# Generation of wrappers |
|
179 |
# |
|
180 |
SIZER_DIR=$(GEN_DIR)/generator |
|
181 |
SIZER = $(SIZER_DIR)/sizer |
|
182 |
SIZER_32_C = $(SIZER).32.c |
|
183 |
SIZER_64_C = $(SIZER).64.c |
|
184 |
CFLAGS_32=$(CFLAGS) |
|
185 |
CFLAGS_64=$(CFLAGS) |
|
186 |
||
187 |
ifeq ($(PLATFORM), solaris) |
|
188 |
||
189 |
isalist:=$(shell $(ISAINFO)) |
|
190 |
||
191 |
ifneq (,$(findstring sparcv9, $(isalist))) |
|
192 |
# On sparcv9 we generate both 32 and 64-bit sizers in spite of ARCH_DATA_MODEL. |
|
193 |
# On sparcv9 CFLAGS already contain $(XARCH_OPTION/64), so to generate 32-bit sizer we need to change this option. |
|
194 |
CFLAGS_32=$(subst $(XARCH_OPTION/64),$(XARCH_OPTION/32),$(CFLAGS)) |
|
195 |
SIZERS = $(SIZER).32 $(SIZER).64 |
|
196 |
SIZERS_C = $(SIZER_32_C) $(SIZER_64_C) |
|
197 |
SIZES = $(WRAPPER_GENERATOR_DIR)/sizes.32 $(WRAPPER_GENERATOR_DIR)/sizes.64 |
|
198 |
CFLAGS_64=$(CFLAGS) $(XARCH_OPTION/64) |
|
199 |
else |
|
200 |
ifneq (,$(findstring amd64, $(isalist))) |
|
201 |
# On amd64 we generate both 32 and 64-bit sizers in spite of ARCH_DATA_MODEL. |
|
202 |
# On amd64 CFLAGS already contain $(XARCH_OPTION/64), so to generate 32-bit sizer we need to change this option. |
|
203 |
CFLAGS_32=$(subst $(XARCH_OPTION/64),$(XARCH_OPTION/32),$(CFLAGS)) |
|
204 |
SIZERS = $(SIZER).32 $(SIZER).64 |
|
205 |
SIZERS_C = $(SIZER_32_C) $(SIZER_64_C) |
|
206 |
SIZES = $(WRAPPER_GENERATOR_DIR)/sizes.32 $(WRAPPER_GENERATOR_DIR)/sizes.64 |
|
207 |
CFLAGS_64=$(CFLAGS) $(XARCH_OPTION/64) |
|
208 |
else # !sparcv9 : includes (32-bit) sparc, i586 |
|
209 |
SIZERS = $(SIZER).32 |
|
210 |
SIZERS_C = $(SIZER_32_C) |
|
211 |
SIZES = $(WRAPPER_GENERATOR_DIR)/sizes.32 |
|
212 |
endif # amd64 |
|
213 |
endif # sparcv9 |
|
214 |
||
215 |
else # !solaris |
|
216 |
||
12047
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
12044
diff
changeset
|
217 |
ifeq ($(PLATFORM), macosx) |
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
12044
diff
changeset
|
218 |
CFLAGS_32=-arch i386 |
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
12044
diff
changeset
|
219 |
SIZERS = $(SIZER).32 $(SIZER).64 |
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
12044
diff
changeset
|
220 |
SIZERS_C = $(SIZER_32_C) $(SIZER_64_C) |
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
12044
diff
changeset
|
221 |
SIZES = $(WRAPPER_GENERATOR_DIR)/sizes.32 $(WRAPPER_GENERATOR_DIR)/sizes.64 |
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
12044
diff
changeset
|
222 |
CFLAGS_64=-arch x86_64 |
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
12044
diff
changeset
|
223 |
else # !macosx |
2 | 224 |
ifeq ($(ARCH_DATA_MODEL), 32) |
225 |
SIZERS = $(SIZER).32 |
|
226 |
SIZERS_C = $(SIZER_32_C) |
|
227 |
SIZES = $(WRAPPER_GENERATOR_DIR)/sizes.32 |
|
12749
edd0b9d5e304
7171653: 32-bit cross-compile on 64-bit build host generates 64-bit data for awt/X11 leading to crash
dholmes
parents:
12292
diff
changeset
|
228 |
ifdef CROSS_COMPILE_ARCH |
edd0b9d5e304
7171653: 32-bit cross-compile on 64-bit build host generates 64-bit data for awt/X11 leading to crash
dholmes
parents:
12292
diff
changeset
|
229 |
CFLAGS_32 = -m32 |
edd0b9d5e304
7171653: 32-bit cross-compile on 64-bit build host generates 64-bit data for awt/X11 leading to crash
dholmes
parents:
12292
diff
changeset
|
230 |
endif |
2 | 231 |
else # !32 |
232 |
SIZERS = $(SIZER).64 |
|
233 |
SIZERS_C = $(SIZER_64_C) |
|
234 |
SIZES = $(WRAPPER_GENERATOR_DIR)/sizes.64 |
|
12749
edd0b9d5e304
7171653: 32-bit cross-compile on 64-bit build host generates 64-bit data for awt/X11 leading to crash
dholmes
parents:
12292
diff
changeset
|
235 |
ifdef CROSS_COMPILE_ARCH |
edd0b9d5e304
7171653: 32-bit cross-compile on 64-bit build host generates 64-bit data for awt/X11 leading to crash
dholmes
parents:
12292
diff
changeset
|
236 |
CFLAGS_64 = -m64 |
edd0b9d5e304
7171653: 32-bit cross-compile on 64-bit build host generates 64-bit data for awt/X11 leading to crash
dholmes
parents:
12292
diff
changeset
|
237 |
endif |
2 | 238 |
endif # 32 |
12047
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
12044
diff
changeset
|
239 |
endif # !macosx |
2 | 240 |
endif # solaris |
241 |
||
242 |
# XXX Hack for 6185483 - use hard-coded sizes. |
|
243 |
# Add the 64-bit platforms that need to be included into 32-bit build |
|
244 |
# and have sizes.64-$(PLATFORM)-$(LIBARCH) hardcoded in the workspace |
|
245 |
ifeq ($(PLATFORM)-$(LIBARCH), solaris-i386) |
|
246 |
# If you define DOHACK=true for some combination of $(PLATFORM)-$(LIBARCH), |
|
247 |
# make sure you have sizes.64-$(PLATFORM)-$(LIBARCH) pre-generated in |
|
248 |
# $(PLATFORM_SRC)/classes/sun/awt/X11/generator/ |
|
249 |
DOHACK=true |
|
250 |
endif # Hack |
|
251 |
||
252 |
ifeq ($(DOHACK), true) |
|
253 |
PREDEFINED_SIZES_TMPL=$(PLATFORM_SRC)/classes/sun/awt/X11/generator/sizes.64-$(PLATFORM)-$(LIBARCH) |
|
254 |
PREDEFINED_SIZES=$(WRAPPER_GENERATOR_DIR)/sizes.64 |
|
255 |
SIZES += $(WRAPPER_GENERATOR_DIR)/sizes.64 |
|
256 |
endif |
|
257 |
||
258 |
ifeq ($(PLATFORM)-$(LIBARCH), solaris-amd64) |
|
259 |
DOCOMPARE=true |
|
260 |
endif |
|
261 |
# 64 bit sizers are generated on platform-libarch (left) for use |
|
262 |
# on platform-libarch (right) and stored under the latter name. |
|
263 |
# Do compare manually stored and automatically generated pair(s) |
|
264 |
# if DOCOMPARE=true, just after the generation. |
|
265 |
STORED_SIZES_TMPL_solaris_amd64=$(PLATFORM_SRC)/classes/sun/awt/X11/generator/sizes.64-solaris-i386 |
|
266 |
||
267 |
WRAPPER_GENERATOR_JAVA=$(PLATFORM_SRC)/classes/sun/awt/X11/generator/WrapperGenerator.java |
|
268 |
WRAPPER_GENERATOR_DIR=$(GENSRCDIR)/sun/awt/X11/generator |
|
269 |
WRAPPER_GENERATOR_TEMPDIR=$(TEMPDIR)/sun/awt/X11/generator |
|
270 |
WRAPPER_GENERATOR_CLASS=$(WRAPPER_GENERATOR_TEMPDIR)/WrapperGenerator.class |
|
271 |
XLIBTYPES=$(PLATFORM_SRC)/classes/sun/awt/X11/generator/xlibtypes.txt |
|
272 |
||
12749
edd0b9d5e304
7171653: 32-bit cross-compile on 64-bit build host generates 64-bit data for awt/X11 leading to crash
dholmes
parents:
12292
diff
changeset
|
273 |
ifndef CROSS_COMPILE_ARCH |
edd0b9d5e304
7171653: 32-bit cross-compile on 64-bit build host generates 64-bit data for awt/X11 leading to crash
dholmes
parents:
12292
diff
changeset
|
274 |
SIZERS_CC = $(CC) |
edd0b9d5e304
7171653: 32-bit cross-compile on 64-bit build host generates 64-bit data for awt/X11 leading to crash
dholmes
parents:
12292
diff
changeset
|
275 |
else |
edd0b9d5e304
7171653: 32-bit cross-compile on 64-bit build host generates 64-bit data for awt/X11 leading to crash
dholmes
parents:
12292
diff
changeset
|
276 |
SIZERS_CC = $(HOST_CC) |
edd0b9d5e304
7171653: 32-bit cross-compile on 64-bit build host generates 64-bit data for awt/X11 leading to crash
dholmes
parents:
12292
diff
changeset
|
277 |
endif |
edd0b9d5e304
7171653: 32-bit cross-compile on 64-bit build host generates 64-bit data for awt/X11 leading to crash
dholmes
parents:
12292
diff
changeset
|
278 |
|
2 | 279 |
$(SIZERS): $(SIZERS_C) |
280 |
$(prep-target) |
|
12749
edd0b9d5e304
7171653: 32-bit cross-compile on 64-bit build host generates 64-bit data for awt/X11 leading to crash
dholmes
parents:
12292
diff
changeset
|
281 |
$(SIZERS_CC) $(CFLAGS_$(subst .,,$(suffix $@))) $(CPPFLAGS) -c -o $(SIZER)$(suffix $@).o $(SIZER)$(suffix $@).c |
edd0b9d5e304
7171653: 32-bit cross-compile on 64-bit build host generates 64-bit data for awt/X11 leading to crash
dholmes
parents:
12292
diff
changeset
|
282 |
$(SIZERS_CC) $(CFLAGS_$(subst .,,$(suffix $@))) -o $@ $(CPPFLAGS) $(SIZER)$(suffix $@).o |
2 | 283 |
|
284 |
$(WRAPPER_GENERATOR_CLASS): $(WRAPPER_GENERATOR_JAVA) |
|
285 |
$(prep-target) |
|
286 |
$(BOOT_JAVAC_CMD) -d $(WRAPPER_GENERATOR_TEMPDIR) $(WRAPPER_GENERATOR_JAVA) |
|
287 |
||
288 |
$(SIZERS_C): $(WRAPPER_GENERATOR_CLASS) $(XLIBTYPES) |
|
289 |
$(prep-target) |
|
290 |
$(MKDIR) -p $(WRAPPER_GENERATOR_TEMPDIR) |
|
291 |
$(BOOT_JAVA_CMD) -cp $(WRAPPER_GENERATOR_TEMPDIR) WrapperGenerator \ |
|
292 |
$(SIZER_DIR) $(XLIBTYPES) "sizer" $(subst .,,$(suffix $(basename $@))) |
|
293 |
||
294 |
$(SIZES): $(SIZERS) |
|
295 |
@if [ "$(DOHACK)$@" = "true$(PREDEFINED_SIZES)" ]; then \ |
|
296 |
$(ECHO) COPYING $(PREDEFINED_SIZES_TMPL) into $@; \ |
|
297 |
$(CP) $(PREDEFINED_SIZES_TMPL) $@; \ |
|
298 |
$(CHMOD) +w $@;\ |
|
299 |
else \ |
|
300 |
$(ECHO) GENERATING $@; \ |
|
301 |
$(WRAPPER_GENERATOR_DIR)/sizer$(suffix $@) > $@; \ |
|
302 |
fi |
|
303 |
@if [ "$(DOCOMPARE)$(suffix $@)" = "true.64" ]; then \ |
|
304 |
$(ECHO) COMPARING $@ and $(STORED_SIZES_TMPL_$(PLATFORM)_$(LIBARCH)); \ |
|
305 |
$(DIFF) $@ $(STORED_SIZES_TMPL_$(PLATFORM)_$(LIBARCH)); \ |
|
133 | 306 |
fi |
2 | 307 |
|
308 |
$(TEMPDIR)/.gen.wrappers: $(SIZES) $(WRAPPER_GENERATOR_CLASS) $(XLIBTYPES) |
|
309 |
$(BOOT_JAVA_CMD) -cp $(WRAPPER_GENERATOR_TEMPDIR) WrapperGenerator \ |
|
310 |
$(GEN_DIR) $(XLIBTYPES) "gen" $(WRAPPER_GENERATOR_DIR)/sizes |
|
311 |
||
312 |
touch.wrappers: $(TEMPDIR)/.gen.wrappers |
|
313 |
$(MKDIR) -p $(TEMPDIR) |
|
314 |
$(TOUCH) $(TEMPDIR)/.gen.wrappers |
|
315 |
||
133 | 316 |
generated.clean: |
2 | 317 |
$(RM) -r $(WRAPPER_GENERATOR_TEMPDIR) |
318 |
$(RM) -r $(WRAPPER_GENERATOR_DIR) |
|
319 |
$(RM) -r $(GEN_DIR)/*.java |
|
133 | 320 |
$(RM) -r $(TEMPDIR)/.gen_icons |
2 | 321 |
|
322 |
ifdef OPENJDK |
|
323 |
ICONS_PATH_PREFIX=$(PLATFORM_SRC) |
|
324 |
else |
|
325 |
ICONS_PATH_PREFIX=$(CLOSED_SRC)/solaris |
|
326 |
endif |
|
327 |
||
328 |
ICONS = \ |
|
329 |
$(ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon16.png \ |
|
330 |
$(ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon24.png \ |
|
331 |
$(ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon32.png \ |
|
332 |
$(ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon48.png |
|
333 |
||
2472
b7aba00cabb6
6693253: Security Warning appearance requires enhancements
anthony
parents:
133
diff
changeset
|
334 |
|
b7aba00cabb6
6693253: Security Warning appearance requires enhancements
anthony
parents:
133
diff
changeset
|
335 |
ICONPATH=$(PLATFORM_SRC)/classes/sun/awt/X11 |
b7aba00cabb6
6693253: Security Warning appearance requires enhancements
anthony
parents:
133
diff
changeset
|
336 |
|
b7aba00cabb6
6693253: Security Warning appearance requires enhancements
anthony
parents:
133
diff
changeset
|
337 |
ICONS += \ |
b7aba00cabb6
6693253: Security Warning appearance requires enhancements
anthony
parents:
133
diff
changeset
|
338 |
$(ICONPATH)/security-icon-bw16.png \ |
b7aba00cabb6
6693253: Security Warning appearance requires enhancements
anthony
parents:
133
diff
changeset
|
339 |
$(ICONPATH)/security-icon-interim16.png \ |
b7aba00cabb6
6693253: Security Warning appearance requires enhancements
anthony
parents:
133
diff
changeset
|
340 |
$(ICONPATH)/security-icon-yellow16.png \ |
b7aba00cabb6
6693253: Security Warning appearance requires enhancements
anthony
parents:
133
diff
changeset
|
341 |
$(ICONPATH)/security-icon-bw24.png \ |
b7aba00cabb6
6693253: Security Warning appearance requires enhancements
anthony
parents:
133
diff
changeset
|
342 |
$(ICONPATH)/security-icon-interim24.png \ |
b7aba00cabb6
6693253: Security Warning appearance requires enhancements
anthony
parents:
133
diff
changeset
|
343 |
$(ICONPATH)/security-icon-yellow24.png \ |
b7aba00cabb6
6693253: Security Warning appearance requires enhancements
anthony
parents:
133
diff
changeset
|
344 |
$(ICONPATH)/security-icon-bw32.png \ |
b7aba00cabb6
6693253: Security Warning appearance requires enhancements
anthony
parents:
133
diff
changeset
|
345 |
$(ICONPATH)/security-icon-interim32.png \ |
b7aba00cabb6
6693253: Security Warning appearance requires enhancements
anthony
parents:
133
diff
changeset
|
346 |
$(ICONPATH)/security-icon-yellow32.png \ |
b7aba00cabb6
6693253: Security Warning appearance requires enhancements
anthony
parents:
133
diff
changeset
|
347 |
$(ICONPATH)/security-icon-bw48.png \ |
b7aba00cabb6
6693253: Security Warning appearance requires enhancements
anthony
parents:
133
diff
changeset
|
348 |
$(ICONPATH)/security-icon-interim48.png \ |
b7aba00cabb6
6693253: Security Warning appearance requires enhancements
anthony
parents:
133
diff
changeset
|
349 |
$(ICONPATH)/security-icon-yellow48.png |
b7aba00cabb6
6693253: Security Warning appearance requires enhancements
anthony
parents:
133
diff
changeset
|
350 |
|
2 | 351 |
TEMPDIR_CLASSES = $(TEMPDIR)/classes |
352 |
||
353 |
$(TEMPDIR_CLASSES)/sun/awt/X11/ToBin.class: ToBin.java |
|
354 |
@$(prep-target) |
|
355 |
$(BOOT_JAVAC_CMD) -d $(TEMPDIR_CLASSES) $< |
|
356 |
||
357 |
$(TEMPDIR)/.gen_icons: $(TEMPDIR_CLASSES)/sun/awt/X11/ToBin.class $(ICONS) |
|
358 |
$(prep-target) |
|
359 |
for i in $(ICONS); do \ |
|
360 |
filename=`basename $$i`; \ |
|
361 |
name=`$(ECHO) $$filename | $(TR) '\-.' '__'`; \ |
|
362 |
classname=$(GEN_DIR)/XAWTIcon32_$$name.java; \ |
|
363 |
$(RM) $$classname; \ |
|
364 |
$(ECHO) "package sun.awt.X11;" >> $$classname ; \ |
|
365 |
$(ECHO) "public class XAWTIcon32_$$name {" >> $$classname; \ |
|
366 |
$(ECHO) "public static int[] $$name = { " >> $$classname; \ |
|
367 |
$(CAT) $$i | \ |
|
368 |
$(BOOT_JAVA_CMD) -cp $(TEMPDIR_CLASSES) \ |
|
369 |
-Djava.awt.headless=true \ |
|
370 |
sun.awt.X11.ToBin >> $$classname; \ |
|
371 |
$(ECHO) "}; }" >> $$classname; \ |
|
372 |
classname=$(GEN_DIR)/XAWTIcon64_$$name.java; \ |
|
373 |
$(RM) $$classname; \ |
|
374 |
$(ECHO) "package sun.awt.X11;" >> $$classname ; \ |
|
375 |
$(ECHO) "public class XAWTIcon64_$$name {" >> $$classname; \ |
|
376 |
$(ECHO) "public static long[] $$name = { " >> $$classname; \ |
|
377 |
$(CAT) $$i | \ |
|
378 |
$(BOOT_JAVA_CMD) -cp $(TEMPDIR_CLASSES) \ |
|
379 |
-Djava.awt.headless=true \ |
|
380 |
sun.awt.X11.ToBin >> $$classname; \ |
|
381 |
$(ECHO) "}; }" >> $$classname; \ |
|
382 |
done |
|
383 |
$(TOUCH) $@ |
|
384 |
||
385 |
clean clobber:: generated.clean |
|
386 |
||
387 |
.PHONY: generated.clean robot_child |
|
388 |