Makefile revision 2370
0N/A#
110N/A# Copyright 2002-2008 Sun Microsystems, Inc. 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
0N/A# published by the Free Software Foundation. Sun designates this
0N/A# particular file as subject to the "Classpath" exception as provided
0N/A# by Sun 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#
0N/A# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
0N/A# CA 95054 USA or visit www.sun.com if you need additional information or
0N/A# have any questions.
0N/A#
0N/A
0N/ABUILDDIR = ../..
2080N/AMODULE = awt
0N/APACKAGE = sun.awt.X11
0N/ALIBRARY = mawt
0N/ALIBRARY_OUTPUT = xawt
0N/ALIB_LOCATION = $(LIBDIR)/$(LIBARCH)/xawt
0N/APRODUCT = sun
0N/A
0N/Ainclude $(BUILDDIR)/common/Defs.gmk
0N/A
0N/AGEN_DIR=$(GENSRCDIR)/sun/awt/X11
0N/A
0N/ACLASSES_INIT += $(TEMPDIR)/.gen.wrappers $(TEMPDIR)/.gen_icons 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
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
2370N/AOTHER_LDLIBS = $(LIBM) -lawt -lXext -lX11 -lXrender -ldl \
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)
0N/A# Allows for builds on Debian GNU Linux, X11 is in a different place
0N/A CPPFLAGS += -I/usr/X11R6/include/X11/extensions \
0N/A -I/usr/include/X11/extensions \
0N/A -I$(OPENWIN_HOME)/include
0N/Aendif
0N/A
0N/Aifeq ($(PLATFORM), solaris)
0N/A CPPFLAGS += -I$(OPENWIN_HOME)/include/X11/extensions
0N/Aendif
0N/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
0N/Aifeq ($(ARCH_DATA_MODEL), 32)
0N/ASIZERS = $(SIZER).32
0N/ASIZERS_C = $(SIZER_32_C)
0N/ASIZES = $(WRAPPER_GENERATOR_DIR)/sizes.32
0N/Aelse # !32
0N/ASIZERS = $(SIZER).64
0N/ASIZERS_C = $(SIZER_64_C)
0N/ASIZES = $(WRAPPER_GENERATOR_DIR)/sizes.64
0N/Aendif # 32
0N/A
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
0N/A$(SIZERS): $(SIZERS_C)
0N/A $(prep-target)
0N/A $(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
110N/A $(RM) -r $(TEMPDIR)/.gen_icons
0N/A
0N/Aifdef OPENJDK
0N/A ICONS_PATH_PREFIX=$(PLATFORM_SRC)
0N/Aelse
0N/A ICONS_PATH_PREFIX=$(CLOSED_SRC)/solaris
0N/Aendif
0N/A
0N/AICONS = \
0N/A $(ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon16.png \
0N/A $(ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon24.png \
0N/A $(ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon32.png \
0N/A $(ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon48.png
0N/A
1066N/A
1066N/AICONPATH=$(PLATFORM_SRC)/classes/sun/awt/X11
1066N/A
1066N/AICONS += \
1066N/A $(ICONPATH)/security-icon-bw16.png \
1066N/A $(ICONPATH)/security-icon-interim16.png \
1066N/A $(ICONPATH)/security-icon-yellow16.png \
1066N/A $(ICONPATH)/security-icon-bw24.png \
1066N/A $(ICONPATH)/security-icon-interim24.png \
1066N/A $(ICONPATH)/security-icon-yellow24.png \
1066N/A $(ICONPATH)/security-icon-bw32.png \
1066N/A $(ICONPATH)/security-icon-interim32.png \
1066N/A $(ICONPATH)/security-icon-yellow32.png \
1066N/A $(ICONPATH)/security-icon-bw48.png \
1066N/A $(ICONPATH)/security-icon-interim48.png \
1066N/A $(ICONPATH)/security-icon-yellow48.png
1066N/A
0N/ATEMPDIR_CLASSES = $(TEMPDIR)/classes
0N/A
0N/A$(TEMPDIR_CLASSES)/sun/awt/X11/ToBin.class: ToBin.java
0N/A @$(prep-target)
0N/A $(BOOT_JAVAC_CMD) -d $(TEMPDIR_CLASSES) $<
0N/A
0N/A$(TEMPDIR)/.gen_icons: $(TEMPDIR_CLASSES)/sun/awt/X11/ToBin.class $(ICONS)
0N/A $(prep-target)
0N/A for i in $(ICONS); do \
0N/A filename=`basename $$i`; \
0N/A name=`$(ECHO) $$filename | $(TR) '\-.' '__'`; \
0N/A classname=$(GEN_DIR)/XAWTIcon32_$$name.java; \
0N/A $(RM) $$classname; \
0N/A $(ECHO) "package sun.awt.X11;" >> $$classname ; \
0N/A $(ECHO) "public class XAWTIcon32_$$name {" >> $$classname; \
0N/A $(ECHO) "public static int[] $$name = { " >> $$classname; \
0N/A $(CAT) $$i | \
0N/A $(BOOT_JAVA_CMD) -cp $(TEMPDIR_CLASSES) \
0N/A -Djava.awt.headless=true \
0N/A sun.awt.X11.ToBin >> $$classname; \
0N/A $(ECHO) "}; }" >> $$classname; \
0N/A classname=$(GEN_DIR)/XAWTIcon64_$$name.java; \
0N/A $(RM) $$classname; \
0N/A $(ECHO) "package sun.awt.X11;" >> $$classname ; \
0N/A $(ECHO) "public class XAWTIcon64_$$name {" >> $$classname; \
0N/A $(ECHO) "public static long[] $$name = { " >> $$classname; \
0N/A $(CAT) $$i | \
0N/A $(BOOT_JAVA_CMD) -cp $(TEMPDIR_CLASSES) \
0N/A -Djava.awt.headless=true \
0N/A sun.awt.X11.ToBin >> $$classname; \
0N/A $(ECHO) "}; }" >> $$classname; \
0N/A done
0N/A $(TOUCH) $@
0N/A
0N/Aclean clobber:: generated.clean
0N/A
0N/A.PHONY: generated.clean robot_child
0N/A