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