author | duke |
Wed, 05 Jul 2017 19:55:15 +0200 | |
changeset 25866 | 82d7101d5cab |
parent 25859 | 3317bb8137f4 |
child 25993 | 3684a086e999 |
permissions | -rw-r--r-- |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
1 |
# |
22649
f70b08c1593c
8033532: Freetype include statement must come before X11 include
ihse
parents:
22607
diff
changeset
|
2 |
# Copyright (c) 2011, 2014, 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 |
|
22963
a28e6f0b511b
8034191: Move relevant parts of build system to new closed repo
ihse
parents:
22649
diff
changeset
|
26 |
# Hook to include the corresponding custom file, if present. |
a28e6f0b511b
8034191: Move relevant parts of build system to new closed repo
ihse
parents:
22649
diff
changeset
|
27 |
$(eval $(call IncludeCustomExtension, jdk, lib/Awt2dLibraries.gmk)) |
a28e6f0b511b
8034191: Move relevant parts of build system to new closed repo
ihse
parents:
22649
diff
changeset
|
28 |
|
20890 | 29 |
WIN_AWT_LIB := $(JDK_OUTPUTDIR)/objs/libawt/awt.lib |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
30 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
31 |
########################################################################################## |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
32 |
|
25859 | 33 |
BUILD_LIBMLIB_SRC := $(JDK_TOPDIR)/src/java.desktop/share/native/libmlib_image \ |
34 |
$(JDK_TOPDIR)/src/java.desktop/share/native/common/sun/awt/medialib |
|
20547 | 35 |
BUILD_LIBMLIB_CFLAGS := -D__USE_J2D_NAMES -D__MEDIALIB_OLD_NAMES \ |
25859 | 36 |
$(addprefix -I, $(BUILD_LIBMLIB_SRC)) \ |
37 |
-I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/libmlib_image |
|
20547 | 38 |
|
39 |
BUILD_LIBMLIB_LDLIBS := |
|
21805 | 40 |
BUILD_LIBMLIB_IMAGE_MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libmlib_image/mapfile-vers |
13164 | 41 |
|
13702 | 42 |
BUILD_LIBMLIB_CFLAGS += -DMLIB_NO_LIBSUNMATH |
43 |
||
44 |
ifeq ($(OPENJDK_TARGET_CPU_BITS), 64) |
|
20547 | 45 |
BUILD_LIBMLIB_CFLAGS += -DMLIB_OS64BIT |
12892 | 46 |
endif |
47 |
||
13164 | 48 |
ifneq ($(OPENJDK_TARGET_OS), windows) |
20547 | 49 |
BUILD_LIBMLIB_LDLIBS += $(LIBM) $(LIBDL) |
12892 | 50 |
endif |
51 |
||
20547 | 52 |
$(eval $(call SetupNativeCompilation,BUILD_LIBMLIB_IMAGE, \ |
53 |
LIBRARY := mlib_image, \ |
|
54 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
|
55 |
SRC := $(BUILD_LIBMLIB_SRC), \ |
|
25859 | 56 |
EXCLUDE_FILES := mlib_c_ImageBlendTable.c, \ |
20547 | 57 |
LANG := C, \ |
58 |
OPTIMIZATION := HIGHEST, \ |
|
59 |
CFLAGS := $(CFLAGS_JDKLIB) \ |
|
60 |
$(BUILD_LIBMLIB_CFLAGS), \ |
|
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", \ |
|
72 |
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libmlib_image, \ |
|
73 |
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES))) |
|
74 |
||
75 |
$(BUILD_LIBMLIB_IMAGE): $(BUILD_LIBJAVA) |
|
13164 | 76 |
|
25859 | 77 |
DESKTOP_LIBRARIES += $(BUILD_LIBMLIB_IMAGE) |
12892 | 78 |
|
79 |
########################################################################################## |
|
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 \ |
|
85 |
$(JDK_TOPDIR)/src/java.desktop/share/native/common/sun/awt/medialib \ |
|
86 |
$(JDK_TOPDIR)/src/java.desktop/unix/native/common/sun/awt/medialib \ |
|
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), \ |
133 |
MAPFILE := $(BUILD_LIBMLIB_IMAGE_MAPFILE), \ |
|
134 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
|
135 |
$(BUILD_LIBMLIB_LDLIBS) -ljava -ljvm \ |
|
136 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
|
137 |
LDFLAGS_SUFFIX_solaris := -lc, \ |
|
138 |
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libmlib_image_v, \ |
|
139 |
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES))) |
|
140 |
||
141 |
$(BUILD_LIBMLIB_IMAGE_V): $(BUILD_LIBJAVA) |
|
142 |
||
25859 | 143 |
DESKTOP_LIBRARIES += $(BUILD_LIBMLIB_IMAGE_V) |
12892 | 144 |
|
145 |
endif |
|
146 |
||
147 |
########################################################################################## |
|
148 |
||
25859 | 149 |
LIBAWT_DIRS := $(JDK_TOPDIR)/src/java.desktop/share/native/libawt \ |
150 |
$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/libawt \ |
|
151 |
$(JDK_TOPDIR)/src/java.desktop/share/native/common/sun/awt/debug \ |
|
152 |
$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/common/sun/awt \ |
|
153 |
# |
|
20547 | 154 |
|
155 |
ifeq ($(OPENJDK_TARGET_OS), windows) |
|
25859 | 156 |
LIBAWT_DIRS += $(JDK_TOPDIR)/src/java.desktop/share/native/common/sun/awt/utility |
157 |
else |
|
158 |
LIBAWT_EXFILES := sun/java2d/ShaderList.c |
|
159 |
endif |
|
160 |
||
161 |
ifneq ($(filter $(OPENJDK_TARGET_OS), solaris linux macosx), ) |
|
162 |
LIBAWT_EXFILES += awt_Font.c CUPSfuncs.c fontpath.c X11Color.c |
|
14231 | 163 |
endif |
13164 | 164 |
|
25859 | 165 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
166 |
LIBAWT_EXFILES += initIDs.c sun/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
|
167 |
endif |
7515a991bb37
8024854: PPC64: Basic changes and files to build the class library on AIX
simonis
parents:
22595
diff
changeset
|
168 |
|
25859 | 169 |
LIBAWT_CFLAGS += -I$(JDK_OUTPUTDIR)/gensrc_headers/java.desktop \ |
170 |
$(addprefix -I, $(shell find $(LIBAWT_DIRS) -type d)) \ |
|
171 |
-I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/common/sun/awt \ |
|
172 |
$(LIBJAVA_HEADER_FLAGS) \ |
|
173 |
$(addprefix -I, $(BUILD_LIBMLIB_IMAGE_SRC)) \ |
|
174 |
# |
|
175 |
||
20547 | 176 |
LIBAWT_CFLAGS += -D__MEDIALIB_OLD_NAMES -D__USE_J2D_NAMES \ |
177 |
$(X_CFLAGS) \ |
|
178 |
$(foreach dir, $(LIBAWT_DIRS), -I$(dir)) |
|
179 |
||
180 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
12892 | 181 |
endif |
182 |
||
13164 | 183 |
ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_ARCH), solaris-sparc) |
20547 | 184 |
LIBAWT_CFLAGS += -DMLIB_ADD_SUFF |
185 |
LIBAWT_CFLAGS += -xarch=sparcvis |
|
186 |
||
25859 | 187 |
LIBAWT_CFLAGS += $(JDK_TOPDIR)/src/java.desktop/unix/native/libmlib_image/vis_$(OPENJDK_TARGET_CPU_BITS).il |
188 |
LIBAWT_DIRS += $(JDK_TOPDIR)/src/java.desktop/share/native/common/sun/awt/medialib |
|
189 |
LIBAWT_EXFILES += sun/java2d/loops/MapAccelFunc.c |
|
20547 | 190 |
|
191 |
ifeq ($(OPENJDK_TARGET_CPU), sparcv9) |
|
192 |
LIBAWT_ASFLAGS = -P -xarch=v9a |
|
193 |
else |
|
194 |
LIBAWT_ASFLAGS = -P -xarch=v8plusa |
|
195 |
endif |
|
12892 | 196 |
else |
25859 | 197 |
LIBAWT_EXCLUDES += \ |
198 |
$(JDK_TOPDIR)/src/java.desktop/unix/native/libawt/sun/awt/medialib \ |
|
199 |
$(JDK_TOPDIR)/src/java.desktop/unix/native/libawt/sun/java2d/loops \ |
|
200 |
$(JDK_TOPDIR)/src/java.desktop/unix/native/common/sun/awt/medialib \ |
|
201 |
# |
|
12892 | 202 |
endif |
203 |
||
20547 | 204 |
ifneq ($(OPENJDK_TARGET_OS), solaris) |
205 |
LIBAWT_CFLAGS += -DMLIB_NO_LIBSUNMATH |
|
12892 | 206 |
endif |
207 |
||
20547 | 208 |
LIBAWT_LANG := C |
209 |
||
210 |
ifeq ($(OPENJDK_TARGET_OS), windows) |
|
25859 | 211 |
LIBAWT_DIRS += $(JDK_TOPDIR)/src/java.desktop/share/native/common/sun/font \ |
212 |
$(JDK_TOPDIR)/src/java.desktop/share/native/common/sun/java2d/opengl \ |
|
213 |
# Why does libawt need java.base headers? |
|
214 |
LIBAWT_CFLAGS += -I$(JDK_TOPDIR)/src/java.desktop/share/native/common/sun/font \ |
|
215 |
-I$(JDK_TOPDIR)/src/java.desktop/share/native/common/sun/java2d/opengl \ |
|
216 |
-I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/common/sun/java2d/opengl \ |
|
217 |
-I$(JDK_TOPDIR)/src/java.desktop/windows/native/include \ |
|
218 |
-I$(JDK_TOPDIR)/src/java.desktop/share/native/include \ |
|
219 |
-I$(JDK_OUTPUTDIR)/gensrc_headers/java.base \ |
|
220 |
# |
|
221 |
LIBAWT_EXFILES += \ |
|
222 |
sun/java2d/d3d/D3DPipeline.cpp \ |
|
223 |
sun/java2d/d3d/D3DShaderGen.c \ |
|
224 |
sun/awt/image/cvutils/img_colors.c \ |
|
225 |
sun/windows/WBufferStrategy.cpp \ |
|
226 |
# |
|
20547 | 227 |
|
228 |
LIBAWT_LANG := C++ |
|
229 |
LIBAWT_CFLAGS += -EHsc -DUNICODE -D_UNICODE |
|
230 |
ifeq ($(OPENJDK_TARGET_CPU_BITS), 64) |
|
231 |
LIBAWT_CFLAGS += -DMLIB_OS64BIT |
|
232 |
endif |
|
233 |
||
234 |
ifdef OPENJDK |
|
25859 | 235 |
LIBAWT_RC_FLAGS := -i "$(JDK_TOPDIR)/src/java.base/windows/native/launcher/icons" |
20547 | 236 |
else |
25859 | 237 |
LIBAWT_RC_FLAGS := -i "$(JDK_TOPDIR)/src/closed/java.base/windows/native/launcher/icons" |
20547 | 238 |
endif |
25859 | 239 |
LIBAWT_VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/java.desktop/windows/native/libawt/sun/windows/awt.rc |
12892 | 240 |
endif |
241 |
||
13164 | 242 |
ifeq ($(MILESTONE), internal) |
20547 | 243 |
LIBAWT_CFLAGS += -DINTERNAL_BUILD |
12892 | 244 |
endif |
245 |
||
21805 | 246 |
LIBAWT_MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libawt/mapfile-vers |
20547 | 247 |
ifeq ($(OPENJDK_TARGET_OS), linux) |
248 |
LIBAWT_MAPFILE := |
|
12892 | 249 |
endif |
250 |
||
20547 | 251 |
$(eval $(call SetupNativeCompilation,BUILD_LIBAWT, \ |
252 |
LIBRARY := awt, \ |
|
253 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
|
254 |
SRC := $(LIBAWT_DIRS), \ |
|
25859 | 255 |
EXCLUDES := $(LIBAWT_EXCLUDES), \ |
256 |
EXCLUDE_FILES := $(LIBAWT_EXFILES), \ |
|
20547 | 257 |
LANG := $(LIBAWT_LANG), \ |
258 |
OPTIMIZATION := LOW, \ |
|
259 |
CFLAGS := $(CFLAGS_JDKLIB) $(LIBAWT_CFLAGS), \ |
|
260 |
ASFLAGS := $(LIBAWT_ASFLAGS), \ |
|
261 |
MAPFILE := $(LIBAWT_MAPFILE), \ |
|
262 |
LDFLAGS := $(LDFLAGS_JDKLIB) $(call SET_SHARED_LIBRARY_ORIGIN), \ |
|
263 |
LDFLAGS_SUFFIX_linux := -ljvm $(LIBM) $(LIBDL) -ljava, \ |
|
264 |
LDFLAGS_SUFFIX_solaris := -ljvm $(LIBM) $(LIBDL) -ljava -lc, \ |
|
22595
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
265 |
LDFLAGS_SUFFIX_aix :=-ljvm $(LIBM) $(LIBDL) -ljava -lm,\ |
20547 | 266 |
LDFLAGS_SUFFIX_macosx := -lmlib_image -ljvm $(LIBM) \ |
267 |
-framework Cocoa \ |
|
268 |
-framework OpenGL \ |
|
269 |
-framework JavaNativeFoundation \ |
|
270 |
-framework JavaRuntimeSupport \ |
|
271 |
-framework ApplicationServices \ |
|
272 |
-framework AudioToolbox \ |
|
273 |
-ljava, \ |
|
274 |
LDFLAGS_SUFFIX_windows := kernel32.lib user32.lib gdi32.lib winspool.lib \ |
|
275 |
imm32.lib ole32.lib uuid.lib shell32.lib \ |
|
276 |
comdlg32.lib winmm.lib comctl32.lib shlwapi.lib \ |
|
277 |
delayimp.lib jvm.lib $(WIN_JAVA_LIB) advapi32.lib \ |
|
278 |
-DELAYLOAD:user32.dll -DELAYLOAD:gdi32.dll \ |
|
279 |
-DELAYLOAD:shell32.dll -DELAYLOAD:winmm.dll \ |
|
280 |
-DELAYLOAD:winspool.drv -DELAYLOAD:imm32.dll \ |
|
281 |
-DELAYLOAD:ole32.dll -DELAYLOAD:comdlg32.dll \ |
|
282 |
-DELAYLOAD:comctl32.dll -DELAYLOAD:shlwapi.dll, \ |
|
283 |
VERSIONINFO_RESOURCE := $(LIBAWT_VERSIONINFO_RESOURCE), \ |
|
284 |
RC_FLAGS := $(RC_FLAGS) $(LIBAWT_RC_FLAGS) \ |
|
285 |
-D "JDK_FNAME=awt.dll" \ |
|
286 |
-D "JDK_INTERNAL_NAME=awt" \ |
|
287 |
-D "JDK_FTYPE=0x2L", \ |
|
288 |
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libawt, \ |
|
289 |
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES))) |
|
290 |
||
291 |
$(BUILD_LIBAWT): $(BUILD_LIBJAVA) |
|
13164 | 292 |
|
293 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
20547 | 294 |
$(BUILD_LIBAWT): $(BUILD_LIBMLIB_IMAGE) |
13164 | 295 |
endif |
296 |
||
25859 | 297 |
DESKTOP_LIBRARIES += $(BUILD_LIBAWT) |
12892 | 298 |
|
299 |
########################################################################################## |
|
300 |
||
21130 | 301 |
ifeq ($(findstring $(OPENJDK_TARGET_OS),windows macosx),) |
20547 | 302 |
ifndef BUILD_HEADLESS_ONLY |
303 |
||
304 |
LIBAWT_XAWT_DIRS := \ |
|
25859 | 305 |
$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/libawt_xawt \ |
306 |
$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/libjawt \ |
|
307 |
$(JDK_TOPDIR)/src/java.desktop/share/native/common/sun/awt/debug \ |
|
308 |
$(JDK_TOPDIR)/src/java.desktop/share/native/common/sun/awt/utility \ |
|
309 |
$(JDK_TOPDIR)/src/java.desktop/share/native/common/sun/font \ |
|
310 |
$(JDK_TOPDIR)/src/java.desktop/share/native/common/sun/java2d/opengl \ |
|
311 |
$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/common/sun/java2d/opengl \ |
|
312 |
$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/common/sun/java2d/x11 \ |
|
313 |
$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/common/sun/awt \ |
|
314 |
# |
|
315 |
||
316 |
LIBAWT_XAWT_EXCLUDES := medialib |
|
20547 | 317 |
|
25859 | 318 |
LIBAWT_XAWT_CFLAGS := $(addprefix -I, $(shell $(FIND) $(LIBAWT_XAWT_DIRS) -type d)) \ |
319 |
-I$(JDK_OUTPUTDIR)/gensrc_headers/java.desktop \ |
|
320 |
-I$(JDK_TOPDIR)/src/java.desktop/share/native/include \ |
|
321 |
-I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS)/native/include \ |
|
322 |
-I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/include \ |
|
323 |
-I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/sun/java2d \ |
|
324 |
-I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/libawt/sun/java2d \ |
|
325 |
-I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/sun/java2d/loops \ |
|
326 |
-I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/sun/java2d/pipe \ |
|
327 |
-I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/sun/awt/image/cvutils \ |
|
328 |
-I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/sun/awt/image \ |
|
329 |
-I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/libsunwjdga \ |
|
330 |
-I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/common/sun/font \ |
|
331 |
$(LIBJAVA_HEADER_FLAGS) |
|
332 |
# |
|
333 |
||
334 |
LIBAWT_XAWT_CFLAGS += -DXAWT -DXAWT_HACK \ |
|
21130 | 335 |
-DPACKAGE_PATH=\"$(PACKAGE_PATH)\" \ |
25859 | 336 |
$(CUPS_CFLAGS) |
20547 | 337 |
|
338 |
ifeq ($(OPENJDK_TARGET_OS), solaris) |
|
339 |
LIBAWT_XAWT_CFLAGS += -DFUNCPROTO=15 |
|
340 |
endif |
|
341 |
||
342 |
ifeq ($(OPENJDK_TARGET_OS), linux) |
|
343 |
ifeq ($(DISABLE_XRENDER), true) |
|
344 |
LIBAWT_XAWT_CFLAGS += -DDISABLE_XRENDER_BY_DEFAULT=true |
|
345 |
endif |
|
346 |
endif |
|
347 |
||
348 |
ifeq ($(MILESTONE), internal) |
|
349 |
LIBAWT_XAWT_CFLAGS += -DINTERNAL_BUILD |
|
350 |
endif |
|
351 |
||
352 |
LIBAWT_XAWT_LDFLAGS_SUFFIX := $(LIBM) -lawt -lXext -lX11 -lXrender $(LIBDL) -lXtst -lXi -ljava -ljvm -lc |
|
353 |
||
354 |
ifeq ($(OPENJDK_TARGET_OS), linux) |
|
355 |
# To match old build, add this to LDFLAGS instead of suffix. |
|
356 |
LIBAWT_XAWT_LDFLAGS += -lpthread |
|
357 |
endif |
|
358 |
||
359 |
$(eval $(call SetupNativeCompilation,BUILD_LIBAWT_XAWT, \ |
|
360 |
LIBRARY := awt_xawt, \ |
|
361 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
|
362 |
SRC := $(LIBAWT_XAWT_DIRS), \ |
|
25859 | 363 |
EXCLUDES := $(LIBAWT_XAWT_EXCLUDES), \ |
20547 | 364 |
LANG := C, \ |
365 |
OPTIMIZATION := LOW, \ |
|
366 |
CFLAGS := $(CFLAGS_JDKLIB) $(LIBAWT_XAWT_CFLAGS) \ |
|
367 |
$(X_CFLAGS), \ |
|
21805 | 368 |
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libawt_xawt/mapfile-vers, \ |
20547 | 369 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
23592
35b16ae6b4f4
8038340: Cleanup and fix sysroot and devkit handling on Linux and Solaris
erikj
parents:
23310
diff
changeset
|
370 |
$(X_LIBS) $(LIBAWT_XAWT_LDFLAGS) \ |
20547 | 371 |
$(call SET_SHARED_LIBRARY_ORIGIN) \ |
372 |
$(call SET_SHARED_LIBRARY_ORIGIN,/..), \ |
|
373 |
LDFLAGS_SUFFIX := $(LIBAWT_XAWT_LDFLAGS_SUFFIX), \ |
|
25859 | 374 |
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \ |
20547 | 375 |
RC_FLAGS := $(RC_FLAGS) \ |
376 |
-D "JDK_FNAME=xawt.dll" \ |
|
377 |
-D "JDK_INTERNAL_NAME=xawt" \ |
|
378 |
-D "JDK_FTYPE=0x2L", \ |
|
379 |
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libawt_xawt, \ |
|
380 |
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES))) |
|
381 |
||
382 |
$(BUILD_LIBAWT_XAWT): $(BUILD_LIBJAVA) |
|
383 |
||
384 |
$(BUILD_LIBAWT_XAWT): $(BUILD_LIBAWT) |
|
385 |
||
25859 | 386 |
DESKTOP_LIBRARIES += $(BUILD_LIBAWT_XAWT) |
20547 | 387 |
|
388 |
endif |
|
389 |
endif |
|
390 |
||
391 |
########################################################################################## |
|
392 |
||
25859 | 393 |
LIBLCMS_SRC := $(JDK_TOPDIR)/src/java.desktop/share/native/liblcms |
394 |
LIBLCMS_CPPFLAGS += -I$(JDK_OUTPUTDIR)/gensrc_headers/java.desktop \ |
|
395 |
-I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/sun/java2d \ |
|
396 |
-I$(JDK_TOPDIR)/src/java.desktop/share/native/common/sun/awt/debug \ |
|
397 |
$(LIBJAVA_HEADER_FLAGS) \ |
|
398 |
# |
|
24540 | 399 |
|
400 |
ifeq ($(USE_EXTERNAL_LCMS), true) |
|
401 |
# If we're using an external library, we'll just need the wrapper part. |
|
402 |
# By including it explicitely, all other files will be excluded. |
|
403 |
BUILD_LIBLCMS_INCLUDE_FILES := LCMS.c |
|
404 |
else |
|
405 |
BUILD_LIBLCMS_INCLUDE_FILES := |
|
406 |
# If we're using the bundled library, we'll need to include it in the |
|
407 |
# include path explicitly. Otherwise the system headers will be used. |
|
25859 | 408 |
LIBLCMS_CPPFLAGS += $(addprefix -I, $(LIBLCMS_SRC)) |
24540 | 409 |
endif |
410 |
||
20547 | 411 |
$(eval $(call SetupNativeCompilation,BUILD_LIBLCMS, \ |
412 |
LIBRARY := lcms, \ |
|
413 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
|
25859 | 414 |
SRC := $(LIBLCMS_SRC), \ |
24540 | 415 |
INCLUDE_FILES := $(BUILD_LIBLCMS_INCLUDE_FILES), \ |
20547 | 416 |
LANG := C, \ |
417 |
OPTIMIZATION := HIGHEST, \ |
|
418 |
CFLAGS := $(filter-out -xc99=%none, $(CFLAGS_JDKLIB)) \ |
|
25859 | 419 |
$(SHARED_LIBRARY_FLAGS) $(LIBLCMS_CPPFLAGS) \ |
24540 | 420 |
$(LCMS_CFLAGS), \ |
20547 | 421 |
CFLAGS_solaris := -xc99=no_lib, \ |
422 |
CFLAGS_windows := -DCMS_IS_WINDOWS_, \ |
|
21805 | 423 |
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/liblcms/mapfile-vers, \ |
20547 | 424 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
425 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
|
426 |
LDFLAGS_solaris := /usr/lib$(OPENJDK_TARGET_CPU_ISADIR)/libm.so.2, \ |
|
427 |
LDFLAGS_windows := $(WIN_AWT_LIB) $(WIN_JAVA_LIB), \ |
|
24540 | 428 |
LDFLAGS_SUFFIX_solaris := -lawt -ljava -ljvm -lc $(LCMS_LIBS), \ |
429 |
LDFLAGS_SUFFIX_macosx := $(LIBM) -lawt -ljava -ljvm $(LCMS_LIBS), \ |
|
430 |
LDFLAGS_SUFFIX_linux := -lm -lawt -ljava -ljvm $(LCMS_LIBS), \ |
|
431 |
LDFLAGS_SUFFIX_aix := -lm -lawt -ljava -ljvm $(LCMS_LIBS),\ |
|
25859 | 432 |
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \ |
20547 | 433 |
RC_FLAGS := $(RC_FLAGS) \ |
434 |
-D "JDK_FNAME=lcms.dll" \ |
|
435 |
-D "JDK_INTERNAL_NAME=lcms" \ |
|
436 |
-D "JDK_FTYPE=0x2L", \ |
|
437 |
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/liblcms, \ |
|
438 |
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES))) |
|
439 |
||
25859 | 440 |
DESKTOP_LIBRARIES += $(BUILD_LIBLCMS) |
20547 | 441 |
|
442 |
$(BUILD_LIBLCMS): $(BUILD_LIBAWT) |
|
443 |
||
444 |
########################################################################################## |
|
445 |
||
446 |
ifdef OPENJDK |
|
25103 | 447 |
BUILD_LIBJAVAJPEG_MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjpeg/mapfile-vers |
20547 | 448 |
else |
25103 | 449 |
BUILD_LIBJAVAJPEG_MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjpeg/mapfile-vers-closed |
25859 | 450 |
LIBJAVAJPEG_SRC += $(JDK_TOPDIR)/src/closed/java.desktop/share/native/libjavajpeg |
20547 | 451 |
endif |
452 |
||
25859 | 453 |
LIBJAVAJPEG_SRC += $(JDK_TOPDIR)/src/java.desktop/share/native/libjavajpeg |
454 |
||
25103 | 455 |
BUILD_LIBJAVAJPEG_REORDER := |
13164 | 456 |
ifeq ($(OPENJDK_TARGET_OS), solaris) |
20547 | 457 |
ifneq ($(OPENJDK_TARGET_CPU), x86_64) |
25103 | 458 |
BUILD_LIBJAVAJPEG_REORDER := $(JDK_TOPDIR)/make/mapfiles/libjpeg/reorder-$(OPENJDK_TARGET_CPU) |
20547 | 459 |
endif |
460 |
endif |
|
461 |
||
25103 | 462 |
|
20547 | 463 |
# Suppress gcc warnings like "variable might be clobbered by 'longjmp' |
464 |
# or 'vfork'": this warning indicates that some variable is placed to |
|
465 |
# a register by optimized compiler and it's value might be lost on longjmp(). |
|
466 |
# Recommended way to avoid such warning is to declare the variable as |
|
467 |
# volatile to prevent the optimization. However, this approach does not |
|
468 |
# work because we have to declare all variables as volatile in result. |
|
469 |
#ifndef CROSS_COMPILE_ARCH |
|
470 |
# CC_43_OR_NEWER := \ |
|
471 |
# $(shell $(EXPR) $(CC_MAJORVER) \> 4 \| \ |
|
472 |
# \( $(CC_MAJORVER) = 4 \& $(CC_MINORVER) \>= 3 \) ) |
|
473 |
# ifeq ($(CC_43_OR_NEWER), 1) |
|
25103 | 474 |
# BUILD_LIBJAVAJPEG_CFLAGS_linux += -Wno-clobbered |
20547 | 475 |
# endif |
476 |
#endif |
|
477 |
||
25103 | 478 |
ifeq ($(USE_EXTERNAL_LIBJPEG), true) |
479 |
LIBJPEG_LIBS := -ljpeg |
|
480 |
BUILD_LIBJAVAJPEG_INCLUDE_FILES := \ |
|
481 |
imageIOJPEG.c \ |
|
482 |
jpegdecoder.c |
|
483 |
BUILD_LIBJAVAJPEG_HEADERS := |
|
484 |
else |
|
485 |
LIBJPEG_LIBS := |
|
486 |
BUILD_LIBJAVAJPEG_INCLUDE_FILES := |
|
25859 | 487 |
BUILD_LIBJAVAJPEG_HEADERS := $(addprefix -I, $(LIBJAVAJPEG_SRC)) |
25103 | 488 |
endif |
489 |
||
490 |
$(eval $(call SetupNativeCompilation,BUILD_LIBJAVAJPEG, \ |
|
491 |
LIBRARY := javajpeg, \ |
|
20547 | 492 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
25859 | 493 |
SRC := $(LIBJAVAJPEG_SRC), \ |
25103 | 494 |
INCLUDE_FILES := $(BUILD_LIBJAVAJPEG_INCLUDE_FILES), \ |
20547 | 495 |
LANG := C, \ |
496 |
OPTIMIZATION := HIGHEST, \ |
|
25859 | 497 |
CFLAGS := $(CFLAGS_JDKLIB) $(addprefix -I, $(LIBJAVAJPEG_SRC)) \ |
498 |
$(LIBJAVA_HEADER_FLAGS) \ |
|
499 |
-I$(JDK_OUTPUTDIR)/gensrc_headers/java.desktop, \ |
|
25103 | 500 |
MAPFILE := $(BUILD_LIBJAVAJPEG_MAPFILE), \ |
501 |
LDFLAGS := $(LDFLAGS_JDKLIB) $(LIBJPEG_LIBS) \ |
|
20547 | 502 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
503 |
LDFLAGS_windows := $(WIN_JAVA_LIB) jvm.lib, \ |
|
504 |
LDFLAGS_SUFFIX := $(LDFLAGS_JDKLIB_SUFFIX), \ |
|
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), \ |
25859 | 511 |
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjavajpeg, \ |
20547 | 512 |
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES))) |
513 |
||
25103 | 514 |
$(BUILD_LIBJAVAJPEG): $(BUILD_LIBJAVA) |
20547 | 515 |
|
25859 | 516 |
DESKTOP_LIBRARIES += $(BUILD_LIBJAVAJPEG) |
20547 | 517 |
|
518 |
########################################################################################## |
|
519 |
||
25859 | 520 |
LIBFONTMANAGER_SRC := $(JDK_TOPDIR)/src/java.desktop/share/native/libfontmanager \ |
521 |
$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/libfontmanager |
|
522 |
LIBFONTMANAGER_CFLAGS := \ |
|
523 |
$(addprefix -I, $(shell $(FIND) \ |
|
524 |
$(LIBFONTMANAGER_SRC) \ |
|
525 |
$(JDK_TOPDIR)/src/java.desktop/share/native/libawt \ |
|
526 |
$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/libawt \ |
|
527 |
$(JDK_TOPDIR)/src/java.desktop/share/native/common \ |
|
528 |
$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/common -type d)) \ |
|
529 |
-I$(JDK_OUTPUTDIR)/gensrc_headers/java.desktop \ |
|
530 |
$(LIBJAVA_HEADER_FLAGS) \ |
|
531 |
# |
|
532 |
||
20547 | 533 |
ifndef OPENJDK |
25859 | 534 |
LIBFONTMANAGER_CFLAGS += -I$(JDK_TOPDIR)/src/closed/java.desktop/share/native/libt2k |
21805 | 535 |
BUILD_LIBFONTMANAGER_MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libfontmanager/mapfile-vers |
20547 | 536 |
LIBFONTMANAGER_EXCLUDE_FILES += freetypeScaler.c |
537 |
else |
|
25859 | 538 |
LIBFONTMANAGER_CFLAGS += $(FREETYPE_CFLAGS) |
21805 | 539 |
BUILD_LIBFONTMANAGER_MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libfontmanager/mapfile-vers.openjdk |
20899 | 540 |
BUILD_LIBFONTMANAGER_FONTLIB := $(FREETYPE_LIBS) |
20547 | 541 |
endif |
542 |
||
543 |
LIBFONTMANAGER_OPTIMIZATION := HIGH |
|
544 |
||
545 |
ifeq ($(OPENJDK_TARGET_OS), windows) |
|
546 |
LIBFONTMANAGER_EXCLUDE_FILES += X11FontScaler.c \ |
|
547 |
X11TextRenderer.c |
|
548 |
LIBFONTMANAGER_OPTIMIZATION := HIGHEST |
|
25859 | 549 |
LIBFONTMANAGER_CFLAGS += -I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/libawt/sun/windows |
21130 | 550 |
else ifeq ($(OPENJDK_TARGET_OS), macosx) |
551 |
LIBFONTMANAGER_EXCLUDE_FILES += X11FontScaler.c \ |
|
552 |
X11TextRenderer.c \ |
|
553 |
fontpath.c \ |
|
554 |
lcdglyph.c |
|
20547 | 555 |
else |
556 |
LIBFONTMANAGER_EXCLUDE_FILES += fontpath.c \ |
|
557 |
lcdglyph.c |
|
558 |
endif |
|
559 |
||
25859 | 560 |
LIBFONTMANAGER_CFLAGS += $(FONT_HEADERS) $(X_CFLAGS) -DLE_STANDALONE -DHEADLESS |
20547 | 561 |
|
562 |
# Turn off aliasing with GCC for ExtensionSubtables.cpp |
|
563 |
ifeq ($(OPENJDK_TARGET_OS), linux) |
|
564 |
BUILD_LIBFONTMANAGER_ExtensionSubtables.cpp_CXXFLAGS := -fno-strict-aliasing |
|
565 |
endif |
|
566 |
||
24198
41b2f3e923b8
8042208: Build fails on Solaris using devkit when X isn't installed
erikj
parents:
23592
diff
changeset
|
567 |
# Libfontmanager doesn't actually need X_LIBS to link, but if building |
41b2f3e923b8
8042208: Build fails on Solaris using devkit when X isn't installed
erikj
parents:
23592
diff
changeset
|
568 |
# on a Solaris machine without X installed, using a devkit, linking |
41b2f3e923b8
8042208: Build fails on Solaris using devkit when X isn't installed
erikj
parents:
23592
diff
changeset
|
569 |
# to libawt_xawt will fail without the -L parameters from X_LIBS. Filter |
41b2f3e923b8
8042208: Build fails on Solaris using devkit when X isn't installed
erikj
parents:
23592
diff
changeset
|
570 |
# out the -R parameters since they aren't needed. |
20547 | 571 |
$(eval $(call SetupNativeCompilation,BUILD_LIBFONTMANAGER, \ |
572 |
LIBRARY := fontmanager, \ |
|
573 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
|
25859 | 574 |
SRC := $(LIBFONTMANAGER_SRC), \ |
20547 | 575 |
EXCLUDE_FILES := $(LIBFONTMANAGER_EXCLUDE_FILES) \ |
576 |
AccelGlyphCache.c, \ |
|
577 |
LANG := C++, \ |
|
25859 | 578 |
CFLAGS := $(CFLAGS_JDKLIB) $(LIBFONTMANAGER_CFLAGS), \ |
579 |
CXXFLAGS := $(CXXFLAGS_JDKLIB) $(LIBFONTMANAGER_CFLAGS), \ |
|
20547 | 580 |
OPTIMIZATION := $(LIBFONTMANAGER_OPTIMIZATION), \ |
25859 | 581 |
CFLAGS_windows = -DCC_NOEX, \ |
20547 | 582 |
MAPFILE := $(BUILD_LIBFONTMANAGER_MAPFILE), \ |
583 |
LDFLAGS := $(subst -Xlinker -z -Xlinker defs,,$(LDFLAGS_JDKLIB)) $(LDFLAGS_CXX_JDK) \ |
|
584 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
|
585 |
LDFLAGS_SUFFIX := $(BUILD_LIBFONTMANAGER_FONTLIB), \ |
|
586 |
LDFLAGS_SUFFIX_linux := -lawt $(LIBM) $(LIBCXX) -ljava -ljvm -lc, \ |
|
24198
41b2f3e923b8
8042208: Build fails on Solaris using devkit when X isn't installed
erikj
parents:
23592
diff
changeset
|
587 |
LDFLAGS_SUFFIX_solaris := $(filter-out -R%, $(X_LIBS)) \ |
41b2f3e923b8
8042208: Build fails on Solaris using devkit when X isn't installed
erikj
parents:
23592
diff
changeset
|
588 |
-lawt -lawt_xawt -lc $(LIBM) $(LIBCXX) -ljava -ljvm, \ |
22595
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
589 |
LDFLAGS_SUFFIX_aix := -lawt -lawt_xawt $(LIBM) $(LIBCXX) -ljava -ljvm,\ |
20547 | 590 |
LDFLAGS_SUFFIX_macosx := -lawt $(LIBM) $(LIBCXX) -undefined dynamic_lookup \ |
591 |
-ljava -ljvm, \ |
|
592 |
LDFLAGS_SUFFIX_windows := $(WIN_JAVA_LIB) advapi32.lib user32.lib gdi32.lib \ |
|
593 |
$(WIN_AWT_LIB), \ |
|
25859 | 594 |
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \ |
20547 | 595 |
RC_FLAGS := $(RC_FLAGS) \ |
596 |
-D "JDK_FNAME=fontmanager.dll" \ |
|
597 |
-D "JDK_INTERNAL_NAME=fontmanager" \ |
|
598 |
-D "JDK_FTYPE=0x2L", \ |
|
599 |
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libfontmanager, \ |
|
600 |
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES))) |
|
601 |
||
602 |
$(BUILD_LIBFONTMANAGER): $(BUILD_LIBAWT) |
|
603 |
||
22595
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
604 |
ifneq (, $(findstring $(OPENJDK_TARGET_OS), solaris aix)) |
20547 | 605 |
$(BUILD_LIBFONTMANAGER): $(BUILD_LIBAWT_XAWT) |
606 |
endif |
|
607 |
||
25859 | 608 |
DESKTOP_LIBRARIES += $(BUILD_LIBFONTMANAGER) |
20547 | 609 |
|
610 |
########################################################################################## |
|
611 |
||
612 |
ifndef OPENJDK |
|
613 |
||
25859 | 614 |
LIBT2K_SRC := $(JDK_TOPDIR)/src/closed/java.desktop/share/native/libt2k |
615 |
LIBT2K_CFLAGS := $(addprefix -I, $(LIBT2K_SRC)) \ |
|
616 |
-I$(JDK_TOPDIR)/src/closed/java.desktop/share/native/libt2k/t2k \ |
|
617 |
-I$(JDK_TOPDIR)/src/java.desktop/share/native/libfontmanager \ |
|
618 |
-I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/sun/java2d \ |
|
619 |
-I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/sun/java2d/loops \ |
|
620 |
-I$(JDK_TOPDIR)/src/java.desktop/share/native/common/sun/font \ |
|
621 |
-I$(JDK_TOPDIR)/src/java.base/share/native/libjava \ |
|
622 |
-I$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_API_DIR)/native/libjava \ |
|
623 |
-I$(JDK_OUTPUTDIR)/gensrc_headers/java.desktop \ |
|
20547 | 624 |
# |
625 |
||
626 |
$(eval $(call SetupNativeCompilation,BUILD_LIBT2K, \ |
|
627 |
LIBRARY := t2k, \ |
|
628 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
|
25859 | 629 |
SRC := $(LIBT2K_SRC), \ |
630 |
EXCLUDE_FILES := t2k/orion.c, \ |
|
20547 | 631 |
LANG := C++, \ |
632 |
OPTIMIZATION := HIGH, \ |
|
25859 | 633 |
CFLAGS := $(CFLAGS_JDKLIB) $(LIBT2K_CFLAGS), \ |
634 |
CXXFLAGS := $(CXXFLAGS_JDKLIB) $(LIBT2K_CFLAGS), \ |
|
20547 | 635 |
CFLAGS_windows = -DCC_NOEX, \ |
636 |
CXXFLAGS_windows = -DCC_NOEX, \ |
|
21805 | 637 |
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libt2k/mapfile-vers, \ |
20547 | 638 |
LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \ |
639 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
|
640 |
LDFLAGS_windows := user32.lib $(JDK_OUTPUTDIR)/objs/libfontmanager/fontmanager.lib, \ |
|
641 |
LDFLAGS_SUFFIX_posix := $(LIBM) $(LIBCXX) -lfontmanager -ljava -ljvm -lc, \ |
|
642 |
LDFLAGS_SUFFIX_solaris := -lawt -lawt_xawt, \ |
|
25859 | 643 |
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \ |
20547 | 644 |
RC_FLAGS := $(RC_FLAGS) \ |
645 |
-D "JDK_FNAME=t2k.dll" \ |
|
646 |
-D "JDK_INTERNAL_NAME=t2k" \ |
|
647 |
-D "JDK_FTYPE=0x2L", \ |
|
648 |
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libt2k, \ |
|
649 |
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES))) |
|
650 |
||
651 |
# t2k is linked against fontmanager |
|
652 |
$(BUILD_LIBT2K): $(BUILD_LIBFONTMANAGER) |
|
653 |
||
25859 | 654 |
DESKTOP_LIBRARIES += $(BUILD_LIBT2K) |
13164 | 655 |
endif |
656 |
||
20547 | 657 |
########################################################################################## |
658 |
||
659 |
ifeq ($(OPENJDK_TARGET_OS), windows) |
|
25859 | 660 |
LIBJAWT_SRC := $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/libjawt |
661 |
LIBJAWT_CFLAGS := -I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/libawt/sun/windows \ |
|
662 |
-I$(JDK_TOPDIR)/src/java.desktop/share/native/common/sun/awt/debug \ |
|
663 |
-I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/sun/java2d \ |
|
664 |
-I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/sun/awt/image/cvutils \ |
|
665 |
-I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/libawt/sun/java2d/windows \ |
|
666 |
-I$(JDK_OUTPUTDIR)/gensrc_headers/java.desktop \ |
|
667 |
-I$(JDK_TOPDIR)/src/java.desktop/windows/native/include \ |
|
668 |
-I$(JDK_TOPDIR)/src/java.desktop/share/native/include \ |
|
669 |
$(LIBJAVA_HEADER_FLAGS) \ |
|
670 |
# |
|
671 |
||
20547 | 672 |
ifeq ($(OPENJDK_TARGET_CPU), x86) |
673 |
KERNEL32_LIB := kernel32.lib |
|
674 |
endif |
|
675 |
$(eval $(call SetupNativeCompilation,BUILD_LIBJAWT, \ |
|
676 |
LIBRARY := jawt, \ |
|
677 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
|
25859 | 678 |
SRC := $(LIBJAWT_SRC), \ |
679 |
INCLUDE_FILES := $(LIBJAWT_INCLUDE_FILES), \ |
|
20547 | 680 |
LANG := C++, \ |
681 |
OPTIMIZATION := LOW, \ |
|
682 |
CFLAGS := $(CXXFLAGS_JDKLIB) \ |
|
683 |
-EHsc -DUNICODE -D_UNICODE \ |
|
25859 | 684 |
$(LIBJAWT_CFLAGS), \ |
20547 | 685 |
LDFLAGS := $(LDFLAGS_JDKLIB) $(KERNEL32_LIB) $(LDFLAGS_CXX_JDK) \ |
686 |
advapi32.lib $(WIN_AWT_LIB), \ |
|
687 |
LDFLAGS_SUFFIX := $(LDFLAGS_JDKLIB_SUFFIX), \ |
|
25859 | 688 |
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \ |
20547 | 689 |
RC_FLAGS := $(RC_FLAGS) \ |
690 |
-D "JDK_FNAME=jawt.dll" \ |
|
691 |
-D "JDK_INTERNAL_NAME=jawt" \ |
|
692 |
-D "JDK_FTYPE=0x2L", \ |
|
693 |
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjawt, \ |
|
694 |
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES))) |
|
695 |
||
696 |
$(BUILD_LIBJAWT): $(BUILD_LIBAWT) |
|
697 |
||
698 |
$(JDK_OUTPUTDIR)/lib/$(LIBRARY_PREFIX)jawt$(STATIC_LIBRARY_SUFFIX): $(BUILD_LIBJAWT) |
|
699 |
$(ECHO) Copying $(@F) |
|
700 |
$(CP) $(JDK_OUTPUTDIR)/objs/libjawt/$(LIBRARY_PREFIX)jawt$(STATIC_LIBRARY_SUFFIX) $@ |
|
701 |
||
25859 | 702 |
DESKTOP_LIBRARIES += $(JDK_OUTPUTDIR)/lib/$(LIBRARY_PREFIX)jawt$(STATIC_LIBRARY_SUFFIX) |
20547 | 703 |
|
704 |
else # OPENJDK_TARGET_OS not windows |
|
705 |
||
706 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
25859 | 707 |
LIBJAWT_SRC := $(JDK_TOPDIR)/src/java.desktop/macosx/native/libjawt |
708 |
else |
|
709 |
LIBJAWT_SRC := $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/libjawt |
|
710 |
endif |
|
711 |
LIBJAWT_CFLAGS := \ |
|
712 |
-I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/common/sun/awt \ |
|
713 |
-I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS)/native/include \ |
|
714 |
-I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/include \ |
|
715 |
-I$(JDK_TOPDIR)/src/java.desktop/share/native/include \ |
|
716 |
$(LIBJAVA_HEADER_FLAGS) \ |
|
717 |
# |
|
718 |
||
719 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
20547 | 720 |
JAWT_LIBS := -lawt_lwawt |
21130 | 721 |
else |
722 |
JAWT_LIBS := |
|
723 |
ifneq ($(OPENJDK_TARGET_OS), solaris) |
|
724 |
JAWT_LIBS += -lawt |
|
725 |
endif |
|
726 |
ifndef BUILD_HEADLESS_ONLY |
|
727 |
JAWT_LIBS += -lawt_xawt |
|
728 |
else |
|
729 |
JAWT_LIBS += -lawt_headless |
|
730 |
HEADLESS_CFLAG += -DHEADLESS |
|
731 |
endif |
|
20547 | 732 |
endif |
733 |
||
734 |
$(eval $(call SetupNativeCompilation,BUILD_LIBJAWT, \ |
|
735 |
LIBRARY := jawt, \ |
|
736 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
|
25859 | 737 |
SRC := $(LIBJAWT_SRC), \ |
20547 | 738 |
INCLUDE_FILES := $(JAWT_FILES), \ |
739 |
LANG := C, \ |
|
740 |
OPTIMIZATION := LOW, \ |
|
25859 | 741 |
CFLAGS := $(CFLAGS_JDKLIB) \ |
742 |
$(LIBJAWT_CFLAGS), \ |
|
20547 | 743 |
CFLAGS_linux := $(HEADLESS_CFLAG), \ |
25859 | 744 |
CFLAGS_macosx := $(LIBJAWT_CFLAGS_macosx), \ |
21805 | 745 |
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjawt/mapfile-vers, \ |
20547 | 746 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
747 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
|
23592
35b16ae6b4f4
8038340: Cleanup and fix sysroot and devkit handling on Linux and Solaris
erikj
parents:
23310
diff
changeset
|
748 |
LDFLAGS_solaris := $(X_LIBS), \ |
20547 | 749 |
LDFLAGS_SUFFIX_linux := $(JAWT_LIBS) $(LDFLAGS_JDKLIB_SUFFIX), \ |
22595
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
750 |
LDFLAGS_SUFFIX_aix := $(JAWT_LIBS) $(LDFLAGS_JDKLIB_SUFFIX),\ |
20547 | 751 |
LDFLAGS_SUFFIX_solaris := $(JAWT_LIBS) $(LDFLAGS_JDKLIB_SUFFIX) -lXrender, \ |
752 |
LDFLAGS_SUFFIX_macosx := -Xlinker -rpath -Xlinker @loader_path $(JAWT_LIBS) \ |
|
753 |
-framework Cocoa $(LDFLAGS_JDKLIB_SUFFIX), \ |
|
754 |
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjawt, \ |
|
755 |
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES))) |
|
756 |
||
757 |
ifndef BUILD_HEADLESS_ONLY |
|
758 |
$(BUILD_LIBJAWT): $(BUILD_LIBAWT_XAWT) |
|
759 |
else |
|
760 |
$(BUILD_LIBJAWT): $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)awt_headless$(SHARED_LIBRARY_SUFFIX) |
|
761 |
endif |
|
762 |
||
763 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
764 |
$(BUILD_LIBJAWT): $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)awt_lwawt$(SHARED_LIBRARY_SUFFIX) |
|
765 |
endif |
|
766 |
||
767 |
endif # OPENJDK_TARGET_OS |
|
768 |
||
25859 | 769 |
DESKTOP_LIBRARIES += $(BUILD_LIBJAWT) |
20547 | 770 |
|
771 |
########################################################################################## |
|
772 |
||
773 |
ifndef OPENJDK |
|
774 |
||
25859 | 775 |
LIBKCMS_SRC := $(JDK_TOPDIR)/src/closed/java.desktop/share/native/libkcms \ |
776 |
$(JDK_TOPDIR)/src/closed/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/libkcms \ |
|
777 |
# |
|
778 |
LIBKCMS_CFLAGS += $(addprefix -I, $(LIBKCMS_SRC)) \ |
|
779 |
-I$(JDK_TOPDIR)/src/java.base/share/native/libjava \ |
|
780 |
-I$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_API_DIR)/native/libjava \ |
|
781 |
-I$(JDK_OUTPUTDIR)/gensrc_headers/java.desktop \ |
|
782 |
# |
|
783 |
LIBKCMS_VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/closed/java.desktop/windows/native/libkcms/cmm.rc |
|
20547 | 784 |
|
25859 | 785 |
LIBKCMS_CFLAGS += $(CFLAGS_JDKLIB) |
20547 | 786 |
|
787 |
ifeq ($(OPENJDK_TARGET_OS), solaris) |
|
788 |
# This particular library uses a feature called PIC_CODE_SMALL (on solaris) |
|
789 |
# implement it like this...since it's only used here |
|
25859 | 790 |
LIBKCMS_CFLAGS := $(patsubst -KPIC, -Kpic, $(LIBKCMS_CFLAGS)) |
20547 | 791 |
else ifeq ($(OPENJDK_TARGET_CPU_ARCH), ppc) |
25859 | 792 |
LIBKCMS_CFLAGS := $(patsubst -fPIC, -fpic, $(LIBKCMS_CFLAGS)) |
20547 | 793 |
endif |
794 |
||
795 |
$(eval $(call SetupNativeCompilation,BUILD_LIBKCMS, \ |
|
796 |
LIBRARY := kcms, \ |
|
797 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
|
25859 | 798 |
SRC := $(LIBKCMS_SRC), \ |
20547 | 799 |
LANG := C, \ |
800 |
EXCLUDE_FILES := $(BUILD_LIBKCMS_EXCLUDE_FILES), \ |
|
801 |
OPTIMIZATION := LOW, \ |
|
25859 | 802 |
CFLAGS := $(LIBKCMS_CFLAGS) \ |
20547 | 803 |
-DJAVACMM -DFUT_CALC_EX -DNO_FUT_GCONST, \ |
804 |
CFLAGS_linux := -Wno-missing-field-initializers, \ |
|
21805 | 805 |
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libkcms/mapfile-vers, \ |
20547 | 806 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
807 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
|
808 |
LDFLAGS_SUFFIX_linux := -lc -lpthread, \ |
|
809 |
LDFLAGS_SUFFIX_solaris := -lc, \ |
|
810 |
LDFLAGS_SUFFIX_windows := $(WIN_JAVA_LIB) advapi32.lib user32.lib version.lib, \ |
|
811 |
LDFLAGS_SUFFIX_posix := -lm -ljava -ljvm, \ |
|
25859 | 812 |
VERSIONINFO_RESOURCE := $(LIBKCMS_VERSIONINFO_RESOURCE), \ |
20547 | 813 |
RC_FLAGS := $(RC_FLAGS) \ |
814 |
-D "JDK_FNAME=kcms.dll" \ |
|
815 |
-D "JDK_INTERNAL_NAME=kcms" \ |
|
816 |
-D "JDK_FTYPE=0x2L", \ |
|
817 |
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libkcms, \ |
|
818 |
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES))) |
|
819 |
||
820 |
$(BUILD_LIBKCMS): $(BUILD_LIBJAVA) |
|
821 |
||
25859 | 822 |
DESKTOP_LIBRARIES += $(BUILD_LIBKCMS) |
12892 | 823 |
|
824 |
endif |
|
825 |
||
826 |
########################################################################################## |
|
827 |
||
828 |
ifndef OPENJDK |
|
20547 | 829 |
ifeq ($(OPENJDK_TARGET_OS), solaris) |
830 |
ifneq ($(OPENJDK_TARGET_CPU), x86_64) |
|
831 |
||
832 |
ifeq ($(shell if test "$(OS_VERSION_MAJOR)" -eq 5 -a "$(OS_VERSION_MINOR)" -le 10; then $(ECHO) ok; fi), ok) |
|
833 |
||
834 |
SUNWJDGA_MAPFILE := |
|
835 |
ifeq ($(OPENJDK_TARGET_CPU_ARCH), sparc) |
|
21805 | 836 |
SUNWJDGA_MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjdga/mapfile-vers |
20547 | 837 |
endif |
838 |
||
839 |
$(eval $(call SetupNativeCompilation,BUILD_LIBSUNWJDGA, \ |
|
840 |
LIBRARY := sunwjdga, \ |
|
841 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
|
25859 | 842 |
SRC := $(JDK_TOPDIR)/src/java.desktop/unix/native/libsunwjdga, \ |
20547 | 843 |
LANG := C, \ |
844 |
OPTIMIZATION := LOW, \ |
|
845 |
CFLAGS := $(CFLAGS_JDKLIB) \ |
|
846 |
-I$(JDK_TOPDIR)/src/share/javavm/export \ |
|
847 |
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/javavm/export \ |
|
23592
35b16ae6b4f4
8038340: Cleanup and fix sysroot and devkit handling on Linux and Solaris
erikj
parents:
23310
diff
changeset
|
848 |
$(X_CFLAGS), \ |
20547 | 849 |
MAPFILE := $(SUNWJDGA_MAPFILE), \ |
850 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
|
851 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
|
23592
35b16ae6b4f4
8038340: Cleanup and fix sysroot and devkit handling on Linux and Solaris
erikj
parents:
23310
diff
changeset
|
852 |
LDFLAGS_SUFFIX := $(X_LIBS) -ldga -lX11 $(LIBDL) -lc, \ |
20547 | 853 |
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libsunwjdga, \ |
854 |
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES))) |
|
855 |
||
25859 | 856 |
DESKTOP_LIBRARIES += $(BUILD_LIBSUNWJDGA) |
20547 | 857 |
|
858 |
endif |
|
859 |
endif |
|
17957
1a51992c6097
8010785: JDK 8 build on Linux fails with new build mechanism
erikj
parents:
17735
diff
changeset
|
860 |
endif |
12892 | 861 |
endif |
862 |
||
863 |
########################################################################################## |
|
864 |
||
20547 | 865 |
ifeq ($(BUILD_HEADLESS), true) |
21130 | 866 |
# Mac and Windows only use the native AWT lib, do not build libawt_headless |
867 |
ifeq ($(findstring $(OPENJDK_TARGET_OS), windows macosx),) |
|
20547 | 868 |
|
25859 | 869 |
LIBAWT_HEADLESS_DIRS := $(JDK_TOPDIR)/src/java.desktop/unix/native/libawt_headless/sun/awt \ |
870 |
$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/common/sun/awt \ |
|
871 |
$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/common/sun/java2d/opengl \ |
|
872 |
$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/common/sun/java2d/x11 \ |
|
873 |
$(JDK_TOPDIR)/src/java.desktop/share/native/common/sun/java2d/opengl \ |
|
874 |
$(JDK_TOPDIR)/src/java.desktop/share/native/common/sun/font \ |
|
875 |
# |
|
20547 | 876 |
|
25859 | 877 |
LIBAWT_HEADLESS_EXCLUDES := medialib |
878 |
LIBAWT_HEADLESS_CFLAGS := -I$(JDK_OUTPUTDIR)/gensrc_headers/java.desktop \ |
|
879 |
$(addprefix -I, $(LIBAWT_HEADLESS_DIRS)) \ |
|
880 |
-I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/sun/java2d \ |
|
881 |
-I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/sun/java2d/loops \ |
|
882 |
-I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/sun/awt/image/cvutils \ |
|
883 |
-I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/sun/java2d/pipe \ |
|
884 |
-I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/sun/awt/image \ |
|
885 |
-I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/libawt/sun/java2d \ |
|
886 |
-I$(JDK_TOPDIR)/src/java.desktop/share/native/common/sun/font \ |
|
887 |
-I$(JDK_TOPDIR)/src/java.desktop/share/native/common/sun/awt/debug \ |
|
888 |
-I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/common/sun/font \ |
|
889 |
-I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/libsunwjdga/ \ |
|
890 |
$(LIBJAVA_HEADER_FLAGS) \ |
|
891 |
# |
|
892 |
LIBAWT_HEADLESS_EXFILES := initIDs.c |
|
12892 | 893 |
|
20547 | 894 |
LIBAWT_HEADLESS_REORDER := |
895 |
ifeq ($(OPENJDK_TARGET_OS), solaris) |
|
896 |
ifneq ($(OPENJDK_TARGET_CPU), x86_64) |
|
21805 | 897 |
LIBAWT_HEADLESS_REORDER := $(JDK_TOPDIR)/make/mapfiles/libawt_headless/reorder-$(OPENJDK_TARGET_CPU) |
20547 | 898 |
endif |
899 |
endif |
|
900 |
||
901 |
$(eval $(call SetupNativeCompilation,BUILD_LIBAWT_HEADLESS, \ |
|
902 |
LIBRARY := awt_headless, \ |
|
903 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
|
904 |
SRC := $(LIBAWT_HEADLESS_DIRS), \ |
|
25859 | 905 |
EXCLUDE_FILES := $(LIBAWT_HEADLESS_EXFILES), \ |
906 |
EXCLUDES := $(LIBAWT_HEADLESS_EXCLUDES), \ |
|
20547 | 907 |
LANG := C, \ |
908 |
OPTIMIZATION := LOW, \ |
|
25859 | 909 |
CFLAGS := $(CFLAGS_JDKLIB) \ |
910 |
-DHEADLESS=true \ |
|
911 |
-DPACKAGE_PATH=\"$(PACKAGE_PATH)\" \ |
|
912 |
$(CUPS_CFLAGS) \ |
|
913 |
$(X_CFLAGS) \ |
|
914 |
$(LIBAWT_HEADLESS_CFLAGS), \ |
|
21805 | 915 |
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libawt_headless/mapfile-vers, \ |
20547 | 916 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
917 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
|
918 |
LDFLAGS_linux := $(call SET_SHARED_LIBRARY_ORIGIN,/..), \ |
|
23592
35b16ae6b4f4
8038340: Cleanup and fix sysroot and devkit handling on Linux and Solaris
erikj
parents:
23310
diff
changeset
|
919 |
LDFLAGS_solaris := $(call SET_SHARED_LIBRARY_ORIGIN,/..), \ |
20547 | 920 |
LDFLAGS_macosx := $(call SET_SHARED_LIBRARY_ORIGIN)., \ |
921 |
REORDER := $(LIBAWT_HEADLESS_REORDER), \ |
|
922 |
LDFLAGS_SUFFIX_linux := -ljvm -lawt -lm $(LIBDL) -ljava, \ |
|
22595
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
923 |
LDFLAGS_SUFFIX_aix := -ljvm -lawt -ljava,\ |
20547 | 924 |
LDFLAGS_SUFFIX_solaris := $(LIBDL) -ljvm -lawt -lm -ljava $(LIBCXX) -lc, \ |
925 |
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libawt_headless, \ |
|
926 |
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES))) |
|
927 |
||
928 |
$(BUILD_LIBAWT_HEADLESS): $(BUILD_LIBAWT) |
|
929 |
||
25859 | 930 |
DESKTOP_LIBRARIES += $(BUILD_LIBAWT_HEADLESS) |
20547 | 931 |
|
932 |
endif |
|
933 |
endif |
|
934 |
||
935 |
########################################################################################## |
|
936 |
||
937 |
ifndef BUILD_HEADLESS_ONLY |
|
25859 | 938 |
|
20547 | 939 |
LIBSPLASHSCREEN_DIRS := \ |
25859 | 940 |
$(JDK_TOPDIR)/src/java.desktop/share/native/libjavajpeg \ |
941 |
$(JDK_TOPDIR)/src/java.desktop/share/native/libsplashscreen \ |
|
942 |
# |
|
20547 | 943 |
|
944 |
ifeq ($(USE_EXTERNAL_LIBGIF), true) |
|
945 |
GIFLIB_LDFLAGS := -lgif |
|
25859 | 946 |
LIBSPLASHSCREEN_EXCLUDES := giflib |
20547 | 947 |
else |
25859 | 948 |
LIBSPLASHSCREEN_CFLAGS += -I$(JDK_TOPDIR)/src/java.desktop/share/native/libsplashscreen/giflib |
20547 | 949 |
endif |
950 |
||
25103 | 951 |
ifeq ($(USE_EXTERNAL_LIBJPEG), true) |
952 |
LIBJPEG_LDFLAGS := -ljpeg |
|
953 |
else |
|
25859 | 954 |
LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/java.desktop/share/native/libjavajpeg |
955 |
LIBJPEG_CFLAGS := -I$(JDK_TOPDIR)/src/java.desktop/share/native/libjavajpeg |
|
25103 | 956 |
endif |
957 |
||
23305 | 958 |
ifeq ($(USE_EXTERNAL_LIBPNG), false) |
25859 | 959 |
LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/java.desktop/share/native/libsplashscreen/libpng |
960 |
else |
|
961 |
LIBSPLASHSCREEN_EXCLUDES += libpng |
|
23305 | 962 |
endif |
963 |
||
20547 | 964 |
ifneq ($(OPENJDK_TARGET_OS), macosx) |
25859 | 965 |
LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/libsplashscreen |
20547 | 966 |
else |
25859 | 967 |
LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/java.desktop/macosx/native/libsplashscreen |
20547 | 968 |
endif |
969 |
||
25859 | 970 |
LIBSPLASHSCREEN_CFLAGS += -DSPLASHSCREEN -DPNG_NO_MMX_CODE \ |
971 |
$(addprefix -I, $(LIBSPLASHSCREEN_DIRS)) \ |
|
972 |
$(LIBJAVA_HEADER_FLAGS) \ |
|
973 |
# |
|
20547 | 974 |
|
975 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
25859 | 976 |
LIBSPLASHSCREEN_CFLAGS += -F/System/Library/Frameworks/JavaVM.framework/Frameworks |
20547 | 977 |
LIBSPLASHSCREEN_CFLAGS += -DWITH_MACOSX |
25859 | 978 |
LIBSPLASHSCREEN_CFLAGS += -I$(JDK_TOPDIR)/src/java.desktop/macosx/native/libosxapp |
20547 | 979 |
|
25859 | 980 |
BUILD_LIBSPLASHSCREEN_java_awt_SplashScreen.c_CFLAGS := -x objective-c -O0 |
981 |
BUILD_LIBSPLASHSCREEN_splashscreen_gfx_impl.c_CFLAGS := -x objective-c -O0 |
|
982 |
BUILD_LIBSPLASHSCREEN_splashscreen_gif.c_CFLAGS := -x objective-c -O0 |
|
983 |
BUILD_LIBSPLASHSCREEN_splashscreen_impl.c_CFLAGS := -x objective-c -O0 |
|
984 |
BUILD_LIBSPLASHSCREEN_splashscreen_jpeg.c_CFLAGS := -x objective-c -O0 |
|
985 |
BUILD_LIBSPLASHSCREEN_splashscreen_png.c_CFLAGS := -x objective-c -O0 |
|
986 |
BUILD_LIBSPLASHSCREEN_splashscreen_sys.m_CFLAGS := -O0 |
|
20547 | 987 |
|
20901
70f69e624fc9
8026888: Licensee build failure due to wrong libs being called
erikj
parents:
20899
diff
changeset
|
988 |
else ifeq ($(OPENJDK_TARGET_OS), windows) |
70f69e624fc9
8026888: Licensee build failure due to wrong libs being called
erikj
parents:
20899
diff
changeset
|
989 |
LIBSPLASHSCREEN_CFLAGS += -DWITH_WIN32 |
20547 | 990 |
else |
20901
70f69e624fc9
8026888: Licensee build failure due to wrong libs being called
erikj
parents:
20899
diff
changeset
|
991 |
LIBSPLASHSCREEN_CFLAGS += -DWITH_X11 $(X_CFLAGS) |
20547 | 992 |
endif |
993 |
||
994 |
LIBSPLASHSCREEN_LDFLAGS_SUFFIX := |
|
995 |
||
996 |
ifneq ($(USE_EXTERNAL_LIBZ), true) |
|
25859 | 997 |
LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/java.base/share/native/libzip/zlib-1.2.8 |
20547 | 998 |
LIBSPLASHSCREEN_CFLAGS += $(ZLIB_CPPFLAGS) |
999 |
endif |
|
1000 |
||
1001 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
1002 |
LIBSPLASHSCREEN_LDFLAGS_SUFFIX += $(LIBM) -lpthread -liconv -losxapp \ |
|
1003 |
-framework ApplicationServices \ |
|
1004 |
-framework Foundation \ |
|
1005 |
-framework Cocoa \ |
|
1006 |
-framework JavaNativeFoundation |
|
20901
70f69e624fc9
8026888: Licensee build failure due to wrong libs being called
erikj
parents:
20899
diff
changeset
|
1007 |
else ifeq ($(OPENJDK_TARGET_OS), windows) |
70f69e624fc9
8026888: Licensee build failure due to wrong libs being called
erikj
parents:
20899
diff
changeset
|
1008 |
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
|
1009 |
else |
20901
70f69e624fc9
8026888: Licensee build failure due to wrong libs being called
erikj
parents:
20899
diff
changeset
|
1010 |
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
|
1011 |
endif |
20547 | 1012 |
|
25859 | 1013 |
$(eval $(call SetupNativeCompilation,BUILD_LIBSPLASHSCREEN, \ |
20547 | 1014 |
LIBRARY := splashscreen, \ |
1015 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
|
1016 |
SRC := $(LIBSPLASHSCREEN_DIRS), \ |
|
1017 |
EXCLUDE_FILES := imageioJPEG.c jpegdecoder.c pngtest.c, \ |
|
25859 | 1018 |
EXCLUDES := $(LIBSPLASHSCREEN_EXCLUDES), \ |
20547 | 1019 |
LANG := C, \ |
1020 |
OPTIMIZATION := LOW, \ |
|
23305 | 1021 |
CFLAGS := $(LIBSPLASHSCREEN_CFLAGS) $(CFLAGS_JDKLIB) \ |
25103 | 1022 |
$(GIFLIB_CFLAGS) $(LIBJPEG_CFLAGS) $(PNG_CFLAGS), \ |
21805 | 1023 |
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libsplashscreen/mapfile-vers, \ |
20547 | 1024 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
1025 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
|
23305 | 1026 |
LDFLAGS_SUFFIX := $(LIBSPLASHSCREEN_LDFLAGS_SUFFIX) $(LIBZ) \ |
25103 | 1027 |
$(GIFLIB_LDFLAGS) $(LIBJPEG_LDFLAGS) $(PNG_LIBS), \ |
20547 | 1028 |
LDFLAGS_SUFFIX_solaris := -lc, \ |
25859 | 1029 |
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \ |
20547 | 1030 |
RC_FLAGS := $(RC_FLAGS) \ |
1031 |
-D "JDK_FNAME=splashscreen.dll" \ |
|
1032 |
-D "JDK_INTERNAL_NAME=splashscreen" \ |
|
1033 |
-D "JDK_FTYPE=0x2L", \ |
|
1034 |
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libsplashscreen, \ |
|
1035 |
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES))) |
|
1036 |
||
25859 | 1037 |
DESKTOP_LIBRARIES += $(BUILD_LIBSPLASHSCREEN) |
20547 | 1038 |
|
1039 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
25859 | 1040 |
$(BUILD_LIBSPLASHSCREEN): $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)osxapp$(SHARED_LIBRARY_SUFFIX) |
20547 | 1041 |
endif |
1042 |
||
1043 |
endif |
|
1044 |
||
1045 |
########################################################################################## |
|
1046 |
||
1047 |
ifndef OPENJDK |
|
1048 |
||
25859 | 1049 |
LIBDCPR_SRC_DIRS := $(JDK_TOPDIR)/src/closed/java.desktop/share/native/libdcpr |
1050 |
LIBDCPR_CFLAGS := $(addprefix -I, $(shell $(FIND) $(LIBDCPR_SRC_DIRS) -type d)) \ |
|
1051 |
-I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/sun/java2d/pipe \ |
|
1052 |
-I$(JDK_TOPDIR)/src/java.base/share/native/libjava \ |
|
1053 |
-I$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_API_DIR)/native/libjava \ |
|
1054 |
-I$(JDK_OUTPUTDIR)/gensrc_headers/java.desktop \ |
|
1055 |
# |
|
20547 | 1056 |
|
1057 |
$(eval $(call SetupNativeCompilation,BUILD_LIBDCPR, \ |
|
1058 |
LIBRARY := dcpr, \ |
|
1059 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
|
1060 |
SRC := $(LIBDCPR_SRC_DIRS), \ |
|
1061 |
LANG := C, \ |
|
1062 |
OPTIMIZATION := LOW, \ |
|
1063 |
CFLAGS := $(CFLAGS_JDKLIB) \ |
|
1064 |
$(LIBDCPR_CFLAGS), \ |
|
21805 | 1065 |
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libdcpr/mapfile-vers, \ |
20547 | 1066 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
1067 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
|
1068 |
LDFLAGS_SUFFIX := $(LIBM) $(LDFLAGS_JDKLIB_SUFFIX), \ |
|
23291 | 1069 |
LDFLAGS_SUFFIX_windows := $(WIN_JAVA_LIB), \ |
20547 | 1070 |
LDFLAGS_SUFFIX_posix := -lm, \ |
25859 | 1071 |
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \ |
20547 | 1072 |
RC_FLAGS := $(RC_FLAGS) \ |
1073 |
-D "JDK_FNAME=dcpr.dll" \ |
|
1074 |
-D "JDK_INTERNAL_NAME=dcpr" \ |
|
1075 |
-D "JDK_FTYPE=0x2L", \ |
|
1076 |
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libdcpr, \ |
|
1077 |
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES))) |
|
1078 |
||
1079 |
$(BUILD_LIBDCPR): $(BUILD_LIBJAVA) |
|
1080 |
||
25859 | 1081 |
DESKTOP_LIBRARIES += $(BUILD_LIBDCPR) |
20547 | 1082 |
|
1083 |
endif |
|
1084 |
||
1085 |
########################################################################################## |
|
1086 |
||
1087 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
1088 |
||
25859 | 1089 |
LIBAWT_LWAWT_DIRS := \ |
1090 |
$(JDK_TOPDIR)/src/java.desktop/macosx/native/libawt_lwawt \ |
|
1091 |
$(JDK_TOPDIR)/src/java.desktop/unix/native/common/sun/awt \ |
|
1092 |
$(JDK_TOPDIR)/src/java.desktop/share/native/common/sun/font \ |
|
1093 |
$(JDK_TOPDIR)/src/java.desktop/share/native/common/sun/java2d/opengl \ |
|
1094 |
# |
|
20547 | 1095 |
|
25859 | 1096 |
LIBAWT_LWAWT_CFLAGS := \ |
1097 |
$(addprefix -I, $(LIBAWT_LWAWT_DIRS)) \ |
|
1098 |
-I$(JDK_OUTPUTDIR)/gensrc_headers/java.desktop \ |
|
1099 |
-I$(JDK_TOPDIR)/src/java.desktop/macosx/native/include \ |
|
1100 |
-I$(JDK_TOPDIR)/src/java.desktop/share/native/include \ |
|
1101 |
-I$(JDK_TOPDIR)/src/java.desktop/macosx/native/libawt_lwawt/sun/java2d/opengl \ |
|
1102 |
-I$(JDK_TOPDIR)/src/java.desktop/macosx/native/libawt_lwawt/sun/awt \ |
|
1103 |
-I$(JDK_TOPDIR)/src/java.desktop/unix/native/libawt_xawt/sun/awt \ |
|
1104 |
-I$(JDK_TOPDIR)/src/java.desktop/macosx/native/libawt_lwawt/sun/font \ |
|
1105 |
-I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/sun/awt/image \ |
|
1106 |
-I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/sun/java2d \ |
|
1107 |
-I$(JDK_TOPDIR)/src/java.desktop/unix/native/libawt/sun/java2d \ |
|
1108 |
-I$(JDK_TOPDIR)/src/java.desktop/share/native/libmlib_image/ \ |
|
1109 |
-I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/sun/awt/image/cvutils \ |
|
1110 |
-I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/sun/java2d/loops \ |
|
1111 |
-I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/sun/java2d/pipe \ |
|
1112 |
-I$(JDK_TOPDIR)/src/java.desktop/share/native/common/sun/awt/debug \ |
|
1113 |
-I$(JDK_TOPDIR)/src/java.desktop/macosx/native/libosxapp \ |
|
1114 |
$(LIBJAVA_HEADER_FLAGS) \ |
|
1115 |
# |
|
20547 | 1116 |
|
25859 | 1117 |
LIBAWT_LWAWT_EXFILES := fontpath.c awt_Font.c X11Color.c initIDs.c |
1118 |
LIBAWT_LWAWT_EXCLUDES := $(JDK_TOPDIR)/src/java.desktop/unix/native/common/sun/awt/medialib |
|
20547 | 1119 |
|
1120 |
$(eval $(call SetupNativeCompilation,BUILD_LIBAWT_LWAWT, \ |
|
1121 |
LIBRARY := awt_lwawt, \ |
|
1122 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
|
1123 |
SRC := $(LIBAWT_LWAWT_DIRS), \ |
|
1124 |
LANG := C, \ |
|
1125 |
INCLUDE_FILES := $(LIBAWT_LWAWT_FILES), \ |
|
25859 | 1126 |
EXCLUDE_FILES := $(LIBAWT_LWAWT_EXFILES), \ |
1127 |
EXCLUDES := $(LIBAWT_LWAWT_EXCLUDES), \ |
|
20547 | 1128 |
OPTIMIZATION := LOW, \ |
1129 |
CFLAGS := $(CFLAGS_JDKLIB) \ |
|
20901
70f69e624fc9
8026888: Licensee build failure due to wrong libs being called
erikj
parents:
20899
diff
changeset
|
1130 |
$(X_CFLAGS) \ |
70f69e624fc9
8026888: Licensee build failure due to wrong libs being called
erikj
parents:
20899
diff
changeset
|
1131 |
$(X_LIBS) \ |
25859 | 1132 |
$(LIBAWT_LWAWT_CFLAGS), \ |
20547 | 1133 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
1134 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
|
1135 |
LDFLAGS_SUFFIX_macosx := -lawt -lmlib_image -losxapp -ljvm $(LIBM) \ |
|
1136 |
-framework Accelerate \ |
|
1137 |
-framework ApplicationServices \ |
|
1138 |
-framework AudioToolbox \ |
|
1139 |
-framework Carbon \ |
|
1140 |
-framework Cocoa \ |
|
1141 |
-framework Security \ |
|
1142 |
-framework ExceptionHandling \ |
|
1143 |
-framework JavaNativeFoundation \ |
|
1144 |
-framework JavaRuntimeSupport \ |
|
1145 |
-framework OpenGL \ |
|
1146 |
-framework QuartzCore -ljava, \ |
|
1147 |
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libawt_lwawt, \ |
|
1148 |
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES))) |
|
1149 |
||
25859 | 1150 |
DESKTOP_LIBRARIES += $(BUILD_LIBAWT_LWAWT) |
20547 | 1151 |
|
1152 |
$(BUILD_LIBAWT_LWAWT): $(BUILD_LIBAWT) |
|
1153 |
||
1154 |
$(BUILD_LIBAWT_LWAWT): $(BUILD_LIBMLIB_IMAGE) |
|
1155 |
||
1156 |
$(BUILD_LIBAWT_LWAWT): $(BUILD_LIBOSXAPP) |
|
1157 |
||
1158 |
$(BUILD_LIBAWT_LWAWT): $(BUILD_LIBJAVA) |
|
1159 |
||
1160 |
endif |
|
1161 |
||
1162 |
########################################################################################## |
|
1163 |
||
1164 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
1165 |
||
1166 |
$(eval $(call SetupNativeCompilation,BUILD_LIBOSXUI, \ |
|
1167 |
LIBRARY := osxui, \ |
|
1168 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
|
25859 | 1169 |
SRC := $(JDK_TOPDIR)/src/java.desktop/macosx/native/libosxui, \ |
20547 | 1170 |
LANG := C, \ |
1171 |
OPTIMIZATION := LOW, \ |
|
1172 |
CFLAGS := $(CFLAGS_JDKLIB) \ |
|
25859 | 1173 |
-I$(JDK_TOPDIR)/src/java.desktop/macosx/native/libosxui \ |
1174 |
-I$(JDK_TOPDIR)/src/java.desktop/macosx/native/libawt_lwawt/sun/awt \ |
|
1175 |
-I$(JDK_TOPDIR)/src/java.desktop/macosx/native/libosxapp \ |
|
1176 |
-I$(JDK_TOPDIR)/src/java.base/share/native/libjava \ |
|
1177 |
-I$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_API_DIR)/native/libjava \ |
|
1178 |
-I$(JDK_OUTPUTDIR)/gensrc_headers/java.desktop, \ |
|
20547 | 1179 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
1180 |
$(call SET_SHARED_LIBRARY_ORIGIN) \ |
|
1181 |
-Xlinker -rpath -Xlinker @loader_path, \ |
|
1182 |
LDFLAGS_SUFFIX_macosx := -lawt -losxapp -lawt_lwawt \ |
|
1183 |
-framework Cocoa \ |
|
1184 |
-framework Carbon \ |
|
1185 |
-framework ApplicationServices \ |
|
1186 |
-framework JavaNativeFoundation \ |
|
1187 |
-framework JavaRuntimeSupport \ |
|
1188 |
-ljava -ljvm, \ |
|
1189 |
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libosxui, \ |
|
1190 |
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES))) |
|
1191 |
||
25859 | 1192 |
DESKTOP_LIBRARIES += $(BUILD_LIBOSXUI) |
20547 | 1193 |
|
1194 |
$(BUILD_LIBOSXUI): $(BUILD_LIBAWT) |
|
1195 |
||
1196 |
$(BUILD_LIBOSXUI): $(BUILD_LIBOSXAPP) |
|
1197 |
||
1198 |
$(BUILD_LIBOSXUI): $(BUILD_LIBAWT_LWAWT) |
|
1199 |
||
1200 |
#$(BUILD_LIBOSXUI): $(BUILD_LIBJAVA) |
|
1201 |
||
1202 |
endif |