0N/A#
6323N/A# Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
0N/A# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A#
0N/A# This code is free software; you can redistribute it and/or modify it
0N/A# under the terms of the GNU General Public License version 2 only, as
2362N/A# published by the Free Software Foundation. Oracle designates this
0N/A# particular file as subject to the "Classpath" exception as provided
2362N/A# by Oracle in the LICENSE file that accompanied this code.
0N/A#
0N/A# This code is distributed in the hope that it will be useful, but WITHOUT
0N/A# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A# version 2 for more details (a copy is included in the LICENSE file that
0N/A# accompanied this code).
0N/A#
0N/A# You should have received a copy of the GNU General Public License version
0N/A# 2 along with this work; if not, write to the Free Software Foundation,
0N/A# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A#
2362N/A# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2362N/A# or visit www.oracle.com if you need additional information or have any
2362N/A# questions.
0N/A#
0N/A
0N/ABUILDDIR = ../..
0N/APACKAGE = sun.awt.X11
0N/ALIBRARY = mawt
0N/ALIBRARY_OUTPUT = xawt
4632N/APRODUCT = sun
4632N/A
4632N/Aifeq ($(PLATFORM), macosx)
4632N/ALIB_LOCATION = $(LIBDIR)/xawt
4632N/Aelse
0N/ALIB_LOCATION = $(LIBDIR)/$(LIBARCH)/xawt
4632N/Aendif
0N/A
0N/Ainclude $(BUILDDIR)/common/Defs.gmk
0N/A
0N/AGEN_DIR=$(GENSRCDIR)/sun/awt/X11
0N/A
6323N/ACLASSES_INIT += $(TEMPDIR)/.gen.wrappers touch.wrappers
0N/A
0N/A.PHONY: generated.clean
0N/A
0N/A#
0N/A# Files
0N/A#
0N/Ainclude FILES_c_unix.gmk
0N/Ainclude FILES_export_unix.gmk
0N/AAUTO_FILES_JAVA_DIRS = sun/awt/X11
0N/AAUTO_JAVA_PRUNE = WrapperGenerator.java
0N/A
0N/ALDFLAGS += -L$(OPENWIN_LIB)
0N/A
2370N/A# For Xrender extension.
2370N/Aifeq ($(PLATFORM), solaris)
2370N/ALDFLAGS += -L/usr/openwin/sfw/lib$(ISA_DIR) -R/usr/openwin/sfw/lib$(ISA_DIR)
2370N/Aendif
2370N/A
0N/Aifeq ($(PLATFORM), linux)
0N/ALDFLAGS += -lpthread
0N/Adummy := $(shell $(MKDIR) -p $(LIB_LOCATION))
0N/Aendif
0N/A
4632N/Aifeq ($(PLATFORM), macosx))
4632N/ALDFLAGS += -pthread
4632N/Adummy := $(shell $(MKDIR) -p $(LIB_LOCATION))
4632N/Aendif
4632N/A
0N/A# Since this library will be living in a subdirectory below the other libraries
0N/A# we need to add an extra runpath so that libraries in the upper directory
0N/A# are found at runtime.
0N/ALD_RUNPATH_EXTRAS = ..
0N/A
0N/A#
0N/A# Rules.
0N/A#
0N/Ainclude $(BUILDDIR)/common/Mapfile-vers.gmk
0N/Ainclude $(BUILDDIR)/common/Library.gmk
0N/A
0N/A#
0N/A# Add to the ambient vpath to pick up files in subdirectories
0N/A#
0N/Avpath %.c $(SHARE_SRC)/native/sunawt/alphacomposite
0N/Avpath %.c $(PLATFORM_SRC)/native/sun/xawt
0N/Avpath %.c $(PLATFORM_SRC)/native/sun/awt
0N/Avpath %.c $(SHARE_SRC)/native/sun/awt/debug
0N/Avpath %.c $(SHARE_SRC)/native/sun/awt/image
0N/Avpath %.c $(SHARE_SRC)/native/sun/awt/image/gif
0N/Avpath %.c $(SHARE_SRC)/native/sun/awt/image/cvutils
0N/Avpath %.c $(SHARE_SRC)/native/sun/awt/shell
0N/Avpath %.c $(SHARE_SRC)/native/sun/java2d
0N/Avpath %.c $(SHARE_SRC)/native/sun/java2d/loops
0N/Avpath %.c $(SHARE_SRC)/native/sun/java2d/pipe
0N/Avpath %.c $(SHARE_SRC)/native/sun/awt/medialib
1066N/Avpath %.c $(SHARE_SRC)/native/sun/awt/utility
0N/Avpath %.cpp $(SHARE_SRC)/native/sun/image
0N/Avpath %.c $(SHARE_SRC)/native/sun/font
0N/Avpath %.c $(PLATFORM_SRC)/native/sun/awt/robot_child
0N/Avpath %.c $(SHARE_SRC)/native/sun/java2d/opengl
0N/Avpath %.c $(PLATFORM_SRC)/native/sun/java2d/opengl
0N/Avpath %.c $(PLATFORM_SRC)/native/sun/java2d/x11
0N/A
4632N/AOTHER_LDLIBS = $(LIBM) -lawt -lXext -lX11 -lXrender $(LIBDL) \
0N/A $(LDFLAGS_COMMON) $(AWT_RUNPATH) $(OTHER_LDFLAGS) -lXtst -lXi
0N/A
0N/Aifeq ($(PLATFORM), solaris)
0N/ACPPFLAGS += -DFUNCPROTO=15
0N/Adummy := $(shell $(MKDIR) -p $(LIB_LOCATION))
0N/Aendif
0N/A
0N/ACPPFLAGS += -I$(CUPS_HEADERS_PATH)
0N/A
0N/ACPPFLAGS += -DXAWT -DXAWT_HACK \
0N/A -I$(TEMPDIR)/../../sun.awt/awt/CClassHeaders \
0N/A -I$(PLATFORM_SRC)/native/sun/awt \
0N/A -I$(PLATFORM_SRC)/native/sun/xawt \
0N/A -I$(PLATFORM_SRC)/native/sun/jdga \
0N/A -I$(SHARE_SRC)/native/sun/awt/debug \
0N/A -I$(SHARE_SRC)/native/sun/awt/image/cvutils \
0N/A -I$(SHARE_SRC)/native/sun/java2d \
0N/A -I$(SHARE_SRC)/native/sun/java2d/loops \
0N/A -I$(SHARE_SRC)/native/sun/awt/image/cvutils \
0N/A -I$(SHARE_SRC)/native/sun/awt/image \
0N/A -I$(SHARE_SRC)/native/sun/font \
0N/A -I$(PLATFORM_SRC)/native/sun/java2d \
0N/A -I$(SHARE_SRC)/native/sun/java2d/pipe \
0N/A -I$(SHARE_SRC)/native/sun/java2d/opengl \
0N/A -I$(PLATFORM_SRC)/native/sun/java2d/opengl \
0N/A -I$(PLATFORM_SRC)/native/sun/java2d/x11 \
0N/A -I$(SHARE_SRC)/native/sun/dc/path \
0N/A -I$(SHARE_SRC)/native/sun/dc/doe \
0N/A -I$(SHARE_SRC)/native/sun/awt/alphacomposite \
0N/A -I$(SHARE_SRC)/native/sun/awt/medialib \
0N/A -I$(PLATFORM_SRC)/native/sun/awt/medialib \
0N/A -I$(PLATFORM_SRC)/native/sun/font \
0N/A -I$(SHARE_SRC)/native/sun/awt \
2370N/A -I$(PLATFORM_SRC)/native/sun/awt
0N/A
0N/Aifeq ($(PLATFORM), linux)
3876N/A ifndef CROSS_COMPILE_ARCH
3876N/A # Allows for builds on Debian GNU Linux, X11 is in a different place
3876N/A # This should really be handled at a higher-level so we don't have to
3876N/A # work-around this when cross-compiling
3876N/A CPPFLAGS += -I/usr/X11R6/include/X11/extensions \
3876N/A -I/usr/include/X11/extensions \
3876N/A -I$(OPENWIN_HOME)/include
3876N/A else
3876N/A CPPFLAGS += -I$(OPENWIN_HOME)/include/X11/extensions \
3876N/A -I$(OPENWIN_HOME)/include
3876N/A endif
0N/Aendif
0N/A
3344N/A# We have some odd logic here because some Solaris 10 updates
3344N/A# have a render.h file that suggests gradients are supported, but
3344N/A# the Xrender.h doesn't have the corresponding type definitions.
3344N/A# Earlier updates have neither. We'd like to know if there's a mismatch.
3344N/A# Whilst in the C preprocessor we can tell if the render.h define's are set
3344N/A# we can't tell anything about C declarations.
3344N/A# A grep of Xrender.h is the only way to know this. If they are absent
3344N/A# we will set a flag indicating this mismatch and the JDK source file
3344N/A# will interpret it to resolve the problem.
0N/Aifeq ($(PLATFORM), solaris)
0N/A CPPFLAGS += -I$(OPENWIN_HOME)/include/X11/extensions
3344N/A OS_VERSION := $(shell uname -r)
3344N/A XRENDER_H := $(OPENWIN_HOME)/share/include/X11/extensions/Xrender.h
3344N/A ifeq ($(OS_VERSION),5.10)
3344N/A LINEARGRADIENT_CNT := $(shell $(EGREP) -c XLinearGradient $(XRENDER_H))
3344N/A ifeq ($(LINEARGRADIENT_CNT),0)
3344N/A CFLAGS+= -DSOLARIS10_NO_XRENDER_STRUCTS
3344N/A endif
3344N/A endif
0N/Aendif
0N/A
4632N/Aifeq ($(PLATFORM), macosx)
4632N/A CPPFLAGS += -DX11_PATH=\"$(X11_PATH)\" -DPACKAGE_PATH=\"$(PACKAGE_PATH)\"
4632N/Aendif
4632N/A
0N/Aifeq ($(MILESTONE), internal)
0N/A CPPFLAGS += -DINTERNAL_BUILD
0N/Aendif
0N/A
0N/A#
0N/A# Generation of wrappers
0N/A#
0N/ASIZER_DIR=$(GEN_DIR)/generator
0N/ASIZER = $(SIZER_DIR)/sizer
0N/ASIZER_32_C = $(SIZER).32.c
0N/ASIZER_64_C = $(SIZER).64.c
0N/ACFLAGS_32=$(CFLAGS)
0N/ACFLAGS_64=$(CFLAGS)
0N/A
0N/Aifeq ($(PLATFORM), solaris)
0N/A
0N/Aisalist:=$(shell $(ISAINFO))
0N/A
0N/Aifneq (,$(findstring sparcv9, $(isalist)))
0N/A# On sparcv9 we generate both 32 and 64-bit sizers in spite of ARCH_DATA_MODEL.
0N/A# On sparcv9 CFLAGS already contain $(XARCH_OPTION/64), so to generate 32-bit sizer we need to change this option.
0N/ACFLAGS_32=$(subst $(XARCH_OPTION/64),$(XARCH_OPTION/32),$(CFLAGS))
0N/ASIZERS = $(SIZER).32 $(SIZER).64
0N/ASIZERS_C = $(SIZER_32_C) $(SIZER_64_C)
0N/ASIZES = $(WRAPPER_GENERATOR_DIR)/sizes.32 $(WRAPPER_GENERATOR_DIR)/sizes.64
0N/ACFLAGS_64=$(CFLAGS) $(XARCH_OPTION/64)
0N/Aelse
0N/Aifneq (,$(findstring amd64, $(isalist)))
0N/A# On amd64 we generate both 32 and 64-bit sizers in spite of ARCH_DATA_MODEL.
0N/A# On amd64 CFLAGS already contain $(XARCH_OPTION/64), so to generate 32-bit sizer we need to change this option.
0N/ACFLAGS_32=$(subst $(XARCH_OPTION/64),$(XARCH_OPTION/32),$(CFLAGS))
0N/ASIZERS = $(SIZER).32 $(SIZER).64
0N/ASIZERS_C = $(SIZER_32_C) $(SIZER_64_C)
0N/ASIZES = $(WRAPPER_GENERATOR_DIR)/sizes.32 $(WRAPPER_GENERATOR_DIR)/sizes.64
0N/ACFLAGS_64=$(CFLAGS) $(XARCH_OPTION/64)
0N/Aelse # !sparcv9 : includes (32-bit) sparc, i586
0N/ASIZERS = $(SIZER).32
0N/ASIZERS_C = $(SIZER_32_C)
0N/ASIZES = $(WRAPPER_GENERATOR_DIR)/sizes.32
0N/Aendif # amd64
0N/Aendif # sparcv9
0N/A
0N/Aelse # !solaris
0N/A
4632N/Aifeq ($(PLATFORM), macosx)
4632N/ACFLAGS_32=-arch i386
4632N/ASIZERS = $(SIZER).32 $(SIZER).64
4632N/ASIZERS_C = $(SIZER_32_C) $(SIZER_64_C)
4632N/ASIZES = $(WRAPPER_GENERATOR_DIR)/sizes.32 $(WRAPPER_GENERATOR_DIR)/sizes.64
4632N/ACFLAGS_64=-arch x86_64
4632N/Aelse # !macosx
0N/Aifeq ($(ARCH_DATA_MODEL), 32)
0N/ASIZERS = $(SIZER).32
0N/ASIZERS_C = $(SIZER_32_C)
0N/ASIZES = $(WRAPPER_GENERATOR_DIR)/sizes.32
5048N/Aifdef CROSS_COMPILE_ARCH
5048N/ACFLAGS_32 = -m32
5048N/Aendif
0N/Aelse # !32
0N/ASIZERS = $(SIZER).64
0N/ASIZERS_C = $(SIZER_64_C)
0N/ASIZES = $(WRAPPER_GENERATOR_DIR)/sizes.64
5048N/Aifdef CROSS_COMPILE_ARCH
5048N/ACFLAGS_64 = -m64
5048N/Aendif
0N/Aendif # 32
4632N/Aendif # !macosx
0N/Aendif # solaris
0N/A
0N/A# XXX Hack for 6185483 - use hard-coded sizes.
0N/A# Add the 64-bit platforms that need to be included into 32-bit build
0N/A# and have sizes.64-$(PLATFORM)-$(LIBARCH) hardcoded in the workspace
0N/Aifeq ($(PLATFORM)-$(LIBARCH), solaris-i386)
0N/A# If you define DOHACK=true for some combination of $(PLATFORM)-$(LIBARCH),
0N/A# make sure you have sizes.64-$(PLATFORM)-$(LIBARCH) pre-generated in
0N/A# $(PLATFORM_SRC)/classes/sun/awt/X11/generator/
0N/ADOHACK=true
0N/Aendif # Hack
0N/A
0N/Aifeq ($(DOHACK), true)
0N/APREDEFINED_SIZES_TMPL=$(PLATFORM_SRC)/classes/sun/awt/X11/generator/sizes.64-$(PLATFORM)-$(LIBARCH)
0N/APREDEFINED_SIZES=$(WRAPPER_GENERATOR_DIR)/sizes.64
0N/ASIZES += $(WRAPPER_GENERATOR_DIR)/sizes.64
0N/Aendif
0N/A
0N/Aifeq ($(PLATFORM)-$(LIBARCH), solaris-amd64)
0N/ADOCOMPARE=true
0N/Aendif
0N/A# 64 bit sizers are generated on platform-libarch (left) for use
0N/A# on platform-libarch (right) and stored under the latter name.
0N/A# Do compare manually stored and automatically generated pair(s)
0N/A# if DOCOMPARE=true, just after the generation.
0N/ASTORED_SIZES_TMPL_solaris_amd64=$(PLATFORM_SRC)/classes/sun/awt/X11/generator/sizes.64-solaris-i386
0N/A
0N/AWRAPPER_GENERATOR_JAVA=$(PLATFORM_SRC)/classes/sun/awt/X11/generator/WrapperGenerator.java
0N/AWRAPPER_GENERATOR_DIR=$(GENSRCDIR)/sun/awt/X11/generator
0N/AWRAPPER_GENERATOR_TEMPDIR=$(TEMPDIR)/sun/awt/X11/generator
0N/AWRAPPER_GENERATOR_CLASS=$(WRAPPER_GENERATOR_TEMPDIR)/WrapperGenerator.class
0N/AXLIBTYPES=$(PLATFORM_SRC)/classes/sun/awt/X11/generator/xlibtypes.txt
0N/A
5048N/Aifndef CROSS_COMPILE_ARCH
5048N/ASIZERS_CC = $(CC)
5048N/Aelse
5048N/ASIZERS_CC = $(HOST_CC)
5048N/Aendif
5048N/A
0N/A$(SIZERS): $(SIZERS_C)
0N/A $(prep-target)
5048N/A $(SIZERS_CC) $(CFLAGS_$(subst .,,$(suffix $@))) $(CPPFLAGS) -o $@ $(SIZER)$(suffix $@).c
0N/A
0N/A$(WRAPPER_GENERATOR_CLASS): $(WRAPPER_GENERATOR_JAVA)
0N/A $(prep-target)
0N/A $(BOOT_JAVAC_CMD) -d $(WRAPPER_GENERATOR_TEMPDIR) $(WRAPPER_GENERATOR_JAVA)
0N/A
0N/A$(SIZERS_C): $(WRAPPER_GENERATOR_CLASS) $(XLIBTYPES)
0N/A $(prep-target)
0N/A $(MKDIR) -p $(WRAPPER_GENERATOR_TEMPDIR)
0N/A $(BOOT_JAVA_CMD) -cp $(WRAPPER_GENERATOR_TEMPDIR) WrapperGenerator \
0N/A $(SIZER_DIR) $(XLIBTYPES) "sizer" $(subst .,,$(suffix $(basename $@)))
0N/A
0N/A$(SIZES): $(SIZERS)
0N/A @if [ "$(DOHACK)$@" = "true$(PREDEFINED_SIZES)" ]; then \
0N/A $(ECHO) COPYING $(PREDEFINED_SIZES_TMPL) into $@; \
0N/A $(CP) $(PREDEFINED_SIZES_TMPL) $@; \
0N/A $(CHMOD) +w $@;\
0N/A else \
0N/A $(ECHO) GENERATING $@; \
0N/A $(WRAPPER_GENERATOR_DIR)/sizer$(suffix $@) > $@; \
0N/A fi
0N/A @if [ "$(DOCOMPARE)$(suffix $@)" = "true.64" ]; then \
0N/A $(ECHO) COMPARING $@ and $(STORED_SIZES_TMPL_$(PLATFORM)_$(LIBARCH)); \
0N/A $(DIFF) $@ $(STORED_SIZES_TMPL_$(PLATFORM)_$(LIBARCH)); \
110N/A fi
0N/A
0N/A$(TEMPDIR)/.gen.wrappers: $(SIZES) $(WRAPPER_GENERATOR_CLASS) $(XLIBTYPES)
0N/A $(BOOT_JAVA_CMD) -cp $(WRAPPER_GENERATOR_TEMPDIR) WrapperGenerator \
0N/A $(GEN_DIR) $(XLIBTYPES) "gen" $(WRAPPER_GENERATOR_DIR)/sizes
0N/A
0N/Atouch.wrappers: $(TEMPDIR)/.gen.wrappers
0N/A $(MKDIR) -p $(TEMPDIR)
0N/A $(TOUCH) $(TEMPDIR)/.gen.wrappers
0N/A
110N/Agenerated.clean:
0N/A $(RM) -r $(WRAPPER_GENERATOR_TEMPDIR)
0N/A $(RM) -r $(WRAPPER_GENERATOR_DIR)
0N/A $(RM) -r $(GEN_DIR)/*.java
0N/A
0N/A
0N/Aclean clobber:: generated.clean
0N/A
0N/A.PHONY: generated.clean robot_child
0N/A