author | lmesnik |
Wed, 11 Sep 2019 16:25:12 -0700 | |
changeset 58093 | 50e1d346a126 |
parent 53995 | ecc2bcc3beb0 |
child 58665 | 30a5049a36bb |
child 58834 | f78e7ce060b0 |
permissions | -rw-r--r-- |
12892 | 1 |
# |
53995 | 2 |
# Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved. |
12892 | 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 |
||
49133 | 26 |
################################################################################ |
27 |
||
28 |
default: all |
|
29 |
||
30 |
include $(SPEC) |
|
31 |
include MakeBase.gmk |
|
53995 | 32 |
include Execute.gmk |
49133 | 33 |
include NativeCompilation.gmk |
34 |
include ToolsJdk.gmk |
|
35 |
||
36 |
################################################################################ |
|
15149
64054e252871
8004151: build-infra: Generating X11 wrapper offset file is not cross compilable
erikj
parents:
15126
diff
changeset
|
37 |
# This file is responsible for extracting the x11 native struct offsets to |
64054e252871
8004151: build-infra: Generating X11 wrapper offset file is not cross compilable
erikj
parents:
15126
diff
changeset
|
38 |
# the xawt Java library. The tool needs to be run on the os/arch that |
64054e252871
8004151: build-infra: Generating X11 wrapper offset file is not cross compilable
erikj
parents:
15126
diff
changeset
|
39 |
# will host the final jvm, thus the tool cannot be used when cross compiling. |
49133 | 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 |
################################################################################ |
|
12892 | 45 |
|
49133 | 46 |
ifeq ($(COMPILE_TYPE), cross) |
47 |
$(error It is not possible to update the x11wrappers when cross-compiling) |
|
13702 | 48 |
endif |
12892 | 49 |
|
49133 | 50 |
X11WRAPPERS_OUTPUT := $(SUPPORT_OUTPUTDIR)/x11wrappers |
53995 | 51 |
GENERATOR_SOURCE_FILE := $(X11WRAPPERS_OUTPUT)/src/data_generator.c |
15149
64054e252871
8004151: build-infra: Generating X11 wrapper offset file is not cross compilable
erikj
parents:
15126
diff
changeset
|
52 |
|
49133 | 53 |
GENSRC_X11WRAPPERS_DATADIR := $(TOPDIR)/make/data/x11wrappergen |
53995 | 54 |
WRAPPER_OUTPUT_FILE := $(GENSRC_X11WRAPPERS_DATADIR)/sizes-$(BITS).txt |
12892 | 55 |
|
49133 | 56 |
BITS := $(OPENJDK_TARGET_CPU_BITS) |
15149
64054e252871
8004151: build-infra: Generating X11 wrapper offset file is not cross compilable
erikj
parents:
15126
diff
changeset
|
57 |
|
49133 | 58 |
# Generate the C code for the program that will output the offset file. |
53995 | 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 |
)) |
|
15149
64054e252871
8004151: build-infra: Generating X11 wrapper offset file is not cross compilable
erikj
parents:
15126
diff
changeset
|
66 |
|
49133 | 67 |
DATA_GENERATOR_INCLUDES := \ |
68 |
-I$(TOPDIR)/src/hotspot/share/include \ |
|
69 |
-I$(TOPDIR)/src/hotspot/os/$(HOTSPOT_TARGET_OS_TYPE)/include \ |
|
70 |
-I$(SUPPORT_OUTPUTDIR)/modules_include/java.base \ |
|
71 |
-I$(SUPPORT_OUTPUTDIR)/modules_include/java.base/$(OPENJDK_TARGET_OS_INCLUDE_SUBDIR) \ |
|
72 |
-I$(TOPDIR)/src/java.base/share/native/libjava \ |
|
73 |
-I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libjava \ |
|
74 |
-I$(TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/common/awt \ |
|
75 |
-I$(TOPDIR)/src/java.desktop/share/native/common/awt/debug \ |
|
76 |
-I$(TOPDIR)/src/java.desktop/share/native/libawt/awt/image/cvutils \ |
|
77 |
# |
|
17046 | 78 |
|
49133 | 79 |
# Compile the generated C code into an executable. |
80 |
$(eval $(call SetupNativeCompilation, BUILD_DATA_GENERATOR, \ |
|
81 |
PROGRAM := data_generator, \ |
|
82 |
OUTPUT_DIR := $(X11WRAPPERS_OUTPUT)/bin, \ |
|
53995 | 83 |
EXTRA_FILES := $(GENERATOR_SOURCE_FILE), \ |
49133 | 84 |
CFLAGS := $(X_CFLAGS) $(DATA_GENERATOR_INCLUDES) $(CFLAGS_JDKEXE), \ |
85 |
LDFLAGS := $(LDFLAGS_JDKEXE), \ |
|
49241 | 86 |
LIBS := $(X_LIBS), \ |
49133 | 87 |
OBJECT_DIR := $(X11WRAPPERS_OUTPUT)/objs, \ |
88 |
)) |
|
25859 | 89 |
|
49133 | 90 |
# Run the executable to create the data file. |
53995 | 91 |
$(eval $(call SetupExecute, run_wrappergen, \ |
92 |
INFO := Generating X11 wrapper data files, \ |
|
93 |
DEPS := $(BUILD_DATA_GENERATOR), \ |
|
94 |
OUTPUT_FILE := $(WRAPPER_OUTPUT_FILE), \ |
|
95 |
COMMAND := $(BUILD_DATA_GENERATOR_TARGET) | $(SORT) > $(WRAPPER_OUTPUT_FILE), \ |
|
96 |
)) |
|
97 |
||
98 |
wrapper-information: $(run_wrappergen) |
|
49133 | 99 |
$(ECHO) IMPORTANT: If you update the X11 wrapper data files, they most certainly |
100 |
$(ECHO) need to be updated for both 32 and 64 bit platforms. You have now |
|
101 |
$(ECHO) updated them for $(BITS) bit platforms only. |
|
12892 | 102 |
|
53995 | 103 |
TARGETS += $(run_wrappergen) wrapper-information |
49133 | 104 |
|
105 |
################################################################################ |
|
12892 | 106 |
|
49133 | 107 |
all: $(TARGETS) |
25859 | 108 |
|
49133 | 109 |
.PHONY: all default |