1 #
2 # Copyright (c) 2012, 2019, 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
29
30 include $(SPEC)
31 include MakeBase.gmk
32 include Execute.gmk
33 include NativeCompilation.gmk
34 include ToolsJdk.gmk
35
36 ################################################################################
37 # This file is responsible for extracting the x11 native struct offsets to
38 # the xawt Java library. The tool needs to be run on the os/arch that
39 # will host the final jvm, thus the tool cannot be used when cross compiling.
40 #
41 # Two versions of the generated offset file, sizes-32.txt and sizes-64.txt are
42 # committed into the source code repository. These are the ones used in
43 # GensrcX11Wrappers.gmk to generate the Java code during the build.
44 ################################################################################
45
46 ifeq ($(COMPILE_TYPE), cross)
47 $(error It is not possible to update the x11wrappers when cross-compiling)
48 endif
49
50 X11WRAPPERS_OUTPUT := $(SUPPORT_OUTPUTDIR)/x11wrappers
51 GENERATOR_SOURCE_FILE := $(X11WRAPPERS_OUTPUT)/src/data_generator.c
52
53 GENSRC_X11WRAPPERS_DATADIR := $(TOPDIR)/make/data/x11wrappergen
54 WRAPPER_OUTPUT_FILE := $(GENSRC_X11WRAPPERS_DATADIR)/sizes-$(BITS).txt
55
56 BITS := $(OPENJDK_TARGET_CPU_BITS)
57
58 # Generate the C code for the program that will output the offset file.
59 $(eval $(call SetupExecute, gensrc_generator, \
60 INFO := Generating X11 wrapper data generator source code, \
61 DEPS := $(GENSRC_X11WRAPPERS_DATADIR)/xlibtypes.txt $(BUILD_TOOLS_JDK), \
62 OUTPUT_FILE := $(GENERATOR_SOURCE_FILE), \
63 COMMAND := $(TOOL_WRAPPERGENERATOR) gen_c_source $(GENERATOR_SOURCE_FILE) \
64 $(GENSRC_X11WRAPPERS_DATADIR)/xlibtypes.txt $(BITS), \
65 ))
66
67 DATA_GENERATOR_INCLUDES := \
68 -I$(TOPDIR)/src/hotspot/share/include \
|
1 #
2 # Copyright (c) 2012, 2020, 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
29
30 include $(SPEC)
31 include MakeBase.gmk
32 include Execute.gmk
33 include NativeCompilation.gmk
34 include ToolsJdk.gmk
35
36 ################################################################################
37 # This file is responsible for extracting the x11 native struct offsets to
38 # the xawt Java library. The tool needs to be run on the os/arch that
39 # will host the final jvm, thus the tool cannot be used when cross compiling.
40 #
41 # Two versions of the generated offset file, sizes-32.txt and sizes-64.txt are
42 # committed into the source code repository. These are the ones used in
43 # GensrcX11Wrappers.gmk to generate the Java code during the build.
44 ################################################################################
45
46 ifeq ($(COMPILE_TYPE), cross)
47 $(error It is not possible to update the x11wrappers when cross-compiling)
48 endif
49
50 TOOL_WRAPPERGENERATOR = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
51 org.openjdk.buildtools.x11wrappergen.WrapperGenerator
52
53 X11WRAPPERS_OUTPUT := $(SUPPORT_OUTPUTDIR)/x11wrappers
54 GENERATOR_SOURCE_FILE := $(X11WRAPPERS_OUTPUT)/src/data_generator.c
55
56 GENSRC_X11WRAPPERS_DATADIR := $(TOPDIR)/make/data/x11wrappergen
57 WRAPPER_OUTPUT_FILE := $(GENSRC_X11WRAPPERS_DATADIR)/sizes-$(BITS).txt
58
59 BITS := $(OPENJDK_TARGET_CPU_BITS)
60
61 # Generate the C code for the program that will output the offset file.
62 $(eval $(call SetupExecute, gensrc_generator, \
63 INFO := Generating X11 wrapper data generator source code, \
64 DEPS := $(GENSRC_X11WRAPPERS_DATADIR)/xlibtypes.txt $(BUILD_TOOLS_JDK), \
65 OUTPUT_FILE := $(GENERATOR_SOURCE_FILE), \
66 COMMAND := $(TOOL_WRAPPERGENERATOR) gen_c_source $(GENERATOR_SOURCE_FILE) \
67 $(GENSRC_X11WRAPPERS_DATADIR)/xlibtypes.txt $(BITS), \
68 ))
69
70 DATA_GENERATOR_INCLUDES := \
71 -I$(TOPDIR)/src/hotspot/share/include \
|