author | ihse |
Thu, 19 Apr 2018 14:15:19 +0200 | |
branch | ihse-jdk-library-branch |
changeset 56457 | 0ec7d7abf529 |
parent 56454 | 82c3ae69914f |
child 56462 | 9bb6697e3fbb |
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 |
|
56433
c3cf838aa2da
Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents:
56421
diff
changeset
|
35 |
BUILD_LIBMLIB_CFLAGS := -D__USE_J2D_NAMES -D__MEDIALIB_OLD_NAMES -DMLIB_NO_LIBSUNMATH |
13164 | 36 |
|
13702 | 37 |
ifeq ($(OPENJDK_TARGET_CPU_BITS), 64) |
20547 | 38 |
BUILD_LIBMLIB_CFLAGS += -DMLIB_OS64BIT |
12892 | 39 |
endif |
40 |
||
49244
995a5556edfa
8199639: Introduce SetupJdkLibrary and SetupJdkExecutable
ihse
parents:
49241
diff
changeset
|
41 |
$(eval $(call SetupJdkLibrary, BUILD_LIBMLIB_IMAGE, \ |
49070
d7859531621b
8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents:
48766
diff
changeset
|
42 |
NAME := mlib_image, \ |
20547 | 43 |
SRC := $(BUILD_LIBMLIB_SRC), \ |
25859 | 44 |
EXCLUDE_FILES := mlib_c_ImageBlendTable.c, \ |
20547 | 45 |
OPTIMIZATION := HIGHEST, \ |
46 |
CFLAGS := $(CFLAGS_JDKLIB) \ |
|
47 |
$(BUILD_LIBMLIB_CFLAGS), \ |
|
48 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
|
49 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
|
56433
c3cf838aa2da
Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents:
56421
diff
changeset
|
50 |
LIBS := $(JDKLIB_LIBS), \ |
c3cf838aa2da
Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents:
56421
diff
changeset
|
51 |
LIBS_unix := $(LIBM) $(LIBDL), \ |
35276 | 52 |
)) |
20547 | 53 |
|
27565 | 54 |
$(BUILD_LIBMLIB_IMAGE): $(call FindLib, java.base, java) |
13164 | 55 |
|
27565 | 56 |
TARGETS += $(BUILD_LIBMLIB_IMAGE) |
12892 | 57 |
|
26191
a0ff4b39d34b
8055188: General cleanup of minor issues from source restructure
erikj
parents:
25993
diff
changeset
|
58 |
################################################################################ |
12892 | 59 |
|
20547 | 60 |
ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_ARCH), solaris-sparc) |
61 |
||
56433
c3cf838aa2da
Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents:
56421
diff
changeset
|
62 |
LIBMLIB_IMAGE_V_SRC := \ |
c3cf838aa2da
Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents:
56421
diff
changeset
|
63 |
$(call FindSrcDirsForLib, java.desktop, mlib_image) \ |
c3cf838aa2da
Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents:
56421
diff
changeset
|
64 |
$(call FindSrcDirsForComponent, java.desktop, common/awt/medialib) \ |
c3cf838aa2da
Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents:
56421
diff
changeset
|
65 |
# |
c3cf838aa2da
Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents:
56421
diff
changeset
|
66 |
|
c3cf838aa2da
Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents:
56421
diff
changeset
|
67 |
LIBMLIB_IMAGE_V_CFLAGS := -xarch=sparcvis -D__USE_J2D_NAMES -D__MEDIALIB_OLD_NAMES \ |
c3cf838aa2da
Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents:
56421
diff
changeset
|
68 |
$(TOPDIR)/src/java.desktop/unix/native/libmlib_image/vis_$(OPENJDK_TARGET_CPU_BITS).il |
20547 | 69 |
|
25859 | 70 |
BUILD_LIBMLIB_IMAGE_V_EXFILES := \ |
71 |
awt_ImagingLib.c \ |
|
72 |
mlib_c_ImageAffine_BC.c \ |
|
73 |
mlib_c_ImageAffine_BC_S16.c \ |
|
74 |
mlib_c_ImageAffine_BC_U16.c \ |
|
75 |
mlib_c_ImageAffine_BL.c \ |
|
76 |
mlib_c_ImageAffine_BL_S16.c \ |
|
77 |
mlib_c_ImageAffine_BL_U16.c \ |
|
78 |
mlib_c_ImageAffine_NN.c \ |
|
79 |
mlib_c_ImageConvClearEdge.c \ |
|
80 |
mlib_c_ImageConvCopyEdge.c \ |
|
81 |
mlib_c_ImageConv_f.c \ |
|
82 |
mlib_c_ImageConvVersion.c \ |
|
83 |
mlib_c_ImageCopy.c \ |
|
84 |
mlib_c_ImageLookUp.c \ |
|
85 |
mlib_c_ImageLookUp_f.c \ |
|
86 |
# |
|
87 |
||
49244
995a5556edfa
8199639: Introduce SetupJdkLibrary and SetupJdkExecutable
ihse
parents:
49241
diff
changeset
|
88 |
$(eval $(call SetupJdkLibrary, BUILD_LIBMLIB_IMAGE_V, \ |
49070
d7859531621b
8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents:
48766
diff
changeset
|
89 |
NAME := mlib_image_v, \ |
25859 | 90 |
SRC := $(LIBMLIB_IMAGE_V_SRC), \ |
91 |
EXCLUDE_FILES := $(BUILD_LIBMLIB_IMAGE_V_EXFILES), \ |
|
20547 | 92 |
OPTIMIZATION := HIGHEST, \ |
56433
c3cf838aa2da
Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents:
56421
diff
changeset
|
93 |
CFLAGS := $(CFLAGS_JDKLIB) \ |
c3cf838aa2da
Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents:
56421
diff
changeset
|
94 |
$(LIBMLIB_IMAGE_V_CFLAGS), \ |
20547 | 95 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
96 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
|
49241 | 97 |
LIBS := -ljava -ljvm $(BUILD_LIBMLIB_LDLIBS), \ |
35276 | 98 |
)) |
20547 | 99 |
|
27565 | 100 |
$(BUILD_LIBMLIB_IMAGE_V): $(call FindLib, java.base, java) |
20547 | 101 |
|
27565 | 102 |
TARGETS += $(BUILD_LIBMLIB_IMAGE_V) |
12892 | 103 |
|
104 |
endif |
|
105 |
||
26191
a0ff4b39d34b
8055188: General cleanup of minor issues from source restructure
erikj
parents:
25993
diff
changeset
|
106 |
################################################################################ |
12892 | 107 |
|
56435 | 108 |
# FIXME:LIBS -- does not work. :( |
109 |
#LIBAWT_DIRS := \ |
|
110 |
# $(call FindSrcDirsForLib, java.desktop, awt) \ |
|
111 |
# $(call FindSrcDirsForComponent, java.desktop, common/awt) \ |
|
112 |
# # |
|
113 |
||
114 |
LIBAWT_DIRS := $(TOPDIR)/src/java.desktop/share/native/libawt \ |
|
115 |
$(TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/libawt \ |
|
116 |
$(TOPDIR)/src/java.desktop/share/native/common/awt/debug \ |
|
117 |
$(TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/common/awt \ |
|
25859 | 118 |
# |
20547 | 119 |
|
56435 | 120 |
ifeq ($(OPENJDK_TARGET_OS), aix) |
121 |
LIBAWT_DIRS += $(TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS)/native/libawt |
|
122 |
endif |
|
123 |
||
124 |
ifeq ($(OPENJDK_TARGET_OS), windows) |
|
125 |
LIBAWT_DIRS += $(TOPDIR)/src/java.desktop/share/native/common/awt/utility |
|
126 |
endif |
|
127 |
||
26225
3c7e92c78bab
8056246: Fix AIX build after the Modular Source Code change 8054834
simonis
parents:
26191
diff
changeset
|
128 |
ifneq ($(filter $(OPENJDK_TARGET_OS), solaris linux macosx aix), ) |
25859 | 129 |
LIBAWT_EXFILES += awt_Font.c CUPSfuncs.c fontpath.c X11Color.c |
14231 | 130 |
endif |
13164 | 131 |
|
25859 | 132 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
26751
70bac69b37c9
8056216: Remove "sun" directory layer from libawt and common
prr
parents:
26741
diff
changeset
|
133 |
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
|
134 |
endif |
7515a991bb37
8024854: PPC64: Basic changes and files to build the class library on AIX
simonis
parents:
22595
diff
changeset
|
135 |
|
26225
3c7e92c78bab
8056246: Fix AIX build after the Modular Source Code change 8054834
simonis
parents:
26191
diff
changeset
|
136 |
LIBAWT_CFLAGS += -D__MEDIALIB_OLD_NAMES -D__USE_J2D_NAMES $(X_CFLAGS) |
20547 | 137 |
|
56433
c3cf838aa2da
Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents:
56421
diff
changeset
|
138 |
ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU), solaris-sparcv9) |
c3cf838aa2da
Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents:
56421
diff
changeset
|
139 |
LIBAWT_CFLAGS += -xarch=sparcvis -DMLIB_ADD_SUFF \ |
c3cf838aa2da
Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents:
56421
diff
changeset
|
140 |
$(TOPDIR)/src/java.desktop/unix/native/libmlib_image/vis_$(OPENJDK_TARGET_CPU_BITS).il |
26751
70bac69b37c9
8056216: Remove "sun" directory layer from libawt and common
prr
parents:
26741
diff
changeset
|
141 |
LIBAWT_EXFILES += java2d/loops/MapAccelFunc.c |
20547 | 142 |
|
56433
c3cf838aa2da
Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents:
56421
diff
changeset
|
143 |
LIBAWT_ASFLAGS = -P -xarch=v9a |
12892 | 144 |
else |
25859 | 145 |
LIBAWT_EXCLUDES += \ |
47217 | 146 |
$(TOPDIR)/src/java.desktop/unix/native/libawt/awt/medialib \ |
147 |
$(TOPDIR)/src/java.desktop/unix/native/libawt/java2d/loops \ |
|
148 |
$(TOPDIR)/src/java.desktop/unix/native/common/awt/medialib \ |
|
25859 | 149 |
# |
12892 | 150 |
endif |
151 |
||
20547 | 152 |
ifneq ($(OPENJDK_TARGET_OS), solaris) |
153 |
LIBAWT_CFLAGS += -DMLIB_NO_LIBSUNMATH |
|
12892 | 154 |
endif |
155 |
||
20547 | 156 |
ifeq ($(OPENJDK_TARGET_OS), windows) |
47217 | 157 |
LIBAWT_DIRS += $(TOPDIR)/src/java.desktop/share/native/common/font \ |
158 |
$(TOPDIR)/src/java.desktop/share/native/common/java2d/opengl \ |
|
159 |
$(TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/common/awt/systemscale \ |
|
56433
c3cf838aa2da
Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents:
56421
diff
changeset
|
160 |
# |
c3cf838aa2da
Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents:
56421
diff
changeset
|
161 |
|
25859 | 162 |
# Why does libawt need java.base headers? |
56435 | 163 |
LIBAWT_HEADER_FLAGS += \ |
47217 | 164 |
-I$(TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/common/java2d/opengl \ |
165 |
-I$(TOPDIR)/src/java.desktop/windows/native/include \ |
|
166 |
-I$(TOPDIR)/src/java.desktop/share/native/include \ |
|
27565 | 167 |
-I$(SUPPORT_OUTPUTDIR)/headers/java.base \ |
25859 | 168 |
# |
169 |
LIBAWT_EXFILES += \ |
|
26751
70bac69b37c9
8056216: Remove "sun" directory layer from libawt and common
prr
parents:
26741
diff
changeset
|
170 |
java2d/d3d/D3DShaderGen.c \ |
70bac69b37c9
8056216: Remove "sun" directory layer from libawt and common
prr
parents:
26741
diff
changeset
|
171 |
awt/image/cvutils/img_colors.c \ |
25859 | 172 |
# |
20547 | 173 |
|
174 |
LIBAWT_CFLAGS += -EHsc -DUNICODE -D_UNICODE |
|
175 |
ifeq ($(OPENJDK_TARGET_CPU_BITS), 64) |
|
176 |
LIBAWT_CFLAGS += -DMLIB_OS64BIT |
|
177 |
endif |
|
178 |
||
47217 | 179 |
LIBAWT_RC_FLAGS ?= -I $(TOPDIR)/src/java.base/windows/native/launcher/icons |
180 |
LIBAWT_VERSIONINFO_RESOURCE := $(TOPDIR)/src/java.desktop/windows/native/libawt/windows/awt.rc |
|
12892 | 181 |
endif |
182 |
||
20547 | 183 |
ifeq ($(OPENJDK_TARGET_OS), linux) |
49440 | 184 |
# FIXME: This is probably not what we want to do, but keep it now for compatibility. |
185 |
LIBAWT_CFLAGS += $(EXPORT_ALL_SYMBOLS) |
|
12892 | 186 |
endif |
187 |
||
35711
d08f24178498
8148629: Disable remaining warnings in awt/fontmanager
erikj
parents:
35276
diff
changeset
|
188 |
# 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
|
189 |
# about initializing a declared 'extern' cannot be turned off individually. Only |
d08f24178498
8148629: Disable remaining warnings in awt/fontmanager
erikj
parents:
35276
diff
changeset
|
190 |
# applies to debug builds. |
d08f24178498
8148629: Disable remaining warnings in awt/fontmanager
erikj
parents:
35276
diff
changeset
|
191 |
ifeq ($(TOOLCHAIN_TYPE), gcc) |
d08f24178498
8148629: Disable remaining warnings in awt/fontmanager
erikj
parents:
35276
diff
changeset
|
192 |
BUILD_LIBAWT_debug_mem.c_CFLAGS := -w |
43082
cf17b8a17dc0
8140266: Performance loss between jdk8 and jdk9 on Maskfill
serb
parents:
42747
diff
changeset
|
193 |
# 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
|
194 |
LIBAWT_CFLAGS += -fgcse-after-reload |
35711
d08f24178498
8148629: Disable remaining warnings in awt/fontmanager
erikj
parents:
35276
diff
changeset
|
195 |
endif |
d08f24178498
8148629: Disable remaining warnings in awt/fontmanager
erikj
parents:
35276
diff
changeset
|
196 |
|
49244
995a5556edfa
8199639: Introduce SetupJdkLibrary and SetupJdkExecutable
ihse
parents:
49241
diff
changeset
|
197 |
$(eval $(call SetupJdkLibrary, BUILD_LIBAWT, \ |
49070
d7859531621b
8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents:
48766
diff
changeset
|
198 |
NAME := awt, \ |
20547 | 199 |
SRC := $(LIBAWT_DIRS), \ |
25859 | 200 |
EXCLUDES := $(LIBAWT_EXCLUDES), \ |
201 |
EXCLUDE_FILES := $(LIBAWT_EXFILES), \ |
|
20547 | 202 |
OPTIMIZATION := LOW, \ |
203 |
CFLAGS := $(CFLAGS_JDKLIB) $(LIBAWT_CFLAGS), \ |
|
56454 | 204 |
HEADER_FLAGS := \ |
205 |
-I$(call FindHeaderDirForModule, $(MODULE)) \ |
|
206 |
$(addprefix -I, $(call FindSrcDirsForComponent, java.desktop, libawt/java2d)) \ |
|
207 |
$(addprefix -I, $(call FindSrcDirsForLib, java.desktop, mlib_image)) \ |
|
208 |
-I$(TOPDIR)/src/java.desktop/share/native/libawt/awt/image \ |
|
209 |
-I$(TOPDIR)/src/java.desktop/share/native/libawt/awt/image/cvutils \ |
|
210 |
-I$(TOPDIR)/src/java.desktop/share/native/libawt/awt/medialib \ |
|
211 |
-I$(TOPDIR)/src/java.desktop/share/native/libawt/java2d/pipe \ |
|
212 |
-I$(TOPDIR)/src/java.desktop/share/native/libawt/java2d/loops, \ |
|
29374
f031a666744a
8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents:
29006
diff
changeset
|
213 |
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
|
214 |
format-nonliteral parentheses, \ |
30434 | 215 |
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
|
216 |
DISABLED_WARNINGS_solstudio := E_DECLARATION_IN_CODE, \ |
30434 | 217 |
DISABLED_WARNINGS_microsoft := 4297 4244 4267 4996, \ |
20547 | 218 |
ASFLAGS := $(LIBAWT_ASFLAGS), \ |
219 |
LDFLAGS := $(LDFLAGS_JDKLIB) $(call SET_SHARED_LIBRARY_ORIGIN), \ |
|
33406 | 220 |
LDFLAGS_macosx := -L$(INSTALL_LIBRARIES_HERE), \ |
221 |
LDFLAGS_windows := -delayload:user32.dll -delayload:gdi32.dll \ |
|
222 |
-delayload:shell32.dll -delayload:winmm.dll \ |
|
223 |
-delayload:winspool.drv -delayload:imm32.dll \ |
|
224 |
-delayload:ole32.dll -delayload:comdlg32.dll \ |
|
225 |
-delayload:comctl32.dll -delayload:shlwapi.dll, \ |
|
226 |
LIBS_unix := -ljvm -ljava $(LIBM), \ |
|
227 |
LIBS_linux := $(LIBDL), \ |
|
49241 | 228 |
LIBS_solaris := $(LIBDL), \ |
33406 | 229 |
LIBS_aix := $(LIBDL),\ |
230 |
LIBS_macosx := -lmlib_image \ |
|
20547 | 231 |
-framework Cocoa \ |
232 |
-framework OpenGL \ |
|
233 |
-framework JavaNativeFoundation \ |
|
234 |
-framework JavaRuntimeSupport \ |
|
235 |
-framework ApplicationServices \ |
|
33406 | 236 |
-framework AudioToolbox, \ |
237 |
LIBS_windows := kernel32.lib user32.lib gdi32.lib winspool.lib \ |
|
20547 | 238 |
imm32.lib ole32.lib uuid.lib shell32.lib \ |
239 |
comdlg32.lib winmm.lib comctl32.lib shlwapi.lib \ |
|
33406 | 240 |
delayimp.lib jvm.lib $(WIN_JAVA_LIB) advapi32.lib, \ |
20547 | 241 |
VERSIONINFO_RESOURCE := $(LIBAWT_VERSIONINFO_RESOURCE), \ |
242 |
RC_FLAGS := $(RC_FLAGS) $(LIBAWT_RC_FLAGS) \ |
|
243 |
-D "JDK_FNAME=awt.dll" \ |
|
244 |
-D "JDK_INTERNAL_NAME=awt" \ |
|
245 |
-D "JDK_FTYPE=0x2L", \ |
|
35276 | 246 |
)) |
20547 | 247 |
|
27565 | 248 |
$(BUILD_LIBAWT): $(call FindLib, java.base, java) |
13164 | 249 |
|
250 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
20547 | 251 |
$(BUILD_LIBAWT): $(BUILD_LIBMLIB_IMAGE) |
13164 | 252 |
endif |
253 |
||
27565 | 254 |
TARGETS += $(BUILD_LIBAWT) |
12892 | 255 |
|
26191
a0ff4b39d34b
8055188: General cleanup of minor issues from source restructure
erikj
parents:
25993
diff
changeset
|
256 |
################################################################################ |
12892 | 257 |
|
21130 | 258 |
ifeq ($(findstring $(OPENJDK_TARGET_OS),windows macosx),) |
41132 | 259 |
ifeq ($(ENABLE_HEADLESS_ONLY), false) |
20547 | 260 |
|
261 |
LIBAWT_XAWT_DIRS := \ |
|
47217 | 262 |
$(TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/libawt_xawt \ |
263 |
$(TOPDIR)/src/java.desktop/share/native/common/awt/debug \ |
|
264 |
$(TOPDIR)/src/java.desktop/share/native/common/awt/utility \ |
|
265 |
$(TOPDIR)/src/java.desktop/share/native/common/font \ |
|
266 |
$(TOPDIR)/src/java.desktop/share/native/common/java2d \ |
|
267 |
$(TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/common/java2d \ |
|
268 |
$(TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/common/awt \ |
|
25859 | 269 |
# |
270 |
||
36953 | 271 |
ifneq ($(filter $(OPENJDK_TARGET_OS),linux solaris aix), ) |
47217 | 272 |
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
|
273 |
endif |
3a05117c7611
8151770: 9-client windows builds fail on windows since make file change for 8145174
erikj
parents:
36869
diff
changeset
|
274 |
|
25859 | 275 |
LIBAWT_XAWT_EXCLUDES := medialib |
20547 | 276 |
|
25859 | 277 |
LIBAWT_XAWT_CFLAGS += -DXAWT -DXAWT_HACK \ |
21130 | 278 |
-DPACKAGE_PATH=\"$(PACKAGE_PATH)\" \ |
47507
5a270d2dfa5d
8170681: Remove fontconfig header files from JDK source tree
prr
parents:
47314
diff
changeset
|
279 |
$(FONTCONFIG_CFLAGS) \ |
25859 | 280 |
$(CUPS_CFLAGS) |
20547 | 281 |
|
282 |
ifeq ($(OPENJDK_TARGET_OS), solaris) |
|
283 |
LIBAWT_XAWT_CFLAGS += -DFUNCPROTO=15 |
|
284 |
endif |
|
285 |
||
286 |
ifeq ($(OPENJDK_TARGET_OS), linux) |
|
287 |
ifeq ($(DISABLE_XRENDER), true) |
|
288 |
LIBAWT_XAWT_CFLAGS += -DDISABLE_XRENDER_BY_DEFAULT=true |
|
289 |
endif |
|
290 |
endif |
|
291 |
||
49241 | 292 |
LIBAWT_XAWT_LIBS := $(LIBM) -lawt -lXext -lX11 -lXrender $(LIBDL) -lXtst -lXi -ljava -ljvm |
20547 | 293 |
|
294 |
ifeq ($(OPENJDK_TARGET_OS), linux) |
|
33406 | 295 |
LIBAWT_XAWT_LIBS += -lpthread |
20547 | 296 |
endif |
297 |
||
35711
d08f24178498
8148629: Disable remaining warnings in awt/fontmanager
erikj
parents:
35276
diff
changeset
|
298 |
ifeq ($(TOOLCHAIN_TYPE), gcc) |
d08f24178498
8148629: Disable remaining warnings in awt/fontmanager
erikj
parents:
35276
diff
changeset
|
299 |
# 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
|
300 |
# that cannot be turned of individually. |
d08f24178498
8148629: Disable remaining warnings in awt/fontmanager
erikj
parents:
35276
diff
changeset
|
301 |
# redefining a macro |
d08f24178498
8148629: Disable remaining warnings in awt/fontmanager
erikj
parents:
35276
diff
changeset
|
302 |
BUILD_LIBAWT_XAWT_gtk2_interface.c_CFLAGS := -w |
d08f24178498
8148629: Disable remaining warnings in awt/fontmanager
erikj
parents:
35276
diff
changeset
|
303 |
# comparison between pointer and integer |
d08f24178498
8148629: Disable remaining warnings in awt/fontmanager
erikj
parents:
35276
diff
changeset
|
304 |
BUILD_LIBAWT_XAWT_awt_Font.c_CFLAGS := -w |
d08f24178498
8148629: Disable remaining warnings in awt/fontmanager
erikj
parents:
35276
diff
changeset
|
305 |
# initializing a declared 'extern' |
d08f24178498
8148629: Disable remaining warnings in awt/fontmanager
erikj
parents:
35276
diff
changeset
|
306 |
BUILD_LIBAWT_XAWT_debug_mem.c_CFLAGS := -w |
56454 | 307 |
endif |
308 |
||
35711
d08f24178498
8148629: Disable remaining warnings in awt/fontmanager
erikj
parents:
35276
diff
changeset
|
309 |
|
49244
995a5556edfa
8199639: Introduce SetupJdkLibrary and SetupJdkExecutable
ihse
parents:
49241
diff
changeset
|
310 |
$(eval $(call SetupJdkLibrary, BUILD_LIBAWT_XAWT, \ |
49070
d7859531621b
8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents:
48766
diff
changeset
|
311 |
NAME := awt_xawt, \ |
20547 | 312 |
SRC := $(LIBAWT_XAWT_DIRS), \ |
56454 | 313 |
HEADER_FLAGS := \ |
314 |
-I$(call FindHeaderDirForModule, $(MODULE)) \ |
|
315 |
$(addprefix -I, $(call FindSrcDirsForComponent, java.desktop, libawt_xawt/awt)) \ |
|
316 |
$(addprefix -I, $(call FindSrcDirsForComponent, java.desktop, include)) \ |
|
317 |
$(addprefix -I, $(call FindSrcDirsForComponent, java.desktop, common/java2d/opengl)) \ |
|
318 |
$(addprefix -I, $(call FindSrcDirsForComponent, java.desktop, common/java2d/x11)) \ |
|
319 |
$(addprefix -I, $(call FindSrcDirsForComponent, java.desktop, common/font)) \ |
|
320 |
$(addprefix -I, $(call FindSrcDirsForComponent, java.desktop, libawt/java2d)) \ |
|
321 |
-I$(TOPDIR)/src/java.desktop/share/native/libawt/awt/image \ |
|
322 |
-I$(TOPDIR)/src/java.desktop/share/native/libawt/awt/image/cvutils \ |
|
323 |
-I$(TOPDIR)/src/java.desktop/share/native/libawt/java2d/loops \ |
|
324 |
-I$(TOPDIR)/src/java.desktop/share/native/libawt/java2d/pipe, \ |
|
25859 | 325 |
EXCLUDES := $(LIBAWT_XAWT_EXCLUDES), \ |
20547 | 326 |
OPTIMIZATION := LOW, \ |
327 |
CFLAGS := $(CFLAGS_JDKLIB) $(LIBAWT_XAWT_CFLAGS) \ |
|
328 |
$(X_CFLAGS), \ |
|
37529
868c7195632c
8154087: Fix AIX and Linux/ppc64le after the integration of the new hotspot build
simonis
parents:
36110
diff
changeset
|
329 |
WARNINGS_AS_ERRORS_xlc := false, \ |
29374
f031a666744a
8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents:
29006
diff
changeset
|
330 |
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
|
331 |
unused-result maybe-uninitialized format \ |
48766
2c4d1993b5f9
8196985: Disable new warnings from GCC 7.3 in jdk libraries
erikj
parents:
48751
diff
changeset
|
332 |
format-security int-to-pointer-cast parentheses \ |
2c4d1993b5f9
8196985: Disable new warnings from GCC 7.3 in jdk libraries
erikj
parents:
48751
diff
changeset
|
333 |
implicit-fallthrough, \ |
29374
f031a666744a
8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents:
29006
diff
changeset
|
334 |
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
|
335 |
E_ASSIGNMENT_TYPE_MISMATCH E_NON_CONST_INIT, \ |
20547 | 336 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
337 |
$(call SET_SHARED_LIBRARY_ORIGIN) \ |
|
27944 | 338 |
-L$(INSTALL_LIBRARIES_HERE), \ |
33406 | 339 |
LIBS := $(X_LIBS) $(LIBAWT_XAWT_LIBS), \ |
35276 | 340 |
)) |
20547 | 341 |
|
27565 | 342 |
$(BUILD_LIBAWT_XAWT): $(call FindLib, java.base, java) |
20547 | 343 |
|
344 |
$(BUILD_LIBAWT_XAWT): $(BUILD_LIBAWT) |
|
345 |
||
27565 | 346 |
TARGETS += $(BUILD_LIBAWT_XAWT) |
20547 | 347 |
|
348 |
endif |
|
349 |
endif |
|
350 |
||
26191
a0ff4b39d34b
8055188: General cleanup of minor issues from source restructure
erikj
parents:
25993
diff
changeset
|
351 |
################################################################################ |
20547 | 352 |
|
33285 | 353 |
# The fast floor code loses precision. |
354 |
LCMS_CFLAGS=-DCMS_DONT_USE_FAST_FLOOR |
|
24540 | 355 |
|
56433
c3cf838aa2da
Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents:
56421
diff
changeset
|
356 |
LCMS_CFLAGS_JDKLIB := $(filter-out -xc99=%none, $(CFLAGS_JDKLIB)) |
c3cf838aa2da
Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents:
56421
diff
changeset
|
357 |
|
24540 | 358 |
ifeq ($(USE_EXTERNAL_LCMS), true) |
359 |
# 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
|
360 |
# By including it explicitly, all other files will be excluded. |
24540 | 361 |
BUILD_LIBLCMS_INCLUDE_FILES := LCMS.c |
56433
c3cf838aa2da
Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents:
56421
diff
changeset
|
362 |
# If we're using an external library, we'll can't include our own SRC path |
c3cf838aa2da
Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents:
56421
diff
changeset
|
363 |
# as includes, instead the system headers should be used. |
c3cf838aa2da
Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents:
56421
diff
changeset
|
364 |
LIBLCMS_HEADERS_FROM_SRC := false |
24540 | 365 |
else |
366 |
BUILD_LIBLCMS_INCLUDE_FILES := |
|
367 |
endif |
|
368 |
||
49244
995a5556edfa
8199639: Introduce SetupJdkLibrary and SetupJdkExecutable
ihse
parents:
49241
diff
changeset
|
369 |
$(eval $(call SetupJdkLibrary, BUILD_LIBLCMS, \ |
49070
d7859531621b
8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents:
48766
diff
changeset
|
370 |
NAME := lcms, \ |
24540 | 371 |
INCLUDE_FILES := $(BUILD_LIBLCMS_INCLUDE_FILES), \ |
20547 | 372 |
OPTIMIZATION := HIGHEST, \ |
56433
c3cf838aa2da
Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents:
56421
diff
changeset
|
373 |
CFLAGS := $(LCMS_CFLAGS_JDKLIB) \ |
24540 | 374 |
$(LCMS_CFLAGS), \ |
20547 | 375 |
CFLAGS_solaris := -xc99=no_lib, \ |
376 |
CFLAGS_windows := -DCMS_IS_WINDOWS_, \ |
|
56454 | 377 |
HEADER_FLAGS := \ |
378 |
-I$(call FindHeaderDirForModule, $(MODULE)) \ |
|
379 |
$(addprefix -I, $(call FindSrcDirsForComponent, java.desktop, common/awt/debug)) \ |
|
380 |
$(addprefix -I, $(call FindSrcDirsForComponent, java.desktop, libawt/java2d)), \ |
|
56433
c3cf838aa2da
Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents:
56421
diff
changeset
|
381 |
HEADERS_FROM_SRC := $(LIBLCMS_HEADERS_FROM_SRC), \ |
39550
8d587cab45d2
8160294: Some client libraries cannot be built with GCC 6
ysuenaga
parents:
39025
diff
changeset
|
382 |
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
|
383 |
DISABLED_WARNINGS_clang := tautological-compare, \ |
f031a666744a
8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents:
29006
diff
changeset
|
384 |
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
|
385 |
DISABLED_WARNINGS_microsoft := 4819, \ |
20547 | 386 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
387 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
|
27944 | 388 |
LDFLAGS_unix := -L$(INSTALL_LIBRARIES_HERE), \ |
49640
dd76fcbda95f
8200383: Can't build on SPARC Hotspot with code which use math functions
kvn
parents:
49263
diff
changeset
|
389 |
LIBS_unix := -lawt -ljvm -ljava $(LCMS_LIBS) $(LIBM), \ |
33406 | 390 |
LIBS_windows := $(WIN_AWT_LIB) $(WIN_JAVA_LIB), \ |
35276 | 391 |
)) |
20547 | 392 |
|
27565 | 393 |
TARGETS += $(BUILD_LIBLCMS) |
20547 | 394 |
|
395 |
$(BUILD_LIBLCMS): $(BUILD_LIBAWT) |
|
396 |
||
26191
a0ff4b39d34b
8055188: General cleanup of minor issues from source restructure
erikj
parents:
25993
diff
changeset
|
397 |
################################################################################ |
20547 | 398 |
|
49440 | 399 |
# "DISABLED_WARNINGS_gcc := clobbered" rationale: |
20547 | 400 |
# Suppress gcc warnings like "variable might be clobbered by 'longjmp' |
401 |
# or 'vfork'": this warning indicates that some variable is placed to |
|
402 |
# a register by optimized compiler and it's value might be lost on longjmp(). |
|
403 |
# Recommended way to avoid such warning is to declare the variable as |
|
404 |
# volatile to prevent the optimization. However, this approach does not |
|
405 |
# work because we have to declare all variables as volatile in result. |
|
406 |
||
25103 | 407 |
ifeq ($(USE_EXTERNAL_LIBJPEG), true) |
408 |
LIBJPEG_LIBS := -ljpeg |
|
409 |
BUILD_LIBJAVAJPEG_INCLUDE_FILES := \ |
|
33647
2665054d3864
8139932: Typo in makefile changes for 8043805 [Allow using a system-installed libjpeg]
omajid
parents:
33518
diff
changeset
|
410 |
imageioJPEG.c \ |
25103 | 411 |
jpegdecoder.c |
56433
c3cf838aa2da
Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents:
56421
diff
changeset
|
412 |
# If we're using an external library, we'll can't include our own SRC path |
c3cf838aa2da
Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents:
56421
diff
changeset
|
413 |
# as includes, instead the system headers should be used. |
c3cf838aa2da
Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents:
56421
diff
changeset
|
414 |
LIBJPEG_HEADERS_FROM_SRC := false |
25103 | 415 |
else |
416 |
LIBJPEG_LIBS := |
|
417 |
BUILD_LIBJAVAJPEG_INCLUDE_FILES := |
|
418 |
endif |
|
419 |
||
49244
995a5556edfa
8199639: Introduce SetupJdkLibrary and SetupJdkExecutable
ihse
parents:
49241
diff
changeset
|
420 |
$(eval $(call SetupJdkLibrary, BUILD_LIBJAVAJPEG, \ |
49070
d7859531621b
8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents:
48766
diff
changeset
|
421 |
NAME := javajpeg, \ |
25103 | 422 |
INCLUDE_FILES := $(BUILD_LIBJAVAJPEG_INCLUDE_FILES), \ |
20547 | 423 |
OPTIMIZATION := HIGHEST, \ |
56433
c3cf838aa2da
Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents:
56421
diff
changeset
|
424 |
CFLAGS := $(CFLAGS_JDKLIB), \ |
56454 | 425 |
HEADER_FLAGS := \ |
426 |
-I$(call FindHeaderDirForModule, $(MODULE)), \ |
|
56433
c3cf838aa2da
Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents:
56421
diff
changeset
|
427 |
HEADERS_FROM_SRC := $(LIBJPEG_HEADERS_FROM_SRC), \ |
48766
2c4d1993b5f9
8196985: Disable new warnings from GCC 7.3 in jdk libraries
erikj
parents:
48751
diff
changeset
|
428 |
DISABLED_WARNINGS_gcc := clobbered implicit-fallthrough shift-negative-value, \ |
33305
ed708a0e3482
8140223: fix the build with a toolchain with a linker defaulting to ld --as-needed
erikj
parents:
33285
diff
changeset
|
429 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
20547 | 430 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
33406 | 431 |
LIBS := $(LIBJPEG_LIBS) $(JDKLIB_LIBS), \ |
432 |
LIBS_windows := $(WIN_JAVA_LIB) jvm.lib, \ |
|
35276 | 433 |
)) |
20547 | 434 |
|
27565 | 435 |
$(BUILD_LIBJAVAJPEG): $(call FindLib, java.base, java) |
20547 | 436 |
|
27565 | 437 |
TARGETS += $(BUILD_LIBJAVAJPEG) |
20547 | 438 |
|
26191
a0ff4b39d34b
8055188: General cleanup of minor issues from source restructure
erikj
parents:
25993
diff
changeset
|
439 |
################################################################################ |
20547 | 440 |
|
41132 | 441 |
# Mac and Windows only use the native AWT lib, do not build libawt_headless |
442 |
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
|
443 |
|
47217 | 444 |
LIBAWT_HEADLESS_DIRS := $(TOPDIR)/src/java.desktop/unix/native/libawt_headless/awt \ |
445 |
$(TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/common/awt \ |
|
446 |
$(TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/common/java2d \ |
|
447 |
$(TOPDIR)/src/java.desktop/share/native/common/java2d \ |
|
448 |
$(TOPDIR)/src/java.desktop/share/native/common/font \ |
|
41132 | 449 |
# |
29006
0d72c5ab72d8
8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents:
29002
diff
changeset
|
450 |
|
41132 | 451 |
LIBAWT_HEADLESS_EXCLUDES := medialib |
56433
c3cf838aa2da
Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents:
56421
diff
changeset
|
452 |
LIBAWT_HEADLESS_CFLAGS := $(CUPS_CFLAGS) $(FONTCONFIG_CFLAGS) $(X_CFLAGS) \ |
c3cf838aa2da
Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents:
56421
diff
changeset
|
453 |
-DHEADLESS=true -DPACKAGE_PATH=\"$(PACKAGE_PATH)\" |
c3cf838aa2da
Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents:
56421
diff
changeset
|
454 |
|
49244
995a5556edfa
8199639: Introduce SetupJdkLibrary and SetupJdkExecutable
ihse
parents:
49241
diff
changeset
|
455 |
$(eval $(call SetupJdkLibrary, BUILD_LIBAWT_HEADLESS, \ |
49070
d7859531621b
8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents:
48766
diff
changeset
|
456 |
NAME := awt_headless, \ |
41132 | 457 |
SRC := $(LIBAWT_HEADLESS_DIRS), \ |
458 |
EXCLUDES := $(LIBAWT_HEADLESS_EXCLUDES), \ |
|
459 |
OPTIMIZATION := LOW, \ |
|
460 |
CFLAGS := $(CFLAGS_JDKLIB) \ |
|
461 |
$(LIBAWT_HEADLESS_CFLAGS), \ |
|
56454 | 462 |
HEADER_FLAGS := \ |
463 |
-I$(call FindHeaderDirForModule, $(MODULE)) \ |
|
464 |
$(addprefix -I, $(call FindSrcDirsForComponent, java.desktop, common/awt/debug)) \ |
|
465 |
$(addprefix -I, $(call FindSrcDirsForComponent, java.desktop, common/font)) \ |
|
466 |
$(addprefix -I, $(call FindSrcDirsForComponent, java.desktop, common/java2d/opengl)) \ |
|
467 |
$(addprefix -I, $(call FindSrcDirsForComponent, java.desktop, libawt/java2d)) \ |
|
468 |
-I$(TOPDIR)/src/java.desktop/share/native/libawt/awt/image \ |
|
469 |
-I$(TOPDIR)/src/java.desktop/share/native/libawt/awt/image/cvutils \ |
|
470 |
-I$(TOPDIR)/src/java.desktop/share/native/libawt/java2d/loops \ |
|
471 |
-I$(TOPDIR)/src/java.desktop/share/native/libawt/java2d/pipe, \ |
|
41132 | 472 |
DISABLED_WARNINGS_xlc := 1506-356, \ |
473 |
DISABLED_WARNINGS_solstudio := E_EMPTY_TRANSLATION_UNIT, \ |
|
474 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
|
475 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
|
476 |
LDFLAGS_unix := -L$(INSTALL_LIBRARIES_HERE), \ |
|
477 |
LIBS_unix := -lawt -ljvm -ljava, \ |
|
478 |
LIBS_linux := $(LIBM) $(LIBDL), \ |
|
49241 | 479 |
LIBS_solaris := $(LIBM) $(LIBDL) $(LIBCXX), \ |
41132 | 480 |
)) |
29006
0d72c5ab72d8
8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents:
29002
diff
changeset
|
481 |
|
41132 | 482 |
# AIX warning explanation: |
483 |
# 1506-356 : (W) Compilation unit is empty. |
|
484 |
# 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
|
485 |
|
41132 | 486 |
$(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
|
487 |
|
41132 | 488 |
TARGETS += $(BUILD_LIBAWT_HEADLESS) |
29006
0d72c5ab72d8
8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents:
29002
diff
changeset
|
489 |
|
0d72c5ab72d8
8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents:
29002
diff
changeset
|
490 |
endif |
0d72c5ab72d8
8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents:
29002
diff
changeset
|
491 |
|
0d72c5ab72d8
8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents:
29002
diff
changeset
|
492 |
################################################################################ |
0d72c5ab72d8
8072116: [Solaris] : Fix for 8071710 needs to be updated for build dependency checking
prr
parents:
29002
diff
changeset
|
493 |
|
49234
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
494 |
ifeq ($(FREETYPE_TO_USE), system) |
56433
c3cf838aa2da
Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents:
56421
diff
changeset
|
495 |
# For use by libfontmanager: |
49234
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
496 |
LIBFREETYPE_CFLAGS := $(FREETYPE_CFLAGS) |
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
497 |
LIBFREETYPE_LIBS := $(FREETYPE_LIBS) |
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
498 |
else |
56433
c3cf838aa2da
Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents:
56421
diff
changeset
|
499 |
BUILD_LIBFREETYPE_HEADERS := -I$(TOPDIR)/src/java.desktop/share/native/libfreetype/include |
c3cf838aa2da
Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents:
56421
diff
changeset
|
500 |
BUILD_LIBFREETYPE_CFLAGS := -DFT2_BUILD_LIBRARY $(EXPORT_ALL_SYMBOLS) |
c3cf838aa2da
Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents:
56421
diff
changeset
|
501 |
|
c3cf838aa2da
Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents:
56421
diff
changeset
|
502 |
# For use by libfontmanager: |
49234
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
503 |
LIBFREETYPE_CFLAGS := $(BUILD_LIBFREETYPE_HEADERS) |
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
504 |
ifeq ($(OPENJDK_TARGET_OS), windows) |
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
505 |
LIBFREETYPE_LIBS := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libfreetype/freetype.lib |
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
506 |
else |
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
507 |
LIBFREETYPE_LIBS := -lfreetype |
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
508 |
endif |
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
509 |
|
49244
995a5556edfa
8199639: Introduce SetupJdkLibrary and SetupJdkExecutable
ihse
parents:
49241
diff
changeset
|
510 |
$(eval $(call SetupJdkLibrary, BUILD_LIBFREETYPE, \ |
49234
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
511 |
NAME := freetype, \ |
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
512 |
OPTIMIZATION := HIGHEST, \ |
56433
c3cf838aa2da
Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents:
56421
diff
changeset
|
513 |
CFLAGS := $(CFLAGS_JDKLIB) \ |
c3cf838aa2da
Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents:
56421
diff
changeset
|
514 |
$(BUILD_LIBFREETYPE_CFLAGS), \ |
c3cf838aa2da
Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents:
56421
diff
changeset
|
515 |
HEADER_FLAGS := $(BUILD_LIBFREETYPE_HEADERS), \ |
49234
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
516 |
DISABLED_WARNINGS_solstudio := \ |
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
517 |
E_STATEMENT_NOT_REACHED \ |
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
518 |
E_END_OF_LOOP_CODE_NOT_REACHED, \ |
49566
7c224ec572d0
8201267: Disable warnings for VS2017 to enable building
erikj
parents:
49539
diff
changeset
|
519 |
DISABLED_WARNINGS_microsoft := 4267 4244 4312, \ |
49234
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
520 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
521 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
522 |
)) |
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
523 |
|
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
524 |
TARGETS += $(BUILD_LIBFREETYPE) |
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
525 |
endif |
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
526 |
|
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
527 |
########################################################################### |
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
528 |
|
56433
c3cf838aa2da
Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents:
56421
diff
changeset
|
529 |
LIBFONTMANAGER_HEADER_SRC := $(TOPDIR)/src/java.desktop/share/native/libfontmanager \ |
c3cf838aa2da
Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents:
56421
diff
changeset
|
530 |
$(TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/libfontmanager |
c3cf838aa2da
Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents:
56421
diff
changeset
|
531 |
LIBFONTMANAGER_HEADER_FLAGS += \ |
c3cf838aa2da
Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents:
56421
diff
changeset
|
532 |
$(addprefix -I, $(shell $(FIND) $(LIBFONTMANAGER_HEADER_SRC) -type d)) \ |
c3cf838aa2da
Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents:
56421
diff
changeset
|
533 |
# |
c3cf838aa2da
Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents:
56421
diff
changeset
|
534 |
# FIXME:LIBS: I wish this was not needed |
c3cf838aa2da
Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents:
56421
diff
changeset
|
535 |
|
c3cf838aa2da
Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents:
56421
diff
changeset
|
536 |
|
34414
e496a8d8fc8a
8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
33647
diff
changeset
|
537 |
#### Begin harfbuzz configuration |
e496a8d8fc8a
8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
33647
diff
changeset
|
538 |
|
e496a8d8fc8a
8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
33647
diff
changeset
|
539 |
HARFBUZZ_CFLAGS := -DHAVE_OT -DHAVE_FALLBACK -DHAVE_UCDN |
e496a8d8fc8a
8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
33647
diff
changeset
|
540 |
|
e496a8d8fc8a
8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
33647
diff
changeset
|
541 |
ifneq ($(OPENJDK_TARGET_OS), windows) |
e496a8d8fc8a
8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
33647
diff
changeset
|
542 |
HARFBUZZ_CFLAGS += -DGETPAGESIZE -DHAVE_MPROTECT -DHAVE_PTHREAD \ |
e496a8d8fc8a
8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
33647
diff
changeset
|
543 |
-DHAVE_SYSCONF -DHAVE_SYS_MMAN_H -DHAVE_UNISTD_H |
e496a8d8fc8a
8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
33647
diff
changeset
|
544 |
endif |
e496a8d8fc8a
8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
33647
diff
changeset
|
545 |
ifneq (, $(findstring $(OPENJDK_TARGET_OS), linux macosx)) |
e496a8d8fc8a
8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
33647
diff
changeset
|
546 |
HARFBUZZ_CFLAGS += -DHAVE_INTEL_ATOMIC_PRIMITIVES |
e496a8d8fc8a
8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
33647
diff
changeset
|
547 |
endif |
e496a8d8fc8a
8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
33647
diff
changeset
|
548 |
ifeq ($(OPENJDK_TARGET_OS), solaris) |
e496a8d8fc8a
8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
33647
diff
changeset
|
549 |
HARFBUZZ_CFLAGS += -DHAVE_SOLARIS_ATOMIC_OPS |
e496a8d8fc8a
8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
33647
diff
changeset
|
550 |
endif |
e496a8d8fc8a
8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
33647
diff
changeset
|
551 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
e496a8d8fc8a
8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
33647
diff
changeset
|
552 |
HARFBUZZ_CFLAGS += -DHAVE_CORETEXT |
e496a8d8fc8a
8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
33647
diff
changeset
|
553 |
endif |
e496a8d8fc8a
8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
33647
diff
changeset
|
554 |
ifneq ($(OPENJDK_TARGET_OS), macosx) |
e496a8d8fc8a
8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
33647
diff
changeset
|
555 |
LIBFONTMANAGER_EXCLUDE_FILES += harfbuzz/hb-coretext.cc |
e496a8d8fc8a
8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
33647
diff
changeset
|
556 |
endif |
34432 | 557 |
# hb-ft.cc is not presently needed, and requires freetype 2.4.2 or later. |
558 |
LIBFONTMANAGER_EXCLUDE_FILES += harfbuzz/hb-ft.cc |
|
34414
e496a8d8fc8a
8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
33647
diff
changeset
|
559 |
|
e496a8d8fc8a
8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
33647
diff
changeset
|
560 |
LIBFONTMANAGER_CFLAGS += $(HARFBUZZ_CFLAGS) |
e496a8d8fc8a
8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
33647
diff
changeset
|
561 |
|
e496a8d8fc8a
8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
33647
diff
changeset
|
562 |
#### End harfbuzz configuration |
e496a8d8fc8a
8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
33647
diff
changeset
|
563 |
|
49234
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
564 |
LIBFONTMANAGER_CFLAGS += $(LIBFREETYPE_CFLAGS) |
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
565 |
BUILD_LIBFONTMANAGER_FONTLIB += $(LIBFREETYPE_LIBS) |
20547 | 566 |
|
567 |
LIBFONTMANAGER_OPTIMIZATION := HIGH |
|
568 |
||
569 |
ifeq ($(OPENJDK_TARGET_OS), windows) |
|
570 |
LIBFONTMANAGER_EXCLUDE_FILES += X11FontScaler.c \ |
|
571 |
X11TextRenderer.c |
|
572 |
LIBFONTMANAGER_OPTIMIZATION := HIGHEST |
|
21130 | 573 |
else ifeq ($(OPENJDK_TARGET_OS), macosx) |
574 |
LIBFONTMANAGER_EXCLUDE_FILES += X11FontScaler.c \ |
|
575 |
X11TextRenderer.c \ |
|
576 |
fontpath.c \ |
|
577 |
lcdglyph.c |
|
20547 | 578 |
else |
579 |
LIBFONTMANAGER_EXCLUDE_FILES += fontpath.c \ |
|
580 |
lcdglyph.c |
|
581 |
endif |
|
582 |
||
56433
c3cf838aa2da
Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents:
56421
diff
changeset
|
583 |
LIBFONTMANAGER_CFLAGS += $(X_CFLAGS) -DLE_STANDALONE -DHEADLESS |
20547 | 584 |
|
35711
d08f24178498
8148629: Disable remaining warnings in awt/fontmanager
erikj
parents:
35276
diff
changeset
|
585 |
ifeq ($(TOOLCHAIN_TYPE), gcc) |
d08f24178498
8148629: Disable remaining warnings in awt/fontmanager
erikj
parents:
35276
diff
changeset
|
586 |
# 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
|
587 |
# about discarding 'const' qualifier cannot be turned off individually. |
d08f24178498
8148629: Disable remaining warnings in awt/fontmanager
erikj
parents:
35276
diff
changeset
|
588 |
BUILD_LIBFONTMANAGER_sunFont.c_CFLAGS := -w |
d08f24178498
8148629: Disable remaining warnings in awt/fontmanager
erikj
parents:
35276
diff
changeset
|
589 |
# Turn off aliasing with GCC for ExtensionSubtables.cpp |
20547 | 590 |
BUILD_LIBFONTMANAGER_ExtensionSubtables.cpp_CXXFLAGS := -fno-strict-aliasing |
591 |
endif |
|
592 |
||
49693
fa23ea24dade
8196516: libfontmanager must be built with LDFLAGS allowing unresolved symbols
sgehwolf
parents:
49566
diff
changeset
|
593 |
# LDFLAGS clarification: |
fa23ea24dade
8196516: libfontmanager must be built with LDFLAGS allowing unresolved symbols
sgehwolf
parents:
49566
diff
changeset
|
594 |
# Filter relevant linker flags disallowing unresolved symbols as we cannot |
fa23ea24dade
8196516: libfontmanager must be built with LDFLAGS allowing unresolved symbols
sgehwolf
parents:
49566
diff
changeset
|
595 |
# build-time decide to which library to link against (libawt_headless or |
fa23ea24dade
8196516: libfontmanager must be built with LDFLAGS allowing unresolved symbols
sgehwolf
parents:
49566
diff
changeset
|
596 |
# libawt_xawt). See JDK-8196516 for details. |
49244
995a5556edfa
8199639: Introduce SetupJdkLibrary and SetupJdkExecutable
ihse
parents:
49241
diff
changeset
|
597 |
$(eval $(call SetupJdkLibrary, BUILD_LIBFONTMANAGER, \ |
49070
d7859531621b
8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents:
48766
diff
changeset
|
598 |
NAME := fontmanager, \ |
20547 | 599 |
EXCLUDE_FILES := $(LIBFONTMANAGER_EXCLUDE_FILES) \ |
600 |
AccelGlyphCache.c, \ |
|
29931
64e274ed6567
8077824: Introduce DefineNativeToolchain to handle toolchain configurations
erikj
parents:
29734
diff
changeset
|
601 |
TOOLCHAIN := TOOLCHAIN_LINK_CXX, \ |
25859 | 602 |
CFLAGS := $(CFLAGS_JDKLIB) $(LIBFONTMANAGER_CFLAGS), \ |
603 |
CXXFLAGS := $(CXXFLAGS_JDKLIB) $(LIBFONTMANAGER_CFLAGS), \ |
|
20547 | 604 |
OPTIMIZATION := $(LIBFONTMANAGER_OPTIMIZATION), \ |
25859 | 605 |
CFLAGS_windows = -DCC_NOEX, \ |
56454 | 606 |
HEADER_FLAGS := \ |
607 |
-I$(call FindHeaderDirForModule, $(MODULE)) \ |
|
608 |
$(addprefix -I, $(call FindSrcDirsForComponent, java.desktop, common/awt)) \ |
|
609 |
$(addprefix -I, $(call FindSrcDirsForComponent, java.desktop, common/font)) \ |
|
610 |
$(addprefix -I, $(call FindSrcDirsForComponent, java.desktop, libawt/java2d)) \ |
|
611 |
-I$(TOPDIR)/src/java.desktop/share/native/libfontmanager/harfbuzz \ |
|
612 |
-I$(TOPDIR)/src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ucdn \ |
|
613 |
-I$(TOPDIR)/src/java.desktop/share/native/libawt/java2d/loops \ |
|
614 |
-I$(TOPDIR)/src/java.desktop/share/native/libawt/java2d/pipe, \ |
|
37529
868c7195632c
8154087: Fix AIX and Linux/ppc64le after the integration of the new hotspot build
simonis
parents:
36110
diff
changeset
|
615 |
WARNINGS_AS_ERRORS_xlc := false, \ |
35711
d08f24178498
8148629: Disable remaining warnings in awt/fontmanager
erikj
parents:
35276
diff
changeset
|
616 |
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
|
617 |
type-limits missing-field-initializers implicit-fallthrough, \ |
35711
d08f24178498
8148629: Disable remaining warnings in awt/fontmanager
erikj
parents:
35276
diff
changeset
|
618 |
DISABLED_WARNINGS_CXX_gcc := reorder delete-non-virtual-dtor strict-overflow \ |
d08f24178498
8148629: Disable remaining warnings in awt/fontmanager
erikj
parents:
35276
diff
changeset
|
619 |
maybe-uninitialized, \ |
30434 | 620 |
DISABLED_WARNINGS_clang := unused-value incompatible-pointer-types \ |
621 |
tautological-constant-out-of-range-compare int-to-pointer-cast, \ |
|
35711
d08f24178498
8148629: Disable remaining warnings in awt/fontmanager
erikj
parents:
35276
diff
changeset
|
622 |
DISABLED_WARNINGS_C_solstudio = \ |
d08f24178498
8148629: Disable remaining warnings in awt/fontmanager
erikj
parents:
35276
diff
changeset
|
623 |
E_INTEGER_OVERFLOW_DETECTED \ |
d08f24178498
8148629: Disable remaining warnings in awt/fontmanager
erikj
parents:
35276
diff
changeset
|
624 |
E_ARG_INCOMPATIBLE_WITH_ARG_L \ |
d08f24178498
8148629: Disable remaining warnings in awt/fontmanager
erikj
parents:
35276
diff
changeset
|
625 |
E_ENUM_VAL_OVERFLOWS_INT_MAX, \ |
d08f24178498
8148629: Disable remaining warnings in awt/fontmanager
erikj
parents:
35276
diff
changeset
|
626 |
DISABLED_WARNINGS_CXX_solstudio := \ |
d08f24178498
8148629: Disable remaining warnings in awt/fontmanager
erikj
parents:
35276
diff
changeset
|
627 |
truncwarn wvarhidenmem wvarhidemem wbadlkginit identexpected \ |
d08f24178498
8148629: Disable remaining warnings in awt/fontmanager
erikj
parents:
35276
diff
changeset
|
628 |
hidevf w_novirtualdescr arrowrtn2, \ |
48274 | 629 |
DISABLED_WARNINGS_microsoft := 4267 4244 4018 4090 4996 4146 4334 4819 4101, \ |
49693
fa23ea24dade
8196516: libfontmanager must be built with LDFLAGS allowing unresolved symbols
sgehwolf
parents:
49566
diff
changeset
|
630 |
LDFLAGS := $(subst -Xlinker -z -Xlinker defs,, \ |
fa23ea24dade
8196516: libfontmanager must be built with LDFLAGS allowing unresolved symbols
sgehwolf
parents:
49566
diff
changeset
|
631 |
$(subst -Wl$(COMMA)-z$(COMMA)defs,,$(LDFLAGS_JDKLIB))) $(LDFLAGS_CXX_JDK) \ |
20547 | 632 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
27944 | 633 |
LDFLAGS_unix := -L$(INSTALL_LIBRARIES_HERE), \ |
33406 | 634 |
LIBS := $(BUILD_LIBFONTMANAGER_FONTLIB), \ |
635 |
LIBS_unix := -lawt -ljava -ljvm $(LIBM) $(LIBCXX), \ |
|
49533 | 636 |
LIBS_aix := -lawt_headless, \ |
637 |
LIBS_macosx := -lawt_lwawt -framework CoreText -framework CoreFoundation \ |
|
638 |
-framework CoreGraphics, \ |
|
33406 | 639 |
LIBS_windows := $(WIN_JAVA_LIB) advapi32.lib user32.lib gdi32.lib \ |
20547 | 640 |
$(WIN_AWT_LIB), \ |
35276 | 641 |
)) |
20547 | 642 |
|
48040
26f1193f1348
8192876: MacOS build fails intermittently after JDK-8139653
erikj
parents:
48032
diff
changeset
|
643 |
$(BUILD_LIBFONTMANAGER): $(BUILD_LIBAWT) |
26f1193f1348
8192876: MacOS build fails intermittently after JDK-8139653
erikj
parents:
48032
diff
changeset
|
644 |
|
48731
c832897a3a23
8196509: Linux UI applications broken by the build change for JDK-8196218
prr
parents:
48730
diff
changeset
|
645 |
ifneq (, $(findstring $(OPENJDK_TARGET_OS), solaris aix)) |
48040
26f1193f1348
8192876: MacOS build fails intermittently after JDK-8139653
erikj
parents:
48032
diff
changeset
|
646 |
$(BUILD_LIBFONTMANAGER): $(BUILD_LIBAWT_HEADLESS) |
26f1193f1348
8192876: MacOS build fails intermittently after JDK-8139653
erikj
parents:
48032
diff
changeset
|
647 |
endif |
26f1193f1348
8192876: MacOS build fails intermittently after JDK-8139653
erikj
parents:
48032
diff
changeset
|
648 |
|
49533 | 649 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
49539
af97dd04d913
8201221: JDK-8199608 introduced a build race on macosx
erikj
parents:
49533
diff
changeset
|
650 |
$(BUILD_LIBFONTMANAGER): $(call FindLib, java.desktop, awt_lwawt) |
49533 | 651 |
endif |
652 |
||
49234
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
653 |
ifeq ($(FREETYPE_TO_USE), bundled) |
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
654 |
$(BUILD_LIBFONTMANAGER): $(BUILD_LIBFREETYPE) |
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
655 |
endif |
3375a8039fde
8193017: Import freetype sources into OpenJDK source tree
prr
parents:
49106
diff
changeset
|
656 |
|
48040
26f1193f1348
8192876: MacOS build fails intermittently after JDK-8139653
erikj
parents:
48032
diff
changeset
|
657 |
TARGETS += $(BUILD_LIBFONTMANAGER) |
20547 | 658 |
|
26191
a0ff4b39d34b
8055188: General cleanup of minor issues from source restructure
erikj
parents:
25993
diff
changeset
|
659 |
################################################################################ |
20547 | 660 |
|
661 |
ifeq ($(OPENJDK_TARGET_OS), windows) |
|
56433
c3cf838aa2da
Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents:
56421
diff
changeset
|
662 |
|
c3cf838aa2da
Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents:
56421
diff
changeset
|
663 |
LIBJAWT_CFLAGS := -EHsc -DUNICODE -D_UNICODE |
c3cf838aa2da
Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents:
56421
diff
changeset
|
664 |
|
20547 | 665 |
ifeq ($(OPENJDK_TARGET_CPU), x86) |
666 |
KERNEL32_LIB := kernel32.lib |
|
667 |
endif |
|
56433
c3cf838aa2da
Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents:
56421
diff
changeset
|
668 |
|
49244
995a5556edfa
8199639: Introduce SetupJdkLibrary and SetupJdkExecutable
ihse
parents:
49241
diff
changeset
|
669 |
$(eval $(call SetupJdkLibrary, BUILD_LIBJAWT, \ |
49070
d7859531621b
8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents:
48766
diff
changeset
|
670 |
NAME := jawt, \ |
20547 | 671 |
OPTIMIZATION := LOW, \ |
672 |
CFLAGS := $(CXXFLAGS_JDKLIB) \ |
|
25859 | 673 |
$(LIBJAWT_CFLAGS), \ |
56433
c3cf838aa2da
Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents:
56421
diff
changeset
|
674 |
HEADER_FLAGS := $(LIBJAWT_HEADER_FLAGS), \ |
33406 | 675 |
LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK), \ |
676 |
LIBS := $(JDKLIB_LIBS) $(KERNEL32_LIB) advapi32.lib $(WIN_AWT_LIB), \ |
|
35276 | 677 |
)) |
20547 | 678 |
|
679 |
$(BUILD_LIBJAWT): $(BUILD_LIBAWT) |
|
680 |
||
45781
0491f891667c
8183166: lib\jawt.lib is missing from JDK 9 distribution for Windows
erikj
parents:
43806
diff
changeset
|
681 |
$(eval $(call SetupCopyFiles, COPY_JAWT_LIB, \ |
49263
78af880eec61
8199749: Debug symbols are not copied to exploded image on Mac
erikj
parents:
49261
diff
changeset
|
682 |
FILES := $(BUILD_LIBJAWT_IMPORT_LIBRARY), \ |
45781
0491f891667c
8183166: lib\jawt.lib is missing from JDK 9 distribution for Windows
erikj
parents:
43806
diff
changeset
|
683 |
DEST := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE), \ |
0491f891667c
8183166: lib\jawt.lib is missing from JDK 9 distribution for Windows
erikj
parents:
43806
diff
changeset
|
684 |
)) |
20547 | 685 |
|
45781
0491f891667c
8183166: lib\jawt.lib is missing from JDK 9 distribution for Windows
erikj
parents:
43806
diff
changeset
|
686 |
$(COPY_JAWT_LIB): $(BUILD_LIBJAWT) |
0491f891667c
8183166: lib\jawt.lib is missing from JDK 9 distribution for Windows
erikj
parents:
43806
diff
changeset
|
687 |
|
0491f891667c
8183166: lib\jawt.lib is missing from JDK 9 distribution for Windows
erikj
parents:
43806
diff
changeset
|
688 |
TARGETS += $(COPY_JAWT_LIB) |
20547 | 689 |
|
690 |
else # OPENJDK_TARGET_OS not windows |
|
691 |
||
56433
c3cf838aa2da
Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents:
56421
diff
changeset
|
692 |
## FIXME:LIBS -- solve this situation better? |
20547 | 693 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
47217 | 694 |
LIBJAWT_SRC := $(TOPDIR)/src/java.desktop/macosx/native/libjawt |
25859 | 695 |
else |
47217 | 696 |
LIBJAWT_SRC := $(TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/libjawt |
25859 | 697 |
endif |
56433
c3cf838aa2da
Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents:
56421
diff
changeset
|
698 |
|
25859 | 699 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
20547 | 700 |
JAWT_LIBS := -lawt_lwawt |
21130 | 701 |
else |
702 |
JAWT_LIBS := |
|
703 |
ifneq ($(OPENJDK_TARGET_OS), solaris) |
|
704 |
JAWT_LIBS += -lawt |
|
705 |
endif |
|
41132 | 706 |
ifeq ($(ENABLE_HEADLESS_ONLY), false) |
21130 | 707 |
JAWT_LIBS += -lawt_xawt |
708 |
else |
|
709 |
JAWT_LIBS += -lawt_headless |
|
56433
c3cf838aa2da
Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents:
56421
diff
changeset
|
710 |
ifeq ($(OPENJDK_TARGET_OS), linux) |
c3cf838aa2da
Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents:
56421
diff
changeset
|
711 |
JAWT_CFLAGS += -DHEADLESS |
c3cf838aa2da
Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents:
56421
diff
changeset
|
712 |
endif |
21130 | 713 |
endif |
20547 | 714 |
endif |
715 |
||
49244
995a5556edfa
8199639: Introduce SetupJdkLibrary and SetupJdkExecutable
ihse
parents:
49241
diff
changeset
|
716 |
$(eval $(call SetupJdkLibrary, BUILD_LIBJAWT, \ |
49070
d7859531621b
8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents:
48766
diff
changeset
|
717 |
NAME := jawt, \ |
25859 | 718 |
SRC := $(LIBJAWT_SRC), \ |
20547 | 719 |
INCLUDE_FILES := $(JAWT_FILES), \ |
720 |
OPTIMIZATION := LOW, \ |
|
25859 | 721 |
CFLAGS := $(CFLAGS_JDKLIB) \ |
56433
c3cf838aa2da
Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents:
56421
diff
changeset
|
722 |
$(JAWT_CFLAGS), \ |
56454 | 723 |
HEADER_FLAGS := \ |
724 |
$(addprefix -I, $(call FindSrcDirsForComponent, java.desktop, include)) \ |
|
725 |
$(addprefix -I, $(call FindSrcDirsForComponent, java.desktop, common/awt)), \ |
|
20547 | 726 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
727 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
|
27944 | 728 |
LDFLAGS_unix := -L$(INSTALL_LIBRARIES_HERE), \ |
34695
7a6cc9982d22
8142907: Integration of minor fixes from the build-infra project
ihse
parents:
34432
diff
changeset
|
729 |
LDFLAGS_macosx := -Wl$(COMMA)-rpath$(COMMA)@loader_path, \ |
33406 | 730 |
LIBS_unix := $(JAWT_LIBS) $(JDKLIB_LIBS), \ |
731 |
LIBS_solaris := $(X_LIBS) -lXrender, \ |
|
732 |
LIBS_macosx := -framework Cocoa, \ |
|
35276 | 733 |
)) |
20547 | 734 |
|
41132 | 735 |
ifeq ($(ENABLE_HEADLESS_ONLY), false) |
20547 | 736 |
$(BUILD_LIBJAWT): $(BUILD_LIBAWT_XAWT) |
737 |
else |
|
738 |
$(BUILD_LIBJAWT): $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)awt_headless$(SHARED_LIBRARY_SUFFIX) |
|
739 |
endif |
|
740 |
||
741 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
742 |
$(BUILD_LIBJAWT): $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)awt_lwawt$(SHARED_LIBRARY_SUFFIX) |
|
743 |
endif |
|
744 |
||
745 |
endif # OPENJDK_TARGET_OS |
|
746 |
||
27565 | 747 |
TARGETS += $(BUILD_LIBJAWT) |
20547 | 748 |
|
26191
a0ff4b39d34b
8055188: General cleanup of minor issues from source restructure
erikj
parents:
25993
diff
changeset
|
749 |
################################################################################ |
12892 | 750 |
|
41132 | 751 |
ifeq ($(ENABLE_HEADLESS_ONLY), false) |
25859 | 752 |
|
20547 | 753 |
LIBSPLASHSCREEN_DIRS := \ |
47217 | 754 |
$(TOPDIR)/src/java.desktop/share/native/libjavajpeg \ |
755 |
$(TOPDIR)/src/java.desktop/share/native/libsplashscreen \ |
|
25859 | 756 |
# |
20547 | 757 |
|
758 |
ifeq ($(USE_EXTERNAL_LIBGIF), true) |
|
33406 | 759 |
GIFLIB_LIBS := -lgif |
25859 | 760 |
LIBSPLASHSCREEN_EXCLUDES := giflib |
20547 | 761 |
else |
56433
c3cf838aa2da
Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents:
56421
diff
changeset
|
762 |
LIBSPLASHSCREEN_HEADER_FLAGS += -I$(TOPDIR)/src/java.desktop/share/native/libsplashscreen/giflib |
20547 | 763 |
endif |
764 |
||
25103 | 765 |
ifeq ($(USE_EXTERNAL_LIBJPEG), true) |
33406 | 766 |
LIBJPEG_LIBS := -ljpeg |
25103 | 767 |
else |
47217 | 768 |
LIBSPLASHSCREEN_DIRS += $(TOPDIR)/src/java.desktop/share/native/libjavajpeg |
56433
c3cf838aa2da
Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents:
56421
diff
changeset
|
769 |
LIBSPLASHSCREEN_HEADER_FLAGS += -I$(TOPDIR)/src/java.desktop/share/native/libjavajpeg |
25103 | 770 |
endif |
771 |
||
23305 | 772 |
ifeq ($(USE_EXTERNAL_LIBPNG), false) |
47217 | 773 |
LIBSPLASHSCREEN_DIRS += $(TOPDIR)/src/java.desktop/share/native/libsplashscreen/libpng |
25859 | 774 |
else |
775 |
LIBSPLASHSCREEN_EXCLUDES += libpng |
|
23305 | 776 |
endif |
777 |
||
20547 | 778 |
ifneq ($(OPENJDK_TARGET_OS), macosx) |
47217 | 779 |
LIBSPLASHSCREEN_DIRS += $(TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/libsplashscreen |
20547 | 780 |
else |
47217 | 781 |
LIBSPLASHSCREEN_DIRS += $(TOPDIR)/src/java.desktop/macosx/native/libsplashscreen |
20547 | 782 |
endif |
783 |
||
36953 | 784 |
ifneq ($(filter $(OPENJDK_TARGET_OS),linux solaris aix), ) |
47217 | 785 |
LIBSPLASHSCREEN_DIRS += $(TOPDIR)/src/java.desktop/unix/native/common/awt/systemscale |
36869 | 786 |
endif |
36880
3a05117c7611
8151770: 9-client windows builds fail on windows since make file change for 8145174
erikj
parents:
36869
diff
changeset
|
787 |
|
36907 | 788 |
ifeq ($(OPENJDK_TARGET_OS), windows) |
47217 | 789 |
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
|
790 |
endif |
56433
c3cf838aa2da
Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents:
56421
diff
changeset
|
791 |
LIBSPLASHSCREEN_CFLAGS += -DSPLASHSCREEN -DPNG_NO_MMX_CODE -DPNG_ARM_NEON_OPT=0 |
c3cf838aa2da
Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents:
56421
diff
changeset
|
792 |
|
20547 | 793 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
794 |
LIBSPLASHSCREEN_CFLAGS += -DWITH_MACOSX |
|
795 |
||
25859 | 796 |
BUILD_LIBSPLASHSCREEN_java_awt_SplashScreen.c_CFLAGS := -x objective-c -O0 |
797 |
BUILD_LIBSPLASHSCREEN_splashscreen_gfx_impl.c_CFLAGS := -x objective-c -O0 |
|
798 |
BUILD_LIBSPLASHSCREEN_splashscreen_gif.c_CFLAGS := -x objective-c -O0 |
|
799 |
BUILD_LIBSPLASHSCREEN_splashscreen_impl.c_CFLAGS := -x objective-c -O0 |
|
800 |
BUILD_LIBSPLASHSCREEN_splashscreen_jpeg.c_CFLAGS := -x objective-c -O0 |
|
801 |
BUILD_LIBSPLASHSCREEN_splashscreen_png.c_CFLAGS := -x objective-c -O0 |
|
802 |
BUILD_LIBSPLASHSCREEN_splashscreen_sys.m_CFLAGS := -O0 |
|
20547 | 803 |
|
20901
70f69e624fc9
8026888: Licensee build failure due to wrong libs being called
erikj
parents:
20899
diff
changeset
|
804 |
else ifeq ($(OPENJDK_TARGET_OS), windows) |
70f69e624fc9
8026888: Licensee build failure due to wrong libs being called
erikj
parents:
20899
diff
changeset
|
805 |
LIBSPLASHSCREEN_CFLAGS += -DWITH_WIN32 |
20547 | 806 |
else |
20901
70f69e624fc9
8026888: Licensee build failure due to wrong libs being called
erikj
parents:
20899
diff
changeset
|
807 |
LIBSPLASHSCREEN_CFLAGS += -DWITH_X11 $(X_CFLAGS) |
20547 | 808 |
endif |
809 |
||
33406 | 810 |
LIBSPLASHSCREEN_LIBS := |
20547 | 811 |
|
48751
54f355e65415
8196803: Fix build warnings in jdk libraries with Xcode 9
erikj
parents:
48731
diff
changeset
|
812 |
ifeq ($(USE_EXTERNAL_LIBZ), false) |
47217 | 813 |
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
|
814 |
else |
54f355e65415
8196803: Fix build warnings in jdk libraries with Xcode 9
erikj
parents:
48731
diff
changeset
|
815 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
54f355e65415
8196803: Fix build warnings in jdk libraries with Xcode 9
erikj
parents:
48731
diff
changeset
|
816 |
ifeq ($(USE_EXTERNAL_LIBPNG), false) |
54f355e65415
8196803: Fix build warnings in jdk libraries with Xcode 9
erikj
parents:
48731
diff
changeset
|
817 |
# 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
|
818 |
# 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
|
819 |
# $(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
|
820 |
# for details. |
54f355e65415
8196803: Fix build warnings in jdk libraries with Xcode 9
erikj
parents:
48731
diff
changeset
|
821 |
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
|
822 |
endif |
54f355e65415
8196803: Fix build warnings in jdk libraries with Xcode 9
erikj
parents:
48731
diff
changeset
|
823 |
endif |
20547 | 824 |
endif |
825 |
||
826 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
33406 | 827 |
LIBSPLASHSCREEN_LIBS += \ |
27565 | 828 |
$(LIBM) -lpthread -liconv -losxapp \ |
20547 | 829 |
-framework ApplicationServices \ |
830 |
-framework Foundation \ |
|
831 |
-framework Cocoa \ |
|
832 |
-framework JavaNativeFoundation |
|
20901
70f69e624fc9
8026888: Licensee build failure due to wrong libs being called
erikj
parents:
20899
diff
changeset
|
833 |
else ifeq ($(OPENJDK_TARGET_OS), windows) |
36907 | 834 |
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
|
835 |
else |
39844
a3cc7e551a48
8149115: [hidpi] Linux: display-wise scaling factor should probably be taken into account
ssadetsky
parents:
39550
diff
changeset
|
836 |
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
|
837 |
endif |
20547 | 838 |
|
49244
995a5556edfa
8199639: Introduce SetupJdkLibrary and SetupJdkExecutable
ihse
parents:
49241
diff
changeset
|
839 |
$(eval $(call SetupJdkLibrary, BUILD_LIBSPLASHSCREEN, \ |
49070
d7859531621b
8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents:
48766
diff
changeset
|
840 |
NAME := splashscreen, \ |
20547 | 841 |
SRC := $(LIBSPLASHSCREEN_DIRS), \ |
842 |
EXCLUDE_FILES := imageioJPEG.c jpegdecoder.c pngtest.c, \ |
|
25859 | 843 |
EXCLUDES := $(LIBSPLASHSCREEN_EXCLUDES), \ |
20547 | 844 |
OPTIMIZATION := LOW, \ |
23305 | 845 |
CFLAGS := $(LIBSPLASHSCREEN_CFLAGS) $(CFLAGS_JDKLIB) \ |
48751
54f355e65415
8196803: Fix build warnings in jdk libraries with Xcode 9
erikj
parents:
48731
diff
changeset
|
846 |
$(GIFLIB_CFLAGS) $(LIBJPEG_CFLAGS) $(PNG_CFLAGS) $(LIBZ_CFLAGS), \ |
56454 | 847 |
HEADER_FLAGS := \ |
848 |
-I$(call FindHeaderDirForModule, $(MODULE)) \ |
|
56457 | 849 |
$(addprefix -I, $(call FindSrcDirsForLib, java.desktop, osxapp)) \ |
56454 | 850 |
$(LIBSPLASHSCREEN_HEADER_FLAGS), \ |
48766
2c4d1993b5f9
8196985: Disable new warnings from GCC 7.3 in jdk libraries
erikj
parents:
48751
diff
changeset
|
851 |
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
|
852 |
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
|
853 |
DISABLED_WARNINGS_clang := incompatible-pointer-types, \ |
32408
97230ec16697
8134408: Disable warnings for jdk libraries triggered by SS12u4
erikj
parents:
31159
diff
changeset
|
854 |
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
|
855 |
E_STATEMENT_NOT_REACHED, \ |
30502
50552a5900a2
8080317: Disable warning treated as error for signed/unsigned comparison in building splashscreen
prr
parents:
30439
diff
changeset
|
856 |
DISABLED_WARNINGS_microsoft := 4018 4244 4267, \ |
49239 | 857 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
20547 | 858 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
49239 | 859 |
LDFLAGS_macosx := -L$(INSTALL_LIBRARIES_HERE), \ |
860 |
LDFLAGS_windows := -delayload:user32.dll, \ |
|
48751
54f355e65415
8196803: Fix build warnings in jdk libraries with Xcode 9
erikj
parents:
48731
diff
changeset
|
861 |
LIBS := $(JDKLIB_LIBS) $(LIBSPLASHSCREEN_LIBS) $(LIBZ_LIBS) \ |
54f355e65415
8196803: Fix build warnings in jdk libraries with Xcode 9
erikj
parents:
48731
diff
changeset
|
862 |
$(GIFLIB_LIBS) $(LIBJPEG_LIBS) $(PNG_LIBS), \ |
33518
3f1644328d06
8141290: AIX: fix build after '8140661: Rename LDFLAGS_SUFFIX to LIBS'
simonis
parents:
33406
diff
changeset
|
863 |
LIBS_aix := -liconv, \ |
35276 | 864 |
)) |
20547 | 865 |
|
27565 | 866 |
TARGETS += $(BUILD_LIBSPLASHSCREEN) |
20547 | 867 |
|
868 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
49261
d5c43e9f08fb
8199745: JDK-8199668 introduced a build race on macosx
erikj
parents:
49244
diff
changeset
|
869 |
$(BUILD_LIBSPLASHSCREEN): $(call FindLib, java.desktop, osxapp) |
20547 | 870 |
endif |
871 |
||
872 |
endif |
|
873 |
||
26191
a0ff4b39d34b
8055188: General cleanup of minor issues from source restructure
erikj
parents:
25993
diff
changeset
|
874 |
################################################################################ |
20547 | 875 |
|
876 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
877 |
||
25859 | 878 |
LIBAWT_LWAWT_DIRS := \ |
47217 | 879 |
$(TOPDIR)/src/java.desktop/macosx/native/libawt_lwawt \ |
880 |
$(TOPDIR)/src/java.desktop/unix/native/common/awt \ |
|
881 |
$(TOPDIR)/src/java.desktop/share/native/common/font \ |
|
882 |
$(TOPDIR)/src/java.desktop/share/native/common/java2d \ |
|
25859 | 883 |
# |
20547 | 884 |
|
56433
c3cf838aa2da
Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents:
56421
diff
changeset
|
885 |
LIBAWT_LWAWT_CFLAGS := $(X_CFLAGS) $(X_LIBS) |
c3cf838aa2da
Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents:
56421
diff
changeset
|
886 |
|
26741 | 887 |
LIBAWT_LWAWT_EXFILES := fontpath.c awt_Font.c X11Color.c |
47217 | 888 |
LIBAWT_LWAWT_EXCLUDES := $(TOPDIR)/src/java.desktop/unix/native/common/awt/medialib |
20547 | 889 |
|
49244
995a5556edfa
8199639: Introduce SetupJdkLibrary and SetupJdkExecutable
ihse
parents:
49241
diff
changeset
|
890 |
$(eval $(call SetupJdkLibrary, BUILD_LIBAWT_LWAWT, \ |
49070
d7859531621b
8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents:
48766
diff
changeset
|
891 |
NAME := awt_lwawt, \ |
20547 | 892 |
SRC := $(LIBAWT_LWAWT_DIRS), \ |
893 |
INCLUDE_FILES := $(LIBAWT_LWAWT_FILES), \ |
|
25859 | 894 |
EXCLUDE_FILES := $(LIBAWT_LWAWT_EXFILES), \ |
895 |
EXCLUDES := $(LIBAWT_LWAWT_EXCLUDES), \ |
|
20547 | 896 |
OPTIMIZATION := LOW, \ |
897 |
CFLAGS := $(CFLAGS_JDKLIB) \ |
|
25859 | 898 |
$(LIBAWT_LWAWT_CFLAGS), \ |
56457 | 899 |
HEADER_FLAGS := \ |
900 |
-I$(call FindHeaderDirForModule, $(MODULE)) \ |
|
901 |
$(addprefix -I, $(call FindSrcDirsForComponent, java.desktop, libawt_lwawt/java2d/opengl)) \ |
|
902 |
$(addprefix -I, $(call FindSrcDirsForComponent, java.desktop, libawt_lwawt/awt)) \ |
|
903 |
$(addprefix -I, $(call FindSrcDirsForComponent, java.desktop, libawt_lwawt/font)) \ |
|
904 |
$(addprefix -I, $(call FindSrcDirsForComponent, java.desktop, include)) \ |
|
905 |
$(addprefix -I, $(call FindSrcDirsForComponent, java.desktop, common/awt/debug)) \ |
|
906 |
$(addprefix -I, $(call FindSrcDirsForComponent, java.desktop, common/java2d/opengl)) \ |
|
907 |
$(addprefix -I, $(call FindSrcDirsForComponent, java.desktop, libawt/awt/image)) \ |
|
908 |
$(addprefix -I, $(call FindSrcDirsForComponent, java.desktop, libawt/awt/image/cvutils)) \ |
|
909 |
$(addprefix -I, $(call FindSrcDirsForComponent, java.desktop, libawt/java2d)) \ |
|
910 |
$(addprefix -I, $(call FindSrcDirsForComponent, java.desktop, libawt/java2d/loops)) \ |
|
911 |
$(addprefix -I, $(call FindSrcDirsForComponent, java.desktop, libawt/java2d/pipe)) \ |
|
912 |
$(addprefix -I, $(call FindSrcDirsForLib, java.desktop, osxapp)), \ |
|
32872 | 913 |
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
|
914 |
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
|
915 |
incompatible-pointer-types parentheses-equality extra-tokens, \ |
20547 | 916 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
27565 | 917 |
$(call SET_SHARED_LIBRARY_ORIGIN) \ |
27944 | 918 |
-L$(INSTALL_LIBRARIES_HERE), \ |
33406 | 919 |
LIBS := -lawt -lmlib_image -losxapp -ljvm $(LIBM) \ |
20547 | 920 |
-framework Accelerate \ |
921 |
-framework ApplicationServices \ |
|
922 |
-framework AudioToolbox \ |
|
923 |
-framework Carbon \ |
|
924 |
-framework Cocoa \ |
|
925 |
-framework Security \ |
|
926 |
-framework ExceptionHandling \ |
|
927 |
-framework JavaNativeFoundation \ |
|
928 |
-framework JavaRuntimeSupport \ |
|
929 |
-framework OpenGL \ |
|
930 |
-framework QuartzCore -ljava, \ |
|
35276 | 931 |
)) |
20547 | 932 |
|
27565 | 933 |
TARGETS += $(BUILD_LIBAWT_LWAWT) |
20547 | 934 |
|
935 |
$(BUILD_LIBAWT_LWAWT): $(BUILD_LIBAWT) |
|
936 |
||
937 |
$(BUILD_LIBAWT_LWAWT): $(BUILD_LIBMLIB_IMAGE) |
|
938 |
||
49261
d5c43e9f08fb
8199745: JDK-8199668 introduced a build race on macosx
erikj
parents:
49244
diff
changeset
|
939 |
$(BUILD_LIBAWT_LWAWT): $(call FindLib, java.desktop, osxapp) |
20547 | 940 |
|
27565 | 941 |
$(BUILD_LIBAWT_LWAWT): $(call FindLib, java.base, java) |
20547 | 942 |
|
943 |
endif |
|
944 |
||
26191
a0ff4b39d34b
8055188: General cleanup of minor issues from source restructure
erikj
parents:
25993
diff
changeset
|
945 |
################################################################################ |
20547 | 946 |
|
947 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
948 |
||
49244
995a5556edfa
8199639: Introduce SetupJdkLibrary and SetupJdkExecutable
ihse
parents:
49241
diff
changeset
|
949 |
$(eval $(call SetupJdkLibrary, BUILD_LIBOSXUI, \ |
49070
d7859531621b
8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents:
48766
diff
changeset
|
950 |
NAME := osxui, \ |
20547 | 951 |
OPTIMIZATION := LOW, \ |
56433
c3cf838aa2da
Initial fix for setting SRC automatically + HEADER_FLAGS.
ihse
parents:
56421
diff
changeset
|
952 |
CFLAGS := $(CFLAGS_JDKLIB), \ |
56457 | 953 |
HEADER_FLAGS := \ |
954 |
-I$(call FindHeaderDirForModule, $(MODULE)) \ |
|
955 |
$(addprefix -I, $(call FindSrcDirsForComponent, java.desktop, libawt_lwawt/awt)) \ |
|
956 |
$(addprefix -I, $(call FindSrcDirsForLib, java.desktop, osxapp)), \ |
|
49523 | 957 |
DISABLED_WARNINGS_clang := deprecated-declarations, \ |
20547 | 958 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
959 |
$(call SET_SHARED_LIBRARY_ORIGIN) \ |
|
34695
7a6cc9982d22
8142907: Integration of minor fixes from the build-infra project
ihse
parents:
34432
diff
changeset
|
960 |
-Wl$(COMMA)-rpath$(COMMA)@loader_path \ |
27944 | 961 |
-L$(INSTALL_LIBRARIES_HERE), \ |
33406 | 962 |
LIBS := -lawt -losxapp -lawt_lwawt \ |
20547 | 963 |
-framework Cocoa \ |
964 |
-framework Carbon \ |
|
965 |
-framework ApplicationServices \ |
|
966 |
-framework JavaNativeFoundation \ |
|
967 |
-framework JavaRuntimeSupport \ |
|
968 |
-ljava -ljvm, \ |
|
35276 | 969 |
)) |
20547 | 970 |
|
27565 | 971 |
TARGETS += $(BUILD_LIBOSXUI) |
20547 | 972 |
|
973 |
$(BUILD_LIBOSXUI): $(BUILD_LIBAWT) |
|
974 |
||
49261
d5c43e9f08fb
8199745: JDK-8199668 introduced a build race on macosx
erikj
parents:
49244
diff
changeset
|
975 |
$(BUILD_LIBOSXUI): $(call FindLib, java.desktop, osxapp) |
20547 | 976 |
|
977 |
$(BUILD_LIBOSXUI): $(BUILD_LIBAWT_LWAWT) |
|
978 |
||
979 |
endif |
|
26191
a0ff4b39d34b
8055188: General cleanup of minor issues from source restructure
erikj
parents:
25993
diff
changeset
|
980 |
|
a0ff4b39d34b
8055188: General cleanup of minor issues from source restructure
erikj
parents:
25993
diff
changeset
|
981 |
################################################################################ |
a0ff4b39d34b
8055188: General cleanup of minor issues from source restructure
erikj
parents:
25993
diff
changeset
|
982 |
|
a0ff4b39d34b
8055188: General cleanup of minor issues from source restructure
erikj
parents:
25993
diff
changeset
|
983 |
# Hook to include the corresponding custom file, if present. |
47314 | 984 |
$(eval $(call IncludeCustomExtension, lib/Awt2dLibraries.gmk)) |