Makefile revision 3261
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson#
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson# Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson#
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson# This code is free software; you can redistribute it and/or modify it
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson# under the terms of the GNU General Public License version 2 only, as
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson# published by the Free Software Foundation. Oracle designates this
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson# particular file as subject to the "Classpath" exception as provided
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson# by Oracle in the LICENSE file that accompanied this code.
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson#
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson# This code is distributed in the hope that it will be useful, but WITHOUT
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson# version 2 for more details (a copy is included in the LICENSE file that
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson# accompanied this code).
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson#
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson# You should have received a copy of the GNU General Public License version
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson# 2 along with this work; if not, write to the Free Software Foundation,
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson#
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson# or visit www.oracle.com if you need additional information or have any
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson# questions.
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson#
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson
fb84f9014321c5f33c4682de5661b579fcde318fAndreas GustafssonBUILDDIR = ../..
fb84f9014321c5f33c4682de5661b579fcde318fAndreas GustafssonMODULE = awt
fb84f9014321c5f33c4682de5661b579fcde318fAndreas GustafssonPACKAGE = sun.awt.X11
fb84f9014321c5f33c4682de5661b579fcde318fAndreas GustafssonLIBRARY = mawt
fb84f9014321c5f33c4682de5661b579fcde318fAndreas GustafssonLIBRARY_OUTPUT = xawt
fb84f9014321c5f33c4682de5661b579fcde318fAndreas GustafssonLIB_LOCATION = $(LIBDIR)/$(LIBARCH)/xawt
fb84f9014321c5f33c4682de5661b579fcde318fAndreas GustafssonPRODUCT = sun
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafssoninclude $(BUILDDIR)/common/Defs.gmk
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson
fb84f9014321c5f33c4682de5661b579fcde318fAndreas GustafssonGEN_DIR=$(GENSRCDIR)/sun/awt/X11
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson
fb84f9014321c5f33c4682de5661b579fcde318fAndreas GustafssonCLASSES_INIT += $(TEMPDIR)/.gen.wrappers $(TEMPDIR)/.gen_icons touch.wrappers
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson.PHONY: generated.clean
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson#
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson# Files
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson#
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafssoninclude FILES_c_unix.gmk
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafssoninclude FILES_export_unix.gmk
fb84f9014321c5f33c4682de5661b579fcde318fAndreas GustafssonAUTO_FILES_JAVA_DIRS = sun/awt/X11
fb84f9014321c5f33c4682de5661b579fcde318fAndreas GustafssonAUTO_JAVA_PRUNE = WrapperGenerator.java
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson
fb84f9014321c5f33c4682de5661b579fcde318fAndreas GustafssonLDFLAGS += -L$(OPENWIN_LIB)
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson# For Xrender extension.
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafssonifeq ($(PLATFORM), solaris)
fb84f9014321c5f33c4682de5661b579fcde318fAndreas GustafssonLDFLAGS += -L/usr/openwin/sfw/lib$(ISA_DIR) -R/usr/openwin/sfw/lib$(ISA_DIR)
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafssonendif
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafssonifeq ($(PLATFORM), linux)
fb84f9014321c5f33c4682de5661b579fcde318fAndreas GustafssonLDFLAGS += -lpthread
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafssondummy := $(shell $(MKDIR) -p $(LIB_LOCATION))
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafssonendif
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson# Since this library will be living in a subdirectory below the other libraries
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson# we need to add an extra runpath so that libraries in the upper directory
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson# are found at runtime.
fb84f9014321c5f33c4682de5661b579fcde318fAndreas GustafssonLD_RUNPATH_EXTRAS = ..
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson#
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson# Rules.
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson#
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafssoninclude $(BUILDDIR)/common/Mapfile-vers.gmk
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafssoninclude $(BUILDDIR)/common/Library.gmk
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson#
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson# Add to the ambient vpath to pick up files in subdirectories
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson#
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafssonvpath %.c $(SHARE_SRC)/native/sunawt/alphacomposite
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafssonvpath %.c $(PLATFORM_SRC)/native/sun/xawt
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafssonvpath %.c $(PLATFORM_SRC)/native/sun/awt
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafssonvpath %.c $(SHARE_SRC)/native/sun/awt/debug
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafssonvpath %.c $(SHARE_SRC)/native/sun/awt/image
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafssonvpath %.c $(SHARE_SRC)/native/sun/awt/image/gif
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafssonvpath %.c $(SHARE_SRC)/native/sun/awt/image/cvutils
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafssonvpath %.c $(SHARE_SRC)/native/sun/awt/shell
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafssonvpath %.c $(SHARE_SRC)/native/sun/java2d
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafssonvpath %.c $(SHARE_SRC)/native/sun/java2d/loops
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafssonvpath %.c $(SHARE_SRC)/native/sun/java2d/pipe
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafssonvpath %.c $(SHARE_SRC)/native/sun/awt/medialib
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafssonvpath %.c $(SHARE_SRC)/native/sun/awt/utility
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafssonvpath %.cpp $(SHARE_SRC)/native/sun/image
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafssonvpath %.c $(SHARE_SRC)/native/sun/font
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafssonvpath %.c $(PLATFORM_SRC)/native/sun/awt/robot_child
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafssonvpath %.c $(SHARE_SRC)/native/sun/java2d/opengl
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafssonvpath %.c $(PLATFORM_SRC)/native/sun/java2d/opengl
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafssonvpath %.c $(PLATFORM_SRC)/native/sun/java2d/x11
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson
fb84f9014321c5f33c4682de5661b579fcde318fAndreas GustafssonOTHER_LDLIBS = $(LIBM) -lawt -lXext -lX11 -lXrender -ldl \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson $(LDFLAGS_COMMON) $(AWT_RUNPATH) $(OTHER_LDFLAGS) -lXtst -lXi
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafssonifeq ($(PLATFORM), solaris)
fb84f9014321c5f33c4682de5661b579fcde318fAndreas GustafssonCPPFLAGS += -DFUNCPROTO=15
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafssondummy := $(shell $(MKDIR) -p $(LIB_LOCATION))
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafssonendif
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson
fb84f9014321c5f33c4682de5661b579fcde318fAndreas GustafssonCPPFLAGS += -I$(CUPS_HEADERS_PATH)
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson
fb84f9014321c5f33c4682de5661b579fcde318fAndreas GustafssonCPPFLAGS += -DXAWT -DXAWT_HACK \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson -I$(TEMPDIR)/../../sun.awt/awt/CClassHeaders \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson -I$(PLATFORM_SRC)/native/sun/awt \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson -I$(PLATFORM_SRC)/native/sun/xawt \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson -I$(PLATFORM_SRC)/native/sun/jdga \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson -I$(SHARE_SRC)/native/sun/awt/debug \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson -I$(SHARE_SRC)/native/sun/awt/image/cvutils \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson -I$(SHARE_SRC)/native/sun/java2d \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson -I$(SHARE_SRC)/native/sun/java2d/loops \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson -I$(SHARE_SRC)/native/sun/awt/image/cvutils \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson -I$(SHARE_SRC)/native/sun/awt/image \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson -I$(SHARE_SRC)/native/sun/font \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson -I$(PLATFORM_SRC)/native/sun/java2d \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson -I$(SHARE_SRC)/native/sun/java2d/pipe \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson -I$(SHARE_SRC)/native/sun/java2d/opengl \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson -I$(PLATFORM_SRC)/native/sun/java2d/opengl \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson -I$(PLATFORM_SRC)/native/sun/java2d/x11 \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson -I$(SHARE_SRC)/native/sun/dc/path \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson -I$(SHARE_SRC)/native/sun/dc/doe \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson -I$(SHARE_SRC)/native/sun/awt/alphacomposite \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson -I$(SHARE_SRC)/native/sun/awt/medialib \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson -I$(PLATFORM_SRC)/native/sun/awt/medialib \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson -I$(PLATFORM_SRC)/native/sun/font \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson -I$(SHARE_SRC)/native/sun/awt \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson -I$(PLATFORM_SRC)/native/sun/awt
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafssonifeq ($(PLATFORM), linux)
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson# Allows for builds on Debian GNU Linux, X11 is in a different place
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson CPPFLAGS += -I/usr/X11R6/include/X11/extensions \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson -I/usr/include/X11/extensions \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson -I$(OPENWIN_HOME)/include
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafssonendif
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafssonifeq ($(PLATFORM), solaris)
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson CPPFLAGS += -I$(OPENWIN_HOME)/include/X11/extensions
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafssonendif
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafssonifeq ($(MILESTONE), internal)
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson CPPFLAGS += -DINTERNAL_BUILD
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafssonendif
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson#
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson# Generation of wrappers
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson#
fb84f9014321c5f33c4682de5661b579fcde318fAndreas GustafssonSIZER_DIR=$(GEN_DIR)/generator
fb84f9014321c5f33c4682de5661b579fcde318fAndreas GustafssonSIZER = $(SIZER_DIR)/sizer
fb84f9014321c5f33c4682de5661b579fcde318fAndreas GustafssonSIZER_32_C = $(SIZER).32.c
fb84f9014321c5f33c4682de5661b579fcde318fAndreas GustafssonSIZER_64_C = $(SIZER).64.c
fb84f9014321c5f33c4682de5661b579fcde318fAndreas GustafssonCFLAGS_32=$(CFLAGS)
fb84f9014321c5f33c4682de5661b579fcde318fAndreas GustafssonCFLAGS_64=$(CFLAGS)
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafssonifeq ($(PLATFORM), solaris)
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafssonisalist:=$(shell $(ISAINFO))
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafssonifneq (,$(findstring sparcv9, $(isalist)))
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson# On sparcv9 we generate both 32 and 64-bit sizers in spite of ARCH_DATA_MODEL.
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson# On sparcv9 CFLAGS already contain $(XARCH_OPTION/64), so to generate 32-bit sizer we need to change this option.
fb84f9014321c5f33c4682de5661b579fcde318fAndreas GustafssonCFLAGS_32=$(subst $(XARCH_OPTION/64),$(XARCH_OPTION/32),$(CFLAGS))
fb84f9014321c5f33c4682de5661b579fcde318fAndreas GustafssonSIZERS = $(SIZER).32 $(SIZER).64
fb84f9014321c5f33c4682de5661b579fcde318fAndreas GustafssonSIZERS_C = $(SIZER_32_C) $(SIZER_64_C)
fb84f9014321c5f33c4682de5661b579fcde318fAndreas GustafssonSIZES = $(WRAPPER_GENERATOR_DIR)/sizes.32 $(WRAPPER_GENERATOR_DIR)/sizes.64
fb84f9014321c5f33c4682de5661b579fcde318fAndreas GustafssonCFLAGS_64=$(CFLAGS) $(XARCH_OPTION/64)
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafssonelse
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafssonifneq (,$(findstring amd64, $(isalist)))
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson# On amd64 we generate both 32 and 64-bit sizers in spite of ARCH_DATA_MODEL.
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson# On amd64 CFLAGS already contain $(XARCH_OPTION/64), so to generate 32-bit sizer we need to change this option.
fb84f9014321c5f33c4682de5661b579fcde318fAndreas GustafssonCFLAGS_32=$(subst $(XARCH_OPTION/64),$(XARCH_OPTION/32),$(CFLAGS))
fb84f9014321c5f33c4682de5661b579fcde318fAndreas GustafssonSIZERS = $(SIZER).32 $(SIZER).64
fb84f9014321c5f33c4682de5661b579fcde318fAndreas GustafssonSIZERS_C = $(SIZER_32_C) $(SIZER_64_C)
fb84f9014321c5f33c4682de5661b579fcde318fAndreas GustafssonSIZES = $(WRAPPER_GENERATOR_DIR)/sizes.32 $(WRAPPER_GENERATOR_DIR)/sizes.64
fb84f9014321c5f33c4682de5661b579fcde318fAndreas GustafssonCFLAGS_64=$(CFLAGS) $(XARCH_OPTION/64)
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafssonelse # !sparcv9 : includes (32-bit) sparc, i586
fb84f9014321c5f33c4682de5661b579fcde318fAndreas GustafssonSIZERS = $(SIZER).32
fb84f9014321c5f33c4682de5661b579fcde318fAndreas GustafssonSIZERS_C = $(SIZER_32_C)
fb84f9014321c5f33c4682de5661b579fcde318fAndreas GustafssonSIZES = $(WRAPPER_GENERATOR_DIR)/sizes.32
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafssonendif # amd64
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafssonendif # sparcv9
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafssonelse # !solaris
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafssonifeq ($(ARCH_DATA_MODEL), 32)
fb84f9014321c5f33c4682de5661b579fcde318fAndreas GustafssonSIZERS = $(SIZER).32
41a0c85888807051d146da9449580bbf0fe150b0Andreas GustafssonSIZERS_C = $(SIZER_32_C)
41a0c85888807051d146da9449580bbf0fe150b0Andreas GustafssonSIZES = $(WRAPPER_GENERATOR_DIR)/sizes.32
41a0c85888807051d146da9449580bbf0fe150b0Andreas Gustafssonelse # !32
41a0c85888807051d146da9449580bbf0fe150b0Andreas GustafssonSIZERS = $(SIZER).64
41a0c85888807051d146da9449580bbf0fe150b0Andreas GustafssonSIZERS_C = $(SIZER_64_C)
41a0c85888807051d146da9449580bbf0fe150b0Andreas GustafssonSIZES = $(WRAPPER_GENERATOR_DIR)/sizes.64
41a0c85888807051d146da9449580bbf0fe150b0Andreas Gustafssonendif # 32
41a0c85888807051d146da9449580bbf0fe150b0Andreas Gustafsson
41a0c85888807051d146da9449580bbf0fe150b0Andreas Gustafssonendif # solaris
41a0c85888807051d146da9449580bbf0fe150b0Andreas Gustafsson
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson# XXX Hack for 6185483 - use hard-coded sizes.
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson# Add the 64-bit platforms that need to be included into 32-bit build
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson# and have sizes.64-$(PLATFORM)-$(LIBARCH) hardcoded in the workspace
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafssonifeq ($(PLATFORM)-$(LIBARCH), solaris-i386)
41a0c85888807051d146da9449580bbf0fe150b0Andreas Gustafsson# If you define DOHACK=true for some combination of $(PLATFORM)-$(LIBARCH),
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson# make sure you have sizes.64-$(PLATFORM)-$(LIBARCH) pre-generated in
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson# $(PLATFORM_SRC)/classes/sun/awt/X11/generator/
fb84f9014321c5f33c4682de5661b579fcde318fAndreas GustafssonDOHACK=true
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafssonendif # Hack
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafssonifeq ($(DOHACK), true)
fb84f9014321c5f33c4682de5661b579fcde318fAndreas GustafssonPREDEFINED_SIZES_TMPL=$(PLATFORM_SRC)/classes/sun/awt/X11/generator/sizes.64-$(PLATFORM)-$(LIBARCH)
fb84f9014321c5f33c4682de5661b579fcde318fAndreas GustafssonPREDEFINED_SIZES=$(WRAPPER_GENERATOR_DIR)/sizes.64
fb84f9014321c5f33c4682de5661b579fcde318fAndreas GustafssonSIZES += $(WRAPPER_GENERATOR_DIR)/sizes.64
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafssonendif
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafssonifeq ($(PLATFORM)-$(LIBARCH), solaris-amd64)
fb84f9014321c5f33c4682de5661b579fcde318fAndreas GustafssonDOCOMPARE=true
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafssonendif
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson# 64 bit sizers are generated on platform-libarch (left) for use
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson# on platform-libarch (right) and stored under the latter name.
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson# Do compare manually stored and automatically generated pair(s)
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson# if DOCOMPARE=true, just after the generation.
fb84f9014321c5f33c4682de5661b579fcde318fAndreas GustafssonSTORED_SIZES_TMPL_solaris_amd64=$(PLATFORM_SRC)/classes/sun/awt/X11/generator/sizes.64-solaris-i386
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson
fb84f9014321c5f33c4682de5661b579fcde318fAndreas GustafssonWRAPPER_GENERATOR_JAVA=$(PLATFORM_SRC)/classes/sun/awt/X11/generator/WrapperGenerator.java
fb84f9014321c5f33c4682de5661b579fcde318fAndreas GustafssonWRAPPER_GENERATOR_DIR=$(GENSRCDIR)/sun/awt/X11/generator
fb84f9014321c5f33c4682de5661b579fcde318fAndreas GustafssonWRAPPER_GENERATOR_TEMPDIR=$(TEMPDIR)/sun/awt/X11/generator
fb84f9014321c5f33c4682de5661b579fcde318fAndreas GustafssonWRAPPER_GENERATOR_CLASS=$(WRAPPER_GENERATOR_TEMPDIR)/WrapperGenerator.class
fb84f9014321c5f33c4682de5661b579fcde318fAndreas GustafssonXLIBTYPES=$(PLATFORM_SRC)/classes/sun/awt/X11/generator/xlibtypes.txt
b6a370c37fd21719c81065f0ec028254ba10c835Andreas Gustafsson
b6a370c37fd21719c81065f0ec028254ba10c835Andreas Gustafsson$(SIZERS): $(SIZERS_C)
b6a370c37fd21719c81065f0ec028254ba10c835Andreas Gustafsson $(prep-target)
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson $(CC) $(CFLAGS_$(subst .,,$(suffix $@))) $(CPPFLAGS) -o $@ $(SIZER)$(suffix $@).c
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson$(WRAPPER_GENERATOR_CLASS): $(WRAPPER_GENERATOR_JAVA)
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson $(prep-target)
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson $(BOOT_JAVAC_CMD) -d $(WRAPPER_GENERATOR_TEMPDIR) $(WRAPPER_GENERATOR_JAVA)
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson$(SIZERS_C): $(WRAPPER_GENERATOR_CLASS) $(XLIBTYPES)
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson $(prep-target)
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson $(MKDIR) -p $(WRAPPER_GENERATOR_TEMPDIR)
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson $(BOOT_JAVA_CMD) -cp $(WRAPPER_GENERATOR_TEMPDIR) WrapperGenerator \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson $(SIZER_DIR) $(XLIBTYPES) "sizer" $(subst .,,$(suffix $(basename $@)))
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson$(SIZES): $(SIZERS)
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson @if [ "$(DOHACK)$@" = "true$(PREDEFINED_SIZES)" ]; then \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson $(ECHO) COPYING $(PREDEFINED_SIZES_TMPL) into $@; \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson $(CP) $(PREDEFINED_SIZES_TMPL) $@; \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson $(CHMOD) +w $@;\
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson else \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson $(ECHO) GENERATING $@; \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson $(WRAPPER_GENERATOR_DIR)/sizer$(suffix $@) > $@; \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson fi
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson @if [ "$(DOCOMPARE)$(suffix $@)" = "true.64" ]; then \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson $(ECHO) COMPARING $@ and $(STORED_SIZES_TMPL_$(PLATFORM)_$(LIBARCH)); \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson $(DIFF) $@ $(STORED_SIZES_TMPL_$(PLATFORM)_$(LIBARCH)); \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson fi
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson$(TEMPDIR)/.gen.wrappers: $(SIZES) $(WRAPPER_GENERATOR_CLASS) $(XLIBTYPES)
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson $(BOOT_JAVA_CMD) -cp $(WRAPPER_GENERATOR_TEMPDIR) WrapperGenerator \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson $(GEN_DIR) $(XLIBTYPES) "gen" $(WRAPPER_GENERATOR_DIR)/sizes
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafssontouch.wrappers: $(TEMPDIR)/.gen.wrappers
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson $(MKDIR) -p $(TEMPDIR)
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson $(TOUCH) $(TEMPDIR)/.gen.wrappers
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafssongenerated.clean:
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson $(RM) -r $(WRAPPER_GENERATOR_TEMPDIR)
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson $(RM) -r $(WRAPPER_GENERATOR_DIR)
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson $(RM) -r $(GEN_DIR)/*.java
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson $(RM) -r $(TEMPDIR)/.gen_icons
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafssonifdef OPENJDK
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson ICONS_PATH_PREFIX=$(PLATFORM_SRC)
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafssonelse
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson ICONS_PATH_PREFIX=$(CLOSED_SRC)/solaris
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafssonendif
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson
fb84f9014321c5f33c4682de5661b579fcde318fAndreas GustafssonICONS = \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson $(ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon16.png \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson $(ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon24.png \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson $(ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon32.png \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson $(ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon48.png
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson
fb84f9014321c5f33c4682de5661b579fcde318fAndreas GustafssonICONPATH=$(PLATFORM_SRC)/classes/sun/awt/X11
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson
fb84f9014321c5f33c4682de5661b579fcde318fAndreas GustafssonICONS += \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson $(ICONPATH)/security-icon-bw16.png \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson $(ICONPATH)/security-icon-interim16.png \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson $(ICONPATH)/security-icon-yellow16.png \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson $(ICONPATH)/security-icon-bw24.png \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson $(ICONPATH)/security-icon-interim24.png \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson $(ICONPATH)/security-icon-yellow24.png \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson $(ICONPATH)/security-icon-bw32.png \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson $(ICONPATH)/security-icon-interim32.png \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson $(ICONPATH)/security-icon-yellow32.png \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson $(ICONPATH)/security-icon-bw48.png \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson $(ICONPATH)/security-icon-interim48.png \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson $(ICONPATH)/security-icon-yellow48.png
41a0c85888807051d146da9449580bbf0fe150b0Andreas Gustafsson
fb84f9014321c5f33c4682de5661b579fcde318fAndreas GustafssonTEMPDIR_CLASSES = $(TEMPDIR)/classes
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson$(TEMPDIR_CLASSES)/sun/awt/X11/ToBin.class: ToBin.java
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson @$(prep-target)
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson $(BOOT_JAVAC_CMD) -d $(TEMPDIR_CLASSES) $<
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson$(TEMPDIR)/.gen_icons: $(TEMPDIR_CLASSES)/sun/awt/X11/ToBin.class $(ICONS)
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson $(prep-target)
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson for i in $(ICONS); do \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson filename=`basename $$i`; \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson name=`$(ECHO) $$filename | $(TR) '\-.' '__'`; \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson classname=$(GEN_DIR)/XAWTIcon32_$$name.java; \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson $(RM) $$classname; \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson $(ECHO) "package sun.awt.X11;" >> $$classname ; \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson $(ECHO) "public class XAWTIcon32_$$name {" >> $$classname; \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson $(ECHO) "public static int[] $$name = { " >> $$classname; \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson $(CAT) $$i | \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson $(BOOT_JAVA_CMD) -cp $(TEMPDIR_CLASSES) \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson -Djava.awt.headless=true \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson sun.awt.X11.ToBin >> $$classname; \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson $(ECHO) "}; }" >> $$classname; \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson classname=$(GEN_DIR)/XAWTIcon64_$$name.java; \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson $(RM) $$classname; \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson $(ECHO) "package sun.awt.X11;" >> $$classname ; \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson $(ECHO) "public class XAWTIcon64_$$name {" >> $$classname; \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson $(ECHO) "public static long[] $$name = { " >> $$classname; \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson $(CAT) $$i | \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson $(BOOT_JAVA_CMD) -cp $(TEMPDIR_CLASSES) \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson -Djava.awt.headless=true \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson sun.awt.X11.ToBin >> $$classname; \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson $(ECHO) "}; }" >> $$classname; \
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson done
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson $(TOUCH) $@
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafssonclean clobber:: generated.clean
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson.PHONY: generated.clean robot_child
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson