Makefile revision 1196
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning###############################################################################
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning# Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning# Permission is hereby granted, free of charge, to any person obtaining a
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning# copy of this software and associated documentation files (the "Software"),
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning# to deal in the Software without restriction, including without limitation
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning# the rights to use, copy, modify, merge, publish, distribute, sublicense,
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning# and/or sell copies of the Software, and to permit persons to whom the
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning# Software is furnished to do so, subject to the following conditions:
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning# The above copyright notice and this permission notice (including the next
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning# paragraph) shall be included in all copies or substantial portions of the
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning# DEALINGS IN THE SOFTWARE.
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning# Package name used in tarballs
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning# Version number (used in path names)
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning# Checksums for upstream tarball
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu XiangningTARBALL_SHA1 = 2d9d38bfd7003ec60eea0b1999ab72cfd5fa3b90
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu XiangningTARBALL_SHA256 = 7fe62180f08ef5f0a0062fb444591e349cae2ab5af6ad834599f5c654e6c840d
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning# Patches to apply to source after unpacking, in order
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning# Library name (used for specfiles/mapfiles)
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning# ARC cases that covered this module
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning# PSARC/1992/077 X11/R5 Xlib API
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning# PSARC/1992/082 Dynamic Locale Access For X11/R5 Xlib
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning# PSARC/1997/141 Sym links needed in /usr/lib for SPARC ABI compliance
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning# PSARC/2006/448 UTF8_STRING support in Solaris libX11 and XLC modules
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning# PSARC/2008/062 Porting of Xorg XI18N
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning# PSARC/2009/666 libX11 1.3
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning# PSARC/2010/109 Introduce libXcb in Solaris
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning# Man pages to apply Sun footer to & attributes to list
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning# Command line options to GNU autoconf configure script
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu XiangningMODULE_CONFIG_OPTS = --enable-xthreads --enable-loadable-i18n \
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning --with-xcb=yes --enable-loadable-xcursor --enable-xcms \
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning --enable-xlocaledir --enable-xkb --enable-man-pages=$(LIB_MAN_SUFFIX) \
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning --with-locale-lib-dir='$${exec_prefix}/lib/X11/locale$(LIBSUBDIR)'
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning# -xF is needed for mapfile reordering to work
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning# -DSUNSOFT enables Solaris extensions
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning# -DMOTIFBC enables compatibility with bugs in Motif & other apps
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning# -DSUNSOFT_KBD enables Solaris traditional keyboard handling
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu XiangningMODULE_CPPFLAGS = -DSUNSOFT -DMOTIFBC -DSUNSOFT_KBD \
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu XiangningMODULE_LDFLAGS = -R$(X11_LIB_DIR)$(ARCHLIBSUBDIR)
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning# Need to ignore extra libraries like -lsocket & -lnsl in i18n modules
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning# Backwards compatibility for old paths until g11n moves all input methods
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning XLOCALEDIR="/usr/share/X11/locale:/usr/X11/share/X11/locale" \
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning XLOCALELIBDIR="/usr/lib/X11/locale$(LIBSUBDIR):/usr/X11/lib/X11/locale$(LIBSUBDIR)"
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning# Work around libtool's interference
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning# Use -KPIC instead of -Kpic because we have too many symbols on SPARC
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu XiangningDELIBTOOLIZE_FLAGS = $(DELIBTOOLIZE_FLAGS_$(MACH))
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning# Need additional mapfile for additional symbols in 64-bit versions
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu XiangningMODULE_BUILD_64_FLAGS = ADD_libX11_LDFLAGS="-M $(PWD)/mapfile-vers-64"
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning# pkg-config files that need to have -R added
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning# Regenerate Makefile.in's from Makefile.am's after patching them
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning# Merge in additional sources from sun-src directory
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning# Install additional headers we need in other parts of the build or ship in
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning# packages, but which X.Org doesn't
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu XiangningMODULE_ADD_INSTALL_TARGETS_32 = install_extra_headers
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu XiangningMODULE_ADD_INSTALL_TARGETS = $(MODULE_ADD_INSTALL_TARGETS_$(BUILD_TYPE))
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning# Extra links to libX11 for compatibility with SVID / SPARC ABI / etc.
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu XiangningMODULE_ADD_INSTALL_TARGETS += install_extra_links
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning# Compatibility links from /usr/X11/lib to /usr/lib
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu XiangningMODULE_X11_LIBCOMPAT_LINKS = libX11.so libX11.so.4 $(EXTRA_LINKS)
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning mkdir -p $(PROTODIR)$(X11_INCLUDES_DIR)/X11/extensions
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning cp -pf sun-src/include/X11/extensions/XInteractive.h \
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning# Install additional links to libX11 that we include in our packages