blob: 61d893ebbf2a4a5d59d9f793d42c4985657a712d [file] [log] [blame]
ihse554e46f2013-11-14 11:19:32 +01001#
2# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4#
5# This code is free software; you can redistribute it and/or modify it
6# under the terms of the GNU General Public License version 2 only, as
7# published by the Free Software Foundation. Oracle designates this
8# particular file as subject to the "Classpath" exception as provided
9# by Oracle in the LICENSE file that accompanied this code.
10#
11# This code is distributed in the hope that it will be useful, but WITHOUT
12# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14# version 2 for more details (a copy is included in the LICENSE file that
15# accompanied this code).
16#
17# You should have received a copy of the GNU General Public License version
18# 2 along with this work; if not, write to the Free Software Foundation,
19# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20#
21# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22# or visit www.oracle.com if you need additional information or have any
23# questions.
24#
25
26# Openwin is defined on Solaris.
27OPENWIN_LIB := $(OPENWIN_HOME)/lib
28
29WIN_AWT_LIB := $(JDK_OUTPUTDIR)/objs/libawt/awt.lib
30
31##########################################################################################
32
33BUILD_LIBMLIB_SRC := $(JDK_TOPDIR)/src/share/native/sun/awt/medialib
34BUILD_LIBMLIB_CFLAGS := -D__USE_J2D_NAMES -D__MEDIALIB_OLD_NAMES \
35 -I$(BUILD_LIBMLIB_SRC) \
36 -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/awt/medialib
37
38BUILD_LIBMLIB_LDLIBS :=
39BUILD_LIBMLIB_IMAGE_MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libmlib_image/mapfile-vers
40
41BUILD_LIBMLIB_CFLAGS += -DMLIB_NO_LIBSUNMATH
42
43ifeq ($(OPENJDK_TARGET_CPU_BITS), 64)
44 BUILD_LIBMLIB_CFLAGS += -DMLIB_OS64BIT
45endif
46
47ifneq ($(OPENJDK_TARGET_OS), windows)
48 BUILD_LIBMLIB_LDLIBS += $(LIBM) $(LIBDL)
49endif
50
51$(eval $(call SetupNativeCompilation,BUILD_LIBMLIB_IMAGE, \
52 LIBRARY := mlib_image, \
53 OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
54 SRC := $(BUILD_LIBMLIB_SRC), \
55 EXCLUDE_FILES := awt_ImagingLib.c mlib_c_ImageBlendTable.c, \
56 LANG := C, \
57 OPTIMIZATION := HIGHEST, \
58 CFLAGS := $(CFLAGS_JDKLIB) \
59 $(BUILD_LIBMLIB_CFLAGS), \
60 MAPFILE := $(BUILD_LIBMLIB_IMAGE_MAPFILE), \
61 LDFLAGS := $(LDFLAGS_JDKLIB) \
62 $(call SET_SHARED_LIBRARY_ORIGIN), \
63 LDFLAGS_SUFFIX := $(BUILD_LIBMLIB_LDLIBS) \
64 $(LDFLAGS_JDKLIB_SUFFIX), \
65 LDFLAGS_SUFFIX_solaris := -lc, \
66 VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
67 RC_FLAGS := $(RC_FLAGS) \
68 -D "JDK_FNAME=mlib_image.dll" \
69 -D "JDK_INTERNAL_NAME=mlib_image" \
70 -D "JDK_FTYPE=0x2L", \
71 OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libmlib_image, \
72 DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
73
74$(BUILD_LIBMLIB_IMAGE): $(BUILD_LIBJAVA)
75
76BUILD_LIBRARIES += $(BUILD_LIBMLIB_IMAGE)
77
78##########################################################################################
79
80ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_ARCH), solaris-sparc)
81
82 BUILD_LIBMLIB_IMAGE_V_FILES := \
83 mlib_v_ImageLookUp.c \
84 mlib_ImageCreate.c \
85 mlib_ImageAffine.c \
86 mlib_ImageConvMxN.c \
87 mlib_ImageConvKernelConvert.c \
88 mlib_sys.c \
89 mlib_ImageLookUp_64.c \
90 mlib_ImageLookUp_Bit.c \
91 mlib_ImageColorTrue2Index.c \
92 mlib_c_ImageThresh1_U8.c \
93 mlib_v_ImageLookUpS16S16Func.c \
94 mlib_v_ImageLookUpS16S32Func.c \
95 mlib_v_ImageLookUpS16U16Func.c \
96 mlib_v_ImageLookUpS16U8Func.c \
97 mlib_v_ImageLookUpS32S16Func.c \
98 mlib_v_ImageLookUpS32S32Func.c \
99 mlib_v_ImageLookUpS32U16Func.c \
100 mlib_v_ImageLookUpS32U8Func.c \
101 mlib_v_ImageLookUpSIS16S16Func.c \
102 mlib_v_ImageLookUpSIS16S32Func.c \
103 mlib_v_ImageLookUpSIS16U16Func.c \
104 mlib_v_ImageLookUpSIS16U8Func.c \
105 mlib_v_ImageLookUpSIS32S16Func.c \
106 mlib_v_ImageLookUpSIS32S32Func.c \
107 mlib_v_ImageLookUpSIS32U16Func.c \
108 mlib_v_ImageLookUpSIS32U8Func.c \
109 mlib_v_ImageLookUpSIU16S16Func.c \
110 mlib_v_ImageLookUpSIU16S32Func.c \
111 mlib_v_ImageLookUpSIU16U16Func.c \
112 mlib_v_ImageLookUpSIU16U8Func.c \
113 mlib_v_ImageLookUpSIU8S16Func.c \
114 mlib_v_ImageLookUpSIU8S32Func.c \
115 mlib_v_ImageLookUpSIU8U16Func.c \
116 mlib_v_ImageLookUpSIU8U8Func.c \
117 mlib_v_ImageLookUpU16S16Func.c \
118 mlib_v_ImageLookUpU16S32Func.c \
119 mlib_v_ImageLookUpU16U16Func.c \
120 mlib_v_ImageLookUpU16U8Func.c \
121 mlib_v_ImageLookUpU8S16Func.c \
122 mlib_v_ImageLookUpU8S32Func.c \
123 mlib_v_ImageLookUpU8U16Func.c \
124 mlib_v_ImageLookUpU8U8Func.c \
125 mlib_v_ImageAffineIndex_BC.c \
126 mlib_v_ImageAffine_BC.c \
127 mlib_v_ImageAffine_BC_S16.c \
128 mlib_v_ImageAffine_BC_U16.c \
129 mlib_v_ImageAffine_BL.c \
130 mlib_v_ImageAffine_BL_S16.c \
131 mlib_v_ImageAffine_BL_U16.c \
132 mlib_v_ImageAffine_NN.c \
133 mlib_v_ImageFilters.c \
134 mlib_ImageAffineEdge.c \
135 mlib_ImageAffine_BC_D64.c \
136 mlib_ImageAffine_BC_F32.c \
137 mlib_ImageAffine_BC_S32.c \
138 mlib_ImageAffine_BL_D64.c \
139 mlib_ImageAffine_BL_F32.c \
140 mlib_ImageAffine_BL_S32.c \
141 mlib_ImageAffine_NN.c \
142 mlib_ImageAffine_NN_Bit.c \
143 mlib_ImageFilters.c \
144 mlib_ImageScanPoly.c \
145 mlib_ImageConv_8nw.c \
146 mlib_ImageConv_8ext.c \
147 mlib_ImageConv_16nw.c \
148 mlib_ImageConv_16ext.c \
149 mlib_ImageConv_u16nw.c \
150 mlib_ImageConv_u16ext.c \
151 mlib_ImageConv_32nw.c \
152 mlib_ImageConv_F32nw.c \
153 mlib_ImageConvMxN_Fp.c \
154 mlib_ImageConvMxN_ext.c \
155 mlib_ImageConv_D64nw.c \
156 mlib_ImageClipping.c \
157 mlib_ImageConvCopyEdge_Bit.c \
158 mlib_ImageConvClearEdge_Bit.c \
159 mlib_ImageConv2x2_f.c \
160 mlib_ImageConvClearEdge_Fp.c \
161 mlib_v_ImageConvMxN_8.c \
162 mlib_v_ImageConvClearEdge.c \
163 mlib_v_ImageConvCopyEdge.c \
164 mlib_v_ImageConvMxN_8ext.c \
165 mlib_v_ImageConvVersion.c \
166 mlib_v_ImageConv_8nw.c \
167 mlib_ImageConvCopyEdge_Fp.c \
168 mlib_v_ImageChannelInsert_1.c \
169 mlib_v_ImageChannelExtract_43.c \
170 mlib_v_ImageChannelExtract_1.c \
171 mlib_ImageCopy_Bit.c \
172 mlib_v_ImageCopy_f.c \
173 mlib_ImageUtils.c \
174 mlib_ImageDivTables.c
175
176 BUILD_LIBMLIB_V_CFLAGS := $(filter-out -DMLIB_NO_LIBSUNMATH, $(BUILD_LIBMLIB_CFLAGS))
177
178 $(eval $(call SetupNativeCompilation,BUILD_LIBMLIB_IMAGE_V, \
179 LIBRARY := mlib_image_v, \
180 OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
181 SRC := $(JDK_TOPDIR)/src/share/native/sun/awt/medialib \
182 $(JDK_TOPDIR)/src/solaris/native/sun/awt/medialib, \
183 LANG := C, \
184 INCLUDE_FILES := $(BUILD_LIBMLIB_IMAGE_V_FILES), \
185 OPTIMIZATION := HIGHEST, \
186 CFLAGS := -xarch=sparcvis \
187 $(JDK_TOPDIR)/src/solaris/native/sun/awt/medialib/vis_$(OPENJDK_TARGET_CPU_BITS).il \
188 $(BUILD_LIBMLIB_V_CFLAGS) \
189 $(CFLAGS_JDKLIB), \
190 MAPFILE := $(BUILD_LIBMLIB_IMAGE_MAPFILE), \
191 LDFLAGS := $(LDFLAGS_JDKLIB) \
192 $(BUILD_LIBMLIB_LDLIBS) -ljava -ljvm \
193 $(call SET_SHARED_LIBRARY_ORIGIN), \
194 LDFLAGS_SUFFIX_solaris := -lc, \
195 OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libmlib_image_v, \
196 DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
197
198 $(BUILD_LIBMLIB_IMAGE_V): $(BUILD_LIBJAVA)
199
200 BUILD_LIBRARIES += $(BUILD_LIBMLIB_IMAGE_V)
201
202endif
203
204##########################################################################################
205
206LIBAWT_DIRS := \
207 $(JDK_TOPDIR)/src/share/native/sun/awt \
208 $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/awt \
209 $(JDK_TOPDIR)/src/share/native/sun/awt/image \
210 $(JDK_TOPDIR)/src/share/native/sun/awt/image/gif \
211 $(JDK_TOPDIR)/src/share/native/sun/awt/image/cvutils \
212 $(JDK_TOPDIR)/src/share/native/sun/awt/medialib \
213 $(JDK_TOPDIR)/src/share/native/sun/awt/debug \
214 $(JDK_TOPDIR)/src/share/native/sun/awt/utility \
215 $(JDK_TOPDIR)/src/share/native/sun/java2d \
216 $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d \
217 $(JDK_TOPDIR)/src/share/native/sun/java2d/loops \
218 $(JDK_TOPDIR)/src/share/native/sun/java2d/pipe \
219 $(JDK_TOPDIR)/src/share/native/sun/awt/image \
220 $(JDK_TOPDIR)/src/share/native/sun/java2d/opengl \
221 $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d/opengl \
222 $(JDK_TOPDIR)/src/share/native/sun/font
223
224ifeq ($(OPENJDK_TARGET_OS), windows)
225 LIBAWT_DIRS += \
226 $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/windows \
227 $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d/windows \
228 $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d/d3d
229else ifneq ($(OPENJDK_TARGET_OS), macosx)
230 LIBAWT_DIRS += \
231 $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d/x11
232endif
233
234LIBAWT_CFLAGS += -D__MEDIALIB_OLD_NAMES -D__USE_J2D_NAMES \
235 $(X_CFLAGS) \
236 $(foreach dir, $(LIBAWT_DIRS), -I$(dir))
237
238LIBAWT_FILES := \
239 gifdecoder.c \
240 imageInitIDs.c \
241 img_globals.c \
242 SurfaceData.c \
243 Region.c \
244 BufImgSurfaceData.c \
245 Disposer.c \
246 Trace.c \
247 GraphicsPrimitiveMgr.c \
248 Blit.c \
249 BlitBg.c \
250 ScaledBlit.c \
251 FillRect.c \
252 FillSpans.c \
253 FillParallelogram.c \
254 DrawParallelogram.c \
255 DrawLine.c \
256 DrawRect.c \
257 DrawPolygons.c \
258 DrawPath.c \
259 FillPath.c \
260 ProcessPath.c \
261 MaskBlit.c \
262 MaskFill.c \
263 TransformHelper.c \
264 AlphaMath.c \
265 AlphaMacros.c \
266 AnyByte.c \
267 ByteBinary1Bit.c \
268 ByteBinary2Bit.c \
269 ByteBinary4Bit.c \
270 ByteIndexed.c \
271 ByteGray.c \
272 Index8Gray.c \
273 Index12Gray.c \
274 AnyShort.c \
275 Ushort555Rgb.c \
276 Ushort565Rgb.c \
277 Ushort4444Argb.c \
278 Ushort555Rgbx.c \
279 UshortGray.c \
280 UshortIndexed.c \
281 Any3Byte.c \
282 ThreeByteBgr.c \
283 AnyInt.c \
284 IntArgb.c \
285 IntArgbPre.c \
286 IntArgbBm.c \
287 IntRgb.c \
288 IntBgr.c \
289 IntRgbx.c \
290 Any4Byte.c \
291 FourByteAbgr.c \
292 FourByteAbgrPre.c \
293 BufferedMaskBlit.c \
294 BufferedRenderPipe.c \
295 ShapeSpanIterator.c \
296 SpanClipRenderer.c \
297 awt_ImageRep.c \
298 awt_ImagingLib.c \
299 awt_Mlib.c \
300 awt_parseImage.c \
301 DataBufferNative.c \
302 dither.c \
303 debug_assert.c \
304 debug_mem.c \
305 debug_trace.c \
306 debug_util.c
307
308ifneq (, $(filter $(OPENJDK_TARGET_OS), solaris linux))
309 LIBAWT_FILES += awt_LoadLibrary.c initIDs.c img_colors.c
310endif
311
312ifeq ($(OPENJDK_TARGET_OS), macosx)
313 LIBAWT_FILES += awt_LoadLibrary.c img_colors.c
314 LIBAWT_CFLAGS += -F/System/Library/Frameworks/JavaVM.framework/Frameworks
315endif
316
317ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_ARCH), solaris-sparc)
318 LIBAWT_CFLAGS += -DMLIB_ADD_SUFF
319 LIBAWT_CFLAGS += -xarch=sparcvis
320 LIBAWT_CFLAGS += $(JDK_TOPDIR)/src/solaris/native/sun/awt/medialib/vis_$(OPENJDK_TARGET_CPU_BITS).il
321 LIBAWT_CFLAGS += \
322 -I$(JDK_TOPDIR)/src/solaris/native/sun/awt/medialib \
323 -I$(JDK_TOPDIR)/src/solaris/native/sun/java2d/medialib \
324 -I$(JDK_TOPDIR)/src/solaris/native/sun/java2d/loops
325
326 LIBAWT_DIRS += $(JDK_TOPDIR)/src/solaris/native/sun/awt/medialib \
327 $(JDK_TOPDIR)/src/solaris/native/sun/java2d/loops
328
329 LIBAWT_FILES += \
330 vis_FuncArray.c \
331 java2d_Mlib.c \
332 mlib_ImageCreate.c \
333 mlib_ImageZoom_NN.c \
334 mlib_ImageCopy_Bit.c \
335 mlib_sys.c \
336 mlib_v_ImageClear.c \
337 mlib_v_ImageClear_f.c \
338 mlib_v_ImageConstXor.c \
339 mlib_v_ImageCopy.c \
340 mlib_v_ImageCopy_f.c \
341 mlib_v_ImageXor.c \
342 mlib_v_ImageZoom_NN_f.c \
343 vis_Interp.c \
344 vis_AlphaMacros.c \
345 vis_AlphaMaskBlit.c \
346 vis_AlphaMaskFill.c \
347 vis_ByteGray.c \
348 vis_ByteGray_FromRgb.c \
349 vis_ByteGray_Mask.c \
350 vis_ByteIndexed.c \
351 vis_DrawLine.c \
352 vis_FourByteAbgr.c \
353 vis_IntArgb.c \
354 vis_IntArgbPre.c \
355 vis_IntArgbPre_Mask.c \
356 vis_IntBgr.c \
357 vis_IntRgb.c \
358 vis_IntRgbx.c \
359 vis_SrcMaskFill.c \
360 vis_SrcOverMaskBlit.c \
361 vis_SrcOverMaskFill.c \
362 vis_FourByteAbgrPre.c \
363 vis_GlyphList.c \
364 vis_GlyphListXor.c \
365 vis_IntArgbBm.c \
366 vis_ThreeByteBgr.c \
367 vis_UshortGray.c \
368 vis_UshortGray_FromRgb.c \
369 vis_XorBlit.c \
370 mlib_v_ImageCopy_blk.s
371
372 ifeq ($(OPENJDK_TARGET_CPU), sparcv9)
373 LIBAWT_ASFLAGS = -P -xarch=v9a
374 else
375 LIBAWT_ASFLAGS = -P -xarch=v8plusa
376 endif
377else
378 LIBAWT_FILES += MapAccelFunc.c
379endif
380
381ifneq ($(OPENJDK_TARGET_OS), solaris)
382 LIBAWT_CFLAGS += -DMLIB_NO_LIBSUNMATH
383endif
384
385LIBAWT_LANG := C
386
387ifeq ($(OPENJDK_TARGET_OS), windows)
388 LIBAWT_FILES += AccelGlyphCache.c \
389 ShaderList.c \
390 CmdIDList.cpp \
391 Hashtable.cpp \
392 GDIHashtable.cpp \
393 Devices.cpp \
394 ObjectList.cpp \
395 GDIBlitLoops.cpp \
396 GDIRenderer.cpp \
397 GDIWindowSurfaceData.cpp \
398 WindowsFlags.cpp \
399 WPrinterJob.cpp \
400 awt_%.cpp \
401 D3DBlitLoops.cpp \
402 D3DBufImgOps.cpp \
403 D3DContext.cpp \
404 D3DGlyphCache.cpp \
405 D3DGraphicsDevice.cpp \
406 D3DMaskBlit.cpp \
407 D3DMaskCache.cpp \
408 D3DMaskFill.cpp \
409 D3DPipelineManager.cpp \
410 D3DPaints.cpp \
411 D3DRenderer.cpp \
412 D3DRenderQueue.cpp \
413 D3DResourceManager.cpp \
414 D3DSurfaceData.cpp \
415 D3DTextRenderer.cpp \
416 D3DVertexCacher.cpp \
417 ShellFolder2.cpp \
418 ThemeReader.cpp \
419 ComCtl32Util.cpp \
420 DllUtil.cpp \
421 initIDs.cpp \
422 MouseInfo.cpp \
423 rect.c \
424 OGLBlitLoops.c \
425 OGLBufImgOps.c \
426 OGLContext.c \
427 OGLFuncs.c \
428 OGLMaskBlit.c \
429 OGLMaskFill.c \
430 OGLPaints.c \
431 OGLRenderQueue.c \
432 OGLRenderer.c \
433 OGLSurfaceData.c \
434 OGLTextRenderer.c \
435 OGLVertexCache.c \
436 WGLGraphicsConfig.c \
437 WGLSurfaceData.c
438
439 LIBAWT_LANG := C++
440 LIBAWT_CFLAGS += -EHsc -DUNICODE -D_UNICODE
441 ifeq ($(OPENJDK_TARGET_CPU_BITS), 64)
442 LIBAWT_CFLAGS += -DMLIB_OS64BIT
443 endif
444
445 ifdef OPENJDK
446 LIBAWT_RC_FLAGS := -i "$(JDK_TOPDIR)/src/windows/resource/icons"
447 else
448 LIBAWT_RC_FLAGS := -i "$(JDK_TOPDIR)/src/closed/windows/native/sun/windows"
449 endif
450 LIBAWT_VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/native/sun/windows/awt.rc
451endif
452
453ifeq ($(MILESTONE), internal)
454 LIBAWT_CFLAGS += -DINTERNAL_BUILD
455endif
456
457LIBAWT_MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libawt/mapfile-vers
458ifeq ($(OPENJDK_TARGET_OS), linux)
459 LIBAWT_MAPFILE :=
460endif
461
462$(eval $(call SetupNativeCompilation,BUILD_LIBAWT, \
463 LIBRARY := awt, \
464 OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
465 SRC := $(LIBAWT_DIRS), \
466 INCLUDE_FILES := $(LIBAWT_FILES), \
467 LANG := $(LIBAWT_LANG), \
468 OPTIMIZATION := LOW, \
469 CFLAGS := $(CFLAGS_JDKLIB) $(LIBAWT_CFLAGS), \
470 ASFLAGS := $(LIBAWT_ASFLAGS), \
471 MAPFILE := $(LIBAWT_MAPFILE), \
472 LDFLAGS := $(LDFLAGS_JDKLIB) $(call SET_SHARED_LIBRARY_ORIGIN), \
473 LDFLAGS_solaris := -R/usr/dt/lib$(OPENJDK_TARGET_CPU_ISADIR) -R$(OPENWIN_LIB)$(OPENJDK_TARGET_CPU_ISADIR), \
474 LDFLAGS_SUFFIX_linux := -ljvm $(LIBM) $(LIBDL) -ljava, \
475 LDFLAGS_SUFFIX_solaris := -ljvm $(LIBM) $(LIBDL) -ljava -lc, \
476 LDFLAGS_SUFFIX_macosx := -lmlib_image -ljvm $(LIBM) \
477 -framework Cocoa \
478 -framework OpenGL \
479 -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
480 -framework JavaNativeFoundation \
481 -framework JavaRuntimeSupport \
482 -framework ApplicationServices \
483 -framework AudioToolbox \
484 -ljava, \
485 LDFLAGS_SUFFIX_windows := kernel32.lib user32.lib gdi32.lib winspool.lib \
486 imm32.lib ole32.lib uuid.lib shell32.lib \
487 comdlg32.lib winmm.lib comctl32.lib shlwapi.lib \
488 delayimp.lib jvm.lib $(WIN_JAVA_LIB) advapi32.lib \
489 -DELAYLOAD:user32.dll -DELAYLOAD:gdi32.dll \
490 -DELAYLOAD:shell32.dll -DELAYLOAD:winmm.dll \
491 -DELAYLOAD:winspool.drv -DELAYLOAD:imm32.dll \
492 -DELAYLOAD:ole32.dll -DELAYLOAD:comdlg32.dll \
493 -DELAYLOAD:comctl32.dll -DELAYLOAD:shlwapi.dll, \
494 VERSIONINFO_RESOURCE := $(LIBAWT_VERSIONINFO_RESOURCE), \
495 RC_FLAGS := $(RC_FLAGS) $(LIBAWT_RC_FLAGS) \
496 -D "JDK_FNAME=awt.dll" \
497 -D "JDK_INTERNAL_NAME=awt" \
498 -D "JDK_FTYPE=0x2L", \
499 OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libawt, \
500 DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
501
502$(BUILD_LIBAWT): $(BUILD_LIBJAVA)
503
504ifeq ($(OPENJDK_TARGET_OS), macosx)
505 $(BUILD_LIBAWT): $(BUILD_LIBMLIB_IMAGE)
506endif
507
508BUILD_LIBRARIES += $(BUILD_LIBAWT)
509
510##########################################################################################
511
512ifeq ($(findstring $(OPENJDK_TARGET_OS),windows macosx),)
513 ifndef BUILD_HEADLESS_ONLY
514
515 LIBAWT_XAWT_DIRS := \
516 $(JDK_TOPDIR)/src/share/native/sun/awt/debug \
517 $(JDK_TOPDIR)/src/share/native/sun/awt/utility \
518 $(JDK_TOPDIR)/src/share/native/sun/font \
519 $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/font \
520 $(JDK_TOPDIR)/src/share/native/sun/java2d/opengl \
521 $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/awt \
522 $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d/opengl \
523 $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d/x11 \
524 $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/xawt \
525
526 LIBAWT_XAWT_CFLAGS := -DXAWT -DXAWT_HACK \
527 -DPACKAGE_PATH=\"$(PACKAGE_PATH)\" \
528 $(CUPS_CFLAGS) \
529 $(foreach dir, $(LIBAWT_XAWT_DIRS), -I$(dir)) \
530 -I$(JDK_TOPDIR)/src/share/native/sun/java2d \
531 -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d \
532 -I$(JDK_TOPDIR)/src/share/native/sun/java2d/loops \
533 -I$(JDK_TOPDIR)/src/share/native/sun/java2d/pipe \
534 -I$(JDK_TOPDIR)/src/share/native/sun/awt/image \
535 -I$(JDK_TOPDIR)/src/share/native/sun/awt/image/cvutils \
536 -I$(JDK_TOPDIR)/src/share/native/sun/awt/debug \
537 -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/jdga
538
539 ifeq ($(OPENJDK_TARGET_OS), solaris)
540 LIBAWT_XAWT_CFLAGS += -DFUNCPROTO=15
541 endif
542
543 ifeq ($(OPENJDK_TARGET_OS), linux)
544 ifndef OPENJDK
545 include $(JDK_TOPDIR)/make/closed/xawt.gmk
546 endif
547
548 ifeq ($(DISABLE_XRENDER), true)
549 LIBAWT_XAWT_CFLAGS += -DDISABLE_XRENDER_BY_DEFAULT=true
550 endif
551 endif
552
553 ifeq ($(MILESTONE), internal)
554 LIBAWT_XAWT_CFLAGS += -DINTERNAL_BUILD
555 endif
556
557 LIBAWT_XAWT_FILES := \
558 XlibWrapper.c \
559 XWindow.c \
560 XToolkit.c \
561 X11Color.c \
562 X11SurfaceData.c \
563 awt_GraphicsEnv.c \
564 awt_InputMethod.c \
565 robot_common.c \
566 awt_Robot.c \
567 list.c \
568 multiVis.c \
569 initIDs.c \
570 awt_util.c \
571 awt_Desktop.c \
572 awt_UNIXToolkit.c \
573 X11FontScaler_md.c \
574 X11TextRenderer_md.c \
575 fontpath.c \
576 awt_Insets.c \
577 awt_Event.c \
578 X11Renderer.c \
579 X11PMBlitLoops.c \
580 OGLBlitLoops.c \
581 OGLBufImgOps.c \
582 OGLContext.c \
583 OGLFuncs.c \
584 OGLMaskBlit.c \
585 OGLMaskFill.c \
586 OGLPaints.c \
587 OGLRenderQueue.c \
588 OGLRenderer.c \
589 OGLSurfaceData.c \
590 OGLTextRenderer.c \
591 OGLVertexCache.c \
592 GLXGraphicsConfig.c \
593 GLXSurfaceData.c \
594 AccelGlyphCache.c \
595 awt_Font.c \
596 multi_font.c \
597 awt_AWTEvent.c \
598 awt_DrawingSurface.c \
599 jawt.c \
600 CUPSfuncs.c \
601 debug_assert.c \
602 debug_mem.c \
603 debug_trace.c \
604 debug_util.c \
605 awt_Plugin.c \
606 gnome_interface.c \
607 gtk2_interface.c \
608 swing_GTKEngine.c \
609 swing_GTKStyle.c \
610 rect.c \
611 sun_awt_X11_GtkFileDialogPeer.c \
612 XRSurfaceData.c \
613 XRBackendNative.c
614
615 LIBAWT_XAWT_LDFLAGS_SUFFIX := $(LIBM) -lawt -lXext -lX11 -lXrender $(LIBDL) -lXtst -lXi -ljava -ljvm -lc
616
617 ifeq ($(OPENJDK_TARGET_OS), linux)
618 # To match old build, add this to LDFLAGS instead of suffix.
619 LIBAWT_XAWT_LDFLAGS += -lpthread
620 endif
621
622 $(eval $(call SetupNativeCompilation,BUILD_LIBAWT_XAWT, \
623 LIBRARY := awt_xawt, \
624 OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
625 SRC := $(LIBAWT_XAWT_DIRS), \
626 INCLUDE_FILES := $(LIBAWT_XAWT_FILES), \
627 LANG := C, \
628 OPTIMIZATION := LOW, \
629 CFLAGS := $(CFLAGS_JDKLIB) $(LIBAWT_XAWT_CFLAGS) \
630 $(X_CFLAGS), \
631 MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libawt_xawt/mapfile-vers, \
632 LDFLAGS := $(LDFLAGS_JDKLIB) \
633 $(X_LIBS) $(LIBAWT_XAWT_LDFLAGS), \
634 LDFLAGS_linux := $(call SET_SHARED_LIBRARY_ORIGIN) \
635 $(call SET_SHARED_LIBRARY_ORIGIN,/..), \
636 LDFLAGS_solaris := -L$(OPENWIN_HOME)/sfw/lib$(OPENJDK_TARGET_CPU_ISADIR) \
637 -L$(OPENWIN_LIB)$(OPENJDK_TARGET_CPU_ISADIR) \
638 -R$(OPENWIN_HOME)/sfw/lib$(OPENJDK_TARGET_CPU_ISADIR) \
639 -R$(OPENWIN_LIB)$(OPENJDK_TARGET_CPU_ISADIR) \
640 -R/usr/dt/lib$(OPENJDK_TARGET_CPU_ISADIR) \
641 $(call SET_SHARED_LIBRARY_ORIGIN) \
642 $(call SET_SHARED_LIBRARY_ORIGIN,/..), \
643 LDFLAGS_SUFFIX := $(LIBAWT_XAWT_LDFLAGS_SUFFIX), \
644 VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
645 RC_FLAGS := $(RC_FLAGS) \
646 -D "JDK_FNAME=xawt.dll" \
647 -D "JDK_INTERNAL_NAME=xawt" \
648 -D "JDK_FTYPE=0x2L", \
649 OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libawt_xawt, \
650 DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
651
652 $(BUILD_LIBAWT_XAWT): $(BUILD_LIBJAVA)
653
654 $(BUILD_LIBAWT_XAWT): $(BUILD_LIBAWT)
655
656 BUILD_LIBRARIES += $(BUILD_LIBAWT_XAWT)
657
658 endif
659endif
660
661##########################################################################################
662
663# TODO: Update awt lib path when awt is converted
664$(eval $(call SetupNativeCompilation,BUILD_LIBLCMS, \
665 LIBRARY := lcms, \
666 OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
667 SRC := $(JDK_TOPDIR)/src/share/native/sun/java2d/cmm/lcms, \
668 LANG := C, \
669 OPTIMIZATION := HIGHEST, \
670 CFLAGS := $(filter-out -xc99=%none, $(CFLAGS_JDKLIB)) \
671 $(SHARED_LIBRARY_FLAGS) \
672 -I$(JDK_TOPDIR)/src/share/native/sun/java2d \
673 -I$(JDK_TOPDIR)/src/share/native/sun/awt/debug, \
674 CFLAGS_solaris := -xc99=no_lib, \
675 CFLAGS_windows := -DCMS_IS_WINDOWS_, \
676 MAPFILE := $(JDK_TOPDIR)/make/mapfiles/liblcms/mapfile-vers, \
677 LDFLAGS := $(LDFLAGS_JDKLIB) \
678 $(call SET_SHARED_LIBRARY_ORIGIN), \
679 LDFLAGS_solaris := /usr/lib$(OPENJDK_TARGET_CPU_ISADIR)/libm.so.2, \
680 LDFLAGS_windows := $(WIN_AWT_LIB) $(WIN_JAVA_LIB), \
681 LDFLAGS_SUFFIX_solaris := -lawt -ljava -ljvm -lc, \
682 LDFLAGS_SUFFIX_macosx := $(LIBM) -lawt -ljava -ljvm, \
683 LDFLAGS_SUFFIX_linux := -lm -lawt -ljava -ljvm, \
684 VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
685 RC_FLAGS := $(RC_FLAGS) \
686 -D "JDK_FNAME=lcms.dll" \
687 -D "JDK_INTERNAL_NAME=lcms" \
688 -D "JDK_FTYPE=0x2L", \
689 OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/liblcms, \
690 DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
691
692BUILD_LIBRARIES += $(BUILD_LIBLCMS)
693
694$(BUILD_LIBLCMS): $(BUILD_LIBAWT)
695
696##########################################################################################
697
698ifdef OPENJDK
699 BUILD_LIBJPEG_MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjpeg/mapfile-vers
700else
701 BUILD_LIBJPEG_MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjpeg/mapfile-vers-closed
702 BUILD_LIBJPEG_CLOSED_SRC := $(JDK_TOPDIR)/src/closed/share/native/sun/awt/image/jpeg
703 BUILD_LIBJPEG_CLOSED_INCLUDES := -I$(BUILD_LIBJPEG_CLOSED_SRC)
704endif
705
706BUILD_LIBJPEG_REORDER :=
707ifeq ($(OPENJDK_TARGET_OS), solaris)
708 ifneq ($(OPENJDK_TARGET_CPU), x86_64)
709 BUILD_LIBJPEG_REORDER := $(JDK_TOPDIR)/make/mapfiles/libjpeg/reorder-$(OPENJDK_TARGET_CPU)
710 endif
711endif
712
713# Suppress gcc warnings like "variable might be clobbered by 'longjmp'
714# or 'vfork'": this warning indicates that some variable is placed to
715# a register by optimized compiler and it's value might be lost on longjmp().
716# Recommended way to avoid such warning is to declare the variable as
717# volatile to prevent the optimization. However, this approach does not
718# work because we have to declare all variables as volatile in result.
719#ifndef CROSS_COMPILE_ARCH
720# CC_43_OR_NEWER := \
721# $(shell $(EXPR) $(CC_MAJORVER) \> 4 \| \
722# \( $(CC_MAJORVER) = 4 \& $(CC_MINORVER) \>= 3 \) )
723# ifeq ($(CC_43_OR_NEWER), 1)
724# BUILD_LIBJPEG_CFLAGS_linux += -Wno-clobbered
725# endif
726#endif
727
728$(eval $(call SetupNativeCompilation,BUILD_LIBJPEG, \
729 LIBRARY := jpeg, \
730 OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
731 SRC := $(BUILD_LIBJPEG_CLOSED_SRC) \
732 $(JDK_TOPDIR)/src/share/native/sun/awt/image/jpeg, \
733 LANG := C, \
734 OPTIMIZATION := HIGHEST, \
735 CFLAGS := $(CFLAGS_JDKLIB) \
736 $(BUILD_LIBJPEG_CLOSED_INCLUDES) \
737 -I$(JDK_TOPDIR)/src/share/native/sun/awt/image/jpeg, \
738 MAPFILE := $(BUILD_LIBJPEG_MAPFILE), \
739 LDFLAGS := $(LDFLAGS_JDKLIB) \
740 $(call SET_SHARED_LIBRARY_ORIGIN), \
741 LDFLAGS_windows := $(WIN_JAVA_LIB) jvm.lib, \
742 LDFLAGS_SUFFIX := $(LDFLAGS_JDKLIB_SUFFIX), \
743 VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
744 RC_FLAGS := $(RC_FLAGS) \
745 -D "JDK_FNAME=jpeg.dll" \
746 -D "JDK_INTERNAL_NAME=jpeg" \
747 -D "JDK_FTYPE=0x2L", \
748 REORDER := $(BUILD_LIBJPEG_REORDER), \
749 OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjpeg, \
750 DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
751
752$(BUILD_LIBJPEG): $(BUILD_LIBJAVA)
753
754BUILD_LIBRARIES += $(BUILD_LIBJPEG)
755
756##########################################################################################
757
758ifndef OPENJDK
759 FONT_HEADERS := -I$(JDK_TOPDIR)/src/closed/share/native/sun/font/t2k
760 BUILD_LIBFONTMANAGER_MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libfontmanager/mapfile-vers
761 LIBFONTMANAGER_EXCLUDE_FILES += freetypeScaler.c
762else
763 FONT_HEADERS := $(FREETYPE_CFLAGS)
764 BUILD_LIBFONTMANAGER_MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libfontmanager/mapfile-vers.openjdk
765 BUILD_LIBFONTMANAGER_FONTLIB := $(FREETYPE_LIBS)
766endif
767
768LIBFONTMANAGER_OPTIMIZATION := HIGH
769
770ifeq ($(OPENJDK_TARGET_OS), windows)
771 LIBFONTMANAGER_EXCLUDE_FILES += X11FontScaler.c \
772 X11TextRenderer.c
773 LIBFONTMANAGER_OPTIMIZATION := HIGHEST
774else ifeq ($(OPENJDK_TARGET_OS), macosx)
775 LIBFONTMANAGER_EXCLUDE_FILES += X11FontScaler.c \
776 X11TextRenderer.c \
777 fontpath.c \
778 lcdglyph.c
779else
780 LIBFONTMANAGER_EXCLUDE_FILES += fontpath.c \
781 lcdglyph.c
782endif
783
784BUILD_LIBFONTMANAGER_CFLAGS_COMMON := \
785 $(X_CFLAGS) \
786 -DLE_STANDALONE -DHEADLESS \
787 $(FONT_HEADERS) \
788 -I$(JDK_TOPDIR)/src/share/native/sun/font \
789 -I$(JDK_TOPDIR)/src/share/native/sun/font/layout \
790 -I$(JDK_TOPDIR)/src/share/native/sun/awt/image/cvutils \
791 -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/awt \
792 -I$(JDK_TOPDIR)/src/share/native/sun/awt/debug \
793 -I$(JDK_TOPDIR)/src/share/native/sun/java2d/loops \
794 -I$(JDK_TOPDIR)/src/share/native/sun/java2d/pipe \
795 -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d \
796 -I$(JDK_TOPDIR)/src/share/native/sun/java2d
797
798# Turn off aliasing with GCC for ExtensionSubtables.cpp
799ifeq ($(OPENJDK_TARGET_OS), linux)
800 BUILD_LIBFONTMANAGER_ExtensionSubtables.cpp_CXXFLAGS := -fno-strict-aliasing
801endif
802
803$(eval $(call SetupNativeCompilation,BUILD_LIBFONTMANAGER, \
804 LIBRARY := fontmanager, \
805 OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
806 SRC := $(JDK_TOPDIR)/src/share/native/sun/font \
807 $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/font, \
808 EXCLUDE_FILES := $(LIBFONTMANAGER_EXCLUDE_FILES) \
809 AccelGlyphCache.c, \
810 LANG := C++, \
811 CFLAGS := $(CFLAGS_JDKLIB) $(BUILD_LIBFONTMANAGER_CFLAGS_COMMON), \
812 CXXFLAGS := $(CXXFLAGS_JDKLIB) $(BUILD_LIBFONTMANAGER_CFLAGS_COMMON), \
813 OPTIMIZATION := $(LIBFONTMANAGER_OPTIMIZATION), \
814 CFLAGS_windows = -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/windows \
815 -DCC_NOEX, \
816 MAPFILE := $(BUILD_LIBFONTMANAGER_MAPFILE), \
817 LDFLAGS := $(subst -Xlinker -z -Xlinker defs,,$(LDFLAGS_JDKLIB)) $(LDFLAGS_CXX_JDK) \
818 $(call SET_SHARED_LIBRARY_ORIGIN), \
819 LDFLAGS_SUFFIX := $(BUILD_LIBFONTMANAGER_FONTLIB), \
820 LDFLAGS_SUFFIX_linux := -lawt $(LIBM) $(LIBCXX) -ljava -ljvm -lc, \
821 LDFLAGS_SUFFIX_solaris := -lawt -lawt_xawt -lc $(LIBM) $(LIBCXX) -ljava -ljvm, \
822 LDFLAGS_SUFFIX_macosx := -lawt $(LIBM) $(LIBCXX) -undefined dynamic_lookup \
823 -ljava -ljvm, \
824 LDFLAGS_SUFFIX_windows := $(WIN_JAVA_LIB) advapi32.lib user32.lib gdi32.lib \
825 $(WIN_AWT_LIB), \
826 VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
827 RC_FLAGS := $(RC_FLAGS) \
828 -D "JDK_FNAME=fontmanager.dll" \
829 -D "JDK_INTERNAL_NAME=fontmanager" \
830 -D "JDK_FTYPE=0x2L", \
831 OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libfontmanager, \
832 DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
833
834$(BUILD_LIBFONTMANAGER): $(BUILD_LIBAWT)
835
836ifeq ($(OPENJDK_TARGET_OS), solaris)
837 $(BUILD_LIBFONTMANAGER): $(BUILD_LIBAWT_XAWT)
838endif
839
840BUILD_LIBRARIES += $(BUILD_LIBFONTMANAGER)
841
842##########################################################################################
843
844ifndef OPENJDK
845
846 #ifeq ($(OPENJDK_TARGET_OS), linux)
847 # ifeq ("$(CC_VER_MAJOR)", "3")
848 # OTHER_LDLIBS += -Wl,-Bstatic -lgcc_eh -Wl,-Bdynamic
849 # endif
850 #endif
851 #
852 # The resulting size of the t2k lib file is (at least on linux) dependant on the order of
853 # the input .o files. Because of this the new build will differ in size to the old build.
854 BUILD_LIBT2K_CFLAGS_COMMON := -I$(JDK_TOPDIR)/src/share/native/sun/font \
855 -I$(JDK_TOPDIR)/src/closed/share/native/sun/font/t2k \
856 -I$(JDK_TOPDIR)/src/closed/share/native/sun/font \
857 -I$(JDK_TOPDIR)/src/share/share/native/sun/font \
858 -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/font \
859 -I$(JDK_TOPDIR)/src/share/native/sun/java2d/loops \
860 -I$(JDK_TOPDIR)/src/share/native/sun/java2d/pipe \
861 -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d \
862 -I$(JDK_TOPDIR)/src/share/native/sun/java2d
863
864 $(eval $(call SetupNativeCompilation,BUILD_LIBT2K, \
865 LIBRARY := t2k, \
866 OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
867 SRC := $(JDK_TOPDIR)/src/closed/share/native/sun/font \
868 $(JDK_TOPDIR)/src/closed/share/native/sun/font/t2k \
869 $(JDK_TOPDIR)/src/closed/share/native/sun/font/t2k/ttHints, \
870 EXCLUDE_FILES := orion.c, \
871 LANG := C++, \
872 OPTIMIZATION := HIGH, \
873 CFLAGS := $(CFLAGS_JDKLIB) $(BUILD_LIBT2K_CFLAGS_COMMON), \
874 CXXFLAGS := $(CXXFLAGS_JDKLIB) $(BUILD_LIBT2K_CFLAGS_COMMON), \
875 CFLAGS_windows = -DCC_NOEX, \
876 CXXFLAGS_windows = -DCC_NOEX, \
877 MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libt2k/mapfile-vers, \
878 LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
879 $(call SET_SHARED_LIBRARY_ORIGIN), \
880 LDFLAGS_windows := user32.lib $(JDK_OUTPUTDIR)/objs/libfontmanager/fontmanager.lib, \
881 LDFLAGS_SUFFIX_posix := $(LIBM) $(LIBCXX) -lfontmanager -ljava -ljvm -lc, \
882 LDFLAGS_SUFFIX_solaris := -lawt -lawt_xawt, \
883 VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
884 RC_FLAGS := $(RC_FLAGS) \
885 -D "JDK_FNAME=t2k.dll" \
886 -D "JDK_INTERNAL_NAME=t2k" \
887 -D "JDK_FTYPE=0x2L", \
888 OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libt2k, \
889 DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
890
891 # t2k is linked against fontmanager
892 $(BUILD_LIBT2K): $(BUILD_LIBFONTMANAGER)
893
894 BUILD_LIBRARIES += $(BUILD_LIBT2K)
895endif
896
897##########################################################################################
898
899ifeq ($(OPENJDK_TARGET_OS), windows)
900 ifeq ($(OPENJDK_TARGET_CPU), x86)
901 KERNEL32_LIB := kernel32.lib
902 endif
903 $(eval $(call SetupNativeCompilation,BUILD_LIBJAWT, \
904 LIBRARY := jawt, \
905 OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
906 SRC := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/windows, \
907 INCLUDE_FILES := jawt.cpp, \
908 LANG := C++, \
909 OPTIMIZATION := LOW, \
910 CFLAGS := $(CXXFLAGS_JDKLIB) \
911 -EHsc -DUNICODE -D_UNICODE \
912 -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/windows \
913 -I$(JDK_TOPDIR)/src/share/native/sun/awt/debug \
914 -I$(JDK_TOPDIR)/src/share/native/sun/java2d \
915 -I$(JDK_TOPDIR)/src/share/native/sun/awt/image/cvutils \
916 -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d/windows, \
917 LDFLAGS := $(LDFLAGS_JDKLIB) $(KERNEL32_LIB) $(LDFLAGS_CXX_JDK) \
918 advapi32.lib $(WIN_AWT_LIB), \
919 LDFLAGS_SUFFIX := $(LDFLAGS_JDKLIB_SUFFIX), \
920 VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
921 RC_FLAGS := $(RC_FLAGS) \
922 -D "JDK_FNAME=jawt.dll" \
923 -D "JDK_INTERNAL_NAME=jawt" \
924 -D "JDK_FTYPE=0x2L", \
925 OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjawt, \
926 DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
927
928 $(BUILD_LIBJAWT): $(BUILD_LIBAWT)
929
930 $(JDK_OUTPUTDIR)/lib/$(LIBRARY_PREFIX)jawt$(STATIC_LIBRARY_SUFFIX): $(BUILD_LIBJAWT)
931 $(ECHO) Copying $(@F)
932 $(CP) $(JDK_OUTPUTDIR)/objs/libjawt/$(LIBRARY_PREFIX)jawt$(STATIC_LIBRARY_SUFFIX) $@
933
934 BUILD_LIBRARIES += $(JDK_OUTPUTDIR)/lib/$(LIBRARY_PREFIX)jawt$(STATIC_LIBRARY_SUFFIX)
935
936else # OPENJDK_TARGET_OS not windows
937
938 ifeq ($(OPENJDK_TARGET_OS), macosx)
939 JAWT_FILES := jawt.m
940 JAWT_LIBS := -lawt_lwawt
941 else
942 JAWT_FILES := jawt.c
943 JAWT_LIBS :=
944 ifneq ($(OPENJDK_TARGET_OS), solaris)
945 JAWT_LIBS += -lawt
946 endif
947 ifndef BUILD_HEADLESS_ONLY
948 JAWT_LIBS += -lawt_xawt
949 else
950 JAWT_LIBS += -lawt_headless
951 HEADLESS_CFLAG += -DHEADLESS
952 endif
953 endif
954
955 $(eval $(call SetupNativeCompilation,BUILD_LIBJAWT, \
956 LIBRARY := jawt, \
957 OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
958 SRC := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/awt \
959 $(JDK_TOPDIR)/src/macosx/native/sun/awt, \
960 INCLUDE_FILES := $(JAWT_FILES), \
961 LANG := C, \
962 OPTIMIZATION := LOW, \
963 CFLAGS := $(CFLAGS_JDKLIB), \
964 CFLAGS_linux := $(HEADLESS_CFLAG), \
965 CFLAGS_macosx := -I$(JDK_TOPDIR)/src/solaris/native/sun/awt, \
966 MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjawt/mapfile-vers, \
967 LDFLAGS := $(LDFLAGS_JDKLIB) \
968 $(call SET_SHARED_LIBRARY_ORIGIN), \
969 LDFLAGS_solaris := -L$(OPENWIN_HOME)/sfw/lib$(OPENJDK_TARGET_CPU_ISADIR) -L$(OPENWIN_LIB)$(OPENJDK_TARGET_CPU_ISADIR), \
970 LDFLAGS_SUFFIX_linux := $(JAWT_LIBS) $(LDFLAGS_JDKLIB_SUFFIX), \
971 LDFLAGS_SUFFIX_solaris := $(JAWT_LIBS) $(LDFLAGS_JDKLIB_SUFFIX) -lXrender, \
972 LDFLAGS_SUFFIX_macosx := -Xlinker -rpath -Xlinker @loader_path $(JAWT_LIBS) \
973 -framework Cocoa $(LDFLAGS_JDKLIB_SUFFIX), \
974 OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjawt, \
975 DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
976
977 ifndef BUILD_HEADLESS_ONLY
978 $(BUILD_LIBJAWT): $(BUILD_LIBAWT_XAWT)
979 else
980 $(BUILD_LIBJAWT): $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)awt_headless$(SHARED_LIBRARY_SUFFIX)
981 endif
982
983 ifeq ($(OPENJDK_TARGET_OS), macosx)
984 $(BUILD_LIBJAWT): $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)awt_lwawt$(SHARED_LIBRARY_SUFFIX)
985 endif
986
987endif # OPENJDK_TARGET_OS
988
989BUILD_LIBRARIES += $(BUILD_LIBJAWT)
990
991##########################################################################################
992
993ifndef OPENJDK
994
995 BUILD_LIBKCMS_EXCLUDE_FILES :=
996 ifeq ($(OPENJDK_TARGET_OS), windows)
997 BUILD_LIBKCMS_EXCLUDE_FILES += ukcpmgr.c unixmem.c
998 else
999 BUILD_LIBKCMS_EXCLUDE_FILES += cmmdll.c registry.c spxffile.c sysinfo.c winmem.c wkcpmgr.c
1000 endif
1001
1002 BUILD_LIBKCMS_FLAGS := $(CFLAGS_JDKLIB)
1003
1004 ifeq ($(OPENJDK_TARGET_OS), solaris)
1005 # This particular library uses a feature called PIC_CODE_SMALL (on solaris)
1006 # implement it like this...since it's only used here
1007 BUILD_LIBKCMS_FLAGS := $(patsubst -KPIC, -Kpic, $(BUILD_LIBKCMS_FLAGS))
1008 else ifeq ($(OPENJDK_TARGET_CPU_ARCH), ppc)
1009 BUILD_LIBKCMS_FLAGS := $(patsubst -fPIC, -fpic, $(BUILD_LIBKCMS_FLAGS))
1010 endif
1011
1012 $(eval $(call SetupNativeCompilation,BUILD_LIBKCMS, \
1013 LIBRARY := kcms, \
1014 OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
1015 SRC := $(JDK_TOPDIR)/src/closed/share/native/sun/java2d/cmm/kcms, \
1016 LANG := C, \
1017 EXCLUDE_FILES := $(BUILD_LIBKCMS_EXCLUDE_FILES), \
1018 OPTIMIZATION := LOW, \
1019 CFLAGS := $(BUILD_LIBKCMS_FLAGS) \
1020 -DJAVACMM -DFUT_CALC_EX -DNO_FUT_GCONST, \
1021 CFLAGS_linux := -Wno-missing-field-initializers, \
1022 MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libkcms/mapfile-vers, \
1023 LDFLAGS := $(LDFLAGS_JDKLIB) \
1024 $(call SET_SHARED_LIBRARY_ORIGIN), \
1025 LDFLAGS_SUFFIX_linux := -lc -lpthread, \
1026 LDFLAGS_SUFFIX_solaris := -lc, \
1027 LDFLAGS_SUFFIX_windows := $(WIN_JAVA_LIB) advapi32.lib user32.lib version.lib, \
1028 LDFLAGS_SUFFIX_posix := -lm -ljava -ljvm, \
1029 VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/closed/share/native/sun/java2d/cmm/kcms/cmm.rc, \
1030 VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/closed/share/native/sun/java2d/cmm/kcms/cmm.rc, \
1031 RC_FLAGS := $(RC_FLAGS) \
1032 -D "JDK_FNAME=kcms.dll" \
1033 -D "JDK_INTERNAL_NAME=kcms" \
1034 -D "JDK_FTYPE=0x2L", \
1035 OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libkcms, \
1036 DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
1037
1038 $(BUILD_LIBKCMS): $(BUILD_LIBJAVA)
1039
1040 BUILD_LIBRARIES += $(BUILD_LIBKCMS)
1041
1042endif
1043
1044##########################################################################################
1045
1046ifndef OPENJDK
1047 ifeq ($(OPENJDK_TARGET_OS), solaris)
1048 ifneq ($(OPENJDK_TARGET_CPU), x86_64)
1049
1050 ifeq ($(shell if test "$(OS_VERSION_MAJOR)" -eq 5 -a "$(OS_VERSION_MINOR)" -le 10; then $(ECHO) ok; fi), ok)
1051
1052 SUNWJDGA_MAPFILE :=
1053 ifeq ($(OPENJDK_TARGET_CPU_ARCH), sparc)
1054 SUNWJDGA_MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjdga/mapfile-vers
1055 endif
1056
1057 $(eval $(call SetupNativeCompilation,BUILD_LIBSUNWJDGA, \
1058 LIBRARY := sunwjdga, \
1059 OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
1060 SRC := $(JDK_TOPDIR)/src/solaris/native/sun/jdga, \
1061 LANG := C, \
1062 OPTIMIZATION := LOW, \
1063 CFLAGS := $(CFLAGS_JDKLIB) \
1064 -I$(JDK_TOPDIR)/src/share/javavm/export \
1065 -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/javavm/export \
1066 -I$(OPENWIN_HOME)/include, \
1067 MAPFILE := $(SUNWJDGA_MAPFILE), \
1068 LDFLAGS := $(LDFLAGS_JDKLIB) \
1069 $(call SET_SHARED_LIBRARY_ORIGIN), \
1070 LDFLAGS_SUFFIX := -L$(OPENWIN_LIB)$(OPENJDK_TARGET_CPU_ISADIR) -R$(OPENWIN_LIB)$(OPENJDK_TARGET_CPU_ISADIR) -ldga -lX11 $(LIBDL) -lc, \
1071 OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libsunwjdga, \
1072 DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
1073
1074 BUILD_LIBRARIES += $(BUILD_LIBSUNWJDGA)
1075
1076 endif
1077 endif
1078 endif
1079endif
1080
1081##########################################################################################
1082
1083ifeq ($(BUILD_HEADLESS), true)
1084 # Mac and Windows only use the native AWT lib, do not build libawt_headless
1085 ifeq ($(findstring $(OPENJDK_TARGET_OS), windows macosx),)
1086
1087 LIBAWT_HEADLESS_DIRS := $(JDK_TOPDIR)/src/share/native/sun/font \
1088 $(JDK_TOPDIR)/src/share/native/sun/java2d/opengl \
1089 $(JDK_TOPDIR)/src/solaris/native/sun/font \
1090 $(JDK_TOPDIR)/src/solaris/native/sun/awt \
1091 $(JDK_TOPDIR)/src/solaris/native/sun/java2d/opengl \
1092 $(JDK_TOPDIR)/src/solaris/native/sun/java2d/x11
1093
1094 ifeq ($(OPENJDK_TARGET_OS), macosx)
1095 LIBAWT_HEADLESS_DIRS += $(JDK_TOPDIR)/src/macosx/native/sun/font
1096 endif
1097
1098 LIBAWT_HEADLESS_CFLAGS := -DHEADLESS=true \
1099 -DPACKAGE_PATH=\"$(PACKAGE_PATH)\" \
1100 $(CUPS_CFLAGS) \
1101 $(X_CFLAGS) \
1102 -I$(JDK_TOPDIR)/src/share/native/sun/java2d \
1103 -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d \
1104 -I$(JDK_TOPDIR)/src/share/native/sun/java2d/loops \
1105 -I$(JDK_TOPDIR)/src/share/native/sun/java2d/pipe \
1106 -I$(JDK_TOPDIR)/src/share/native/sun/awt/image \
1107 -I$(JDK_TOPDIR)/src/share/native/sun/awt/image/cvutils \
1108 -I$(JDK_TOPDIR)/src/share/native/sun/awt/debug \
1109 -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/jdga \
1110 $(foreach dir, $(LIBAWT_HEADLESS_DIRS), -I$(dir))
1111
1112 ifeq ($(OPENJDK_TARGET_OS), macosx)
1113 LIBAWT_HEADLESS_CFLAGS += \
1114 -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
1115 -F/System/Library/Frameworks/ApplicationServices.framework/Frameworks
1116 endif
1117
1118 LIBAWT_HEADLESS_FILES := \
1119 awt_Font.c \
1120 HeadlessToolkit.c \
1121 fontpath.c \
1122 VDrawingArea.c \
1123 X11Color.c \
1124 X11Renderer.c \
1125 X11PMBlitLoops.c \
1126 X11SurfaceData.c \
1127 X11FontScaler_md.c \
1128 X11TextRenderer_md.c \
1129 OGLBlitLoops.c \
1130 OGLBufImgOps.c \
1131 OGLContext.c \
1132 OGLFuncs.c \
1133 OGLMaskBlit.c \
1134 OGLMaskFill.c \
1135 OGLPaints.c \
1136 OGLRenderQueue.c \
1137 OGLRenderer.c \
1138 OGLSurfaceData.c \
1139 OGLTextRenderer.c \
1140 OGLVertexCache.c \
1141 GLXGraphicsConfig.c \
1142 GLXSurfaceData.c \
1143 AccelGlyphCache.c \
1144 CUPSfuncs.c
1145
1146 LIBAWT_HEADLESS_REORDER :=
1147 ifeq ($(OPENJDK_TARGET_OS), solaris)
1148 ifneq ($(OPENJDK_TARGET_CPU), x86_64)
1149 LIBAWT_HEADLESS_REORDER := $(JDK_TOPDIR)/make/mapfiles/libawt_headless/reorder-$(OPENJDK_TARGET_CPU)
1150 endif
1151 endif
1152
1153 $(eval $(call SetupNativeCompilation,BUILD_LIBAWT_HEADLESS, \
1154 LIBRARY := awt_headless, \
1155 OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
1156 SRC := $(LIBAWT_HEADLESS_DIRS), \
1157 INCLUDE_FILES := $(LIBAWT_HEADLESS_FILES), \
1158 LANG := C, \
1159 OPTIMIZATION := LOW, \
1160 CFLAGS := $(CFLAGS_JDKLIB) $(LIBAWT_HEADLESS_CFLAGS), \
1161 MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libawt_headless/mapfile-vers, \
1162 LDFLAGS := $(LDFLAGS_JDKLIB) \
1163 $(call SET_SHARED_LIBRARY_ORIGIN), \
1164 LDFLAGS_linux := $(call SET_SHARED_LIBRARY_ORIGIN,/..), \
1165 LDFLAGS_solaris := $(call SET_SHARED_LIBRARY_ORIGIN,/..) \
1166 -R/usr/dt/lib$(OPENJDK_TARGET_CPU_ISADIR) \
1167 -R$(OPENWIN_LIB)$(OPENJDK_TARGET_CPU_ISADIR), \
1168 LDFLAGS_macosx := $(call SET_SHARED_LIBRARY_ORIGIN)., \
1169 REORDER := $(LIBAWT_HEADLESS_REORDER), \
1170 LDFLAGS_SUFFIX_linux := -ljvm -lawt -lm $(LIBDL) -ljava, \
1171 LDFLAGS_SUFFIX_solaris := $(LIBDL) -ljvm -lawt -lm -ljava $(LIBCXX) -lc, \
1172 OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libawt_headless, \
1173 DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
1174
1175 $(BUILD_LIBAWT_HEADLESS): $(BUILD_LIBAWT)
1176
1177 BUILD_LIBRARIES += $(BUILD_LIBAWT_HEADLESS)
1178
1179 endif
1180endif
1181
1182##########################################################################################
1183
1184ifndef BUILD_HEADLESS_ONLY
1185 LIBSPLASHSCREEN_DIRS := \
1186 $(JDK_TOPDIR)/src/share/native/sun/awt/image/jpeg \
1187 $(JDK_TOPDIR)/src/share/native/sun/awt/libpng \
1188 $(JDK_TOPDIR)/src/share/native/sun/awt/splashscreen
1189
1190 ifeq ($(USE_EXTERNAL_LIBGIF), true)
1191 GIFLIB_LDFLAGS := -lgif
1192 else
1193 LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/share/native/sun/awt/giflib
1194 GIFLIB_CFLAGS := -I$(JDK_TOPDIR)/src/share/native/sun/awt/giflib
1195 endif
1196
1197 ifneq ($(OPENJDK_TARGET_OS), macosx)
1198 LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/awt/splashscreen
1199 else
1200 LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/macosx/native/sun/awt/splashscreen
1201 endif
1202
1203 LIBSPLASHSCREEN_CFLAGS := -DSPLASHSCREEN -DPNG_NO_MMX_CODE \
1204 $(foreach dir, $(LIBSPLASHSCREEN_DIRS), -I$(dir))
1205
1206 ifeq ($(OPENJDK_TARGET_OS), macosx)
1207 LIBSPLASHSCREEN_CFLAGS := -I$(JDK_TOPDIR)/src/macosx/native/sun/awt/splashscreen \
1208 $(LIBSPLASHSCREEN_CFLAGS) \
1209 -F/System/Library/Frameworks/JavaVM.framework/Frameworks
1210 LIBSPLASHSCREEN_CFLAGS += -DWITH_MACOSX
1211 LIBSPLASHSCREEN_CFLAGS += -I$(JDK_TOPDIR)/src/macosx/native/sun/osxapp
1212
1213 LIBSPLASHSCREEN_java_awt_SplashScreen.c_CFLAGS := -x objective-c -O0
1214 LIBSPLASHSCREEN_splashscreen_gfx_impl.c_CFLAGS := -x objective-c -O0
1215 LIBSPLASHSCREEN_splashscreen_gif.c_CFLAGS := -x objective-c -O0
1216 LIBSPLASHSCREEN_splashscreen_impl.c_CFLAGS := -x objective-c -O0
1217 LIBSPLASHSCREEN_splashscreen_jpeg.c_CFLAGS := -x objective-c -O0
1218 LIBSPLASHSCREEN_splashscreen_png.c_CFLAGS := -x objective-c -O0
1219 LIBSPLASHSCREEN_splashscreen_sys.m_CFLAGS := -O0
1220
1221 else ifeq ($(OPENJDK_TARGET_OS), windows)
1222 LIBSPLASHSCREEN_CFLAGS += -DWITH_WIN32
1223 else ifeq ($(OPENJDK_TARGET_OS), solaris)
1224 LIBSPLASHSCREEN_CFLAGS += -DWITH_X11 -I$(OPENWIN_HOME)/include -I$(OPENWIN_HOME)/include/X11/extensions
1225 else
1226 LIBSPLASHSCREEN_CFLAGS += -DWITH_X11 $(X_CFLAGS)
1227 endif
1228
1229 LIBSPLASHSCREEN_LDFLAGS_SUFFIX :=
1230
1231 ifneq ($(USE_EXTERNAL_LIBZ), true)
1232 LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.5
1233 LIBSPLASHSCREEN_CFLAGS += $(ZLIB_CPPFLAGS)
1234 endif
1235
1236 ifeq ($(OPENJDK_TARGET_OS), macosx)
1237 LIBSPLASHSCREEN_LDFLAGS_SUFFIX += $(LIBM) -lpthread -liconv -losxapp \
1238 -framework ApplicationServices \
1239 -framework Foundation \
1240 -framework Cocoa \
1241 -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
1242 -framework JavaNativeFoundation
1243 else ifeq ($(OPENJDK_TARGET_OS), windows)
1244 LIBSPLASHSCREEN_LDFLAGS_SUFFIX += kernel32.lib user32.lib gdi32.lib delayimp.lib -DELAYLOAD:user32.dll
1245 else ifeq ($(OPENJDK_TARGET_OS), solaris)
1246 # Solaris still uses OPENWIN_LIB ..
1247 LIBSPLASHSCREEN_LDFLAGS_SUFFIX += -L$(OPENWIN_LIB)$(OPENJDK_TARGET_CPU_ISADIR) -lX11 -lXext $(LIBM) -lpthread
1248 else # .. all other Unixes can use X_LIBS
1249 LIBSPLASHSCREEN_LDFLAGS_SUFFIX += $(X_LIBS) -lX11 -lXext $(LIBM) -lpthread
1250 endif
1251
1252 $(eval $(call SetupNativeCompilation,LIBSPLASHSCREEN, \
1253 LIBRARY := splashscreen, \
1254 OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
1255 SRC := $(LIBSPLASHSCREEN_DIRS), \
1256 EXCLUDE_FILES := imageioJPEG.c jpegdecoder.c pngtest.c, \
1257 LANG := C, \
1258 OPTIMIZATION := LOW, \
1259 CFLAGS := $(LIBSPLASHSCREEN_CFLAGS) $(CFLAGS_JDKLIB) $(GIFLIB_CFLAGS), \
1260 MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libsplashscreen/mapfile-vers, \
1261 LDFLAGS := $(LDFLAGS_JDKLIB) \
1262 $(call SET_SHARED_LIBRARY_ORIGIN), \
1263 LDFLAGS_SUFFIX := $(LIBSPLASHSCREEN_LDFLAGS_SUFFIX) $(LIBZ) $(GIFLIB_LDFLAGS), \
1264 LDFLAGS_SUFFIX_solaris := -lc, \
1265 VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
1266 RC_FLAGS := $(RC_FLAGS) \
1267 -D "JDK_FNAME=splashscreen.dll" \
1268 -D "JDK_INTERNAL_NAME=splashscreen" \
1269 -D "JDK_FTYPE=0x2L", \
1270 OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libsplashscreen, \
1271 DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
1272
1273 BUILD_LIBRARIES += $(LIBSPLASHSCREEN)
1274
1275 ifeq ($(OPENJDK_TARGET_OS), macosx)
1276 $(LIBSPLASHSCREEN): $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)osxapp$(SHARED_LIBRARY_SUFFIX)
1277 endif
1278
1279endif
1280
1281##########################################################################################
1282
1283ifndef OPENJDK
1284
1285 LIBDCPR_SRC_DIRS := \
1286 $(JDK_TOPDIR)/src/closed/share/native/sun/dc/doe \
1287 $(JDK_TOPDIR)/src/closed/share/native/sun/dc/path \
1288 $(JDK_TOPDIR)/src/closed/share/native/sun/dc/pr \
1289 $(JDK_TOPDIR)/src/closed/share/native/sun/dc/util
1290
1291 LIBDCPR_CFLAGS := $(foreach dir, $(LIBDCPR_SRC_DIRS), -I$(dir)) \
1292 -I$(JDK_TOPDIR)/src/share/native/sun/java2d/pipe
1293
1294 $(eval $(call SetupNativeCompilation,BUILD_LIBDCPR, \
1295 LIBRARY := dcpr, \
1296 OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
1297 SRC := $(LIBDCPR_SRC_DIRS), \
1298 LANG := C, \
1299 OPTIMIZATION := LOW, \
1300 CFLAGS := $(CFLAGS_JDKLIB) \
1301 $(LIBDCPR_CFLAGS), \
1302 MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libdcpr/mapfile-vers, \
1303 LDFLAGS := $(LDFLAGS_JDKLIB) \
1304 $(call SET_SHARED_LIBRARY_ORIGIN), \
1305 LDFLAGS_SUFFIX := $(LIBM) $(LDFLAGS_JDKLIB_SUFFIX), \
1306 LDFLAGS_SUFFIX_posix := -lm, \
1307 VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
1308 RC_FLAGS := $(RC_FLAGS) \
1309 -D "JDK_FNAME=dcpr.dll" \
1310 -D "JDK_INTERNAL_NAME=dcpr" \
1311 -D "JDK_FTYPE=0x2L", \
1312 OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libdcpr, \
1313 DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
1314
1315 $(BUILD_LIBDCPR): $(BUILD_LIBJAVA)
1316
1317 BUILD_LIBRARIES += $(BUILD_LIBDCPR)
1318
1319endif
1320
1321##########################################################################################
1322
1323ifeq ($(OPENJDK_TARGET_OS), macosx)
1324
1325 LIBAWT_LWAWT_FILES := \
1326 awt.m \
1327 ApplicationDelegate.m \
1328 CFRetainedResource.m \
1329 CGLGraphicsConfig.m \
1330 CGLSurfaceData.m \
1331 CGLLayer.m \
1332 CGraphicsConfig.m \
1333 CGraphicsDevice.m \
1334 CGraphicsEnv.m \
1335 CCharToGlyphMapper.m \
1336 CSystemColors.m \
1337 AWTFont.m \
1338 CGGlyphOutlines.m \
1339 CGGlyphImages.m \
1340 CoreTextSupport.m \
1341 AWTStrike.m \
1342 InitIDs.m \
1343 AWTEvent.m \
1344 AWTView.m \
1345 AWTWindow.m \
1346 AWTSurfaceLayers.m \
1347 CCursorManager.m \
1348 CClipboard.m \
1349 CDataTransferer.m \
1350 CDragSource.m \
1351 CDragSourceContextPeer.m \
1352 CDropTarget.m \
1353 CDropTargetContextPeer.m \
1354 CInputMethod.m \
1355 CDesktopPeer.m \
1356 OSVersion.m \
1357 DnDUtilities.m \
1358 CFileDialog.m \
1359 CImage.m \
1360 CMenu.m \
1361 CMenuBar.m \
1362 CMenuComponent.m \
1363 CMenuItem.m \
1364 CPopupMenu.m \
1365 CRobot.m \
1366 CTrayIcon.m \
1367 CWrapper.m \
1368 JavaAccessibilityAction.m \
1369 JavaAccessibilityUtilities.m \
1370 JavaComponentAccessibility.m \
1371 JavaTextAccessibility.m \
1372 LWCToolkit.m \
1373 GeomUtilities.m \
1374 CPrinterJob.m \
1375 PrintModel.m \
1376 PrinterSurfaceData.m \
1377 PrinterView.m \
1378 QuartzSurfaceData.m \
1379 QuartzRenderer.m \
1380 CTextPipe.m \
1381 ImageSurfaceData.m \
1382 awt_DrawingSurface.m \
1383 \
1384 OGLBlitLoops.c \
1385 OGLBufImgOps.c \
1386 OGLContext.c \
1387 OGLFuncs.c \
1388 OGLMaskBlit.c \
1389 OGLMaskFill.c \
1390 OGLPaints.c \
1391 OGLRenderQueue.c \
1392 OGLRenderer.c \
1393 OGLSurfaceData.c \
1394 OGLTextRenderer.c \
1395 OGLVertexCache.c \
1396 AccelGlyphCache.c \
1397 CUPSfuncs.c
1398
1399
1400 LIBAWT_LWAWT_DIRS := \
1401 $(JDK_TOPDIR)/src/macosx/native/sun/awt \
1402 $(JDK_TOPDIR)/src/macosx/native/sun/font \
1403 $(JDK_TOPDIR)/src/macosx/native/sun/java2d/opengl \
1404 $(JDK_TOPDIR)/src/solaris/native/sun/awt \
1405 $(JDK_TOPDIR)/src/share/native/sun/font \
1406 $(JDK_TOPDIR)/src/share/native/sun/java2d/opengl \
1407
1408 $(eval $(call SetupNativeCompilation,BUILD_LIBAWT_LWAWT, \
1409 LIBRARY := awt_lwawt, \
1410 OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
1411 SRC := $(LIBAWT_LWAWT_DIRS), \
1412 LANG := C, \
1413 INCLUDE_FILES := $(LIBAWT_LWAWT_FILES), \
1414 OPTIMIZATION := LOW, \
1415 CFLAGS := $(CFLAGS_JDKLIB) \
1416 $(X_CFLAGS) \
1417 $(X_LIBS) \
1418 $(foreach dir, $(LIBAWT_LWAWT_DIRS), -I$(dir)) \
1419 -I$(JDK_TOPDIR)/src/macosx/native/sun/osxapp \
1420 -I$(JDK_TOPDIR)/src/share/native/sun/java2d \
1421 -I$(JDK_TOPDIR)/src/solaris/native/sun/java2d \
1422 -I$(JDK_TOPDIR)/src/share/native/sun/awt/image \
1423 -I$(JDK_TOPDIR)/src/share/native/sun/awt/image/cvutils \
1424 -I$(JDK_TOPDIR)/src/share/native/sun/java2d/loops \
1425 -I$(JDK_TOPDIR)/src/share/native/sun/java2d/pipe \
1426 -I$(JDK_TOPDIR)/src/share/native/sun/awt/debug \
1427 -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
1428 -F/System/Library/Frameworks/ApplicationServices.framework/Frameworks, \
1429 LDFLAGS := $(LDFLAGS_JDKLIB) \
1430 $(call SET_SHARED_LIBRARY_ORIGIN), \
1431 LDFLAGS_SUFFIX_macosx := -lawt -lmlib_image -losxapp -ljvm $(LIBM) \
1432 -framework Accelerate \
1433 -framework ApplicationServices \
1434 -framework AudioToolbox \
1435 -framework Carbon \
1436 -framework Cocoa \
1437 -framework Security \
1438 -framework ExceptionHandling \
1439 -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
1440 -framework JavaNativeFoundation \
1441 -framework JavaRuntimeSupport \
1442 -framework OpenGL \
1443 -framework QuartzCore -ljava, \
1444 OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libawt_lwawt, \
1445 DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
1446
1447 BUILD_LIBRARIES += $(BUILD_LIBAWT_LWAWT)
1448
1449 $(BUILD_LIBAWT_LWAWT): $(BUILD_LIBAWT)
1450
1451 $(BUILD_LIBAWT_LWAWT): $(BUILD_LIBMLIB_IMAGE)
1452
1453 $(BUILD_LIBAWT_LWAWT): $(BUILD_LIBOSXAPP)
1454
1455 $(BUILD_LIBAWT_LWAWT): $(BUILD_LIBJAVA)
1456
1457endif
1458
1459##########################################################################################
1460
1461ifeq ($(OPENJDK_TARGET_OS), macosx)
1462
1463 $(eval $(call SetupNativeCompilation,BUILD_LIBOSXUI, \
1464 LIBRARY := osxui, \
1465 OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
1466 SRC := $(JDK_TOPDIR)/src/macosx/native/com/apple/laf, \
1467 LANG := C, \
1468 OPTIMIZATION := LOW, \
1469 CFLAGS := $(CFLAGS_JDKLIB) \
1470 -I$(JDK_TOPDIR)/src/macosx/native/com/apple/laf \
1471 -I$(JDK_TOPDIR)/src/macosx/native/sun/osxapp \
1472 -I$(JDK_TOPDIR)/src/macosx/native/sun/awt \
1473 -F/System/Library/Frameworks/JavaVM.framework/Frameworks, \
1474 LDFLAGS := $(LDFLAGS_JDKLIB) \
1475 $(call SET_SHARED_LIBRARY_ORIGIN) \
1476 -Xlinker -rpath -Xlinker @loader_path, \
1477 LDFLAGS_SUFFIX_macosx := -lawt -losxapp -lawt_lwawt \
1478 -framework Cocoa \
1479 -framework Carbon \
1480 -framework ApplicationServices \
1481 -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
1482 -framework JavaNativeFoundation \
1483 -framework JavaRuntimeSupport \
1484 -ljava -ljvm, \
1485 OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libosxui, \
1486 DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
1487
1488 BUILD_LIBRARIES += $(BUILD_LIBOSXUI)
1489
1490 $(BUILD_LIBOSXUI): $(BUILD_LIBAWT)
1491
1492 $(BUILD_LIBOSXUI): $(BUILD_LIBOSXAPP)
1493
1494 $(BUILD_LIBOSXUI): $(BUILD_LIBAWT_LWAWT)
1495
1496 #$(BUILD_LIBOSXUI): $(BUILD_LIBJAVA)
1497
1498endif