author | ihse |
Sat, 03 Mar 2018 09:14:01 +0100 | |
branch | ihse-cflags-rewrite-branch |
changeset 56236 | 97746cb303aa |
parent 56212 | d1a4766aa7ac |
child 56312 | a52bcf4118eb |
permissions | -rw-r--r-- |
12892 | 1 |
# |
56211 | 2 |
# Copyright (c) 2012, 2018, 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 |
||
56211 | 26 |
################################################################################ |
27 |
||
28 |
default: all |
|
29 |
||
30 |
include $(SPEC) |
|
31 |
include MakeBase.gmk |
|
32 |
include NativeCompilation.gmk |
|
33 |
include ToolsJdk.gmk |
|
34 |
||
35 |
################################################################################ |
|
15149
64054e252871
8004151: build-infra: Generating X11 wrapper offset file is not cross compilable
erikj
parents:
15126
diff
changeset
|
36 |
# 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
|
37 |
# 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
|
38 |
# will host the final jvm, thus the tool cannot be used when cross compiling. |
56211 | 39 |
# |
40 |
# Two versions of the generated offset file, sizes-32.txt and sizes-64.txt are |
|
41 |
# committed into the source code repository. These are the ones used in |
|
42 |
# GensrcX11Wrappers.gmk to generate the Java code during the build. |
|
43 |
################################################################################ |
|
12892 | 44 |
|
56211 | 45 |
ifeq ($(COMPILE_TYPE), cross) |
46 |
$(error It is not possible to update the x11wrappers when cross-compiling) |
|
13702 | 47 |
endif |
12892 | 48 |
|
56211 | 49 |
X11WRAPPERS_OUTPUT := $(SUPPORT_OUTPUTDIR)/x11wrappers |
50 |
||
51 |
GENSRC_X11WRAPPERS_DATADIR := $(TOPDIR)/make/data/x11wrappergen |
|
15149
64054e252871
8004151: build-infra: Generating X11 wrapper offset file is not cross compilable
erikj
parents:
15126
diff
changeset
|
52 |
|
56211 | 53 |
BITS := $(OPENJDK_TARGET_CPU_BITS) |
54 |
||
55 |
# Generate the C code for the program that will output the offset file. |
|
56 |
$(X11WRAPPERS_OUTPUT)/src/data_generator.c: $(GENSRC_X11WRAPPERS_DATADIR)/xlibtypes.txt $(BUILD_TOOLS_JDK) |
|
57 |
$(call LogInfo, Generating X11 wrapper data generator source code) |
|
35241 | 58 |
$(call MakeDir, $(@D)) |
56211 | 59 |
$(TOOL_WRAPPERGENERATOR) gen_c_source $@ $(GENSRC_X11WRAPPERS_DATADIR)/xlibtypes.txt $(BITS) |
15149
64054e252871
8004151: build-infra: Generating X11 wrapper offset file is not cross compilable
erikj
parents:
15126
diff
changeset
|
60 |
|
56211 | 61 |
DATA_GENERATOR_INCLUDES := \ |
62 |
-I$(TOPDIR)/src/hotspot/share/include \ |
|
63 |
-I$(TOPDIR)/src/hotspot/os/$(HOTSPOT_TARGET_OS_TYPE)/include \ |
|
64 |
-I$(SUPPORT_OUTPUTDIR)/modules_include/java.base \ |
|
65 |
-I$(SUPPORT_OUTPUTDIR)/modules_include/java.base/$(OPENJDK_TARGET_OS_INCLUDE_SUBDIR) \ |
|
66 |
-I$(TOPDIR)/src/java.base/share/native/libjava \ |
|
67 |
-I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libjava \ |
|
68 |
-I$(TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/common/awt \ |
|
69 |
-I$(TOPDIR)/src/java.desktop/share/native/common/awt/debug \ |
|
70 |
-I$(TOPDIR)/src/java.desktop/share/native/libawt/awt/image/cvutils \ |
|
71 |
# |
|
17046 | 72 |
|
56211 | 73 |
# Compile the generated C code into an executable. |
74 |
$(eval $(call SetupNativeCompilation, BUILD_DATA_GENERATOR, \ |
|
75 |
PROGRAM := data_generator, \ |
|
76 |
OUTPUT_DIR := $(X11WRAPPERS_OUTPUT)/bin, \ |
|
77 |
EXTRA_FILES := $(X11WRAPPERS_OUTPUT)/src/data_generator.c, \ |
|
56212 | 78 |
CFLAGS := $(X_CFLAGS) $(DATA_GENERATOR_INCLUDES) $(CFLAGS_JDKEXE), \ |
79 |
LDFLAGS := $(LDFLAGS_JDKEXE), \ |
|
56211 | 80 |
LIBS := $(X_LIBS) -lc, \ |
81 |
OBJECT_DIR := $(X11WRAPPERS_OUTPUT)/objs, \ |
|
82 |
)) |
|
25859 | 83 |
|
56211 | 84 |
# Run the executable to create the data file. |
85 |
$(GENSRC_X11WRAPPERS_DATADIR)/sizes-$(BITS).txt: $(BUILD_DATA_GENERATOR_TARGET) |
|
86 |
$(call LogInfo, Generating X11 wrapper data files) |
|
35241 | 87 |
$(call MakeDir, $(@D)) |
56211 | 88 |
$(BUILD_DATA_GENERATOR_TARGET) | $(SORT) > $@ |
15149
64054e252871
8004151: build-infra: Generating X11 wrapper offset file is not cross compilable
erikj
parents:
15126
diff
changeset
|
89 |
|
56211 | 90 |
TARGETS += $(GENSRC_X11WRAPPERS_DATADIR)/sizes-$(BITS).txt |
12892 | 91 |
|
56211 | 92 |
################################################################################ |
12892 | 93 |
|
56211 | 94 |
all: $(TARGETS) |
25859 | 95 |
|
56211 | 96 |
.PHONY: all default |