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