jdk/make/sun/xawt/Makefile
author mchung
Wed, 09 Mar 2011 23:11:07 -0800
changeset 8583 15dea0fdc2ea
parent 7933 afae9398b405
child 9035 1255eb81cc2f
child 9002 6ee0abf0167f
permissions -rw-r--r--
7025631: Remove the modules build support from jdk 7 Reviewed-by: alanb, ohair
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
#
7668
d4a77089c587 6962318: Update copyright year
ohair
parents: 5580
diff changeset
     2
# Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4665
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4665
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
# accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
#
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4665
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4665
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4665
diff changeset
    23
# questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
BUILDDIR = ../..
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
PACKAGE = sun.awt.X11
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
LIBRARY = mawt
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
LIBRARY_OUTPUT = xawt
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
LIB_LOCATION = $(LIBDIR)/$(LIBARCH)/xawt
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
PRODUCT = sun
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
include $(BUILDDIR)/common/Defs.gmk
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
GEN_DIR=$(GENSRCDIR)/sun/awt/X11
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
CLASSES_INIT += $(TEMPDIR)/.gen.wrappers $(TEMPDIR)/.gen_icons touch.wrappers
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
.PHONY: generated.clean
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
# Files
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
include FILES_c_unix.gmk
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
include FILES_export_unix.gmk
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
AUTO_FILES_JAVA_DIRS = sun/awt/X11
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
AUTO_JAVA_PRUNE = WrapperGenerator.java
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
LDFLAGS += -L$(OPENWIN_LIB)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
5579
1a5e995a710b 6307603: [X11] Use RENDER extension for complex operations done in software
ceisserer
parents: 4665
diff changeset
    51
# For Xrender extension.
1a5e995a710b 6307603: [X11] Use RENDER extension for complex operations done in software
ceisserer
parents: 4665
diff changeset
    52
ifeq ($(PLATFORM), solaris)
1a5e995a710b 6307603: [X11] Use RENDER extension for complex operations done in software
ceisserer
parents: 4665
diff changeset
    53
LDFLAGS += -L/usr/openwin/sfw/lib$(ISA_DIR) -R/usr/openwin/sfw/lib$(ISA_DIR)
1a5e995a710b 6307603: [X11] Use RENDER extension for complex operations done in software
ceisserer
parents: 4665
diff changeset
    54
endif
1a5e995a710b 6307603: [X11] Use RENDER extension for complex operations done in software
ceisserer
parents: 4665
diff changeset
    55
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
ifeq ($(PLATFORM), linux)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
LDFLAGS += -lpthread
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
dummy := $(shell $(MKDIR) -p $(LIB_LOCATION))
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
# Since this library will be living in a subdirectory below the other libraries
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
#   we need to add an extra runpath so that libraries in the upper directory
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
#   are found at runtime.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
LD_RUNPATH_EXTRAS = ..
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
# Rules.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
include $(BUILDDIR)/common/Mapfile-vers.gmk
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
include $(BUILDDIR)/common/Library.gmk
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
# Add to the ambient vpath to pick up files in subdirectories
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
vpath %.c   $(SHARE_SRC)/native/sunawt/alphacomposite
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
vpath %.c   $(PLATFORM_SRC)/native/sun/xawt
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
vpath %.c   $(PLATFORM_SRC)/native/sun/awt
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
vpath %.c   $(SHARE_SRC)/native/sun/awt/debug
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
vpath %.c   $(SHARE_SRC)/native/sun/awt/image
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
vpath %.c   $(SHARE_SRC)/native/sun/awt/image/gif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
vpath %.c   $(SHARE_SRC)/native/sun/awt/image/cvutils
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
vpath %.c   $(SHARE_SRC)/native/sun/awt/shell
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
vpath %.c   $(SHARE_SRC)/native/sun/java2d
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
vpath %.c   $(SHARE_SRC)/native/sun/java2d/loops
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
vpath %.c   $(SHARE_SRC)/native/sun/java2d/pipe
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
vpath %.c   $(SHARE_SRC)/native/sun/awt/medialib
2472
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 133
diff changeset
    87
vpath %.c   $(SHARE_SRC)/native/sun/awt/utility
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
vpath %.cpp $(SHARE_SRC)/native/sun/image
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
vpath %.c   $(SHARE_SRC)/native/sun/font
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
vpath %.c   $(PLATFORM_SRC)/native/sun/awt/robot_child
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
vpath %.c   $(SHARE_SRC)/native/sun/java2d/opengl
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
vpath %.c   $(PLATFORM_SRC)/native/sun/java2d/opengl
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
vpath %.c   $(PLATFORM_SRC)/native/sun/java2d/x11
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
5579
1a5e995a710b 6307603: [X11] Use RENDER extension for complex operations done in software
ceisserer
parents: 4665
diff changeset
    95
OTHER_LDLIBS = $(LIBM) -lawt -lXext -lX11 -lXrender -ldl \
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
                   $(LDFLAGS_COMMON) $(AWT_RUNPATH) $(OTHER_LDFLAGS) -lXtst -lXi
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
ifeq  ($(PLATFORM), solaris)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
CPPFLAGS += -DFUNCPROTO=15
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
dummy := $(shell $(MKDIR) -p $(LIB_LOCATION))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
CPPFLAGS += -I$(CUPS_HEADERS_PATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
CPPFLAGS += -DXAWT -DXAWT_HACK \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
        -I$(TEMPDIR)/../../sun.awt/awt/CClassHeaders \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
        -I$(PLATFORM_SRC)/native/sun/awt \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
	-I$(PLATFORM_SRC)/native/sun/xawt \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
        -I$(PLATFORM_SRC)/native/sun/jdga \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
        -I$(SHARE_SRC)/native/sun/awt/debug \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
        -I$(SHARE_SRC)/native/sun/awt/image/cvutils \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
        -I$(SHARE_SRC)/native/sun/java2d \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
	-I$(SHARE_SRC)/native/sun/java2d/loops \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
	-I$(SHARE_SRC)/native/sun/awt/image/cvutils \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
	-I$(SHARE_SRC)/native/sun/awt/image \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
	-I$(SHARE_SRC)/native/sun/font \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
	-I$(PLATFORM_SRC)/native/sun/java2d \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
	-I$(SHARE_SRC)/native/sun/java2d/pipe \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
	-I$(SHARE_SRC)/native/sun/java2d/opengl \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
	-I$(PLATFORM_SRC)/native/sun/java2d/opengl \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
	-I$(PLATFORM_SRC)/native/sun/java2d/x11 \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
	-I$(SHARE_SRC)/native/sun/dc/path \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
	-I$(SHARE_SRC)/native/sun/dc/doe \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
	-I$(SHARE_SRC)/native/sun/awt/alphacomposite \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
        -I$(SHARE_SRC)/native/sun/awt/medialib \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
	-I$(PLATFORM_SRC)/native/sun/awt/medialib \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
        -I$(PLATFORM_SRC)/native/sun/font \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
        -I$(SHARE_SRC)/native/sun/awt \
5579
1a5e995a710b 6307603: [X11] Use RENDER extension for complex operations done in software
ceisserer
parents: 4665
diff changeset
   129
        -I$(PLATFORM_SRC)/native/sun/awt
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
ifeq ($(PLATFORM), linux)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
# Allows for builds on Debian GNU Linux, X11 is in a different place 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
  CPPFLAGS += -I/usr/X11R6/include/X11/extensions \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
              -I/usr/include/X11/extensions \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
              -I$(OPENWIN_HOME)/include 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
7933
afae9398b405 7001056: JDK 7 fails on to build on Solaris 10 update 9 - updated Xrender header files
prr
parents: 7668
diff changeset
   138
# We have some odd logic here because some Solaris 10 updates
afae9398b405 7001056: JDK 7 fails on to build on Solaris 10 update 9 - updated Xrender header files
prr
parents: 7668
diff changeset
   139
# have a render.h file that suggests gradients are supported, but
afae9398b405 7001056: JDK 7 fails on to build on Solaris 10 update 9 - updated Xrender header files
prr
parents: 7668
diff changeset
   140
# the Xrender.h doesn't have the corresponding type definitions.
afae9398b405 7001056: JDK 7 fails on to build on Solaris 10 update 9 - updated Xrender header files
prr
parents: 7668
diff changeset
   141
# Earlier updates have neither. We'd like to know if there's a mismatch.
afae9398b405 7001056: JDK 7 fails on to build on Solaris 10 update 9 - updated Xrender header files
prr
parents: 7668
diff changeset
   142
# Whilst in the C preprocessor we can tell if the render.h define's are set
afae9398b405 7001056: JDK 7 fails on to build on Solaris 10 update 9 - updated Xrender header files
prr
parents: 7668
diff changeset
   143
# we can't tell anything about C declarations.
afae9398b405 7001056: JDK 7 fails on to build on Solaris 10 update 9 - updated Xrender header files
prr
parents: 7668
diff changeset
   144
# A grep of Xrender.h is the only way to know this. If they are absent
afae9398b405 7001056: JDK 7 fails on to build on Solaris 10 update 9 - updated Xrender header files
prr
parents: 7668
diff changeset
   145
# we will set a flag indicating this mismatch and the JDK source file
afae9398b405 7001056: JDK 7 fails on to build on Solaris 10 update 9 - updated Xrender header files
prr
parents: 7668
diff changeset
   146
# will interpret it to resolve the problem.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
ifeq ($(PLATFORM), solaris)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
  CPPFLAGS += -I$(OPENWIN_HOME)/include/X11/extensions
7933
afae9398b405 7001056: JDK 7 fails on to build on Solaris 10 update 9 - updated Xrender header files
prr
parents: 7668
diff changeset
   149
  OS_VERSION := $(shell uname -r)
afae9398b405 7001056: JDK 7 fails on to build on Solaris 10 update 9 - updated Xrender header files
prr
parents: 7668
diff changeset
   150
  XRENDER_H := $(OPENWIN_HOME)/share/include/X11/extensions/Xrender.h
afae9398b405 7001056: JDK 7 fails on to build on Solaris 10 update 9 - updated Xrender header files
prr
parents: 7668
diff changeset
   151
  ifeq ($(OS_VERSION),5.10) 
afae9398b405 7001056: JDK 7 fails on to build on Solaris 10 update 9 - updated Xrender header files
prr
parents: 7668
diff changeset
   152
     LINEARGRADIENT_CNT := $(shell $(EGREP) -c XLinearGradient $(XRENDER_H))
afae9398b405 7001056: JDK 7 fails on to build on Solaris 10 update 9 - updated Xrender header files
prr
parents: 7668
diff changeset
   153
     ifeq ($(LINEARGRADIENT_CNT),0) 
afae9398b405 7001056: JDK 7 fails on to build on Solaris 10 update 9 - updated Xrender header files
prr
parents: 7668
diff changeset
   154
       CFLAGS+= -DSOLARIS10_NO_XRENDER_STRUCTS
afae9398b405 7001056: JDK 7 fails on to build on Solaris 10 update 9 - updated Xrender header files
prr
parents: 7668
diff changeset
   155
     endif
afae9398b405 7001056: JDK 7 fails on to build on Solaris 10 update 9 - updated Xrender header files
prr
parents: 7668
diff changeset
   156
 endif
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
ifeq ($(MILESTONE), internal)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
  CPPFLAGS += -DINTERNAL_BUILD
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
# Generation of wrappers
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
SIZER_DIR=$(GEN_DIR)/generator
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
SIZER = $(SIZER_DIR)/sizer
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
SIZER_32_C = $(SIZER).32.c
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
SIZER_64_C = $(SIZER).64.c
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
CFLAGS_32=$(CFLAGS)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
CFLAGS_64=$(CFLAGS)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
ifeq ($(PLATFORM), solaris)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
isalist:=$(shell $(ISAINFO))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
ifneq (,$(findstring sparcv9, $(isalist)))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
# On sparcv9 we generate both 32 and 64-bit sizers in spite of ARCH_DATA_MODEL.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
# On sparcv9 CFLAGS already contain $(XARCH_OPTION/64), so to generate 32-bit sizer we need to change this option.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
CFLAGS_32=$(subst $(XARCH_OPTION/64),$(XARCH_OPTION/32),$(CFLAGS))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
SIZERS = $(SIZER).32 $(SIZER).64
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
SIZERS_C = $(SIZER_32_C) $(SIZER_64_C)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
SIZES = $(WRAPPER_GENERATOR_DIR)/sizes.32 $(WRAPPER_GENERATOR_DIR)/sizes.64
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
CFLAGS_64=$(CFLAGS) $(XARCH_OPTION/64)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
ifneq (,$(findstring amd64, $(isalist)))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
# On amd64 we generate both 32 and 64-bit sizers in spite of ARCH_DATA_MODEL.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
# On amd64 CFLAGS already contain $(XARCH_OPTION/64), so to generate 32-bit sizer we need to change this option.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
CFLAGS_32=$(subst $(XARCH_OPTION/64),$(XARCH_OPTION/32),$(CFLAGS))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
SIZERS = $(SIZER).32 $(SIZER).64
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
SIZERS_C = $(SIZER_32_C) $(SIZER_64_C)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
SIZES = $(WRAPPER_GENERATOR_DIR)/sizes.32 $(WRAPPER_GENERATOR_DIR)/sizes.64
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
CFLAGS_64=$(CFLAGS) $(XARCH_OPTION/64)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
else # !sparcv9 : includes (32-bit) sparc, i586
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
SIZERS = $(SIZER).32
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
SIZERS_C = $(SIZER_32_C)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
SIZES = $(WRAPPER_GENERATOR_DIR)/sizes.32
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
endif # amd64
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
endif # sparcv9
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
else # !solaris
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
ifeq ($(ARCH_DATA_MODEL), 32)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
SIZERS = $(SIZER).32
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
SIZERS_C = $(SIZER_32_C)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
SIZES = $(WRAPPER_GENERATOR_DIR)/sizes.32
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
else # !32
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
SIZERS = $(SIZER).64
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
SIZERS_C = $(SIZER_64_C)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
SIZES = $(WRAPPER_GENERATOR_DIR)/sizes.64
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
endif # 32
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
endif # solaris
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
# XXX Hack for 6185483 - use hard-coded sizes.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
# Add the 64-bit platforms that need to be included into 32-bit build
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
# and have sizes.64-$(PLATFORM)-$(LIBARCH) hardcoded in the workspace
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
ifeq ($(PLATFORM)-$(LIBARCH), solaris-i386)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
# If you define DOHACK=true for some combination of $(PLATFORM)-$(LIBARCH),
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
# make sure you have sizes.64-$(PLATFORM)-$(LIBARCH) pre-generated in
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
# $(PLATFORM_SRC)/classes/sun/awt/X11/generator/
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
DOHACK=true
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
endif # Hack
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
ifeq ($(DOHACK), true)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
PREDEFINED_SIZES_TMPL=$(PLATFORM_SRC)/classes/sun/awt/X11/generator/sizes.64-$(PLATFORM)-$(LIBARCH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
PREDEFINED_SIZES=$(WRAPPER_GENERATOR_DIR)/sizes.64
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
SIZES += $(WRAPPER_GENERATOR_DIR)/sizes.64
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
ifeq ($(PLATFORM)-$(LIBARCH), solaris-amd64)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
DOCOMPARE=true
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
# 64 bit sizers are generated on platform-libarch (left) for use 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
# on platform-libarch (right) and stored under the latter name.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
# Do compare manually stored and automatically generated pair(s) 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
# if DOCOMPARE=true, just after the generation.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
STORED_SIZES_TMPL_solaris_amd64=$(PLATFORM_SRC)/classes/sun/awt/X11/generator/sizes.64-solaris-i386
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
WRAPPER_GENERATOR_JAVA=$(PLATFORM_SRC)/classes/sun/awt/X11/generator/WrapperGenerator.java
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
WRAPPER_GENERATOR_DIR=$(GENSRCDIR)/sun/awt/X11/generator
90ce3da70b43 Initial load
duke
parents:
diff changeset
   242
WRAPPER_GENERATOR_TEMPDIR=$(TEMPDIR)/sun/awt/X11/generator
90ce3da70b43 Initial load
duke
parents:
diff changeset
   243
WRAPPER_GENERATOR_CLASS=$(WRAPPER_GENERATOR_TEMPDIR)/WrapperGenerator.class 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   244
XLIBTYPES=$(PLATFORM_SRC)/classes/sun/awt/X11/generator/xlibtypes.txt
90ce3da70b43 Initial load
duke
parents:
diff changeset
   245
90ce3da70b43 Initial load
duke
parents:
diff changeset
   246
$(SIZERS): $(SIZERS_C) 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   247
	$(prep-target)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   248
	$(CC) $(CFLAGS_$(subst .,,$(suffix $@))) $(CPPFLAGS) -o $@ $(SIZER)$(suffix $@).c
90ce3da70b43 Initial load
duke
parents:
diff changeset
   249
90ce3da70b43 Initial load
duke
parents:
diff changeset
   250
$(WRAPPER_GENERATOR_CLASS): $(WRAPPER_GENERATOR_JAVA)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   251
	$(prep-target)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   252
	$(BOOT_JAVAC_CMD) -d $(WRAPPER_GENERATOR_TEMPDIR) $(WRAPPER_GENERATOR_JAVA)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   253
90ce3da70b43 Initial load
duke
parents:
diff changeset
   254
$(SIZERS_C): $(WRAPPER_GENERATOR_CLASS) $(XLIBTYPES)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   255
	$(prep-target)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   256
	$(MKDIR) -p $(WRAPPER_GENERATOR_TEMPDIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   257
	$(BOOT_JAVA_CMD) -cp $(WRAPPER_GENERATOR_TEMPDIR) WrapperGenerator \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   258
	    $(SIZER_DIR) $(XLIBTYPES) "sizer" $(subst .,,$(suffix $(basename $@)))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   259
90ce3da70b43 Initial load
duke
parents:
diff changeset
   260
$(SIZES): $(SIZERS)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   261
	@if [ "$(DOHACK)$@" = "true$(PREDEFINED_SIZES)" ]; then \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   262
	    $(ECHO) COPYING $(PREDEFINED_SIZES_TMPL) into $@; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   263
	    $(CP) $(PREDEFINED_SIZES_TMPL) $@; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   264
	    $(CHMOD) +w $@;\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   265
	else	\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   266
	    $(ECHO) GENERATING $@; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   267
	    $(WRAPPER_GENERATOR_DIR)/sizer$(suffix $@) > $@; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   268
	fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   269
	@if [ "$(DOCOMPARE)$(suffix $@)" = "true.64" ]; then \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   270
	    $(ECHO) COMPARING $@ and $(STORED_SIZES_TMPL_$(PLATFORM)_$(LIBARCH)); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   271
	    $(DIFF) $@ $(STORED_SIZES_TMPL_$(PLATFORM)_$(LIBARCH)); \
133
99b9bf838505 6630878: clean target in sun/xawt is incomplete
son
parents: 2
diff changeset
   272
	fi
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   273
90ce3da70b43 Initial load
duke
parents:
diff changeset
   274
$(TEMPDIR)/.gen.wrappers: $(SIZES) $(WRAPPER_GENERATOR_CLASS) $(XLIBTYPES)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   275
	$(BOOT_JAVA_CMD) -cp $(WRAPPER_GENERATOR_TEMPDIR) WrapperGenerator \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   276
	    $(GEN_DIR) $(XLIBTYPES) "gen" $(WRAPPER_GENERATOR_DIR)/sizes
90ce3da70b43 Initial load
duke
parents:
diff changeset
   277
90ce3da70b43 Initial load
duke
parents:
diff changeset
   278
touch.wrappers: $(TEMPDIR)/.gen.wrappers
90ce3da70b43 Initial load
duke
parents:
diff changeset
   279
	$(MKDIR) -p $(TEMPDIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   280
	$(TOUCH) $(TEMPDIR)/.gen.wrappers
90ce3da70b43 Initial load
duke
parents:
diff changeset
   281
133
99b9bf838505 6630878: clean target in sun/xawt is incomplete
son
parents: 2
diff changeset
   282
generated.clean:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   283
	$(RM) -r $(WRAPPER_GENERATOR_TEMPDIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   284
	$(RM) -r $(WRAPPER_GENERATOR_DIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   285
	$(RM) -r $(GEN_DIR)/*.java
133
99b9bf838505 6630878: clean target in sun/xawt is incomplete
son
parents: 2
diff changeset
   286
	$(RM) -r $(TEMPDIR)/.gen_icons
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   287
90ce3da70b43 Initial load
duke
parents:
diff changeset
   288
ifdef OPENJDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   289
    ICONS_PATH_PREFIX=$(PLATFORM_SRC)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   290
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   291
    ICONS_PATH_PREFIX=$(CLOSED_SRC)/solaris
90ce3da70b43 Initial load
duke
parents:
diff changeset
   292
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   293
90ce3da70b43 Initial load
duke
parents:
diff changeset
   294
ICONS = \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   295
    $(ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon16.png \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   296
    $(ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon24.png \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   297
    $(ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon32.png \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   298
    $(ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon48.png
90ce3da70b43 Initial load
duke
parents:
diff changeset
   299
2472
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 133
diff changeset
   300
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 133
diff changeset
   301
ICONPATH=$(PLATFORM_SRC)/classes/sun/awt/X11
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 133
diff changeset
   302
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 133
diff changeset
   303
ICONS += \
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 133
diff changeset
   304
   $(ICONPATH)/security-icon-bw16.png \
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 133
diff changeset
   305
   $(ICONPATH)/security-icon-interim16.png \
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 133
diff changeset
   306
   $(ICONPATH)/security-icon-yellow16.png \
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 133
diff changeset
   307
   $(ICONPATH)/security-icon-bw24.png \
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 133
diff changeset
   308
   $(ICONPATH)/security-icon-interim24.png \
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 133
diff changeset
   309
   $(ICONPATH)/security-icon-yellow24.png \
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 133
diff changeset
   310
   $(ICONPATH)/security-icon-bw32.png \
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 133
diff changeset
   311
   $(ICONPATH)/security-icon-interim32.png \
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 133
diff changeset
   312
   $(ICONPATH)/security-icon-yellow32.png \
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 133
diff changeset
   313
   $(ICONPATH)/security-icon-bw48.png \
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 133
diff changeset
   314
   $(ICONPATH)/security-icon-interim48.png \
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 133
diff changeset
   315
   $(ICONPATH)/security-icon-yellow48.png
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 133
diff changeset
   316
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   317
TEMPDIR_CLASSES = $(TEMPDIR)/classes
90ce3da70b43 Initial load
duke
parents:
diff changeset
   318
90ce3da70b43 Initial load
duke
parents:
diff changeset
   319
$(TEMPDIR_CLASSES)/sun/awt/X11/ToBin.class: ToBin.java
90ce3da70b43 Initial load
duke
parents:
diff changeset
   320
	@$(prep-target)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   321
	$(BOOT_JAVAC_CMD) -d $(TEMPDIR_CLASSES) $<
90ce3da70b43 Initial load
duke
parents:
diff changeset
   322
90ce3da70b43 Initial load
duke
parents:
diff changeset
   323
$(TEMPDIR)/.gen_icons: $(TEMPDIR_CLASSES)/sun/awt/X11/ToBin.class $(ICONS)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   324
	$(prep-target)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   325
	for i in $(ICONS); do \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   326
            filename=`basename $$i`; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   327
	    name=`$(ECHO) $$filename | $(TR) '\-.' '__'`;  \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   328
            classname=$(GEN_DIR)/XAWTIcon32_$$name.java; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   329
	    $(RM) $$classname; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   330
	    $(ECHO) "package sun.awt.X11;" >> $$classname ; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   331
	    $(ECHO) "public class XAWTIcon32_$$name {" >> $$classname; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   332
	    $(ECHO) "public static int[] $$name = { " >> $$classname;  \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   333
	    $(CAT) $$i | \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   334
	      $(BOOT_JAVA_CMD) -cp $(TEMPDIR_CLASSES)  \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   335
		-Djava.awt.headless=true \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   336
		sun.awt.X11.ToBin >> $$classname; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   337
	    $(ECHO) "}; }" >> $$classname;  \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   338
            classname=$(GEN_DIR)/XAWTIcon64_$$name.java; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   339
	    $(RM) $$classname; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   340
	    $(ECHO) "package sun.awt.X11;" >> $$classname ; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   341
	    $(ECHO) "public class XAWTIcon64_$$name {" >> $$classname; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   342
	    $(ECHO) "public static long[] $$name = { " >> $$classname;  \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   343
	    $(CAT) $$i | \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   344
	      $(BOOT_JAVA_CMD) -cp $(TEMPDIR_CLASSES)  \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   345
		-Djava.awt.headless=true \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   346
		sun.awt.X11.ToBin >> $$classname; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   347
	    $(ECHO) "}; }" >> $$classname;  \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   348
	done
90ce3da70b43 Initial load
duke
parents:
diff changeset
   349
	$(TOUCH) $@
90ce3da70b43 Initial load
duke
parents:
diff changeset
   350
90ce3da70b43 Initial load
duke
parents:
diff changeset
   351
clean clobber:: generated.clean
90ce3da70b43 Initial load
duke
parents:
diff changeset
   352
90ce3da70b43 Initial load
duke
parents:
diff changeset
   353
.PHONY: generated.clean robot_child
90ce3da70b43 Initial load
duke
parents:
diff changeset
   354