12892
|
1 |
#
|
|
2 |
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
|
|
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
|
|
7 |
# published by the Free Software Foundation. Oracle designates this
|
|
8 |
# particular file as subject to the "Classpath" exception as provided
|
|
9 |
# by Oracle in the LICENSE file that accompanied this code.
|
|
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 |
#
|
|
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.
|
|
24 |
#
|
|
25 |
|
|
26 |
GENSRC_X11WRAPPERS :=
|
|
27 |
GENSRC_X11WRAPPERS_TMP := $(JDK_OUTPUTDIR)/gensrc_x11wrappers
|
|
28 |
|
|
29 |
GENSRC_SIZER_SRC := $(JDK_TOPDIR)/src/solaris/classes/sun/awt/X11/generator
|
|
30 |
|
|
31 |
GENSRC_SIZES :=
|
|
32 |
|
13164
|
33 |
ifeq ($(OPENJDK_TARGET_OS)-$(LIBARCH), solaris-i386)
|
12892
|
34 |
GENSRC_SIZES := sizes.32 sizes.64
|
13164
|
35 |
else ifeq ($(OPENJDK_TARGET_OS), solaris)
|
|
36 |
isalist:=$(shell isainfo)
|
12892
|
37 |
ifneq (,$(findstring sparcv9, $(isalist)))
|
|
38 |
# On sparcv9 we generate both 32 and 64-bit sizers in spite of ARCH_DATA_MODEL.
|
|
39 |
GENSRC_SIZES := sizes.32 sizes.64
|
|
40 |
else
|
|
41 |
ifneq (,$(findstring amd64, $(isalist)))
|
|
42 |
# On amd64 we generate both 32 and 64-bit sizers in spite of ARCH_DATA_MODEL.
|
|
43 |
GENSRC_SIZES := sizes.32 sizes.64
|
|
44 |
else # !sparcv9 : includes (32-bit) sparc, i586
|
|
45 |
GENSRC_SIZES := sizes.32
|
|
46 |
endif # amd64
|
|
47 |
endif # sparcv9
|
|
48 |
else # !solaris
|
13164
|
49 |
ifeq ($(OPENJDK_TARGET_OS), macosx)
|
12892
|
50 |
GENSRC_SIZES := sizes.32 sizes.64
|
|
51 |
else # !macosx
|
|
52 |
GENSRC_SIZES := sizes.$(ARCH_DATA_MODEL)
|
|
53 |
endif # !macosx
|
|
54 |
endif # solaris
|
|
55 |
|
|
56 |
|
|
57 |
##########################################################################################
|
|
58 |
|
|
59 |
$(GENSRC_X11WRAPPERS_TMP)/sizer/sizer.%.c : $(GENSRC_SIZER_SRC)/xlibtypes.txt
|
|
60 |
$(MKDIR) -p $(@D)
|
|
61 |
$(RM) $@
|
|
62 |
$(TOOL_WRAPPERGENERATOR) $(@D) $< "sizer" $*
|
|
63 |
|
|
64 |
$(GENSRC_X11WRAPPERS_TMP)/sizer/sizer.%.exe : $(GENSRC_X11WRAPPERS_TMP)/sizer/sizer.%.c
|
13164
|
65 |
(cd $(@D) && $(HOST_CC) -m$* -o $@ $< \
|
|
66 |
-I$(JDK_OUTPUTDIR)/include \
|
|
67 |
-I$(JDK_TOPDIR)/src/share/javavm/export \
|
|
68 |
-I$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/javavm/export \
|
|
69 |
-I$(JDK_TOPDIR)//src/share/native/common \
|
|
70 |
-I$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/common \
|
12892
|
71 |
-I$(JDK_TOPDIR)/src/solaris/native/sun/awt \
|
|
72 |
-I$(JDK_TOPDIR)/src/share/native/sun/awt/debug \
|
|
73 |
-I$(JDK_TOPDIR)/src/share/native/sun/awt/image/cvutils -lc)
|
|
74 |
|
13164
|
75 |
ifeq ($(OPENJDK_TARGET_OS)-$(LIBARCH), solaris-i386)
|
12892
|
76 |
|
|
77 |
$(GENSRC_X11WRAPPERS_TMP)/sizer/sizes.32 : $(GENSRC_X11WRAPPERS_TMP)/sizer/sizer.32.exe
|
|
78 |
$< > $@.tmp
|
|
79 |
$(MV) $@.tmp $@
|
|
80 |
|
13164
|
81 |
$(GENSRC_X11WRAPPERS_TMP)/sizer/sizes.64 : $(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/classes/sun/awt/X11/generator/sizes.64-$(OPENJDK_TARGET_OS)-$(LIBARCH)
|
12892
|
82 |
$(MKDIR) -p $(@D)
|
|
83 |
$(CP) $< $@
|
|
84 |
else
|
|
85 |
|
|
86 |
$(GENSRC_X11WRAPPERS_TMP)/sizer/sizes.% : $(GENSRC_X11WRAPPERS_TMP)/sizer/sizer.%.exe
|
|
87 |
$< > $@.tmp
|
|
88 |
$(MV) $@.tmp $@
|
|
89 |
|
|
90 |
endif
|
|
91 |
|
|
92 |
$(GENSRC_X11WRAPPERS_TMP)/classes/_the.classes : $(foreach S,$(GENSRC_SIZES),$(GENSRC_X11WRAPPERS_TMP)/sizer/$(S))
|
|
93 |
$(MKDIR) -p $(@D)/sun/awt/X11
|
|
94 |
$(RM) $(@D)/sun/awt/X11/*
|
|
95 |
$(TOOL_WRAPPERGENERATOR) $(@D)/sun/awt/X11 $(GENSRC_SIZER_SRC)/xlibtypes.txt "gen" $(GENSRC_X11WRAPPERS_TMP)/sizer/sizes
|
13164
|
96 |
ifeq ($(OPENJDK_TARGET_OS)-$(LIBARCH), solaris-amd64)
|
|
97 |
$(ECHO) COMPARING $(GENSRC_X11WRAPPERS_TMP)/sizer/sizes.64 and $(GENSRC_SIZER_SRC)/sizes.64-$(OPENJDK_TARGET_OS)-i386
|
|
98 |
$(DIFF) $(GENSRC_X11WRAPPERS_TMP)/sizer/sizes.64 $(GENSRC_SIZER_SRC)/sizes.64-$(OPENJDK_TARGET_OS)-i386
|
12892
|
99 |
endif
|
|
100 |
$(TOUCH) $@
|
|
101 |
|
|
102 |
GENSRC_X11WRAPPERS += $(GENSRC_X11WRAPPERS_TMP)/classes/_the.classes
|