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