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