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
47 endif
48 else
49 ifeq ($(OPENJDK_TARGET_OS), solaris)
50 # As a special case, solaris 32-bit also generates the 64-bit version
51 GENSRC_SIZES := sizes.32 sizes.64
52 endif
53 endif
54
55 ##########################################################################################
56
57 $(GENSRC_X11WRAPPERS_TMP)/sizer/sizer.%.c : $(GENSRC_SIZER_SRC)/xlibtypes.txt $(BUILD_TOOLS)
58 $(ECHO) "Generating X11 wrapper ($*-bit version)"
59 $(MKDIR) -p $(@D)
60 $(RM) $@
61 $(TOOL_WRAPPERGENERATOR) $(@D) $< "sizer" $*
62
63 $(GENSRC_X11WRAPPERS_TMP)/sizer/sizer.%.exe : $(GENSRC_X11WRAPPERS_TMP)/sizer/sizer.%.c
64 $(MKDIR) -p $(@D)
65 $(RM) $@ $@.tmp
66 (cd $(@D) && $(BUILD_CC) -m$* -o $@.tmp $< \
67 $(X_CFLAGS) \
68 $(X_LIBS) \
69 -I$(JDK_OUTPUTDIR)/include \
70 -I$(JDK_TOPDIR)/src/share/javavm/export \
71 -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/javavm/export \
72 -I$(JDK_TOPDIR)//src/share/native/common \
73 -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/common \
74 -I$(JDK_TOPDIR)/src/solaris/native/sun/awt \
75 -I$(JDK_TOPDIR)/src/share/native/sun/awt/debug \
76 -I$(JDK_TOPDIR)/src/share/native/sun/awt/image/cvutils -lc)
77 $(MV) $@.tmp $@
78
79 # Run the generated sizer binary to create the sizes text file
80 $(GENSRC_X11WRAPPERS_TMP)/sizer/sizes.% : $(GENSRC_X11WRAPPERS_TMP)/sizer/sizer.%.exe
81 $(MKDIR) -p $(@D)
82 $(RM) $@ $@.tmp
83 $< > $@.tmp
84 $(MV) $@.tmp $@
85
86 ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU), solaris-x86)
87 # On solaris-x86 we also need to create the 64-bit version, but we can't run a 64-bit binary
88 # As a workaround, copy this from a pre-generated file.
|
1 #
2 # Copyright (c) 2013, 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
47 endif
48 else
49 ifeq ($(OPENJDK_TARGET_OS), solaris)
50 # As a special case, solaris 32-bit also generates the 64-bit version
51 GENSRC_SIZES := sizes.32 sizes.64
52 endif
53 endif
54
55 ##########################################################################################
56
57 $(GENSRC_X11WRAPPERS_TMP)/sizer/sizer.%.c : $(GENSRC_SIZER_SRC)/xlibtypes.txt $(BUILD_TOOLS)
58 $(ECHO) "Generating X11 wrapper ($*-bit version)"
59 $(MKDIR) -p $(@D)
60 $(RM) $@
61 $(TOOL_WRAPPERGENERATOR) $(@D) $< "sizer" $*
62
63 $(GENSRC_X11WRAPPERS_TMP)/sizer/sizer.%.exe : $(GENSRC_X11WRAPPERS_TMP)/sizer/sizer.%.c
64 $(MKDIR) -p $(@D)
65 $(RM) $@ $@.tmp
66 (cd $(@D) && $(BUILD_CC) -m$* -o $@.tmp $< \
67 -I$(JDK_OUTPUTDIR)/include \
68 -I$(JDK_TOPDIR)/src/share/javavm/export \
69 -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/javavm/export \
70 -I$(JDK_TOPDIR)//src/share/native/common \
71 -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/common \
72 -I$(JDK_TOPDIR)/src/solaris/native/sun/awt \
73 -I$(JDK_TOPDIR)/src/share/native/sun/awt/debug \
74 -I$(JDK_TOPDIR)/src/share/native/sun/awt/image/cvutils -lc)
75 $(MV) $@.tmp $@
76
77 # Run the generated sizer binary to create the sizes text file
78 $(GENSRC_X11WRAPPERS_TMP)/sizer/sizes.% : $(GENSRC_X11WRAPPERS_TMP)/sizer/sizer.%.exe
79 $(MKDIR) -p $(@D)
80 $(RM) $@ $@.tmp
81 $< > $@.tmp
82 $(MV) $@.tmp $@
83
84 ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU), solaris-x86)
85 # On solaris-x86 we also need to create the 64-bit version, but we can't run a 64-bit binary
86 # As a workaround, copy this from a pre-generated file.
|