Makefile 19.2 KB
Newer Older
D
duke 已提交
1
#
2
# Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
D
duke 已提交
3 4 5 6
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
7
# published by the Free Software Foundation.  Oracle designates this
D
duke 已提交
8
# particular file as subject to the "Classpath" exception as provided
9
# by Oracle in the LICENSE file that accompanied this code.
D
duke 已提交
10 11 12 13 14 15 16 17 18 19 20
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
21 22 23
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
D
duke 已提交
24 25 26 27 28 29 30 31 32 33 34
#

BUILDDIR = ../..
PACKAGE = sun.awt
LIBRARY = awt
PRODUCT = sun

# Tell Defs.gmk that VIS is needed
VIS_NEEDED=true

# Use highest optimization level
35 36 37
OPTMIZATION_LEVEL = HIGHEST

include $(BUILDDIR)/common/Defs.gmk
D
duke 已提交
38 39 40

OTHER_CFLAGS += -D__MEDIALIB_OLD_NAMES -D__USE_J2D_NAMES

41 42 43 44
ifneq  ($(PLATFORM), windows)
CLASSES_INIT += $(TEMPDIR)/.gen_icons
endif

D
duke 已提交
45 46 47 48 49 50 51 52 53
#
# Files
#

#
# Include all Java source files in sun/awt and sun/java2d, except for:
# sun/awt/resources       handled by java/awt/Makefile
# sun/java2d/pisces       handled by sun/pisces/Makefile
#
54
AUTO_FILES_JAVA_DIRS = sun/awt sun/java2d com/sun/awt
D
duke 已提交
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
AUTO_JAVA_PRUNE = resources pisces

ifeq ($(PLATFORM), windows)
# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv WINDOWS

#
# Files
#
include FILES_c_windows.gmk
include FILES_export_windows.gmk

#
# Prune files that are currently unused on Windows (but still used on
# Solaris/Linux).
#
AUTO_JAVA_PRUNE += RemoteOffScreenImage.java

OTHER_CFLAGS += $(GX_OPTION) -DMLIB_NO_LIBSUNMATH -DUNICODE -D_UNICODE
OTHER_CXXFLAGS += $(GX_OPTION) -DUNICODE -D_UNICODE

ifeq ($(ARCH_DATA_MODEL), 64)
  OTHER_CFLAGS += -DMLIB_OS64BIT
endif

# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ WINDOWS
endif # PLATFORM

ifneq ($(PLATFORM), windows)
# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv SOLARIS/LINUX

#
# Files
#
include FILES_c_unix.gmk
include FILES_export_unix.gmk
#
# Prune the sun/awt/X11 subdirectory, which is handled by sun/xawt/Makefile.
# Also prune files that are currently unused on Solaris/Linux (but still
# used on Windows).
#
AUTO_JAVA_PRUNE += X11 AWTCharset.java

ifeq  ($(PLATFORM), solaris)
FILES_c = $(FILES_2D_c)
FILES_c += awt_LoadLibrary.c
100
OTHER_LDLIBS = $(JVMLIB) $(LIBM) $(LIBDL)
D
duke 已提交
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126
ifeq ($(CC_VER), 5.8)
  ifndef REMOVE_ALL_WORKAROUNDS
    ifeq ($(ARCH_FAMILY), i586)
      # If on Solaris 11 (or dlfcn.h has unknown_control_flow pragmas in it)
      #   we trigger a SS11 bug that causes the compiler to crash (bug 6343678)
      #   Here we check to see if we need this workaround and change the opt 
      #   settings for this one file.
      USE_WORKAROUND:=$(shell $(GREP) unknown_control_flow /usr/include/dlfcn.h)
      ifneq ($(USE_WORKAROUND),)
	ifeq ($(FASTDEBUG), true)
          CFLAGS_DBG/awt_Mlib.o = -xO0 \
	    $(warning  "WARNING: Using workaround for SS11 bug 6343678, on $@")
	endif
        # Compiler bug 6343678 need to prevent a SEGV in the compiler
        CFLAGS_OPT/awt_Mlib.o = -g \
	  $(warning  "WARNING: Using workaround for SS11 bug 6343678, on $@")
      endif
    endif
  endif
endif
endif

ifeq  ($(PLATFORM), linux)
FILES_c = $(FILES_2D_c)
FILES_c += awt_LoadLibrary.c
OTHER_CFLAGS += -DMLIB_NO_LIBSUNMATH
127
OTHER_LDLIBS = $(JVMLIB) $(LIBM) $(LIBDL)
D
duke 已提交
128 129 130 131
endif

FILES_c += initIDs.c

132 133 134 135 136 137 138
ifeq ($(PLATFORM), macosx)
FILES_c = $(FILES_2D_c)
FILES_c += awt_LoadLibrary.c
OTHER_CFLAGS += -DMLIB_NO_LIBSUNMATH
OTHER_LDLIBS = $(JVMLIB) $(LIBM)
endif

D
duke 已提交
139 140 141
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SOLARIS/LINUX
endif # PLATFORM 

142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160
ifeq ($(PLATFORM), macosx)
# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv MAC OS X

#
# Files
#

FILES_objc = $(FILES_AWT_objc)
OTHER_LDLIBS = -lmlib_image $(JVMLIB) $(LIBM) \
    -framework Cocoa \
    -framework OpenGL \
    -framework JavaNativeFoundation \
    -framework JavaRuntimeSupport \
    -framework ApplicationServices \
    -framework AudioToolbox

# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ MAC OS X
endif # PLATFORM 

D
duke 已提交
161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206
# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv SOLARIS-SPARC
# solaris-sparc and solaris-sparcv9 both build 'vis'
ifeq ("$(PLATFORM)-$(ARCH_FAMILY)", "solaris-sparc")
  FILES_c += $(FILES_2D_vis)
  ASFLAGS += -P
  FILES_s += mlib_v_ImageCopy_blk.s
  INLINE_VIS = $(PLATFORM_SRC)/native/sun/awt/medialib/vis_$(ARCH_DATA_MODEL).il
  CFLAGS_sparcv9 = -DMLIB_OS64BIT
  
  CFLAGS += $(CFLAGS_$(ARCH)) -DMLIB_ADD_SUFF $(INLINE_VIS) \
	    -I$(SHARE_SRC)/native/sun/awt/medialib \
	    -I$(PLATFORM_SRC)/native/sun/awt/medialib \
	    -I$(PLATFORM_SRC)/native/sun/java2d/loops

vpath %.c  $(PLATFORM_SRC)/native/sun/java2d/loops
vpath %.c  $(SHARE_SRC)/native/sun/awt/medialib
vpath %.c  $(PLATFORM_SRC)/native/sun/awt/medialib
vpath %.s  $(PLATFORM_SRC)/native/sun/awt/medialib

else
  FILES_c += MapAccelFunc.c
endif
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SOLARIS-SPARC

#
# Resources
#
LOCALE_SET_DEFINITION = jre
ifeq ($(PLATFORM), windows)
  RESOURCE_BUNDLES_COMPILED_PROPERTIES += \
	sun/awt/windows/awtLocalization.properties
endif

#
# Rules
#
ifeq ($(PLATFORM), linux)
  FILES_m = mapfile-vers-linux
  # libawt.so on Linux is statically linked with Motif and contains all the
  # Xm symbols. Mapfile is disabled so the symbols will remain public.
  LDNOMAP=true
endif

include $(BUILDDIR)/common/Mapfile-vers.gmk
include $(BUILDDIR)/common/Library.gmk

207 208 209 210
COMPILEFONTCONFIG_FLAGS =
ifdef ALT_COMPILEFONTCONFIG_FLAGS
  COMPILEFONTCONFIG_FLAGS += $(ALT_COMPILEFONTCONFIG_FLAGS)
endif
D
duke 已提交
211 212
build: fontconfigs

213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285
ifneq ($(PLATFORM), windows)

GEN_DIR=$(GENSRCDIR)/sun/awt/

ifdef OPENJDK
    ICONS_PATH_PREFIX=$(PLATFORM_SRC)
else
    ICONS_PATH_PREFIX=$(CLOSED_SRC)/solaris
endif

ICONS = \
    $(ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon16.png \
    $(ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon24.png \
    $(ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon32.png \
    $(ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon48.png

ICONPATH=$(SHARE_SRC)/classes/sun/awt/resources

ICONS += \
   $(ICONPATH)/security-icon-bw16.png \
   $(ICONPATH)/security-icon-interim16.png \
   $(ICONPATH)/security-icon-yellow16.png \
   $(ICONPATH)/security-icon-bw24.png \
   $(ICONPATH)/security-icon-interim24.png \
   $(ICONPATH)/security-icon-yellow24.png \
   $(ICONPATH)/security-icon-bw32.png \
   $(ICONPATH)/security-icon-interim32.png \
   $(ICONPATH)/security-icon-yellow32.png \
   $(ICONPATH)/security-icon-bw48.png \
   $(ICONPATH)/security-icon-interim48.png \
   $(ICONPATH)/security-icon-yellow48.png

TEMPDIR_CLASSES = $(TEMPDIR)/classes
   
generated.clean:
	$(RM) -r $(GEN_DIR)/*.java
	$(RM) -r $(TEMPDIR)/.gen_icons   

$(TEMPDIR_CLASSES)/sun/awt/ToBin.class: ToBin.java
	@$(prep-target)
	$(BOOT_JAVAC_CMD) -d $(TEMPDIR_CLASSES) $<

$(TEMPDIR)/.gen_icons: $(TEMPDIR_CLASSES)/sun/awt/ToBin.class $(ICONS)
	$(prep-target)
	for i in $(ICONS); do \
            filename=`basename $$i`; \
	    name=`$(ECHO) $$filename | $(TR) '\-.' '__'`;  \
            classname=$(GEN_DIR)/AWTIcon32_$$name.java; \
	    $(RM) $$classname; \
	    $(ECHO) "package sun.awt;" >> $$classname ; \
	    $(ECHO) "public class AWTIcon32_$$name {" >> $$classname; \
	    $(ECHO) "public final static int[] $$name = { " >> $$classname;  \
	    $(CAT) $$i | \
	      $(BOOT_JAVA_CMD) -cp $(TEMPDIR_CLASSES)  \
		-Djava.awt.headless=true \
		sun.awt.ToBin >> $$classname; \
	    $(ECHO) "}; }" >> $$classname;  \
            classname=$(GEN_DIR)/AWTIcon64_$$name.java; \
	    $(RM) $$classname; \
	    $(ECHO) "package sun.awt;" >> $$classname ; \
	    $(ECHO) "public class AWTIcon64_$$name {" >> $$classname; \
	    $(ECHO) "public final static long[] $$name = { " >> $$classname;  \
	    $(CAT) $$i | \
	      $(BOOT_JAVA_CMD) -cp $(TEMPDIR_CLASSES)  \
		-Djava.awt.headless=true \
		sun.awt.ToBin >> $$classname; \
	    $(ECHO) "}; }" >> $$classname;  \
	done
	$(TOUCH) $@

clean clobber:: generated.clean    
endif

D
duke 已提交
286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328

ifeq ($(PLATFORM), windows)
# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv WINDOWS
#
# Additional dependencies.
#
# If make.depend is not working correctly, then it can be omitted
# if you always build from a clean workspace. 

include make.depend

# required additional rules:

# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ WINDOWS
endif # PLATFORM

ifneq ($(PLATFORM), windows)
# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv SOLARIS/LINUX

ifndef OPENJDK
build: dgalibs
endif
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SOLARIS/LINUX
endif # PLATFORM

clobber clean:: java2d.clean fontconfigs.clean

ifndef OPENJDK
clobber clean:: dgalib.clean 
endif

java2d.clean:
	$(RM) -r $(CLASSBINDIR)/sun/java2d .classes.*

#
# Add to the ambient vpath to pick up files in subdirectories
#
vpath %.c   $(SHARE_SRC)/native/$(PKGDIR)/image
vpath %.c   $(SHARE_SRC)/native/$(PKGDIR)/image/gif
vpath %.c   $(SHARE_SRC)/native/$(PKGDIR)/image/cvutils
vpath %.c   $(SHARE_SRC)/native/$(PKGDIR)/shell
vpath %.c   $(SHARE_SRC)/native/$(PKGDIR)/medialib
vpath %.c   $(SHARE_SRC)/native/$(PKGDIR)/debug
329
vpath %.c   $(SHARE_SRC)/native/$(PKGDIR)/utility
D
duke 已提交
330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345
vpath %.c   $(SHARE_SRC)/native/$(PKGDIR)/../java2d
vpath %.c   $(SHARE_SRC)/native/$(PKGDIR)/../java2d/loops
vpath %.c   $(SHARE_SRC)/native/$(PKGDIR)/../java2d/pipe
vpath %.cpp $(SHARE_SRC)/native/$(PKGDIR)/image
ifeq ($(PLATFORM), windows)
# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv WINDOWS
vpath %.cpp   $(PLATFORM_SRC)/native/sun/windows
vpath %.cpp   $(PLATFORM_SRC)/native/$(PKGDIR)
vpath %.cpp   $(PLATFORM_SRC)/native/$(PKGDIR)/../java2d/windows
vpath %.cpp   $(PLATFORM_SRC)/native/$(PKGDIR)/../java2d/d3d
vpath %.c     $(PLATFORM_SRC)/native/$(PKGDIR)/../java2d/opengl
vpath %.c     $(SHARE_SRC)/native/$(PKGDIR)/../java2d/opengl
vpath %.c     $(SHARE_SRC)/native/$(PKGDIR)/../font
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ WINDOWS
endif # PLATFORM

346
ifneq (,$(findstring $(PLATFORM), linux bsd))
D
duke 已提交
347 348 349 350 351 352 353 354
# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv LINUX
vpath %.c   $(SHARE_SRC)/native/$(PKGDIR)/../java2d/opengl
vpath %.c   $(PLATFORM_SRC)/native/$(PKGDIR)/../java2d/opengl
vpath %.c   $(PLATFORM_SRC)/native/$(PKGDIR)/../java2d/x11
vpath %.c   $(SHARE_SRC)/native/$(PKGDIR)/../font
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ LINUX
endif # PLATFORM

355 356 357 358 359 360
ifeq ($(PLATFORM), macosx)
# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv MAC OS X
vpath %.m   $(call NativeSrcDirList,,native/com/apple/resources)
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ MAC OS X
endif # PLATFORM

D
duke 已提交
361 362 363
ifeq ($(PLATFORM), windows)
# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv WINDOWS
OTHER_LDLIBS = kernel32.lib user32.lib gdi32.lib winspool.lib \
364
               imm32.lib ole32.lib uuid.lib shell32.lib \
365 366
               comdlg32.lib winmm.lib comctl32.lib \
               shlwapi.lib delayimp.lib \
367 368 369 370 371
               $(JVMLIB) \
               /DELAYLOAD:user32.dll /DELAYLOAD:gdi32.dll \
               /DELAYLOAD:shell32.dll /DELAYLOAD:winmm.dll \
               /DELAYLOAD:winspool.drv /DELAYLOAD:imm32.dll \
               /DELAYLOAD:ole32.dll /DELAYLOAD:comdlg32.dll \
372
               /DELAYLOAD:comctl32.dll /DELAYLOAD:shlwapi.dll
D
duke 已提交
373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428

clean:: awt.clean

awt.clean: 
	$(RM) $(TEMPDIR)/awt.ico 
	$(RM) $(TEMPDIR)/awt.res 
	$(RM) $(TEMPDIR)/hand.cur 
	$(RM) $(TEMPDIR)/check.bmp
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ WINDOWS
endif # PLATFORM

ifneq ($(PLATFORM), windows)
# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv SOLARIS/LINUX

LIBXTST = -lXtst

# Use -lXmu for EditRes support
LIBXMU_DBG	= -lXmu
LIBXMU_OPT	=
LIBXMU	        = $(LIBXMU_$(VARIANT))

#
# Extra C flags.
#


ifndef OPENJDK

#
# Solaris X11 Direct Graphics Access library
#

_DGALIBS_sparc = \
	libxinerama.so \
	libjdgaSUNWcg6.so \
	libjdgaSUNWffb.so \
	libjdgaSUNWm64.so \
	libjdgaSUNWafb.so

_DGALIBS_sparcv9 = \
	libxinerama.so \
	libjdgaSUNWcg6.so \
	libjdgaSUNWffb.so \
	libjdgaSUNWm64.so \
	libjdgaSUNWafb.so

_DGALIBS_i586 = 	# no i586 library yet

_DGALIBS_amd64 = 	# no amd64 library yet

DGALIBS = $(_DGALIBS_$(ARCH):%=$(LIBDIR)/$(LIBARCH)/%)

dgalibs: $(DGALIBS)

$(LIBDIR)/$(LIBARCH)/libxinerama.so: $(CLOSED_SRC)/solaris/lib/$(ARCH)/libxinerama.so
	$(install-file)
429
	$(call chmod-file, a+x)
D
duke 已提交
430 431 432

$(LIBDIR)/$(LIBARCH)/libjdgaSUNW%.so: $(CLOSED_SRC)/solaris/lib/$(ARCH)/libjdgaSUNW%.so
	$(install-file)
433
	$(call chmod-file, a+x)
D
duke 已提交
434 435 436

$(LIBDIR)/$(LIBARCH)/libjdgaSUNWafb.so: $(LIBDIR)/$(LIBARCH)/libjdgaSUNWffb.so
	$(prep-target)
437
	$(call install-sym-link, libjdgaSUNWffb.so)
D
duke 已提交
438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456

clean:: dgalib.clean

dgalib.clean:
	$(RM) $(LIBDIR)/$(LIBARCH)/libjdgaSUNW* $(LIBDIR)/$(LIBARCH)/libxinerama.so
endif

# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SOLARIS/LINUX
endif # PLATFORM

#
# Font configs
#

ifeq ($(PLATFORM), windows)
# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv WINDOWS

FONTCONFIGS_SRC = $(PLATFORM_SRC)/classes/sun/awt/windows
_FONTCONFIGS = \
457
        fontconfig.properties
D
duke 已提交
458 459 460 461 462 463 464 465 466 467

FONTCONFIGS_SRC_PREFIX =

# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ WINDOWS
endif # PLATFORM

ifeq ($(PLATFORM), linux)
# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv LINUX
ifdef OPENJDK

468 469 470
FONTCONFIGS_SRC	= 
_FONTCONFIGS	= 

D
duke 已提交
471 472 473 474 475
else

FONTCONFIGS_SRC	= $(CLOSED_SRC)/solaris/classes/sun/awt/fontconfigs
_FONTCONFIGS	= \
	fontconfig.properties				\
476 477
	fontconfig.RedHat.5.properties			\
	fontconfig.RedHat.6.properties			\
D
duke 已提交
478
	fontconfig.Turbo.properties			\
O
okutsu 已提交
479 480
	fontconfig.SuSE.10.properties                   \
	fontconfig.SuSE.11.properties
D
duke 已提交
481 482 483 484 485 486 487 488 489 490 491 492
endif

FONTCONFIGS_SRC_PREFIX = $(PLATFORM).

# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ LINUX
endif # PLATFORM

ifeq ($(PLATFORM), solaris)
# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv SOLARIS

FONTCONFIGS_SRC	= $(PLATFORM_SRC)/classes/sun/awt/fontconfigs
_FONTCONFIGS	= \
493
	fontconfig.properties
D
duke 已提交
494 495 496 497 498 499

FONTCONFIGS_SRC_PREFIX = $(PLATFORM).

# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SOLARIS
endif # PLATFORM

500 501 502 503 504 505 506 507 508 509 510 511 512

ifeq ($(PLATFORM), macosx)
# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv MAC OS X

FONTCONFIGS_SRC = $(JDK_TOPDIR)/src/macosx/classes/sun/awt/fontconfigs
_FONTCONFIGS    = \
        fontconfig.properties

FONTCONFIGS_SRC_PREFIX = $(PLATFORM).

# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ MAC OS X
endif # PLATFORM

D
duke 已提交
513 514 515
FONTCONFIGS     = $(_FONTCONFIGS:%=$(LIBDIR)/%.src)
BINARYFONTCONFIGS = $(_FONTCONFIGS:%.properties=$(LIBDIR)/%.bfc)

516
ifneq ("x$(_FONTCONFIGS)", "x")
D
duke 已提交
517
fontconfigs: $(FONTCONFIGS) $(BINARYFONTCONFIGS)
518 519 520
else
fontconfigs:
endif
D
duke 已提交
521 522 523 524 525 526 527 528 529

$(LIBDIR)/%.src: $(FONTCONFIGS_SRC)/$(FONTCONFIGS_SRC_PREFIX)%
	$(install-file)

COMPILEFONTCONFIG_JARFILE = $(BUILDTOOLJARDIR)/compilefontconfig.jar

$(LIBDIR)/%.bfc: $(FONTCONFIGS_SRC)/$(FONTCONFIGS_SRC_PREFIX)%.properties \
    $(COMPILEFONTCONFIG_JARFILE)
	$(prep-target)
530
	$(BOOT_JAVA_CMD) -jar $(COMPILEFONTCONFIG_JARFILE) $(COMPILEFONTCONFIG_FLAGS) $< $@
531
	$(call chmod-file, 444)
D
duke 已提交
532 533
	@$(java-vm-cleanup)

534
ifneq ("x$(_FONTCONFIGS)", "x")
D
duke 已提交
535 536 537
fontconfigs.clean :
	$(RM) $(FONTCONFIGS)
	$(RM) $(BINARYFONTCONFIGS)
538 539 540
else
fontconfigs.clean :
endif
D
duke 已提交
541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579

ifeq ($(PLATFORM), windows)
# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv WINDOWS
OTHER_CFLAGS += $(GX_OPTION) -DUNICODE -D_UNICODE

ifeq ($(MILESTONE), internal)
  CPPFLAGS += -DINTERNAL_BUILD
endif

#
# Useful variables that name parts of the src tree.
#
WINAWT_native        = $(PLATFORM_SRC)/native/sun/windows
WINAWT_COMMON_native = $(PLATFORM_SRC)/native/sun/awt_common

# FIXME: awt shouldn't have to see the VM's private headers.
# FIXME: if you re-order this list, the build breaks, possibly because 
#        of filename collision. Such a collision, if present, is pure
#        evil. Need to investigate this.

OTHER_INCLUDES += -I$(CLASSHDRDIR)/../../java/jvm \
	-I$(OBJDIR) \
	-I$(SHARE_SRC)/native/common \
	-I$(WINAWT_native) \
	-I$(DXSDK_INCLUDE_PATH) \
	-I$(SHARE_SRC)/native/sun/awt/image/cvutils \
	-I$(SHARE_SRC)/native/sun/awt/image \
	-I$(SHARE_SRC)/native/sun/java2d/loops \
	-I$(SHARE_SRC)/native/sun/java2d \
	-I$(PLATFORM_SRC)/native/sun/java2d \
	-I$(SHARE_SRC)/native/sun/java2d/opengl \
	-I$(PLATFORM_SRC)/native/sun/java2d/d3d \
	-I$(PLATFORM_SRC)/native/sun/java2d/opengl \
	-I$(PLATFORM_SRC)/native/sun/java2d/windows \
	-I$(SHARE_SRC)/native/sun/font \
	-I$(SHARE_SRC)/native/sun/java2d/pipe \
	-I$(SHARE_SRC)/native/sun/dc/path \
	-I$(SHARE_SRC)/native/sun/dc/doe \
	-I$(SHARE_SRC)/native/sun/awt/debug \
580
	-I$(PLATFORM_SRC)/native/sun/awt
D
duke 已提交
581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647
#	-I$(WINAWT_COMMON_native)

# this is only required for compiling )/native/sun/awt/medialib/*.c files
#
OTHER_INCLUDES += -I$(SHARE_SRC)/native/sun/awt/medialib

#
# .res file construction.
#

ifdef OPENJDK
    RC_FLAGS += -i "$(PLATFORM_SRC)/resource/icons"
else
    RC_FLAGS += -i "$(CLOSED_SRC)/windows/native/sun/windows"
endif
VERSIONINFO_RESOURCE = $(WINAWT_native)/awt.rc

# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ WINDOWS
endif # PLATFORM

ifneq ($(PLATFORM), windows)
# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv SOLARIS/LINUX

#
# Other extra flags needed for compiling.
#

ifeq ($(PLATFORM), linux)
CPPFLAGS += -I$(OPENWIN_HOME)/include \
            -I$(OPENWIN_HOME)/include/X11/extensions \
            -I$(PLATFORM_SRC)/native/$(PKGDIR)/font 
endif
CPPFLAGS += -I$(SHARE_SRC)/native/$(PKGDIR)/debug \
            -I$(SHARE_SRC)/native/$(PKGDIR)/../font \
            -I$(PLATFORM_SRC)/native/$(PKGDIR)/../font \
            -I$(SHARE_SRC)/native/$(PKGDIR)/image \
	    -I$(SHARE_SRC)/native/$(PKGDIR)/image/cvutils \
	    -I$(SHARE_SRC)/native/$(PKGDIR)/shell \
            -I$(SHARE_SRC)/native/$(PKGDIR)/medialib \
            -I$(PLATFORM_SRC)/native/$(PKGDIR)/medialib \
	    -I$(SHARE_SRC)/native/$(PKGDIR)/../java2d \
	    -I$(PLATFORM_SRC)/native/$(PKGDIR)/../java2d \
	    -I$(SHARE_SRC)/native/$(PKGDIR)/../java2d/loops \
	    -I$(SHARE_SRC)/native/$(PKGDIR)/../java2d/pipe \
	    -I$(SHARE_SRC)/native/$(PKGDIR)/../java2d/opengl \
	    -I$(PLATFORM_SRC)/native/$(PKGDIR)/../java2d/opengl \
	    -I$(PLATFORM_SRC)/native/$(PKGDIR)/../java2d/x11 \
	    -I$(SHARE_SRC)/native/$(PKGDIR)/../dc/doe \
	    -I$(SHARE_SRC)/native/$(PKGDIR)/../dc/path \
            -I$(PLATFORM_SRC)/native/$(PKGDIR)/../jdga \
            -I$(PLATFORM_SRC)/native/$(PKGDIR) \
	    $(EVENT_MODEL)

ifeq ($(PLATFORM), linux)
LDFLAGS += -L$(OPENWIN_LIB)
endif

LDFLAGS += -L$(LIBDIR)/$(LIBARCH)/$(TSOBJDIR) \
	   $(AWT_RUNPATH)

# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SOLARIS/LINUX
endif # PLATFORM

CLASSES.export += java.io.InputStream \
		  java.lang.Integer \
		  java.lang.ThreadGroup

648
.PHONY: dgalibs dgalib.clean fontconfigs fontconfigs.clean generated.clean
D
duke 已提交
649