blob: ed9361294a4cd2e10614ac12bfd070dc879bf60a [file] [log] [blame]
duke6e45e102007-12-01 00:00:00 +00001#
michaelm5ac8c152012-03-06 20:34:38 +00002# Copyright (c) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
duke6e45e102007-12-01 00:00:00 +00003# 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
ohair2283b9d2010-05-25 15:58:33 -07007# published by the Free Software Foundation. Oracle designates this
duke6e45e102007-12-01 00:00:00 +00008# particular file as subject to the "Classpath" exception as provided
ohair2283b9d2010-05-25 15:58:33 -07009# by Oracle in the LICENSE file that accompanied this code.
duke6e45e102007-12-01 00:00:00 +000010#
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#
ohair2283b9d2010-05-25 15:58:33 -070021# 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.
duke6e45e102007-12-01 00:00:00 +000024#
25
26BUILDDIR = ../..
27PACKAGE = sun.awt
28LIBRARY = awt
29PRODUCT = sun
30
duke6e45e102007-12-01 00:00:00 +000031# Tell Defs.gmk that VIS is needed
duke6e45e102007-12-01 00:00:00 +000032VIS_NEEDED=true
33
duke6e45e102007-12-01 00:00:00 +000034# Use highest optimization level
ohair850fb252008-07-30 19:40:57 -070035OPTMIZATION_LEVEL = HIGHEST
36
37include $(BUILDDIR)/common/Defs.gmk
duke6e45e102007-12-01 00:00:00 +000038
39OTHER_CFLAGS += -D__MEDIALIB_OLD_NAMES -D__USE_J2D_NAMES
40
41#
42# Files
43#
44
45#
46# Include all Java source files in sun/awt and sun/java2d, except for:
47# sun/awt/resources handled by java/awt/Makefile
48# sun/java2d/pisces handled by sun/pisces/Makefile
49#
anthony421dab82009-02-04 11:58:13 +030050AUTO_FILES_JAVA_DIRS = sun/awt sun/java2d com/sun/awt
duke6e45e102007-12-01 00:00:00 +000051AUTO_JAVA_PRUNE = resources pisces
52
53ifeq ($(PLATFORM), windows)
54# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv WINDOWS
55
56#
57# Files
58#
59include FILES_c_windows.gmk
60include FILES_export_windows.gmk
61
62#
63# Prune files that are currently unused on Windows (but still used on
64# Solaris/Linux).
65#
66AUTO_JAVA_PRUNE += RemoteOffScreenImage.java
67
duke6e45e102007-12-01 00:00:00 +000068OTHER_CFLAGS += $(GX_OPTION) -DMLIB_NO_LIBSUNMATH -DUNICODE -D_UNICODE
69OTHER_CXXFLAGS += $(GX_OPTION) -DUNICODE -D_UNICODE
70
71ifeq ($(ARCH_DATA_MODEL), 64)
72 OTHER_CFLAGS += -DMLIB_OS64BIT
73endif
74
75# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ WINDOWS
76endif # PLATFORM
77
78ifneq ($(PLATFORM), windows)
79# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv SOLARIS/LINUX
80
81#
82# Files
83#
84include FILES_c_unix.gmk
85include FILES_export_unix.gmk
86#
87# Prune the sun/awt/X11 subdirectory, which is handled by sun/xawt/Makefile.
88# Also prune files that are currently unused on Solaris/Linux (but still
89# used on Windows).
90#
91AUTO_JAVA_PRUNE += X11 AWTCharset.java
92
93ifeq ($(PLATFORM), solaris)
94FILES_c = $(FILES_2D_c)
95FILES_c += awt_LoadLibrary.c
michaelm5ac8c152012-03-06 20:34:38 +000096OTHER_LDLIBS = $(JVMLIB) $(LIBM) $(LIBDL)
duke6e45e102007-12-01 00:00:00 +000097ifeq ($(CC_VER), 5.8)
98 ifndef REMOVE_ALL_WORKAROUNDS
99 ifeq ($(ARCH_FAMILY), i586)
100 # If on Solaris 11 (or dlfcn.h has unknown_control_flow pragmas in it)
101 # we trigger a SS11 bug that causes the compiler to crash (bug 6343678)
102 # Here we check to see if we need this workaround and change the opt
103 # settings for this one file.
104 USE_WORKAROUND:=$(shell $(GREP) unknown_control_flow /usr/include/dlfcn.h)
105 ifneq ($(USE_WORKAROUND),)
106 ifeq ($(FASTDEBUG), true)
107 CFLAGS_DBG/awt_Mlib.o = -xO0 \
108 $(warning "WARNING: Using workaround for SS11 bug 6343678, on $@")
109 endif
110 # Compiler bug 6343678 need to prevent a SEGV in the compiler
111 CFLAGS_OPT/awt_Mlib.o = -g \
112 $(warning "WARNING: Using workaround for SS11 bug 6343678, on $@")
113 endif
114 endif
115 endif
116endif
117endif
118
119ifeq ($(PLATFORM), linux)
120FILES_c = $(FILES_2D_c)
121FILES_c += awt_LoadLibrary.c
122OTHER_CFLAGS += -DMLIB_NO_LIBSUNMATH
michaelm5ac8c152012-03-06 20:34:38 +0000123OTHER_LDLIBS = $(JVMLIB) $(LIBM) $(LIBDL)
duke6e45e102007-12-01 00:00:00 +0000124endif
125
126FILES_c += initIDs.c
127
michaelm5ac8c152012-03-06 20:34:38 +0000128ifeq ($(PLATFORM), macosx)
129FILES_c = $(FILES_2D_c)
130FILES_c += awt_LoadLibrary.c
131OTHER_CFLAGS += -DMLIB_NO_LIBSUNMATH
132OTHER_LDLIBS = $(JVMLIB) $(LIBM)
133endif
134
duke6e45e102007-12-01 00:00:00 +0000135# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SOLARIS/LINUX
136endif # PLATFORM
137
michaelm5ac8c152012-03-06 20:34:38 +0000138ifeq ($(PLATFORM), macosx)
139# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv MAC OS X
140
141#
142# Files
143#
144include FILES_c_macosx.gmk
145include FILES_export_macosx.gmk
146
147FILES_objc = $(FILES_AWT_objc)
148OTHER_LDLIBS = -lmlib_image $(JVMLIB) $(LIBM) \
149 -framework Cocoa \
150 -framework OpenGL \
151 -framework JavaNativeFoundation \
152 -framework JavaRuntimeSupport \
153 -framework ApplicationServices \
154 -framework AudioToolbox
155
156# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ MAC OS X
157endif # PLATFORM
158
duke6e45e102007-12-01 00:00:00 +0000159# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv SOLARIS-SPARC
160# solaris-sparc and solaris-sparcv9 both build 'vis'
161ifeq ("$(PLATFORM)-$(ARCH_FAMILY)", "solaris-sparc")
162 FILES_c += $(FILES_2D_vis)
163 ASFLAGS += -P
164 FILES_s += mlib_v_ImageCopy_blk.s
165 INLINE_VIS = $(PLATFORM_SRC)/native/sun/awt/medialib/vis_$(ARCH_DATA_MODEL).il
166 CFLAGS_sparcv9 = -DMLIB_OS64BIT
167
168 CFLAGS += $(CFLAGS_$(ARCH)) -DMLIB_ADD_SUFF $(INLINE_VIS) \
169 -I$(SHARE_SRC)/native/sun/awt/medialib \
170 -I$(PLATFORM_SRC)/native/sun/awt/medialib \
171 -I$(PLATFORM_SRC)/native/sun/java2d/loops
172
173vpath %.c $(PLATFORM_SRC)/native/sun/java2d/loops
174vpath %.c $(SHARE_SRC)/native/sun/awt/medialib
175vpath %.c $(PLATFORM_SRC)/native/sun/awt/medialib
176vpath %.s $(PLATFORM_SRC)/native/sun/awt/medialib
177
178else
179 FILES_c += MapAccelFunc.c
180endif
181# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SOLARIS-SPARC
182
183#
184# Resources
185#
186LOCALE_SET_DEFINITION = jre
187ifeq ($(PLATFORM), windows)
188 RESOURCE_BUNDLES_COMPILED_PROPERTIES += \
189 sun/awt/windows/awtLocalization.properties
190endif
191
192#
193# Rules
194#
195ifeq ($(PLATFORM), linux)
196 FILES_m = mapfile-vers-linux
197 # libawt.so on Linux is statically linked with Motif and contains all the
198 # Xm symbols. Mapfile is disabled so the symbols will remain public.
199 LDNOMAP=true
200endif
201
202include $(BUILDDIR)/common/Mapfile-vers.gmk
203include $(BUILDDIR)/common/Library.gmk
204
okutsudb181462010-12-15 11:38:34 +0900205COMPILEFONTCONFIG_FLAGS =
206ifdef ALT_COMPILEFONTCONFIG_FLAGS
207 COMPILEFONTCONFIG_FLAGS += $(ALT_COMPILEFONTCONFIG_FLAGS)
208endif
duke6e45e102007-12-01 00:00:00 +0000209build: fontconfigs
210
211
212ifeq ($(PLATFORM), windows)
213# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv WINDOWS
214#
215# Additional dependencies.
216#
217# If make.depend is not working correctly, then it can be omitted
218# if you always build from a clean workspace.
219
220include make.depend
221
222# required additional rules:
223
224# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ WINDOWS
225endif # PLATFORM
226
227ifneq ($(PLATFORM), windows)
228# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv SOLARIS/LINUX
229
230ifndef OPENJDK
231build: dgalibs
232endif
233# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SOLARIS/LINUX
234endif # PLATFORM
235
236clobber clean:: java2d.clean fontconfigs.clean
237
238ifndef OPENJDK
239clobber clean:: dgalib.clean
240endif
241
242java2d.clean:
243 $(RM) -r $(CLASSBINDIR)/sun/java2d .classes.*
244
245#
246# Add to the ambient vpath to pick up files in subdirectories
247#
248vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/image
249vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/image/gif
250vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/image/cvutils
251vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/shell
252vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/medialib
253vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/debug
art433d2732009-02-11 17:07:06 +0300254vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/utility
duke6e45e102007-12-01 00:00:00 +0000255vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/../java2d
256vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/../java2d/loops
257vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/../java2d/pipe
258vpath %.cpp $(SHARE_SRC)/native/$(PKGDIR)/image
259ifeq ($(PLATFORM), windows)
260# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv WINDOWS
261vpath %.cpp $(PLATFORM_SRC)/native/sun/windows
262vpath %.cpp $(PLATFORM_SRC)/native/$(PKGDIR)
263vpath %.cpp $(PLATFORM_SRC)/native/$(PKGDIR)/../java2d/windows
264vpath %.cpp $(PLATFORM_SRC)/native/$(PKGDIR)/../java2d/d3d
265vpath %.c $(PLATFORM_SRC)/native/$(PKGDIR)/../java2d/opengl
266vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/../java2d/opengl
267vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/../font
268# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ WINDOWS
269endif # PLATFORM
270
michaelm5ac8c152012-03-06 20:34:38 +0000271ifneq (,$(findstring $(PLATFORM), linux bsd))
duke6e45e102007-12-01 00:00:00 +0000272# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv LINUX
273vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/../java2d/opengl
274vpath %.c $(PLATFORM_SRC)/native/$(PKGDIR)/../java2d/opengl
275vpath %.c $(PLATFORM_SRC)/native/$(PKGDIR)/../java2d/x11
276vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/../font
277# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ LINUX
278endif # PLATFORM
279
michaelm5ac8c152012-03-06 20:34:38 +0000280ifeq ($(PLATFORM), macosx)
281# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv MAC OS X
282vpath %.m $(call NativeSrcDirList,,native/com/apple/resources)
283# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ MAC OS X
284endif # PLATFORM
285
duke6e45e102007-12-01 00:00:00 +0000286ifeq ($(PLATFORM), windows)
287# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv WINDOWS
288OTHER_LDLIBS = kernel32.lib user32.lib gdi32.lib winspool.lib \
art591952e2008-08-26 13:09:34 +0400289 imm32.lib ole32.lib uuid.lib shell32.lib \
uta28a2b552009-12-24 17:19:09 +0300290 comdlg32.lib winmm.lib comctl32.lib \
291 shlwapi.lib delayimp.lib \
art591952e2008-08-26 13:09:34 +0400292 $(JVMLIB) \
293 /DELAYLOAD:user32.dll /DELAYLOAD:gdi32.dll \
294 /DELAYLOAD:shell32.dll /DELAYLOAD:winmm.dll \
295 /DELAYLOAD:winspool.drv /DELAYLOAD:imm32.dll \
296 /DELAYLOAD:ole32.dll /DELAYLOAD:comdlg32.dll \
uta28a2b552009-12-24 17:19:09 +0300297 /DELAYLOAD:comctl32.dll /DELAYLOAD:shlwapi.dll
duke6e45e102007-12-01 00:00:00 +0000298
299clean:: awt.clean
300
301awt.clean:
302 $(RM) $(TEMPDIR)/awt.ico
303 $(RM) $(TEMPDIR)/awt.res
304 $(RM) $(TEMPDIR)/hand.cur
305 $(RM) $(TEMPDIR)/check.bmp
306# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ WINDOWS
307endif # PLATFORM
308
309ifneq ($(PLATFORM), windows)
310# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv SOLARIS/LINUX
311
312LIBXTST = -lXtst
313
314# Use -lXmu for EditRes support
315LIBXMU_DBG = -lXmu
316LIBXMU_OPT =
317LIBXMU = $(LIBXMU_$(VARIANT))
318
319#
320# Extra C flags.
321#
322
323
324ifndef OPENJDK
325
326#
327# Solaris X11 Direct Graphics Access library
328#
329
330_DGALIBS_sparc = \
331 libxinerama.so \
332 libjdgaSUNWcg6.so \
333 libjdgaSUNWffb.so \
334 libjdgaSUNWm64.so \
335 libjdgaSUNWafb.so
336
337_DGALIBS_sparcv9 = \
338 libxinerama.so \
339 libjdgaSUNWcg6.so \
340 libjdgaSUNWffb.so \
341 libjdgaSUNWm64.so \
342 libjdgaSUNWafb.so
343
344_DGALIBS_i586 = # no i586 library yet
345
346_DGALIBS_amd64 = # no amd64 library yet
347
348DGALIBS = $(_DGALIBS_$(ARCH):%=$(LIBDIR)/$(LIBARCH)/%)
349
350dgalibs: $(DGALIBS)
351
352$(LIBDIR)/$(LIBARCH)/libxinerama.so: $(CLOSED_SRC)/solaris/lib/$(ARCH)/libxinerama.so
353 $(install-file)
mchung3baa2d62010-01-07 08:14:48 -0800354 $(call chmod-file, a+x)
duke6e45e102007-12-01 00:00:00 +0000355
356$(LIBDIR)/$(LIBARCH)/libjdgaSUNW%.so: $(CLOSED_SRC)/solaris/lib/$(ARCH)/libjdgaSUNW%.so
357 $(install-file)
mchung3baa2d62010-01-07 08:14:48 -0800358 $(call chmod-file, a+x)
duke6e45e102007-12-01 00:00:00 +0000359
360$(LIBDIR)/$(LIBARCH)/libjdgaSUNWafb.so: $(LIBDIR)/$(LIBARCH)/libjdgaSUNWffb.so
361 $(prep-target)
mchung3baa2d62010-01-07 08:14:48 -0800362 $(call install-sym-link, libjdgaSUNWffb.so)
duke6e45e102007-12-01 00:00:00 +0000363
364clean:: dgalib.clean
365
366dgalib.clean:
367 $(RM) $(LIBDIR)/$(LIBARCH)/libjdgaSUNW* $(LIBDIR)/$(LIBARCH)/libxinerama.so
368endif
369
370# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SOLARIS/LINUX
371endif # PLATFORM
372
373#
374# Font configs
375#
376
377ifeq ($(PLATFORM), windows)
378# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv WINDOWS
379
380FONTCONFIGS_SRC = $(PLATFORM_SRC)/classes/sun/awt/windows
381_FONTCONFIGS = \
prr943cc3b2008-12-18 11:25:09 -0800382 fontconfig.properties
duke6e45e102007-12-01 00:00:00 +0000383
384FONTCONFIGS_SRC_PREFIX =
385
386# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ WINDOWS
387endif # PLATFORM
388
389ifeq ($(PLATFORM), linux)
390# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv LINUX
391ifdef OPENJDK
392
393FONTCONFIGS_SRC = $(PLATFORM_SRC)/classes/sun/awt/fontconfigs
394_FONTCONFIGS = \
395 fontconfig.properties \
396 fontconfig.SuSE.properties \
397 fontconfig.Ubuntu.properties \
398 fontconfig.Fedora.properties
399else
400
401FONTCONFIGS_SRC = $(CLOSED_SRC)/solaris/classes/sun/awt/fontconfigs
402_FONTCONFIGS = \
403 fontconfig.properties \
dbucka6ed22f2012-01-16 11:52:51 +0400404 fontconfig.RedHat.5.properties \
405 fontconfig.RedHat.6.properties \
duke6e45e102007-12-01 00:00:00 +0000406 fontconfig.Turbo.properties \
okutsube547ff2010-12-09 12:36:58 +0900407 fontconfig.SuSE.10.properties \
408 fontconfig.SuSE.11.properties
duke6e45e102007-12-01 00:00:00 +0000409endif
410
411FONTCONFIGS_SRC_PREFIX = $(PLATFORM).
412
413# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ LINUX
414endif # PLATFORM
415
416ifeq ($(PLATFORM), solaris)
417# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv SOLARIS
418
419FONTCONFIGS_SRC = $(PLATFORM_SRC)/classes/sun/awt/fontconfigs
420_FONTCONFIGS = \
prr16f235f2011-01-20 13:56:26 -0800421 fontconfig.properties
duke6e45e102007-12-01 00:00:00 +0000422
423FONTCONFIGS_SRC_PREFIX = $(PLATFORM).
424
425# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SOLARIS
426endif # PLATFORM
427
michaelm5ac8c152012-03-06 20:34:38 +0000428
429ifeq ($(PLATFORM), macosx)
430# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv MAC OS X
431
432FONTCONFIGS_SRC = $(JDK_TOPDIR)/src/macosx/classes/sun/awt/fontconfigs
433_FONTCONFIGS = \
434 fontconfig.properties
435
436FONTCONFIGS_SRC_PREFIX = $(PLATFORM).
437
438# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ MAC OS X
439endif # PLATFORM
440
duke6e45e102007-12-01 00:00:00 +0000441FONTCONFIGS = $(_FONTCONFIGS:%=$(LIBDIR)/%.src)
442BINARYFONTCONFIGS = $(_FONTCONFIGS:%.properties=$(LIBDIR)/%.bfc)
443
444fontconfigs: $(FONTCONFIGS) $(BINARYFONTCONFIGS)
445
446$(LIBDIR)/%.src: $(FONTCONFIGS_SRC)/$(FONTCONFIGS_SRC_PREFIX)%
447 $(install-file)
448
449COMPILEFONTCONFIG_JARFILE = $(BUILDTOOLJARDIR)/compilefontconfig.jar
450
451$(LIBDIR)/%.bfc: $(FONTCONFIGS_SRC)/$(FONTCONFIGS_SRC_PREFIX)%.properties \
452 $(COMPILEFONTCONFIG_JARFILE)
453 $(prep-target)
okutsudb181462010-12-15 11:38:34 +0900454 $(BOOT_JAVA_CMD) -jar $(COMPILEFONTCONFIG_JARFILE) $(COMPILEFONTCONFIG_FLAGS) $< $@
mchung3baa2d62010-01-07 08:14:48 -0800455 $(call chmod-file, 444)
duke6e45e102007-12-01 00:00:00 +0000456 @$(java-vm-cleanup)
457
458fontconfigs.clean :
459 $(RM) $(FONTCONFIGS)
460 $(RM) $(BINARYFONTCONFIGS)
461
462ifeq ($(PLATFORM), windows)
463# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv WINDOWS
464OTHER_CFLAGS += $(GX_OPTION) -DUNICODE -D_UNICODE
465
466ifeq ($(MILESTONE), internal)
467 CPPFLAGS += -DINTERNAL_BUILD
468endif
469
470#
471# Useful variables that name parts of the src tree.
472#
473WINAWT_native = $(PLATFORM_SRC)/native/sun/windows
474WINAWT_COMMON_native = $(PLATFORM_SRC)/native/sun/awt_common
475
476# FIXME: awt shouldn't have to see the VM's private headers.
477# FIXME: if you re-order this list, the build breaks, possibly because
478# of filename collision. Such a collision, if present, is pure
479# evil. Need to investigate this.
480
481OTHER_INCLUDES += -I$(CLASSHDRDIR)/../../java/jvm \
482 -I$(OBJDIR) \
483 -I$(SHARE_SRC)/native/common \
484 -I$(WINAWT_native) \
485 -I$(DXSDK_INCLUDE_PATH) \
486 -I$(SHARE_SRC)/native/sun/awt/image/cvutils \
487 -I$(SHARE_SRC)/native/sun/awt/image \
488 -I$(SHARE_SRC)/native/sun/java2d/loops \
489 -I$(SHARE_SRC)/native/sun/java2d \
490 -I$(PLATFORM_SRC)/native/sun/java2d \
491 -I$(SHARE_SRC)/native/sun/java2d/opengl \
492 -I$(PLATFORM_SRC)/native/sun/java2d/d3d \
493 -I$(PLATFORM_SRC)/native/sun/java2d/opengl \
494 -I$(PLATFORM_SRC)/native/sun/java2d/windows \
495 -I$(SHARE_SRC)/native/sun/font \
496 -I$(SHARE_SRC)/native/sun/java2d/pipe \
497 -I$(SHARE_SRC)/native/sun/dc/path \
498 -I$(SHARE_SRC)/native/sun/dc/doe \
499 -I$(SHARE_SRC)/native/sun/awt/debug \
tdvcf2e2232008-07-18 10:48:44 -0700500 -I$(PLATFORM_SRC)/native/sun/awt
duke6e45e102007-12-01 00:00:00 +0000501# -I$(WINAWT_COMMON_native)
502
503# this is only required for compiling )/native/sun/awt/medialib/*.c files
504#
505OTHER_INCLUDES += -I$(SHARE_SRC)/native/sun/awt/medialib
506
507#
508# .res file construction.
509#
510
511ifdef OPENJDK
512 RC_FLAGS += -i "$(PLATFORM_SRC)/resource/icons"
513else
514 RC_FLAGS += -i "$(CLOSED_SRC)/windows/native/sun/windows"
515endif
516VERSIONINFO_RESOURCE = $(WINAWT_native)/awt.rc
517
518# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ WINDOWS
519endif # PLATFORM
520
521ifneq ($(PLATFORM), windows)
522# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv SOLARIS/LINUX
523
524#
525# Other extra flags needed for compiling.
526#
527
528ifeq ($(PLATFORM), linux)
529CPPFLAGS += -I$(OPENWIN_HOME)/include \
530 -I$(OPENWIN_HOME)/include/X11/extensions \
531 -I$(PLATFORM_SRC)/native/$(PKGDIR)/font
532endif
533CPPFLAGS += -I$(SHARE_SRC)/native/$(PKGDIR)/debug \
534 -I$(SHARE_SRC)/native/$(PKGDIR)/../font \
535 -I$(PLATFORM_SRC)/native/$(PKGDIR)/../font \
536 -I$(SHARE_SRC)/native/$(PKGDIR)/image \
537 -I$(SHARE_SRC)/native/$(PKGDIR)/image/cvutils \
538 -I$(SHARE_SRC)/native/$(PKGDIR)/shell \
539 -I$(SHARE_SRC)/native/$(PKGDIR)/medialib \
540 -I$(PLATFORM_SRC)/native/$(PKGDIR)/medialib \
541 -I$(SHARE_SRC)/native/$(PKGDIR)/../java2d \
542 -I$(PLATFORM_SRC)/native/$(PKGDIR)/../java2d \
543 -I$(SHARE_SRC)/native/$(PKGDIR)/../java2d/loops \
544 -I$(SHARE_SRC)/native/$(PKGDIR)/../java2d/pipe \
545 -I$(SHARE_SRC)/native/$(PKGDIR)/../java2d/opengl \
546 -I$(PLATFORM_SRC)/native/$(PKGDIR)/../java2d/opengl \
547 -I$(PLATFORM_SRC)/native/$(PKGDIR)/../java2d/x11 \
548 -I$(SHARE_SRC)/native/$(PKGDIR)/../dc/doe \
549 -I$(SHARE_SRC)/native/$(PKGDIR)/../dc/path \
550 -I$(PLATFORM_SRC)/native/$(PKGDIR)/../jdga \
551 -I$(PLATFORM_SRC)/native/$(PKGDIR) \
552 $(EVENT_MODEL)
553
554ifeq ($(PLATFORM), linux)
555LDFLAGS += -L$(OPENWIN_LIB)
556endif
557
558LDFLAGS += -L$(LIBDIR)/$(LIBARCH)/$(TSOBJDIR) \
559 $(AWT_RUNPATH)
560
561# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SOLARIS/LINUX
562endif # PLATFORM
563
564CLASSES.export += java.io.InputStream \
565 java.lang.Integer \
566 java.lang.ThreadGroup
567
568.PHONY: dgalibs dgalib.clean fontconfigs fontconfigs.clean
569