author | ihse |
Wed, 14 Mar 2018 11:23:16 +0100 | |
changeset 49239 | c35ec365e329 |
parent 49234 | 3375a8039fde |
child 49241 | de4b3a04feae |
child 56302 | 1c7ec9412f91 |
permissions | -rw-r--r-- |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
1 |
# |
49070
d7859531621b
8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents:
48766
diff
changeset
|
2 |
# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved. |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
3 |
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
4 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
5 |
# This code is free software; you can redistribute it and/or modify it |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
6 |
# under the terms of the GNU General Public License version 2 only, as |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
7 |
# published by the Free Software Foundation. Oracle designates this |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
8 |
# particular file as subject to the "Classpath" exception as provided |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
9 |
# by Oracle in the LICENSE file that accompanied this code. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
10 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
11 |
# This code is distributed in the hope that it will be useful, but WITHOUT |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
12 |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
13 |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
14 |
# version 2 for more details (a copy is included in the LICENSE file that |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
15 |
# accompanied this code). |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
16 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
17 |
# You should have received a copy of the GNU General Public License version |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
18 |
# 2 along with this work; if not, write to the Free Software Foundation, |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
19 |
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
20 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
21 |
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
22 |
# or visit www.oracle.com if you need additional information or have any |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
23 |
# questions. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
24 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
25 |
|
47314 | 26 |
$(eval $(call IncludeCustomExtension, lib/Awt2dLibraries-pre.gmk)) |
39504
96c700e62710
8003593: build-infra: Paths to optional platform-specific files should not be hardwired to src/closed
erikj
parents:
39025
diff
changeset
|
27 |
|
27565 | 28 |
WIN_AWT_LIB := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libawt/awt.lib |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
29 |
|
26191
a0ff4b39d34b
8055188: General cleanup of minor issues from source restructure
erikj
parents:
25993
diff
changeset
|
30 |
################################################################################ |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
31 |
|
47217 | 32 |
BUILD_LIBMLIB_SRC := $(TOPDIR)/src/java.desktop/share/native/libmlib_image \ |
33 |
$(TOPDIR)/src/java.desktop/share/native/common/awt/medialib |
|
20547 | 34 |
BUILD_LIBMLIB_CFLAGS := -D__USE_J2D_NAMES -D__MEDIALIB_OLD_NAMES \ |
25859 | 35 |
$(addprefix -I, $(BUILD_LIBMLIB_SRC)) \ |
47217 | 36 |
-I$(TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/libmlib_image |
20547 | 37 |
|
38 |
BUILD_LIBMLIB_LDLIBS := |
|
47217 | 39 |
BUILD_LIBMLIB_IMAGE_MAPFILE := $(TOPDIR)/make/mapfiles/libmlib_image/mapfile-vers |
13164 | 40 |
|
13702 | 41 |
BUILD_LIBMLIB_CFLAGS += -DMLIB_NO_LIBSUNMATH |
42 |
||
43 |
ifeq ($(OPENJDK_TARGET_CPU_BITS), 64) |
|
20547 | 44 |
BUILD_LIBMLIB_CFLAGS += -DMLIB_OS64BIT |
12892 | 45 |
endif |
46 |
||
13164 | 47 |
ifneq ($(OPENJDK_TARGET_OS), windows) |
20547 | 48 |
BUILD_LIBMLIB_LDLIBS += $(LIBM) $(LIBDL) |
12892 | 49 |
endif |
50 |
||
49070
d7859531621b
8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents:
48766
diff
changeset
|
51 |
$(eval $(call SetupNativeCompilation, BUILD_LIBMLIB_IMAGE, \ |
d7859531621b
8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents:
48766
diff
changeset
|
52 |
NAME := mlib_image, \ |
20547 | 53 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
54 |
SRC := $(BUILD_LIBMLIB_SRC), \ |
|
25859 | 55 |
EXCLUDE_FILES := mlib_c_ImageBlendTable.c, \ |
20547 | 56 |
OPTIMIZATION := HIGHEST, \ |
57 |
CFLAGS := $(CFLAGS_JDKLIB) \ |
|
58 |
$(BUILD_LIBMLIB_CFLAGS), \ |
|
59 |
MAPFILE := $(BUILD_LIBMLIB_IMAGE_MAPFILE), \ |
|
60 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
|
61 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
|
33406 | 62 |
LIBS := $(BUILD_LIBMLIB_LDLIBS) \ |
63 |
$(JDKLIB_LIBS), \ |
|
64 |
LIBS_solaris := -lc, \ |
|
25859 | 65 |
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \ |
20547 | 66 |
RC_FLAGS := $(RC_FLAGS) \ |
67 |
-D "JDK_FNAME=mlib_image.dll" \ |
|
68 |
-D "JDK_INTERNAL_NAME=mlib_image" \ |
|
69 |
-D "JDK_FTYPE=0x2L", \ |
|
27565 | 70 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libmlib_image, \ |
35276 | 71 |
)) |
20547 | 72 |
|
27565 | 73 |
$(BUILD_LIBMLIB_IMAGE): $(call FindLib, java.base, java) |
13164 | 74 |
|
27565 | 75 |
TARGETS += $(BUILD_LIBMLIB_IMAGE) |
12892 | 76 |
|
26191
a0ff4b39d34b
8055188: General cleanup of minor issues from source restructure
erikj
parents:
25993
diff
changeset
|
77 |
################################################################################ |
12892 | 78 |
|
20547 | 79 |
ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_ARCH), solaris-sparc) |
80 |
||
47217 | 81 |
LIBMLIB_IMAGE_V_SRC := $(TOPDIR)/src/java.desktop/share/native/libmlib_image \ |
82 |
$(TOPDIR)/src/java.desktop/unix/native/libmlib_image \ |
|
83 |
$(TOPDIR)/src/java.desktop/share/native/common/awt/medialib \ |
|
84 |
$(TOPDIR)/src/java.desktop/unix/native/common/awt/medialib \ |
|
25859 | 85 |
# |
47217 | 86 |
LIBMLIB_IMAGE_V_CFLAGS := $(TOPDIR)/src/java.desktop/unix/native/libmlib_image/vis_$(OPENJDK_TARGET_CPU_BITS).il \ |
25859 | 87 |
$(addprefix -I, $(LIBMLIB_IMAGE_V_SRC)) \ |
88 |
# |
|
20547 | 89 |
|
25859 | 90 |
BUILD_LIBMLIB_IMAGE_V_EXFILES := \ |
91 |
awt_ImagingLib.c \ |
|
92 |
mlib_c_ImageAffine_BC.c \ |
|
93 |
mlib_c_ImageAffine_BC_S16.c \ |
|
94 |
mlib_c_ImageAffine_BC_U16.c \ |
|
95 |
mlib_c_ImageAffine_BL.c \ |
|
96 |
mlib_c_ImageAffine_BL_S16.c \ |
|
97 |
mlib_c_ImageAffine_BL_U16.c \ |
|
98 |
mlib_c_ImageAffine_NN.c \ |
|
99 |
mlib_c_ImageConvClearEdge.c \ |
|
100 |
mlib_c_ImageConvCopyEdge.c \ |
|
101 |
mlib_c_ImageConv_f.c \ |
|
102 |
mlib_c_ImageConvVersion.c \ |
|
103 |
mlib_c_ImageCopy.c \ |
|
104 |
mlib_c_ImageLookUp.c \ |
|
105 |
mlib_c_ImageLookUp_f.c \ |
|
106 |
# |
|
107 |
||
108 |
LIBMLIB_IMAGE_V_CFLAGS += $(filter-out -DMLIB_NO_LIBSUNMATH, $(BUILD_LIBMLIB_CFLAGS)) |
|
20547 | 109 |
|
49070
d7859531621b
8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents:
48766
diff
changeset
|
110 |
$(eval $(call SetupNativeCompilation, BUILD_LIBMLIB_IMAGE_V, \ |
d7859531621b
8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents:
48766
diff
changeset
|
111 |
NAME := mlib_image_v, \ |
20547 | 112 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
25859 | 113 |
SRC := $(LIBMLIB_IMAGE_V_SRC), \ |
114 |
EXCLUDE_FILES := $(BUILD_LIBMLIB_IMAGE_V_EXFILES), \ |
|
20547 | 115 |
OPTIMIZATION := HIGHEST, \ |
116 |
CFLAGS := -xarch=sparcvis \ |
|
25859 | 117 |
$(LIBMLIB_IMAGE_V_CFLAGS) \ |
20547 | 118 |
$(CFLAGS_JDKLIB), \ |
119 |
MAPFILE := $(BUILD_LIBMLIB_IMAGE_MAPFILE), \ |
|
120 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
|
121 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
|
33406 | 122 |
LIBS := -ljava -ljvm -lc $(BUILD_LIBMLIB_LDLIBS), \ |
27565 | 123 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libmlib_image_v, \ |
35276 | 124 |
)) |
20547 | 125 |
|
27565 | 126 |
$(BUILD_LIBMLIB_IMAGE_V): $(call FindLib, java.base, java) |
20547 | 127 |
|
27565 | 128 |
TARGETS += $(BUILD_LIBMLIB_IMAGE_V) |
12892 | 129 |
|
130 |
endif |
|
131 |
||
26191
a0ff4b39d34b
8055188: General cleanup of minor issues from source restructure
erikj
parents:
25993
diff
changeset
|
132 |
################################################################################ |
12892 | 133 |
|
47217 | 134 |
LIBAWT_DIRS := $(TOPDIR)/src/java.desktop/share/native/libawt \ |
135 |
$(TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/libawt \ |
|
136 |
$(TOPDIR)/src/java.desktop/share/native/common/awt/debug \ |
|
137 |
$(TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/common/awt \ |
|
25859 | 138 |
# |
20547 | 139 |
|
26225
3c7e92c78bab
8056246: Fix AIX build after the Modular Source Code change 8054834
simonis
parents:
26191
diff
changeset
|
140 |
ifeq ($(OPENJDK_TARGET_OS), aix) |
47217 | 141 |
LIBAWT_DIRS += $(TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS)/native/libawt |
26225
3c7e92c78bab
8056246: Fix AIX build after the Modular Source Code change 8054834
simonis
parents:
26191
diff
changeset
|
142 |
endif |
3c7e92c78bab
8056246: Fix AIX build after the Modular Source Code change 8054834
simonis
parents:
26191
diff
changeset
|
143 |
|
20547 | 144 |
ifeq ($(OPENJDK_TARGET_OS), windows) |
47217 | 145 |
LIBAWT_DIRS += $(TOPDIR)/src/java.desktop/share/native/common/awt/utility |
25859 | 146 |
endif |
147 |
||
26225
3c7e92c78bab
8056246: Fix AIX build after the Modular Source Code change 8054834
simonis
parents:
26191
diff
changeset
|
148 |
ifneq ($(filter $(OPENJDK_TARGET_OS), solaris linux macosx aix), ) |
25859 | 149 |
LIBAWT_EXFILES += awt_Font.c CUPSfuncs.c fontpath.c X11Color.c |
14231 | 150 |
endif |
13164 | 151 |
|
25859 | 152 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
26751
70bac69b37c9
8056216: Remove "sun" directory layer from libawt and common
prr
parents:
26741
diff
changeset
|
153 |
LIBAWT_EXFILES += initIDs.c awt/image/cvutils/img_colors.c |
22597
7515a991bb37
8024854: PPC64: Basic changes and files to build the class library on AIX
simonis
parents:
22595
diff
changeset
|
154 |
endif |
7515a991bb37
8024854: PPC64: Basic changes and files to build the class library on AIX
simonis
parents:
22595
diff
changeset
|
155 |
|
27565 | 156 |
LIBAWT_CFLAGS += -I$(SUPPORT_OUTPUTDIR)/headers/java.desktop \ |
25859 | 157 |
$(addprefix -I, $(shell find $(LIBAWT_DIRS) -type d)) \ |
158 |
$(LIBJAVA_HEADER_FLAGS) \ |
|
159 |
$(addprefix -I, $(BUILD_LIBMLIB_IMAGE_SRC)) \ |
|
160 |
# |
|
161 |
||
26225
3c7e92c78bab
8056246: Fix AIX build after the Modular Source Code change 8054834
simonis
parents:
26191
diff
changeset
|
162 |
LIBAWT_CFLAGS += -D__MEDIALIB_OLD_NAMES -D__USE_J2D_NAMES $(X_CFLAGS) |
20547 | 163 |
|
13164 | 164 |
ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_ARCH), solaris-sparc) |
20547 | 165 |
LIBAWT_CFLAGS += -DMLIB_ADD_SUFF |
166 |
LIBAWT_CFLAGS += -xarch=sparcvis |
|
167 |
||
47217 | 168 |
LIBAWT_CFLAGS += $(TOPDIR)/src/java.desktop/unix/native/libmlib_image/vis_$(OPENJDK_TARGET_CPU_BITS).il |
169 |
LIBAWT_DIRS += $(TOPDIR)/src/java.desktop/share/native/common/awt/medialib |
|
26751
70bac69b37c9
8056216: Remove "sun" directory layer from libawt and common
prr
parents:
26741
diff
changeset
|
170 |
LIBAWT_EXFILES += java2d/loops/MapAccelFunc.c |
20547 | 171 |
|
172 |
ifeq ($(OPENJDK_TARGET_CPU), sparcv9) |
|
173 |
LIBAWT_ASFLAGS = -P -xarch=v9a |
|
174 |
else |
|
175 |
LIBAWT_ASFLAGS = -P -xarch=v8plusa |
|
176 |
endif |
|
12892 | 177 |
else |
25859 | 178 |
LIBAWT_EXCLUDES += \ |
47217 | 179 |
$(TOPDIR)/src/java.desktop/unix/native/libawt/awt/medialib \ |
180 |
$(TOPDIR)/src/java.desktop/unix/native/libawt/java2d/loops \ |
|
181 |
$(TOPDIR)/src/java.desktop/unix/native/common/awt/medialib \ |
|
25859 | 182 |
# |
12892 | 183 |
endif |
184 |
||
20547 | 185 |
ifneq ($(OPENJDK_TARGET_OS), solaris) |
186 |
LIBAWT_CFLAGS += -DMLIB_NO_LIBSUNMATH |
|
12892 | 187 |
endif |
188 |
||
20547 | 189 |
ifeq ($(OPENJDK_TARGET_OS), windows) |
47217 | 190 |
LIBAWT_DIRS += $(TOPDIR)/src/java.desktop/share/native/common/font \ |
191 |
$(TOPDIR)/src/java.desktop/share/native/common/java2d/opengl \ |
|
192 |
$(TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/common/awt/systemscale \ |
|
25859 | 193 |
# Why does libawt need java.base headers? |
47217 | 194 |
LIBAWT_CFLAGS += -I$(TOPDIR)/src/java.desktop/share/native/common/font \ |
195 |
-I$(TOPDIR)/src/java.desktop/share/native/common/java2d/opengl \ |
|
196 |
-I$(TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/common/java2d/opengl \ |
|
197 |
-I$(TOPDIR)/src/java.desktop/windows/native/include \ |
|
198 |
-I$(TOPDIR)/src/java.desktop/share/native/include \ |
|
27565 | 199 |
-I$(SUPPORT_OUTPUTDIR)/headers/java.base \ |
25859 | 200 |
# |
201 |
LIBAWT_EXFILES += \ |
|
26751
70bac69b37c9
8056216: Remove "sun" directory layer from libawt and common
prr
parents:
26741
diff
changeset
|
202 |
java2d/d3d/D3DShaderGen.c \ |
70bac69b37c9
8056216: Remove "sun" directory layer from libawt and common
prr
parents:
26741
diff
changeset
|
203 |
awt/image/cvutils/img_colors.c \ |
25859 | 204 |
# |
20547 | 205 |
|
206 |
LIBAWT_CFLAGS += -EHsc -DUNICODE -D_UNICODE |
|
207 |
ifeq ($(OPENJDK_TARGET_CPU_BITS), 64) |
|
208 |
LIBAWT_CFLAGS += -DMLIB_OS64BIT |
|
209 |
endif |
|
210 |
||
47217 | 211 |
LIBAWT_RC_FLAGS ?= -I $(TOPDIR)/src/java.base/windows/native/launcher/icons |
212 |
LIBAWT_VERSIONINFO_RESOURCE := $(TOPDIR)/src/java.desktop/windows/native/libawt/windows/awt.rc |
|
12892 | 213 |
endif |
214 |
||
47217 | 215 |
LIBAWT_MAPFILE := $(TOPDIR)/make/mapfiles/libawt/mapfile-vers |
20547 | 216 |
ifeq ($(OPENJDK_TARGET_OS), linux) |
217 |
LIBAWT_MAPFILE := |
|
12892 | 218 |
endif |
219 |
||
35711
d08f24178498
8148629: Disable remaining warnings in awt/fontmanager
erikj
parents:
35276
diff
changeset
|
220 |
# Turn off all warnings for debug_mem.c This is needed because the specific warning |
d08f24178498
8148629: Disable remaining warnings in awt/fontmanager
erikj
parents:
35276
diff
changeset
|
221 |
# about initializing a declared 'extern' cannot be turned off individually. Only |
d08f24178498
8148629: Disable remaining warnings in awt/fontmanager
erikj
parents:
35276
diff
changeset
|
222 |
# applies to debug builds. |
d08f24178498
8148629: Disable remaining warnings in awt/fontmanager
erikj
parents:
35276
diff
changeset
|
223 |
ifeq ($(TOOLCHAIN_TYPE), gcc) |
d08f24178498
8148629: Disable remaining warnings in awt/fontmanager
erikj
parents:
35276
diff
changeset
|
224 |
BUILD_LIBAWT_debug_mem.c_CFLAGS := -w |
43082
cf17b8a17dc0
8140266: Performance loss between jdk8 and jdk9 on Maskfill
serb
parents:
42747
diff
changeset
|
225 |
# This option improves performance of MaskFill in Java2D by 20% for some gcc |
cf17b8a17dc0
8140266: Performance loss between jdk8 and jdk9 on Maskfill
serb
parents:
42747
diff
changeset
|
226 |
LIBAWT_CFLAGS += -fgcse-after-reload |
35711
d08f24178498
8148629: Disable remaining warnings in awt/fontmanager
erikj
parents:
35276
diff
changeset
|
227 |
endif |
d08f24178498
8148629: Disable remaining warnings in awt/fontmanager
erikj
parents:
35276
diff
changeset
|
228 |
|
49070
d7859531621b
8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents:
48766
diff
changeset
|
229 |
$(eval $(call SetupNativeCompilation, BUILD_LIBAWT, \ |
d7859531621b
8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents:
48766
diff
changeset
|
230 |
NAME := awt, \ |
20547 | 231 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
232 |
SRC := $(LIBAWT_DIRS), \ |
|
25859 | 233 |
EXCLUDES := $(LIBAWT_EXCLUDES), \ |
234 |
EXCLUDE_FILES := $(LIBAWT_EXFILES), \ |
|
20547 | 235 |
OPTIMIZATION := LOW, \ |
236 |
CFLAGS := $(CFLAGS_JDKLIB) $(LIBAWT_CFLAGS), \ |
|
29374
f031a666744a
8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents:
29006
diff
changeset
|
237 |
DISABLED_WARNINGS_gcc := sign-compare unused-result maybe-uninitialized \ |
f031a666744a
8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents:
29006
diff
changeset
|
238 |
format-nonliteral parentheses, \ |
30434 | 239 |
DISABLED_WARNINGS_clang := logical-op-parentheses extern-initializer, \ |
29374
f031a666744a
8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents:
29006
diff
changeset
|
240 |
DISABLED_WARNINGS_solstudio := E_DECLARATION_IN_CODE, \ |
30434 | 241 |
DISABLED_WARNINGS_microsoft := 4297 4244 4267 4996, \ |
20547 | 242 |
ASFLAGS := $(LIBAWT_ASFLAGS), \ |
243 |
MAPFILE := $(LIBAWT_MAPFILE), \ |
|
244 |
LDFLAGS := $(LDFLAGS_JDKLIB) $(call SET_SHARED_LIBRARY_ORIGIN), \ |
|
33406 | 245 |
LDFLAGS_macosx := -L$(INSTALL_LIBRARIES_HERE), \ |
246 |
LDFLAGS_windows := -delayload:user32.dll -delayload:gdi32.dll \ |
|
247 |
-delayload:shell32.dll -delayload:winmm.dll \ |
|
248 |
-delayload:winspool.drv -delayload:imm32.dll \ |
|
249 |
-delayload:ole32.dll -delayload:comdlg32.dll \ |
|
250 |
-delayload:comctl32.dll -delayload:shlwapi.dll, \ |
|
251 |
LIBS_unix := -ljvm -ljava $(LIBM), \ |
|
252 |
LIBS_linux := $(LIBDL), \ |
|
253 |
LIBS_solaris := $(LIBDL) -lc, \ |
|
254 |
LIBS_aix := $(LIBDL),\ |
|
255 |
LIBS_macosx := -lmlib_image \ |
|
20547 | 256 |
-framework Cocoa \ |
257 |
-framework OpenGL \ |
|
258 |
-framework JavaNativeFoundation \ |
|
259 |
-framework JavaRuntimeSupport \ |
|
260 |
-framework ApplicationServices \ |
|
33406 | 261 |
-framework AudioToolbox, \ |
262 |
LIBS_windows := kernel32.lib user32.lib gdi32.lib winspool.lib \ |
|
20547 | 263 |
imm32.lib ole32.lib uuid.lib shell32.lib \ |
264 |
comdlg32.lib winmm.lib comctl32.lib shlwapi.lib \ |
|
33406 | 265 |
delayimp.lib jvm.lib $(WIN_JAVA_LIB) advapi32.lib, \ |
20547 | 266 |
VERSIONINFO_RESOURCE := $(LIBAWT_VERSIONINFO_RESOURCE), \ |
267 |
RC_FLAGS := $(RC_FLAGS) $(LIBAWT_RC_FLAGS) \ |
|
268 |
-D "JDK_FNAME=awt.dll" \ |
|
269 |
-D "JDK_INTERNAL_NAME=awt" \ |
|
270 |
-D "JDK_FTYPE=0x2L", \ |
|
27565 | 271 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libawt, \ |
35276 | 272 |
)) |
20547 | 273 |
|
27565 | 274 |
$(BUILD_LIBAWT): $(call FindLib, java.base, java) |
13164 | 275 |
|
276 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
20547 | 277 |
$(BUILD_LIBAWT): $(BUILD_LIBMLIB_IMAGE) |
13164 | 278 |
endif |
279 |
||
27565 | 280 |
TARGETS += $(BUILD_LIBAWT) |
12892 | 281 |
|
26191
a0ff4b39d34b
8055188: General cleanup of minor issues from source restructure
erikj
parents:
25993
diff
changeset
|
282 |
################################################################################ |
12892 | 283 |
|
21130 | 284 |
ifeq ($(findstring $(OPENJDK_TARGET_OS),windows macosx),) |
41132 | 285 |
ifeq ($(ENABLE_HEADLESS_ONLY), false) |
20547 | 286 |
|
287 |
LIBAWT_XAWT_DIRS := \ |
|
47217 | 288 |
$(TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/libawt_xawt \ |
289 |
$(TOPDIR)/src/java.desktop/share/native/common/awt/debug \ |
|
290 |
$(TOPDIR)/src/java.desktop/share/native/common/awt/utility \ |
|
291 |
$(TOPDIR)/src/java.desktop/share/native/common/font \ |
|
292 |
$(TOPDIR)/src/java.desktop/share/native/common/java2d \ |
|
293 |
$(TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/common/java2d \ |
|
294 |
$(TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/common/awt \ |
|
25859 | 295 |
# |
296 |
||
36953 | 297 |
ifneq ($(filter $(OPENJDK_TARGET_OS),linux solaris aix), ) |
47217 | 298 |
LIBAWT_XAWT_DIRS += $(TOPDIR)/src/java.desktop/unix/native/common/awt/systemscale |
36880
3a05117c7611
8151770: 9-client windows builds fail on windows since make file change for 8145174
erikj
parents:
36869
diff
changeset
|
299 |
endif |
3a05117c7611
8151770: 9-client windows builds fail on windows since make file change for 8145174
erikj
parents:
36869
diff
changeset
|
300 |
|
25859 | 301 |
LIBAWT_XAWT_EXCLUDES := medialib |
20547 | 302 |
|
25859 | 303 |
LIBAWT_XAWT_CFLAGS := $(addprefix -I, $(shell $(FIND) $(LIBAWT_XAWT_DIRS) -type d)) \ |
27565 | 304 |
-I$(SUPPORT_OUTPUTDIR)/headers/java.desktop \ |
47217 | 305 |
-I$(TOPDIR)/src/java.desktop/share/native/include \ |
306 |
-I$(TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS)/native/include \ |
|
307 |
-I$(TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/include \ |
|
308 |
-I$(TOPDIR)/src/java.desktop/share/native/libawt/java2d \ |
|
309 |
-I$(TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/libawt/java2d \ |
|
310 |
-I$(TOPDIR)/src/java.desktop/share/native/libawt/java2d/loops \ |
|
311 |
-I$(TOPDIR)/src/java.desktop/share/native/libawt/java2d/pipe \ |
|
312 |
-I$(TOPDIR)/src/java.desktop/share/native/libawt/awt/image/cvutils \ |
|
313 |
-I$(TOPDIR)/src/java.desktop/share/native/libawt/awt/image \ |
|
314 |
-I$(TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/common/font \ |
|
25859 | 315 |
$(LIBJAVA_HEADER_FLAGS) |
316 |
# |
|
317 |
||
318 |
LIBAWT_XAWT_CFLAGS += -DXAWT -DXAWT_HACK \ |
|
21130 | 319 |
-DPACKAGE_PATH=\"$(PACKAGE_PATH)\" \ |
47507
5a270d2dfa5d
8170681: Remove fontconfig header files from JDK source tree
prr
parents:
47314
diff
changeset
|
320 |
$(FONTCONFIG_CFLAGS) \ |
25859 | 321 |
$(CUPS_CFLAGS) |
20547 | 322 |
|
323 |
ifeq ($(OPENJDK_TARGET_OS), solaris) |
|
324 |
LIBAWT_XAWT_CFLAGS += -DFUNCPROTO=15 |
|
325 |
endif |
|
326 |
||
327 |
ifeq ($(OPENJDK_TARGET_OS), linux) |
|
328 |
ifeq ($(DISABLE_XRENDER), true) |
|
329 |
LIBAWT_XAWT_CFLAGS += -DDISABLE_XRENDER_BY_DEFAULT=true |
|
330 |
endif |
|
331 |
endif |
|
332 |
||
33406 | 333 |
LIBAWT_XAWT_LIBS := $(LIBM) -lawt -lXext -lX11 -lXrender $(LIBDL) -lXtst -lXi -ljava -ljvm -lc |
20547 | 334 |
|
335 |
ifeq ($(OPENJDK_TARGET_OS), linux) |
|
33406 | 336 |
LIBAWT_XAWT_LIBS += -lpthread |
20547 | 337 |
endif |
338 |
||
35711
d08f24178498
8148629: Disable remaining warnings in awt/fontmanager
erikj
parents:
35276
diff
changeset
|
339 |
ifeq ($(TOOLCHAIN_TYPE), gcc) |
d08f24178498
8148629: Disable remaining warnings in awt/fontmanager
erikj
parents:
35276
diff
changeset
|
340 |
# Turn off all warnings for the following files since they contain warnings |
d08f24178498
8148629: Disable remaining warnings in awt/fontmanager
erikj
parents:
35276
diff
changeset
|
341 |
# that cannot be turned of individually. |
d08f24178498
8148629: Disable remaining warnings in awt/fontmanager
erikj
parents:
35276
diff
changeset
|
342 |
# redefining a macro |
d08f24178498
8148629: Disable remaining warnings in awt/fontmanager
erikj
parents:
35276
diff
changeset
|
343 |
BUILD_LIBAWT_XAWT_gtk2_interface.c_CFLAGS := -w |
d08f24178498
8148629: Disable remaining warnings in awt/fontmanager
erikj
parents:
35276
diff
changeset
|
344 |
# comparison between pointer and integer |
d08f24178498
8148629: Disable remaining warnings in awt/fontmanager
erikj
parents:
35276
diff
changeset
|
345 |
BUILD_LIBAWT_XAWT_awt_Font.c_CFLAGS := -w |
d08f24178498
8148629: Disable remaining warnings in awt/fontmanager
erikj
parents:
35276
diff
changeset
|
346 |
# initializing a declared 'extern' |
d08f24178498
8148629: Disable remaining warnings in awt/fontmanager
erikj
parents:
35276
diff
changeset
|
347 |
BUILD_LIBAWT_XAWT_debug_mem.c_CFLAGS := -w |
d08f24178498
8148629: Disable remaining warnings in awt/fontmanager
erikj
parents:
35276
diff
changeset
|
348 |
endif |
d08f24178498
8148629: Disable remaining warnings in awt/fontmanager
erikj
parents:
35276
diff
changeset
|
349 |
|
49070
d7859531621b
8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents:
48766
diff
changeset
|
350 |
$(eval $(call SetupNativeCompilation, BUILD_LIBAWT_XAWT, \ |
d7859531621b
8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents:
48766
diff
changeset
|
351 |
NAME := awt_xawt, \ |
20547 | 352 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
353 |
SRC := $(LIBAWT_XAWT_DIRS), \ |
|
25859 | 354 |
EXCLUDES := $(LIBAWT_XAWT_EXCLUDES), \ |
20547 | 355 |
OPTIMIZATION := LOW, \ |
356 |
CFLAGS := $(CFLAGS_JDKLIB) $(LIBAWT_XAWT_CFLAGS) \ |
|
357 |
$(X_CFLAGS), \ |
|
37529
868c7195632c
8154087: Fix AIX and Linux/ppc64le after the integration of the new hotspot build
simonis
parents:
36110
diff
changeset
|
358 |
WARNINGS_AS_ERRORS_xlc := false, \ |
29374
f031a666744a
8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents:
29006
diff
changeset
|
359 |
DISABLED_WARNINGS_gcc := type-limits pointer-to-int-cast \ |
42194
4c928df88d20
8160146: Resolve disabled GCC warning 'deprecated-declarations' for libawt_xawt
aghaisas
parents:
41132
diff
changeset
|
360 |
unused-result maybe-uninitialized format \ |
48766
2c4d1993b5f9
8196985: Disable new warnings from GCC 7.3 in jdk libraries
erikj
parents:
48751
diff
changeset
|
361 |
format-security int-to-pointer-cast parentheses \ |
2c4d1993b5f9
8196985: Disable new warnings from GCC 7.3 in jdk libraries
erikj
parents:
48751
diff
changeset
|
362 |
implicit-fallthrough, \ |
29374
f031a666744a
8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents:
29006
diff
changeset
|
363 |
DISABLED_WARNINGS_solstudio := E_DECLARATION_IN_CODE \ |
f031a666744a
8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents:
29006
diff
changeset
|
364 |
E_ASSIGNMENT_TYPE_MISMATCH E_NON_CONST_INIT, \ |
47217 | 365 |
MAPFILE := $(TOPDIR)/make/mapfiles/libawt_xawt/mapfile-vers, \ |
20547 | 366 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
367 |
$(call SET_SHARED_LIBRARY_ORIGIN) \ |
|
27944 | 368 |
-L$(INSTALL_LIBRARIES_HERE), \ |
33406 | 369 |
LIBS := $(X_LIBS) $(LIBAWT_XAWT_LIBS), \ |
25859 | 370 |
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \ |
20547 | 371 |
RC_FLAGS := $(RC_FLAGS) \ |
372 |
-D "JDK_FNAME=xawt.dll" \ |
|
373 |
-D "JDK_INTERNAL_NAME=xawt" \ |
|
374 |
-D "JDK_FTYPE=0x2L", \ |
|
27565 | 375 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libawt_xawt, \ |
35276 | 376 |
)) |
20547 | 377 |
|
27565 | 378 |
$(BUILD_LIBAWT_XAWT): $(call FindLib, java.base, java) |
20547 | 379 |
|
380 |
$(BUILD_LIBAWT_XAWT): $(BUILD_LIBAWT) |
|
381 |
||
27565 | 382 |
TARGETS += $(BUILD_LIBAWT_XAWT) |
20547 | 383 |
|
384 |
endif |
|
385 |
endif |
|
386 |
||
26191
a0ff4b39d34b
8055188: General cleanup of minor issues from source restructure
erikj
parents:
25993
diff
changeset
|
387 |
################################################################################ |
20547 | 388 |
|
47217 | 389 |
LIBLCMS_SRC := $(TOPDIR)/src/java.desktop/share/native/liblcms |
27565 | 390 |
LIBLCMS_CPPFLAGS += -I$(SUPPORT_OUTPUTDIR)/headers/java.desktop \ |
47217 | 391 |
-I$(TOPDIR)/src/java.desktop/share/native/libawt/java2d \ |
392 |
-I$(TOPDIR)/src/java.desktop/share/native/common/awt/debug \ |
|
25859 | 393 |
$(LIBJAVA_HEADER_FLAGS) \ |
394 |
# |
|
33285 | 395 |
# The fast floor code loses precision. |
396 |
LCMS_CFLAGS=-DCMS_DONT_USE_FAST_FLOOR |
|
24540 | 397 |
|
398 |
ifeq ($(USE_EXTERNAL_LCMS), true) |
|
399 |
# If we're using an external library, we'll just need the wrapper part. |
|
42352
4036fe6d110d
8039103: "explicitly" is misspelled as "explicitely" in configure scripts
ihse
parents:
42340
diff
changeset
|
400 |
# By including it explicitly, all other files will be excluded. |
24540 | 401 |
BUILD_LIBLCMS_INCLUDE_FILES := LCMS.c |
402 |
else |
|
403 |
BUILD_LIBLCMS_INCLUDE_FILES := |
|
404 |
# If we're using the bundled library, we'll need to include it in the |
|
405 |
# include path explicitly. Otherwise the system headers will be used. |
|
25859 | 406 |
LIBLCMS_CPPFLAGS += $(addprefix -I, $(LIBLCMS_SRC)) |
24540 | 407 |
endif |
408 |
||
49070
d7859531621b
8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents:
48766
diff
changeset
|
409 |
$(eval $(call SetupNativeCompilation, BUILD_LIBLCMS, \ |
d7859531621b
8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents:
48766
diff
changeset
|
410 |
NAME := lcms, \ |
20547 | 411 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
25859 | 412 |
SRC := $(LIBLCMS_SRC), \ |
24540 | 413 |
INCLUDE_FILES := $(BUILD_LIBLCMS_INCLUDE_FILES), \ |
20547 | 414 |
OPTIMIZATION := HIGHEST, \ |
415 |
CFLAGS := $(filter-out -xc99=%none, $(CFLAGS_JDKLIB)) \ |
|
30434 | 416 |
$(LIBLCMS_CPPFLAGS) \ |
24540 | 417 |
$(LCMS_CFLAGS), \ |
20547 | 418 |
CFLAGS_solaris := -xc99=no_lib, \ |
419 |
CFLAGS_windows := -DCMS_IS_WINDOWS_, \ |
|
39550
8d587cab45d2
8160294: Some client libraries cannot be built with GCC 6
ysuenaga
parents:
39025
diff
changeset
|
420 |
DISABLED_WARNINGS_gcc := format-nonliteral type-limits misleading-indentation, \ |
29374
f031a666744a
8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents:
29006
diff
changeset
|
421 |
DISABLED_WARNINGS_clang := tautological-compare, \ |
f031a666744a
8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents:
29006
diff
changeset
|
422 |
DISABLED_WARNINGS_solstudio := E_STATEMENT_NOT_REACHED, \ |
42747
807791cafb87
8170954: non-ASCII characters in lcms and harfbuzz break Windows builds on some locales
dbuck
parents:
42352
diff
changeset
|
423 |
DISABLED_WARNINGS_microsoft := 4819, \ |
47217 | 424 |
MAPFILE := $(TOPDIR)/make/mapfiles/liblcms/mapfile-vers, \ |
20547 | 425 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
426 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
|
27944 | 427 |
LDFLAGS_unix := -L$(INSTALL_LIBRARIES_HERE), \ |
20547 | 428 |
LDFLAGS_solaris := /usr/lib$(OPENJDK_TARGET_CPU_ISADIR)/libm.so.2, \ |
33406 | 429 |
LIBS_unix := -lawt -ljvm -ljava $(LCMS_LIBS), \ |
430 |
LIBS_linux := $(LIBM), \ |
|
431 |
LIBS_macosx := $(LIBM), \ |
|
432 |
LIBS_solaris := -lc, \ |
|
433 |
LIBS_aix := $(LIBM),\ |
|
434 |
LIBS_windows := $(WIN_AWT_LIB) $(WIN_JAVA_LIB), \ |
|
25859 | 435 |
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \ |
20547 | 436 |
RC_FLAGS := $(RC_FLAGS) \ |
437 |
-D "JDK_FNAME=lcms.dll" \ |
|
438 |
-D "JDK_INTERNAL_NAME=lcms" \ |
|
439 |
-D "JDK_FTYPE=0x2L", \ |
|
27565 | 440 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/liblcms, \ |
35276 | 441 |
)) |
20547 | 442 |
|
27565 | 443 |
TARGETS += $(BUILD_LIBLCMS) |
20547 | 444 |
|
445 |
$(BUILD_LIBLCMS): $(BUILD_LIBAWT) |
|
446 |
||
26191
a0ff4b39d34b
8055188: General cleanup of minor issues from source restructure
erikj
parents:
25993
diff
changeset
|
447 |
################################################################################ |
20547 | 448 |
|
47217 | 449 |
LIBJAVAJPEG_SRC += $(TOPDIR)/src/java.desktop/share/native/libjavajpeg |
25859 | 450 |
|
25103 | 451 |
BUILD_LIBJAVAJPEG_REORDER := |
13164 | 452 |
ifeq ($(OPENJDK_TARGET_OS), solaris) |
20547 | 453 |
ifneq ($(OPENJDK_TARGET_CPU), x86_64) |
47217 | 454 |
BUILD_LIBJAVAJPEG_REORDER := $(TOPDIR)/make/mapfiles/libjpeg/reorder-$(OPENJDK_TARGET_CPU) |
20547 | 455 |
endif |
456 |
endif |
|
457 |
||
25103 | 458 |
|
20547 | 459 |
# Suppress gcc warnings like "variable might be clobbered by 'longjmp' |
460 |
# or 'vfork'": this warning indicates that some variable is placed to |
|
461 |
# a register by optimized compiler and it's value might be lost on longjmp(). |
|
462 |
# Recommended way to avoid such warning is to declare the variable as |
|
463 |
# volatile to prevent the optimization. However, this approach does not |
|
464 |
# work because we have to declare all variables as volatile in result. |
|
465 |
#ifndef CROSS_COMPILE_ARCH |
|
466 |
# CC_43_OR_NEWER := \ |
|
467 |
# $(shell $(EXPR) $(CC_MAJORVER) \> 4 \| \ |
|
468 |
# \( $(CC_MAJORVER) = 4 \& $(CC_MINORVER) \>= 3 \) ) |
|
469 |
# ifeq ($(CC_43_OR_NEWER), 1) |
|
25103 | 470 |
# BUILD_LIBJAVAJPEG_CFLAGS_linux += -Wno-clobbered |
20547 | 471 |
# endif |
472 |
#endif |
|
473 |
||
25103 | 474 |
ifeq ($(USE_EXTERNAL_LIBJPEG), true) |
475 |
LIBJPEG_LIBS := -ljpeg |
|
476 |
BUILD_LIBJAVAJPEG_INCLUDE_FILES := \ |
|
33647
2665054d3864
8139932: Typo in makefile changes for 8043805 [Allow using a system-installed libjpeg]
omajid
parents:
33518
diff
changeset
|
477 |
imageioJPEG.c \ |
25103 | 478 |
jpegdecoder.c |
479 |
BUILD_LIBJAVAJPEG_HEADERS := |
|
480 |
else |
|
481 |
LIBJPEG_LIBS := |
|
482 |
BUILD_LIBJAVAJPEG_INCLUDE_FILES := |
|
25859 | 483 |
BUILD_LIBJAVAJPEG_HEADERS := $(addprefix -I, $(LIBJAVAJPEG_SRC)) |
25103 | 484 |
endif |
485 |
||
49070
d7859531621b
8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents:
48766
diff
changeset
|
486 |
$(eval $(call SetupNativeCompilation, BUILD_LIBJAVAJPEG, \ |
d7859531621b
8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents:
48766
diff
changeset
|
487 |
NAME := javajpeg, \ |
20547 | 488 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
25859 | 489 |
SRC := $(LIBJAVAJPEG_SRC), \ |
25103 | 490 |
INCLUDE_FILES := $(BUILD_LIBJAVAJPEG_INCLUDE_FILES), \ |
20547 | 491 |
OPTIMIZATION := HIGHEST, \ |
31159
6f5c7d192b2d
8081447: System JPEG builds include in-tree jpeglib.h, resulting in build failure
andrew
parents:
31157
diff
changeset
|
492 |
CFLAGS := $(CFLAGS_JDKLIB) $(BUILD_LIBJAVAJPEG_HEADERS) \ |
25859 | 493 |
$(LIBJAVA_HEADER_FLAGS) \ |
27565 | 494 |
-I$(SUPPORT_OUTPUTDIR)/headers/java.desktop, \ |
48766
2c4d1993b5f9
8196985: Disable new warnings from GCC 7.3 in jdk libraries
erikj
parents:
48751
diff
changeset
|
495 |
DISABLED_WARNINGS_gcc := clobbered implicit-fallthrough shift-negative-value, \ |
47217 | 496 |
MAPFILE := $(TOPDIR)/make/mapfiles/libjpeg/mapfile-vers, \ |
33305
ed708a0e3482
8140223: fix the build with a toolchain with a linker defaulting to ld --as-needed
erikj
parents:
33285
diff
changeset
|
497 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
20547 | 498 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
33406 | 499 |
LIBS := $(LIBJPEG_LIBS) $(JDKLIB_LIBS), \ |
500 |
LIBS_windows := $(WIN_JAVA_LIB) jvm.lib, \ |
|
25859 | 501 |
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \ |
20547 | 502 |
RC_FLAGS := $(RC_FLAGS) \ |
25103 | 503 |
-D "JDK_FNAME=javajpeg.dll" \ |
504 |
-D "JDK_INTERNAL_NAME=javajpeg" \ |
|
20547 | 505 |
-D "JDK_FTYPE=0x2L", \ |
25103 | 506 |
REORDER := $(BUILD_LIBJAVAJPEG_REORDER), \ |
27565 | 507 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjavajpeg, \ |
35276 | 508 |
)) |
20547 | 509 |
|
27565 | 510 |
$(BUILD_LIBJAVAJPEG): $(call FindLib, java.base, java) |
20547 | 511 |
|
27565 | 512 |
TARGETS += $(BUILD_LIBJAVAJPEG) |
20547 | 513 |
|
26191
a0ff4b39d34b
8055188: General cleanup of minor issues from source restructure
erikj
parents:
25993
diff
changeset
|
514 |
################################################################################ |
20547 | 515 |
|
41132 | 516 |
# Mac and Windows only use the native AWT lib, do not build libawt_headless |
517 |
ifeq ($(findstring $(OPENJDK_TARGET_OS), windows macosx),) |
|
29006
0d72c5ab72d8
8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents:
29002
diff
changeset
|
518 |
|
47217 | 519 |
LIBAWT_HEADLESS_DIRS := $(TOPDIR)/src/java.desktop/unix/native/libawt_headless/awt \ |
520 |
$(TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/common/awt \ |
|
521 |
$(TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/common/java2d \ |
|
522 |
$(TOPDIR)/src/java.desktop/share/native/common/java2d \ |
|
523 |
$(TOPDIR)/src/java.desktop/share/native/common/font \ |
|
41132 | 524 |
# |
29006
0d72c5ab72d8
8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents:
29002
diff
changeset
|
525 |
|
41132 | 526 |
LIBAWT_HEADLESS_EXCLUDES := medialib |
527 |
LIBAWT_HEADLESS_CFLAGS := -I$(SUPPORT_OUTPUTDIR)/headers/java.desktop \ |
|
528 |
$(addprefix -I, $(LIBAWT_HEADLESS_DIRS)) \ |
|
47217 | 529 |
-I$(TOPDIR)/src/java.desktop/share/native/libawt/awt/image \ |
530 |
-I$(TOPDIR)/src/java.desktop/share/native/libawt/awt/image/cvutils \ |
|
531 |
-I$(TOPDIR)/src/java.desktop/share/native/libawt/java2d \ |
|
532 |
-I$(TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/libawt/java2d \ |
|
533 |
-I$(TOPDIR)/src/java.desktop/share/native/libawt/java2d/loops \ |
|
534 |
-I$(TOPDIR)/src/java.desktop/share/native/libawt/java2d/pipe \ |
|
535 |
-I$(TOPDIR)/src/java.desktop/share/native/common/awt/debug \ |
|
536 |
-I$(TOPDIR)/src/java.desktop/share/native/common/font \ |
|
537 |
-I$(TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/common/font \ |
|
538 |
-I$(TOPDIR)/src/java.desktop/share/native/common/java2d/opengl \ |
|
539 |
-I$(TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/common/java2d/opengl \ |
|
41132 | 540 |
$(LIBJAVA_HEADER_FLAGS) \ |
541 |
# |
|
29006
0d72c5ab72d8
8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents:
29002
diff
changeset
|
542 |
|
41132 | 543 |
LIBAWT_HEADLESS_REORDER := |
544 |
ifeq ($(OPENJDK_TARGET_OS), solaris) |
|
545 |
ifneq ($(OPENJDK_TARGET_CPU), x86_64) |
|
47217 | 546 |
LIBAWT_HEADLESS_REORDER := $(TOPDIR)/make/mapfiles/libawt_headless/reorder-$(OPENJDK_TARGET_CPU) |
29006
0d72c5ab72d8
8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents:
29002
diff
changeset
|
547 |
endif |
41132 | 548 |
endif |
29006
0d72c5ab72d8
8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents:
29002
diff
changeset
|
549 |
|
49070
d7859531621b
8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents:
48766
diff
changeset
|
550 |
$(eval $(call SetupNativeCompilation, BUILD_LIBAWT_HEADLESS, \ |
d7859531621b
8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents:
48766
diff
changeset
|
551 |
NAME := awt_headless, \ |
41132 | 552 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
553 |
SRC := $(LIBAWT_HEADLESS_DIRS), \ |
|
554 |
EXCLUDES := $(LIBAWT_HEADLESS_EXCLUDES), \ |
|
555 |
OPTIMIZATION := LOW, \ |
|
556 |
CFLAGS := $(CFLAGS_JDKLIB) \ |
|
557 |
-DHEADLESS=true \ |
|
558 |
-DPACKAGE_PATH=\"$(PACKAGE_PATH)\" \ |
|
559 |
$(CUPS_CFLAGS) \ |
|
47507
5a270d2dfa5d
8170681: Remove fontconfig header files from JDK source tree
prr
parents:
47314
diff
changeset
|
560 |
$(FONTCONFIG_CFLAGS) \ |
41132 | 561 |
$(X_CFLAGS) \ |
562 |
$(LIBAWT_HEADLESS_CFLAGS), \ |
|
563 |
DISABLED_WARNINGS_xlc := 1506-356, \ |
|
564 |
DISABLED_WARNINGS_solstudio := E_EMPTY_TRANSLATION_UNIT, \ |
|
47217 | 565 |
MAPFILE := $(TOPDIR)/make/mapfiles/libawt_headless/mapfile-vers, \ |
41132 | 566 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
567 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
|
568 |
LDFLAGS_unix := -L$(INSTALL_LIBRARIES_HERE), \ |
|
569 |
REORDER := $(LIBAWT_HEADLESS_REORDER), \ |
|
570 |
LIBS_unix := -lawt -ljvm -ljava, \ |
|
571 |
LIBS_linux := $(LIBM) $(LIBDL), \ |
|
572 |
LIBS_solaris := $(LIBM) $(LIBDL) $(LIBCXX) -lc, \ |
|
573 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libawt_headless, \ |
|
574 |
)) |
|
29006
0d72c5ab72d8
8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents:
29002
diff
changeset
|
575 |
|
41132 | 576 |
# AIX warning explanation: |
577 |
# 1506-356 : (W) Compilation unit is empty. |
|
578 |
# This happens during the headless build |
|
37529
868c7195632c
8154087: Fix AIX and Linux/ppc64le after the integration of the new hotspot build
simonis
parents:
36110
diff
changeset
|
579 |
|
41132 | 580 |
$(BUILD_LIBAWT_HEADLESS): $(BUILD_LIBAWT) |
29006
0d72c5ab72d8
8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents:
29002
diff
changeset
|
581 |
|
41132 | 582 |
TARGETS += $(BUILD_LIBAWT_HEADLESS) |
29006
0d72c5ab72d8
8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents:
29002
diff
changeset
|
583 |
|
0d72c5ab72d8
8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents:
29002
diff
changeset
|
584 |
endif |
0d72c5ab72d8
8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents:
29002
diff
changeset
|
585 |
|
0d72c5ab72d8
8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents:
29002
diff
changeset
|
586 |
################################################################################ |
0d72c5ab72d8
8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents:
29002
diff
changeset
|
587 |
|
49234
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
588 |
ifeq ($(FREETYPE_TO_USE), system) |
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
589 |
LIBFREETYPE_CFLAGS := $(FREETYPE_CFLAGS) |
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
590 |
LIBFREETYPE_LIBS := $(FREETYPE_LIBS) |
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
591 |
else |
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
592 |
LIBFREETYPE_SRC := $(TOPDIR)/src/java.desktop/share/native/libfreetype |
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
593 |
BUILD_LIBFREETYPE_HEADERS := $(addprefix -I, $(LIBFREETYPE_SRC)/include) |
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
594 |
LIBFREETYPE_CFLAGS := $(BUILD_LIBFREETYPE_HEADERS) |
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
595 |
ifeq ($(OPENJDK_TARGET_OS), windows) |
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
596 |
LIBFREETYPE_LIBS := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libfreetype/freetype.lib |
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
597 |
else |
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
598 |
LIBFREETYPE_LIBS := -lfreetype |
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
599 |
endif |
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
600 |
|
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
601 |
$(eval $(call SetupNativeCompilation, BUILD_LIBFREETYPE, \ |
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
602 |
NAME := freetype, \ |
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
603 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
604 |
SRC := $(LIBFREETYPE_SRC)/src, \ |
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
605 |
OPTIMIZATION := HIGHEST, \ |
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
606 |
CFLAGS := $(CFLAGS_JDKLIB) $(BUILD_LIBFREETYPE_HEADERS) \ |
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
607 |
-DFT2_BUILD_LIBRARY, \ |
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
608 |
DISABLED_WARNINGS_solstudio := \ |
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
609 |
E_STATEMENT_NOT_REACHED \ |
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
610 |
E_END_OF_LOOP_CODE_NOT_REACHED, \ |
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
611 |
DISABLED_WARNINGS_microsoft := 4267 2220 4244, \ |
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
612 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
613 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
614 |
LIBS_solaris := -lc, \ |
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
615 |
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \ |
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
616 |
RC_FLAGS := $(RC_FLAGS) \ |
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
617 |
-D "JDK_FNAME=freetype.dll" \ |
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
618 |
-D "JDK_INTERNAL_NAME=freetype" \ |
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
619 |
-D "JDK_FTYPE=0x2L", \ |
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
620 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libfreetype, \ |
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
621 |
)) |
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
622 |
|
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
623 |
TARGETS += $(BUILD_LIBFREETYPE) |
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
624 |
endif |
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
625 |
|
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
626 |
########################################################################### |
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
627 |
|
47217 | 628 |
LIBFONTMANAGER_SRC := $(TOPDIR)/src/java.desktop/share/native/libfontmanager \ |
629 |
$(TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/libfontmanager |
|
25859 | 630 |
LIBFONTMANAGER_CFLAGS := \ |
631 |
$(addprefix -I, $(shell $(FIND) \ |
|
632 |
$(LIBFONTMANAGER_SRC) \ |
|
47217 | 633 |
$(TOPDIR)/src/java.desktop/share/native/libawt \ |
634 |
$(TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/libawt \ |
|
635 |
$(TOPDIR)/src/java.desktop/share/native/common \ |
|
636 |
$(TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/common -type d)) \ |
|
27565 | 637 |
-I$(SUPPORT_OUTPUTDIR)/headers/java.desktop \ |
25859 | 638 |
$(LIBJAVA_HEADER_FLAGS) \ |
639 |
# |
|
640 |
||
34414
e496a8d8fc8a
8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
33647
diff
changeset
|
641 |
#### Begin harfbuzz configuration |
e496a8d8fc8a
8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
33647
diff
changeset
|
642 |
|
e496a8d8fc8a
8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
33647
diff
changeset
|
643 |
HARFBUZZ_CFLAGS := -DHAVE_OT -DHAVE_FALLBACK -DHAVE_UCDN |
e496a8d8fc8a
8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
33647
diff
changeset
|
644 |
|
e496a8d8fc8a
8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
33647
diff
changeset
|
645 |
ifneq ($(OPENJDK_TARGET_OS), windows) |
e496a8d8fc8a
8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
33647
diff
changeset
|
646 |
HARFBUZZ_CFLAGS += -DGETPAGESIZE -DHAVE_MPROTECT -DHAVE_PTHREAD \ |
e496a8d8fc8a
8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
33647
diff
changeset
|
647 |
-DHAVE_SYSCONF -DHAVE_SYS_MMAN_H -DHAVE_UNISTD_H |
e496a8d8fc8a
8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
33647
diff
changeset
|
648 |
endif |
e496a8d8fc8a
8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
33647
diff
changeset
|
649 |
ifneq (, $(findstring $(OPENJDK_TARGET_OS), linux macosx)) |
e496a8d8fc8a
8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
33647
diff
changeset
|
650 |
HARFBUZZ_CFLAGS += -DHAVE_INTEL_ATOMIC_PRIMITIVES |
e496a8d8fc8a
8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
33647
diff
changeset
|
651 |
endif |
e496a8d8fc8a
8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
33647
diff
changeset
|
652 |
ifeq ($(OPENJDK_TARGET_OS), solaris) |
e496a8d8fc8a
8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
33647
diff
changeset
|
653 |
HARFBUZZ_CFLAGS += -DHAVE_SOLARIS_ATOMIC_OPS |
e496a8d8fc8a
8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
33647
diff
changeset
|
654 |
endif |
e496a8d8fc8a
8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
33647
diff
changeset
|
655 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
e496a8d8fc8a
8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
33647
diff
changeset
|
656 |
HARFBUZZ_CFLAGS += -DHAVE_CORETEXT |
e496a8d8fc8a
8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
33647
diff
changeset
|
657 |
endif |
e496a8d8fc8a
8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
33647
diff
changeset
|
658 |
ifneq ($(OPENJDK_TARGET_OS), macosx) |
e496a8d8fc8a
8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
33647
diff
changeset
|
659 |
LIBFONTMANAGER_EXCLUDE_FILES += harfbuzz/hb-coretext.cc |
e496a8d8fc8a
8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
33647
diff
changeset
|
660 |
endif |
34432 | 661 |
# hb-ft.cc is not presently needed, and requires freetype 2.4.2 or later. |
662 |
LIBFONTMANAGER_EXCLUDE_FILES += harfbuzz/hb-ft.cc |
|
34414
e496a8d8fc8a
8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
33647
diff
changeset
|
663 |
|
e496a8d8fc8a
8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
33647
diff
changeset
|
664 |
LIBFONTMANAGER_CFLAGS += $(HARFBUZZ_CFLAGS) |
e496a8d8fc8a
8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
33647
diff
changeset
|
665 |
|
e496a8d8fc8a
8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
33647
diff
changeset
|
666 |
#### End harfbuzz configuration |
e496a8d8fc8a
8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
33647
diff
changeset
|
667 |
|
49234
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
668 |
LIBFONTMANAGER_CFLAGS += $(LIBFREETYPE_CFLAGS) |
39504
96c700e62710
8003593: build-infra: Paths to optional platform-specific files should not be hardwired to src/closed
erikj
parents:
39025
diff
changeset
|
669 |
# This may be overridden in a custom makefile |
47217 | 670 |
BUILD_LIBFONTMANAGER_MAPFILE ?= $(TOPDIR)/make/mapfiles/libfontmanager/mapfile-vers |
49234
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
671 |
BUILD_LIBFONTMANAGER_FONTLIB += $(LIBFREETYPE_LIBS) |
20547 | 672 |
|
673 |
LIBFONTMANAGER_OPTIMIZATION := HIGH |
|
674 |
||
675 |
ifeq ($(OPENJDK_TARGET_OS), windows) |
|
676 |
LIBFONTMANAGER_EXCLUDE_FILES += X11FontScaler.c \ |
|
677 |
X11TextRenderer.c |
|
678 |
LIBFONTMANAGER_OPTIMIZATION := HIGHEST |
|
47217 | 679 |
LIBFONTMANAGER_CFLAGS += -I$(TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/libawt/windows |
21130 | 680 |
else ifeq ($(OPENJDK_TARGET_OS), macosx) |
681 |
LIBFONTMANAGER_EXCLUDE_FILES += X11FontScaler.c \ |
|
682 |
X11TextRenderer.c \ |
|
683 |
fontpath.c \ |
|
684 |
lcdglyph.c |
|
20547 | 685 |
else |
686 |
LIBFONTMANAGER_EXCLUDE_FILES += fontpath.c \ |
|
687 |
lcdglyph.c |
|
688 |
endif |
|
689 |
||
25859 | 690 |
LIBFONTMANAGER_CFLAGS += $(FONT_HEADERS) $(X_CFLAGS) -DLE_STANDALONE -DHEADLESS |
20547 | 691 |
|
35711
d08f24178498
8148629: Disable remaining warnings in awt/fontmanager
erikj
parents:
35276
diff
changeset
|
692 |
ifeq ($(TOOLCHAIN_TYPE), gcc) |
d08f24178498
8148629: Disable remaining warnings in awt/fontmanager
erikj
parents:
35276
diff
changeset
|
693 |
# Turn off all warnings for sunFont.c. This is needed because the specific warning |
d08f24178498
8148629: Disable remaining warnings in awt/fontmanager
erikj
parents:
35276
diff
changeset
|
694 |
# about discarding 'const' qualifier cannot be turned off individually. |
d08f24178498
8148629: Disable remaining warnings in awt/fontmanager
erikj
parents:
35276
diff
changeset
|
695 |
BUILD_LIBFONTMANAGER_sunFont.c_CFLAGS := -w |
d08f24178498
8148629: Disable remaining warnings in awt/fontmanager
erikj
parents:
35276
diff
changeset
|
696 |
# Turn off aliasing with GCC for ExtensionSubtables.cpp |
20547 | 697 |
BUILD_LIBFONTMANAGER_ExtensionSubtables.cpp_CXXFLAGS := -fno-strict-aliasing |
698 |
endif |
|
699 |
||
49070
d7859531621b
8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents:
48766
diff
changeset
|
700 |
$(eval $(call SetupNativeCompilation, BUILD_LIBFONTMANAGER, \ |
d7859531621b
8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents:
48766
diff
changeset
|
701 |
NAME := fontmanager, \ |
49234
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
702 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
25859 | 703 |
SRC := $(LIBFONTMANAGER_SRC), \ |
20547 | 704 |
EXCLUDE_FILES := $(LIBFONTMANAGER_EXCLUDE_FILES) \ |
705 |
AccelGlyphCache.c, \ |
|
29931
64e274ed6567
8077824: Introduce DefineNativeToolchain to handle toolchain configurations
erikj
parents:
29734
diff
changeset
|
706 |
TOOLCHAIN := TOOLCHAIN_LINK_CXX, \ |
25859 | 707 |
CFLAGS := $(CFLAGS_JDKLIB) $(LIBFONTMANAGER_CFLAGS), \ |
708 |
CXXFLAGS := $(CXXFLAGS_JDKLIB) $(LIBFONTMANAGER_CFLAGS), \ |
|
20547 | 709 |
OPTIMIZATION := $(LIBFONTMANAGER_OPTIMIZATION), \ |
25859 | 710 |
CFLAGS_windows = -DCC_NOEX, \ |
37529
868c7195632c
8154087: Fix AIX and Linux/ppc64le after the integration of the new hotspot build
simonis
parents:
36110
diff
changeset
|
711 |
WARNINGS_AS_ERRORS_xlc := false, \ |
35711
d08f24178498
8148629: Disable remaining warnings in awt/fontmanager
erikj
parents:
35276
diff
changeset
|
712 |
DISABLED_WARNINGS_gcc := sign-compare int-to-pointer-cast \ |
48766
2c4d1993b5f9
8196985: Disable new warnings from GCC 7.3 in jdk libraries
erikj
parents:
48751
diff
changeset
|
713 |
type-limits missing-field-initializers implicit-fallthrough, \ |
35711
d08f24178498
8148629: Disable remaining warnings in awt/fontmanager
erikj
parents:
35276
diff
changeset
|
714 |
DISABLED_WARNINGS_CXX_gcc := reorder delete-non-virtual-dtor strict-overflow \ |
d08f24178498
8148629: Disable remaining warnings in awt/fontmanager
erikj
parents:
35276
diff
changeset
|
715 |
maybe-uninitialized, \ |
30434 | 716 |
DISABLED_WARNINGS_clang := unused-value incompatible-pointer-types \ |
717 |
tautological-constant-out-of-range-compare int-to-pointer-cast, \ |
|
35711
d08f24178498
8148629: Disable remaining warnings in awt/fontmanager
erikj
parents:
35276
diff
changeset
|
718 |
DISABLED_WARNINGS_C_solstudio = \ |
d08f24178498
8148629: Disable remaining warnings in awt/fontmanager
erikj
parents:
35276
diff
changeset
|
719 |
E_INTEGER_OVERFLOW_DETECTED \ |
d08f24178498
8148629: Disable remaining warnings in awt/fontmanager
erikj
parents:
35276
diff
changeset
|
720 |
E_ARG_INCOMPATIBLE_WITH_ARG_L \ |
d08f24178498
8148629: Disable remaining warnings in awt/fontmanager
erikj
parents:
35276
diff
changeset
|
721 |
E_ENUM_VAL_OVERFLOWS_INT_MAX, \ |
d08f24178498
8148629: Disable remaining warnings in awt/fontmanager
erikj
parents:
35276
diff
changeset
|
722 |
DISABLED_WARNINGS_CXX_solstudio := \ |
d08f24178498
8148629: Disable remaining warnings in awt/fontmanager
erikj
parents:
35276
diff
changeset
|
723 |
truncwarn wvarhidenmem wvarhidemem wbadlkginit identexpected \ |
d08f24178498
8148629: Disable remaining warnings in awt/fontmanager
erikj
parents:
35276
diff
changeset
|
724 |
hidevf w_novirtualdescr arrowrtn2, \ |
48274 | 725 |
DISABLED_WARNINGS_microsoft := 4267 4244 4018 4090 4996 4146 4334 4819 4101, \ |
20547 | 726 |
MAPFILE := $(BUILD_LIBFONTMANAGER_MAPFILE), \ |
48731
c832897a3a23
8196509: Linux UI applications broken by the build change for JDK-8196218
prr
parents:
48730
diff
changeset
|
727 |
LDFLAGS := $(subst -Wl$(COMMA)-z$(COMMA)defs,,$(LDFLAGS_JDKLIB)) $(LDFLAGS_CXX_JDK) \ |
20547 | 728 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
27944 | 729 |
LDFLAGS_unix := -L$(INSTALL_LIBRARIES_HERE), \ |
33406 | 730 |
LDFLAGS_macosx := -undefined dynamic_lookup, \ |
731 |
LIBS := $(BUILD_LIBFONTMANAGER_FONTLIB), \ |
|
732 |
LIBS_unix := -lawt -ljava -ljvm $(LIBM) $(LIBCXX), \ |
|
48731
c832897a3a23
8196509: Linux UI applications broken by the build change for JDK-8196218
prr
parents:
48730
diff
changeset
|
733 |
LIBS_linux := -lc, \ |
49094
ca51cc708843
8194870: Some regression tests throw NPE exception on a specific Solaris 11.2 sun4v sparc machine
prr
parents:
48766
diff
changeset
|
734 |
LIBS_solaris := -lc, \ |
33406 | 735 |
LIBS_aix := -lawt_headless,\ |
736 |
LIBS_windows := $(WIN_JAVA_LIB) advapi32.lib user32.lib gdi32.lib \ |
|
20547 | 737 |
$(WIN_AWT_LIB), \ |
25859 | 738 |
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \ |
20547 | 739 |
RC_FLAGS := $(RC_FLAGS) \ |
740 |
-D "JDK_FNAME=fontmanager.dll" \ |
|
741 |
-D "JDK_INTERNAL_NAME=fontmanager" \ |
|
742 |
-D "JDK_FTYPE=0x2L", \ |
|
27565 | 743 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libfontmanager, \ |
35276 | 744 |
)) |
20547 | 745 |
|
48040
26f1193f1348
8192876: MacOS build fails intermittently after JDK-8139653
erikj
parents:
48032
diff
changeset
|
746 |
$(BUILD_LIBFONTMANAGER): $(BUILD_LIBAWT) |
26f1193f1348
8192876: MacOS build fails intermittently after JDK-8139653
erikj
parents:
48032
diff
changeset
|
747 |
|
48731
c832897a3a23
8196509: Linux UI applications broken by the build change for JDK-8196218
prr
parents:
48730
diff
changeset
|
748 |
ifneq (, $(findstring $(OPENJDK_TARGET_OS), solaris aix)) |
48040
26f1193f1348
8192876: MacOS build fails intermittently after JDK-8139653
erikj
parents:
48032
diff
changeset
|
749 |
$(BUILD_LIBFONTMANAGER): $(BUILD_LIBAWT_HEADLESS) |
26f1193f1348
8192876: MacOS build fails intermittently after JDK-8139653
erikj
parents:
48032
diff
changeset
|
750 |
endif |
26f1193f1348
8192876: MacOS build fails intermittently after JDK-8139653
erikj
parents:
48032
diff
changeset
|
751 |
|
49234
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
752 |
ifeq ($(FREETYPE_TO_USE), bundled) |
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
753 |
$(BUILD_LIBFONTMANAGER): $(BUILD_LIBFREETYPE) |
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
754 |
endif |
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
755 |
|
48040
26f1193f1348
8192876: MacOS build fails intermittently after JDK-8139653
erikj
parents:
48032
diff
changeset
|
756 |
TARGETS += $(BUILD_LIBFONTMANAGER) |
20547 | 757 |
|
26191
a0ff4b39d34b
8055188: General cleanup of minor issues from source restructure
erikj
parents:
25993
diff
changeset
|
758 |
################################################################################ |
20547 | 759 |
|
760 |
ifeq ($(OPENJDK_TARGET_OS), windows) |
|
47217 | 761 |
LIBJAWT_SRC := $(TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/libjawt |
762 |
LIBJAWT_CFLAGS := -I$(TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/libawt/windows \ |
|
763 |
-I$(TOPDIR)/src/java.desktop/share/native/common/awt/debug \ |
|
764 |
-I$(TOPDIR)/src/java.desktop/share/native/libawt/java2d \ |
|
765 |
-I$(TOPDIR)/src/java.desktop/share/native/libawt/awt/image/cvutils \ |
|
766 |
-I$(TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/libawt/java2d/windows \ |
|
27565 | 767 |
-I$(SUPPORT_OUTPUTDIR)/headers/java.desktop \ |
47217 | 768 |
-I$(TOPDIR)/src/java.desktop/windows/native/include \ |
769 |
-I$(TOPDIR)/src/java.desktop/share/native/include \ |
|
25859 | 770 |
$(LIBJAVA_HEADER_FLAGS) \ |
771 |
# |
|
772 |
||
20547 | 773 |
ifeq ($(OPENJDK_TARGET_CPU), x86) |
774 |
KERNEL32_LIB := kernel32.lib |
|
775 |
endif |
|
49070
d7859531621b
8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents:
48766
diff
changeset
|
776 |
$(eval $(call SetupNativeCompilation, BUILD_LIBJAWT, \ |
d7859531621b
8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents:
48766
diff
changeset
|
777 |
NAME := jawt, \ |
20547 | 778 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
25859 | 779 |
SRC := $(LIBJAWT_SRC), \ |
780 |
INCLUDE_FILES := $(LIBJAWT_INCLUDE_FILES), \ |
|
20547 | 781 |
OPTIMIZATION := LOW, \ |
782 |
CFLAGS := $(CXXFLAGS_JDKLIB) \ |
|
783 |
-EHsc -DUNICODE -D_UNICODE \ |
|
25859 | 784 |
$(LIBJAWT_CFLAGS), \ |
33406 | 785 |
LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK), \ |
786 |
LIBS := $(JDKLIB_LIBS) $(KERNEL32_LIB) advapi32.lib $(WIN_AWT_LIB), \ |
|
25859 | 787 |
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \ |
20547 | 788 |
RC_FLAGS := $(RC_FLAGS) \ |
789 |
-D "JDK_FNAME=jawt.dll" \ |
|
790 |
-D "JDK_INTERNAL_NAME=jawt" \ |
|
791 |
-D "JDK_FTYPE=0x2L", \ |
|
27565 | 792 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjawt, \ |
35276 | 793 |
)) |
20547 | 794 |
|
795 |
$(BUILD_LIBJAWT): $(BUILD_LIBAWT) |
|
796 |
||
45781
0491f891667c
8183166: lib\jawt.lib is missing from JDK 9 distribution for Windows
erikj
parents:
43806
diff
changeset
|
797 |
$(eval $(call SetupCopyFiles, COPY_JAWT_LIB, \ |
0491f891667c
8183166: lib\jawt.lib is missing from JDK 9 distribution for Windows
erikj
parents:
43806
diff
changeset
|
798 |
FILES := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjawt/$(LIBRARY_PREFIX)jawt$(STATIC_LIBRARY_SUFFIX), \ |
0491f891667c
8183166: lib\jawt.lib is missing from JDK 9 distribution for Windows
erikj
parents:
43806
diff
changeset
|
799 |
DEST := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE), \ |
0491f891667c
8183166: lib\jawt.lib is missing from JDK 9 distribution for Windows
erikj
parents:
43806
diff
changeset
|
800 |
)) |
20547 | 801 |
|
45781
0491f891667c
8183166: lib\jawt.lib is missing from JDK 9 distribution for Windows
erikj
parents:
43806
diff
changeset
|
802 |
$(COPY_JAWT_LIB): $(BUILD_LIBJAWT) |
0491f891667c
8183166: lib\jawt.lib is missing from JDK 9 distribution for Windows
erikj
parents:
43806
diff
changeset
|
803 |
|
0491f891667c
8183166: lib\jawt.lib is missing from JDK 9 distribution for Windows
erikj
parents:
43806
diff
changeset
|
804 |
TARGETS += $(COPY_JAWT_LIB) |
20547 | 805 |
|
806 |
else # OPENJDK_TARGET_OS not windows |
|
807 |
||
808 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
47217 | 809 |
LIBJAWT_SRC := $(TOPDIR)/src/java.desktop/macosx/native/libjawt |
25859 | 810 |
else |
47217 | 811 |
LIBJAWT_SRC := $(TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/libjawt |
25859 | 812 |
endif |
813 |
LIBJAWT_CFLAGS := \ |
|
47217 | 814 |
-I$(TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/common/awt \ |
815 |
-I$(TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS)/native/include \ |
|
816 |
-I$(TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/include \ |
|
817 |
-I$(TOPDIR)/src/java.desktop/share/native/include \ |
|
25859 | 818 |
$(LIBJAVA_HEADER_FLAGS) \ |
819 |
# |
|
820 |
||
821 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
20547 | 822 |
JAWT_LIBS := -lawt_lwawt |
21130 | 823 |
else |
824 |
JAWT_LIBS := |
|
825 |
ifneq ($(OPENJDK_TARGET_OS), solaris) |
|
826 |
JAWT_LIBS += -lawt |
|
827 |
endif |
|
41132 | 828 |
ifeq ($(ENABLE_HEADLESS_ONLY), false) |
21130 | 829 |
JAWT_LIBS += -lawt_xawt |
830 |
else |
|
831 |
JAWT_LIBS += -lawt_headless |
|
832 |
HEADLESS_CFLAG += -DHEADLESS |
|
833 |
endif |
|
20547 | 834 |
endif |
835 |
||
49070
d7859531621b
8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents:
48766
diff
changeset
|
836 |
$(eval $(call SetupNativeCompilation, BUILD_LIBJAWT, \ |
d7859531621b
8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents:
48766
diff
changeset
|
837 |
NAME := jawt, \ |
20547 | 838 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
25859 | 839 |
SRC := $(LIBJAWT_SRC), \ |
20547 | 840 |
INCLUDE_FILES := $(JAWT_FILES), \ |
841 |
OPTIMIZATION := LOW, \ |
|
25859 | 842 |
CFLAGS := $(CFLAGS_JDKLIB) \ |
843 |
$(LIBJAWT_CFLAGS), \ |
|
20547 | 844 |
CFLAGS_linux := $(HEADLESS_CFLAG), \ |
25859 | 845 |
CFLAGS_macosx := $(LIBJAWT_CFLAGS_macosx), \ |
47217 | 846 |
MAPFILE := $(TOPDIR)/make/mapfiles/libjawt/mapfile-vers, \ |
20547 | 847 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
848 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
|
27944 | 849 |
LDFLAGS_unix := -L$(INSTALL_LIBRARIES_HERE), \ |
34695
7a6cc9982d22
8142907: Integration of minor fixes from the build-infra project
ihse
parents:
34432
diff
changeset
|
850 |
LDFLAGS_macosx := -Wl$(COMMA)-rpath$(COMMA)@loader_path, \ |
33406 | 851 |
LIBS_unix := $(JAWT_LIBS) $(JDKLIB_LIBS), \ |
852 |
LIBS_solaris := $(X_LIBS) -lXrender, \ |
|
853 |
LIBS_macosx := -framework Cocoa, \ |
|
27565 | 854 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjawt, \ |
35276 | 855 |
)) |
20547 | 856 |
|
41132 | 857 |
ifeq ($(ENABLE_HEADLESS_ONLY), false) |
20547 | 858 |
$(BUILD_LIBJAWT): $(BUILD_LIBAWT_XAWT) |
859 |
else |
|
860 |
$(BUILD_LIBJAWT): $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)awt_headless$(SHARED_LIBRARY_SUFFIX) |
|
861 |
endif |
|
862 |
||
863 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
864 |
$(BUILD_LIBJAWT): $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)awt_lwawt$(SHARED_LIBRARY_SUFFIX) |
|
865 |
endif |
|
866 |
||
867 |
endif # OPENJDK_TARGET_OS |
|
868 |
||
27565 | 869 |
TARGETS += $(BUILD_LIBJAWT) |
20547 | 870 |
|
26191
a0ff4b39d34b
8055188: General cleanup of minor issues from source restructure
erikj
parents:
25993
diff
changeset
|
871 |
################################################################################ |
12892 | 872 |
|
41132 | 873 |
ifeq ($(ENABLE_HEADLESS_ONLY), false) |
25859 | 874 |
|
20547 | 875 |
LIBSPLASHSCREEN_DIRS := \ |
47217 | 876 |
$(TOPDIR)/src/java.desktop/share/native/libjavajpeg \ |
877 |
$(TOPDIR)/src/java.desktop/share/native/libsplashscreen \ |
|
25859 | 878 |
# |
20547 | 879 |
|
880 |
ifeq ($(USE_EXTERNAL_LIBGIF), true) |
|
33406 | 881 |
GIFLIB_LIBS := -lgif |
25859 | 882 |
LIBSPLASHSCREEN_EXCLUDES := giflib |
20547 | 883 |
else |
47217 | 884 |
LIBSPLASHSCREEN_CFLAGS += -I$(TOPDIR)/src/java.desktop/share/native/libsplashscreen/giflib |
20547 | 885 |
endif |
886 |
||
25103 | 887 |
ifeq ($(USE_EXTERNAL_LIBJPEG), true) |
33406 | 888 |
LIBJPEG_LIBS := -ljpeg |
25103 | 889 |
else |
47217 | 890 |
LIBSPLASHSCREEN_DIRS += $(TOPDIR)/src/java.desktop/share/native/libjavajpeg |
891 |
LIBJPEG_CFLAGS := -I$(TOPDIR)/src/java.desktop/share/native/libjavajpeg |
|
25103 | 892 |
endif |
893 |
||
23305 | 894 |
ifeq ($(USE_EXTERNAL_LIBPNG), false) |
47217 | 895 |
LIBSPLASHSCREEN_DIRS += $(TOPDIR)/src/java.desktop/share/native/libsplashscreen/libpng |
25859 | 896 |
else |
897 |
LIBSPLASHSCREEN_EXCLUDES += libpng |
|
23305 | 898 |
endif |
899 |
||
20547 | 900 |
ifneq ($(OPENJDK_TARGET_OS), macosx) |
47217 | 901 |
LIBSPLASHSCREEN_DIRS += $(TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/libsplashscreen |
20547 | 902 |
else |
47217 | 903 |
LIBSPLASHSCREEN_DIRS += $(TOPDIR)/src/java.desktop/macosx/native/libsplashscreen |
20547 | 904 |
endif |
905 |
||
36953 | 906 |
ifneq ($(filter $(OPENJDK_TARGET_OS),linux solaris aix), ) |
47217 | 907 |
LIBSPLASHSCREEN_DIRS += $(TOPDIR)/src/java.desktop/unix/native/common/awt/systemscale |
36869 | 908 |
endif |
36880
3a05117c7611
8151770: 9-client windows builds fail on windows since make file change for 8145174
erikj
parents:
36869
diff
changeset
|
909 |
|
36907 | 910 |
ifeq ($(OPENJDK_TARGET_OS), windows) |
47217 | 911 |
LIBSPLASHSCREEN_DIRS += $(TOPDIR)/src/java.desktop/windows/native/common/awt/systemscale |
42340
bf1c934665a9
8056215: AWT source dirs should only point to java2d, not below
ihse
parents:
42194
diff
changeset
|
912 |
endif |
30325
1472b22475f2
8078245: AARCH64: JDK fails to build due to undefined symbol in libpng
enevill
parents:
29931
diff
changeset
|
913 |
LIBSPLASHSCREEN_CFLAGS += -DSPLASHSCREEN -DPNG_NO_MMX_CODE -DPNG_ARM_NEON_OPT=0 \ |
25859 | 914 |
$(addprefix -I, $(LIBSPLASHSCREEN_DIRS)) \ |
915 |
$(LIBJAVA_HEADER_FLAGS) \ |
|
916 |
# |
|
20547 | 917 |
|
918 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
919 |
LIBSPLASHSCREEN_CFLAGS += -DWITH_MACOSX |
|
47217 | 920 |
LIBSPLASHSCREEN_CFLAGS += -I$(TOPDIR)/src/java.desktop/macosx/native/libosxapp |
20547 | 921 |
|
25859 | 922 |
BUILD_LIBSPLASHSCREEN_java_awt_SplashScreen.c_CFLAGS := -x objective-c -O0 |
923 |
BUILD_LIBSPLASHSCREEN_splashscreen_gfx_impl.c_CFLAGS := -x objective-c -O0 |
|
924 |
BUILD_LIBSPLASHSCREEN_splashscreen_gif.c_CFLAGS := -x objective-c -O0 |
|
925 |
BUILD_LIBSPLASHSCREEN_splashscreen_impl.c_CFLAGS := -x objective-c -O0 |
|
926 |
BUILD_LIBSPLASHSCREEN_splashscreen_jpeg.c_CFLAGS := -x objective-c -O0 |
|
927 |
BUILD_LIBSPLASHSCREEN_splashscreen_png.c_CFLAGS := -x objective-c -O0 |
|
928 |
BUILD_LIBSPLASHSCREEN_splashscreen_sys.m_CFLAGS := -O0 |
|
20547 | 929 |
|
20901
70f69e624fc9
8026888: Licensee build failure due to wrong libs being called
erikj
parents:
20899
diff
changeset
|
930 |
else ifeq ($(OPENJDK_TARGET_OS), windows) |
70f69e624fc9
8026888: Licensee build failure due to wrong libs being called
erikj
parents:
20899
diff
changeset
|
931 |
LIBSPLASHSCREEN_CFLAGS += -DWITH_WIN32 |
20547 | 932 |
else |
20901
70f69e624fc9
8026888: Licensee build failure due to wrong libs being called
erikj
parents:
20899
diff
changeset
|
933 |
LIBSPLASHSCREEN_CFLAGS += -DWITH_X11 $(X_CFLAGS) |
20547 | 934 |
endif |
935 |
||
33406 | 936 |
LIBSPLASHSCREEN_LIBS := |
20547 | 937 |
|
48751
54f355e65415
8196803: Fix build warnings in jdk libraries with Xcode 9
erikj
parents:
48731
diff
changeset
|
938 |
ifeq ($(USE_EXTERNAL_LIBZ), false) |
47217 | 939 |
LIBSPLASHSCREEN_DIRS += $(TOPDIR)/src/java.base/share/native/libzip/zlib |
48751
54f355e65415
8196803: Fix build warnings in jdk libraries with Xcode 9
erikj
parents:
48731
diff
changeset
|
940 |
else |
54f355e65415
8196803: Fix build warnings in jdk libraries with Xcode 9
erikj
parents:
48731
diff
changeset
|
941 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
54f355e65415
8196803: Fix build warnings in jdk libraries with Xcode 9
erikj
parents:
48731
diff
changeset
|
942 |
ifeq ($(USE_EXTERNAL_LIBPNG), false) |
54f355e65415
8196803: Fix build warnings in jdk libraries with Xcode 9
erikj
parents:
48731
diff
changeset
|
943 |
# When building our own libpng and using an external libz, we need to |
54f355e65415
8196803: Fix build warnings in jdk libraries with Xcode 9
erikj
parents:
48731
diff
changeset
|
944 |
# inject our own libz.h to tweak the exported ZLIB_VERNUM macro. See |
54f355e65415
8196803: Fix build warnings in jdk libraries with Xcode 9
erikj
parents:
48731
diff
changeset
|
945 |
# $(TOPDIR)/src/java.desktop/macosx/native/libsplashscreen/libpng/zlib.h |
54f355e65415
8196803: Fix build warnings in jdk libraries with Xcode 9
erikj
parents:
48731
diff
changeset
|
946 |
# for details. |
54f355e65415
8196803: Fix build warnings in jdk libraries with Xcode 9
erikj
parents:
48731
diff
changeset
|
947 |
LIBSPLASHSCREEN_CFLAGS += -iquote $(TOPDIR)/src/java.desktop/macosx/native/libsplashscreen/libpng |
54f355e65415
8196803: Fix build warnings in jdk libraries with Xcode 9
erikj
parents:
48731
diff
changeset
|
948 |
endif |
54f355e65415
8196803: Fix build warnings in jdk libraries with Xcode 9
erikj
parents:
48731
diff
changeset
|
949 |
endif |
20547 | 950 |
endif |
951 |
||
952 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
33406 | 953 |
LIBSPLASHSCREEN_LIBS += \ |
27565 | 954 |
$(LIBM) -lpthread -liconv -losxapp \ |
20547 | 955 |
-framework ApplicationServices \ |
956 |
-framework Foundation \ |
|
957 |
-framework Cocoa \ |
|
958 |
-framework JavaNativeFoundation |
|
20901
70f69e624fc9
8026888: Licensee build failure due to wrong libs being called
erikj
parents:
20899
diff
changeset
|
959 |
else ifeq ($(OPENJDK_TARGET_OS), windows) |
36907 | 960 |
LIBSPLASHSCREEN_LIBS += kernel32.lib user32.lib gdi32.lib delayimp.lib $(WIN_JAVA_LIB) jvm.lib |
23592
35b16ae6b4f4
8038340: Cleanup and fix sysroot and devkit handling on Linux and Solaris
erikj
parents:
23310
diff
changeset
|
961 |
else |
39844
a3cc7e551a48
8149115: [hidpi] Linux: display-wise scaling factor should probably be taken into account
ssadetsky
parents:
39550
diff
changeset
|
962 |
LIBSPLASHSCREEN_LIBS += $(X_LIBS) -lX11 -lXext $(LIBM) -lpthread -ldl |
20901
70f69e624fc9
8026888: Licensee build failure due to wrong libs being called
erikj
parents:
20899
diff
changeset
|
963 |
endif |
20547 | 964 |
|
49070
d7859531621b
8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents:
48766
diff
changeset
|
965 |
$(eval $(call SetupNativeCompilation, BUILD_LIBSPLASHSCREEN, \ |
d7859531621b
8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents:
48766
diff
changeset
|
966 |
NAME := splashscreen, \ |
20547 | 967 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
968 |
SRC := $(LIBSPLASHSCREEN_DIRS), \ |
|
969 |
EXCLUDE_FILES := imageioJPEG.c jpegdecoder.c pngtest.c, \ |
|
25859 | 970 |
EXCLUDES := $(LIBSPLASHSCREEN_EXCLUDES), \ |
20547 | 971 |
OPTIMIZATION := LOW, \ |
23305 | 972 |
CFLAGS := $(LIBSPLASHSCREEN_CFLAGS) $(CFLAGS_JDKLIB) \ |
48751
54f355e65415
8196803: Fix build warnings in jdk libraries with Xcode 9
erikj
parents:
48731
diff
changeset
|
973 |
$(GIFLIB_CFLAGS) $(LIBJPEG_CFLAGS) $(PNG_CFLAGS) $(LIBZ_CFLAGS), \ |
48766
2c4d1993b5f9
8196985: Disable new warnings from GCC 7.3 in jdk libraries
erikj
parents:
48751
diff
changeset
|
974 |
DISABLED_WARNINGS_gcc := sign-compare type-limits unused-result \ |
2c4d1993b5f9
8196985: Disable new warnings from GCC 7.3 in jdk libraries
erikj
parents:
48751
diff
changeset
|
975 |
maybe-uninitialized shift-negative-value implicit-fallthrough, \ |
29374
f031a666744a
8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents:
29006
diff
changeset
|
976 |
DISABLED_WARNINGS_clang := incompatible-pointer-types, \ |
32408
97230ec16697
8134408: Disable warnings for jdk libraries triggered by SS12u4
erikj
parents:
31159
diff
changeset
|
977 |
DISABLED_WARNINGS_solstudio := E_NEWLINE_NOT_LAST E_DECLARATION_IN_CODE \ |
97230ec16697
8134408: Disable warnings for jdk libraries triggered by SS12u4
erikj
parents:
31159
diff
changeset
|
978 |
E_STATEMENT_NOT_REACHED, \ |
30502
50552a5900a2
8080317: Disable warning treated as error for signed/unsigned comparison in building splashscreen
prr
parents:
30439
diff
changeset
|
979 |
DISABLED_WARNINGS_microsoft := 4018 4244 4267, \ |
47217 | 980 |
MAPFILE := $(TOPDIR)/make/mapfiles/libsplashscreen/mapfile-vers, \ |
49239 | 981 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
20547 | 982 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
49239 | 983 |
LDFLAGS_macosx := -L$(INSTALL_LIBRARIES_HERE), \ |
984 |
LDFLAGS_windows := -delayload:user32.dll, \ |
|
48751
54f355e65415
8196803: Fix build warnings in jdk libraries with Xcode 9
erikj
parents:
48731
diff
changeset
|
985 |
LIBS := $(JDKLIB_LIBS) $(LIBSPLASHSCREEN_LIBS) $(LIBZ_LIBS) \ |
54f355e65415
8196803: Fix build warnings in jdk libraries with Xcode 9
erikj
parents:
48731
diff
changeset
|
986 |
$(GIFLIB_LIBS) $(LIBJPEG_LIBS) $(PNG_LIBS), \ |
33518
3f1644328d06
8141290: AIX: fix build after '8140661: Rename LDFLAGS_SUFFIX to LIBS'
simonis
parents:
33406
diff
changeset
|
987 |
LIBS_aix := -liconv, \ |
25859 | 988 |
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \ |
20547 | 989 |
RC_FLAGS := $(RC_FLAGS) \ |
990 |
-D "JDK_FNAME=splashscreen.dll" \ |
|
991 |
-D "JDK_INTERNAL_NAME=splashscreen" \ |
|
992 |
-D "JDK_FTYPE=0x2L", \ |
|
27565 | 993 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libsplashscreen, \ |
35276 | 994 |
)) |
20547 | 995 |
|
27565 | 996 |
TARGETS += $(BUILD_LIBSPLASHSCREEN) |
20547 | 997 |
|
998 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
25859 | 999 |
$(BUILD_LIBSPLASHSCREEN): $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)osxapp$(SHARED_LIBRARY_SUFFIX) |
20547 | 1000 |
endif |
1001 |
||
1002 |
endif |
|
1003 |
||
26191
a0ff4b39d34b
8055188: General cleanup of minor issues from source restructure
erikj
parents:
25993
diff
changeset
|
1004 |
################################################################################ |
20547 | 1005 |
|
1006 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
1007 |
||
25859 | 1008 |
LIBAWT_LWAWT_DIRS := \ |
47217 | 1009 |
$(TOPDIR)/src/java.desktop/macosx/native/libawt_lwawt \ |
1010 |
$(TOPDIR)/src/java.desktop/unix/native/common/awt \ |
|
1011 |
$(TOPDIR)/src/java.desktop/share/native/common/font \ |
|
1012 |
$(TOPDIR)/src/java.desktop/share/native/common/java2d \ |
|
25859 | 1013 |
# |
20547 | 1014 |
|
25859 | 1015 |
LIBAWT_LWAWT_CFLAGS := \ |
1016 |
$(addprefix -I, $(LIBAWT_LWAWT_DIRS)) \ |
|
27565 | 1017 |
-I$(SUPPORT_OUTPUTDIR)/headers/java.desktop \ |
47217 | 1018 |
-I$(TOPDIR)/src/java.desktop/macosx/native/libawt_lwawt/awt \ |
1019 |
-I$(TOPDIR)/src/java.desktop/unix/native/libawt_xawt/awt \ |
|
1020 |
-I$(TOPDIR)/src/java.desktop/macosx/native/libawt_lwawt/font \ |
|
1021 |
-I$(TOPDIR)/src/java.desktop/macosx/native/libawt_lwawt/java2d/opengl \ |
|
1022 |
-I$(TOPDIR)/src/java.desktop/share/native/common/awt/debug \ |
|
1023 |
-I$(TOPDIR)/src/java.desktop/share/native/common/java2d/opengl \ |
|
1024 |
-I$(TOPDIR)/src/java.desktop/macosx/native/include \ |
|
1025 |
-I$(TOPDIR)/src/java.desktop/share/native/include \ |
|
1026 |
-I$(TOPDIR)/src/java.desktop/share/native/libawt/awt/image \ |
|
1027 |
-I$(TOPDIR)/src/java.desktop/share/native/libawt/awt/image/cvutils \ |
|
1028 |
-I$(TOPDIR)/src/java.desktop/share/native/libawt/java2d \ |
|
1029 |
-I$(TOPDIR)/src/java.desktop/unix/native/libawt/java2d \ |
|
1030 |
-I$(TOPDIR)/src/java.desktop/share/native/libawt/java2d/loops \ |
|
1031 |
-I$(TOPDIR)/src/java.desktop/share/native/libawt/java2d/pipe \ |
|
1032 |
-I$(TOPDIR)/src/java.desktop/share/native/libmlib_image/ \ |
|
1033 |
-I$(TOPDIR)/src/java.desktop/macosx/native/libosxapp \ |
|
25859 | 1034 |
$(LIBJAVA_HEADER_FLAGS) \ |
1035 |
# |
|
20547 | 1036 |
|
26741 | 1037 |
LIBAWT_LWAWT_EXFILES := fontpath.c awt_Font.c X11Color.c |
47217 | 1038 |
LIBAWT_LWAWT_EXCLUDES := $(TOPDIR)/src/java.desktop/unix/native/common/awt/medialib |
20547 | 1039 |
|
49070
d7859531621b
8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents:
48766
diff
changeset
|
1040 |
$(eval $(call SetupNativeCompilation, BUILD_LIBAWT_LWAWT, \ |
d7859531621b
8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents:
48766
diff
changeset
|
1041 |
NAME := awt_lwawt, \ |
20547 | 1042 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
1043 |
SRC := $(LIBAWT_LWAWT_DIRS), \ |
|
1044 |
INCLUDE_FILES := $(LIBAWT_LWAWT_FILES), \ |
|
25859 | 1045 |
EXCLUDE_FILES := $(LIBAWT_LWAWT_EXFILES), \ |
1046 |
EXCLUDES := $(LIBAWT_LWAWT_EXCLUDES), \ |
|
20547 | 1047 |
OPTIMIZATION := LOW, \ |
1048 |
CFLAGS := $(CFLAGS_JDKLIB) \ |
|
20901
70f69e624fc9
8026888: Licensee build failure due to wrong libs being called
erikj
parents:
20899
diff
changeset
|
1049 |
$(X_CFLAGS) \ |
70f69e624fc9
8026888: Licensee build failure due to wrong libs being called
erikj
parents:
20899
diff
changeset
|
1050 |
$(X_LIBS) \ |
25859 | 1051 |
$(LIBAWT_LWAWT_CFLAGS), \ |
32872 | 1052 |
DISABLED_WARNINGS_clang := incomplete-implementation enum-conversion \ |
29374
f031a666744a
8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents:
29006
diff
changeset
|
1053 |
deprecated-declarations objc-method-access bitwise-op-parentheses \ |
f031a666744a
8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents:
29006
diff
changeset
|
1054 |
incompatible-pointer-types parentheses-equality extra-tokens, \ |
20547 | 1055 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
27565 | 1056 |
$(call SET_SHARED_LIBRARY_ORIGIN) \ |
27944 | 1057 |
-L$(INSTALL_LIBRARIES_HERE), \ |
33406 | 1058 |
LIBS := -lawt -lmlib_image -losxapp -ljvm $(LIBM) \ |
20547 | 1059 |
-framework Accelerate \ |
1060 |
-framework ApplicationServices \ |
|
1061 |
-framework AudioToolbox \ |
|
1062 |
-framework Carbon \ |
|
1063 |
-framework Cocoa \ |
|
1064 |
-framework Security \ |
|
1065 |
-framework ExceptionHandling \ |
|
1066 |
-framework JavaNativeFoundation \ |
|
1067 |
-framework JavaRuntimeSupport \ |
|
1068 |
-framework OpenGL \ |
|
1069 |
-framework QuartzCore -ljava, \ |
|
27565 | 1070 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libawt_lwawt, \ |
35276 | 1071 |
)) |
20547 | 1072 |
|
27565 | 1073 |
TARGETS += $(BUILD_LIBAWT_LWAWT) |
20547 | 1074 |
|
1075 |
$(BUILD_LIBAWT_LWAWT): $(BUILD_LIBAWT) |
|
1076 |
||
1077 |
$(BUILD_LIBAWT_LWAWT): $(BUILD_LIBMLIB_IMAGE) |
|
1078 |
||
1079 |
$(BUILD_LIBAWT_LWAWT): $(BUILD_LIBOSXAPP) |
|
1080 |
||
27565 | 1081 |
$(BUILD_LIBAWT_LWAWT): $(call FindLib, java.base, java) |
20547 | 1082 |
|
1083 |
endif |
|
1084 |
||
26191
a0ff4b39d34b
8055188: General cleanup of minor issues from source restructure
erikj
parents:
25993
diff
changeset
|
1085 |
################################################################################ |
20547 | 1086 |
|
1087 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
1088 |
||
49070
d7859531621b
8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents:
48766
diff
changeset
|
1089 |
$(eval $(call SetupNativeCompilation, BUILD_LIBOSXUI, \ |
d7859531621b
8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents:
48766
diff
changeset
|
1090 |
NAME := osxui, \ |
20547 | 1091 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
47217 | 1092 |
SRC := $(TOPDIR)/src/java.desktop/macosx/native/libosxui, \ |
20547 | 1093 |
OPTIMIZATION := LOW, \ |
1094 |
CFLAGS := $(CFLAGS_JDKLIB) \ |
|
47217 | 1095 |
-I$(TOPDIR)/src/java.desktop/macosx/native/libosxui \ |
1096 |
-I$(TOPDIR)/src/java.desktop/macosx/native/libawt_lwawt/awt \ |
|
1097 |
-I$(TOPDIR)/src/java.desktop/macosx/native/libosxapp \ |
|
1098 |
-I$(TOPDIR)/src/java.base/share/native/libjava \ |
|
1099 |
-I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libjava \ |
|
27565 | 1100 |
-I$(SUPPORT_OUTPUTDIR)/headers/java.desktop, \ |
20547 | 1101 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
1102 |
$(call SET_SHARED_LIBRARY_ORIGIN) \ |
|
34695
7a6cc9982d22
8142907: Integration of minor fixes from the build-infra project
ihse
parents:
34432
diff
changeset
|
1103 |
-Wl$(COMMA)-rpath$(COMMA)@loader_path \ |
27944 | 1104 |
-L$(INSTALL_LIBRARIES_HERE), \ |
33406 | 1105 |
LIBS := -lawt -losxapp -lawt_lwawt \ |
20547 | 1106 |
-framework Cocoa \ |
1107 |
-framework Carbon \ |
|
1108 |
-framework ApplicationServices \ |
|
1109 |
-framework JavaNativeFoundation \ |
|
1110 |
-framework JavaRuntimeSupport \ |
|
1111 |
-ljava -ljvm, \ |
|
27565 | 1112 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libosxui, \ |
35276 | 1113 |
)) |
20547 | 1114 |
|
27565 | 1115 |
TARGETS += $(BUILD_LIBOSXUI) |
20547 | 1116 |
|
1117 |
$(BUILD_LIBOSXUI): $(BUILD_LIBAWT) |
|
1118 |
||
1119 |
$(BUILD_LIBOSXUI): $(BUILD_LIBOSXAPP) |
|
1120 |
||
1121 |
$(BUILD_LIBOSXUI): $(BUILD_LIBAWT_LWAWT) |
|
1122 |
||
27565 | 1123 |
#$(BUILD_LIBOSXUI): $(call FindLib, java.base, java) |
20547 | 1124 |
|
1125 |
endif |
|
26191
a0ff4b39d34b
8055188: General cleanup of minor issues from source restructure
erikj
parents:
25993
diff
changeset
|
1126 |
|
a0ff4b39d34b
8055188: General cleanup of minor issues from source restructure
erikj
parents:
25993
diff
changeset
|
1127 |
################################################################################ |
a0ff4b39d34b
8055188: General cleanup of minor issues from source restructure
erikj
parents:
25993
diff
changeset
|
1128 |
|
a0ff4b39d34b
8055188: General cleanup of minor issues from source restructure
erikj
parents:
25993
diff
changeset
|
1129 |
# Hook to include the corresponding custom file, if present. |
47314 | 1130 |
$(eval $(call IncludeCustomExtension, lib/Awt2dLibraries.gmk)) |