Makefile revision 422
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael Graff###############################################################################
615f17d0171dd807c6803b25a255a8ea2051fbd4David Lawrence#
615f17d0171dd807c6803b25a255a8ea2051fbd4David Lawrence# X11 1.x Makefile
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael Graff#
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael Graff# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael Graff# Use subject to license terms.
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael Graff#
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael Graff# Permission is hereby granted, free of charge, to any person obtaining a
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael Graff# copy of this software and associated documentation files (the
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael Graff# "Software"), to deal in the Software without restriction, including
615f17d0171dd807c6803b25a255a8ea2051fbd4David Lawrence# without limitation the rights to use, copy, modify, merge, publish,
d3498432822fb487e58f8f72bb5f880dd8307d7dMichael Sawyer# distribute, and/or sell copies of the Software, and to permit persons
d3498432822fb487e58f8f72bb5f880dd8307d7dMichael Sawyer# to whom the Software is furnished to do so, provided that the above
d3498432822fb487e58f8f72bb5f880dd8307d7dMichael Sawyer# copyright notice(s) and this permission notice appear in all copies of
d3498432822fb487e58f8f72bb5f880dd8307d7dMichael Sawyer# the Software and that both the above copyright notice(s) and this
d3498432822fb487e58f8f72bb5f880dd8307d7dMichael Sawyer# permission notice appear in supporting documentation.
d3498432822fb487e58f8f72bb5f880dd8307d7dMichael Sawyer#
615f17d0171dd807c6803b25a255a8ea2051fbd4David Lawrence# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
95be83b467e2384d414693982318a5c06cccf1d7Andreas Gustafsson# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
f9354808d122036e66e9f007a4bb12d4aa936aaeAndreas Gustafsson# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
f9354808d122036e66e9f007a4bb12d4aa936aaeAndreas Gustafsson# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
f9354808d122036e66e9f007a4bb12d4aa936aaeAndreas Gustafsson# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
f9354808d122036e66e9f007a4bb12d4aa936aaeAndreas Gustafsson# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
b1d234eb75e2804e09d89178a76df39c321db51bBrian Wellington# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
b1d234eb75e2804e09d89178a76df39c321db51bBrian Wellington# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
58007c5fde59b756174280d26916eb27f593e6ccBob Halley# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
58007c5fde59b756174280d26916eb27f593e6ccBob Halley#
58007c5fde59b756174280d26916eb27f593e6ccBob Halley# Except as contained in this notice, the name of a copyright holder
58007c5fde59b756174280d26916eb27f593e6ccBob Halley# shall not be used in advertising or otherwise to promote the sale, use
58007c5fde59b756174280d26916eb27f593e6ccBob Halley# or other dealings in this Software without prior written authorization
58007c5fde59b756174280d26916eb27f593e6ccBob Halley# of the copyright holder.
58007c5fde59b756174280d26916eb27f593e6ccBob Halley#
58007c5fde59b756174280d26916eb27f593e6ccBob Halley# @(#)Makefile 1.9 08/05/17
58007c5fde59b756174280d26916eb27f593e6ccBob Halley#
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael Graff
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael Graff# Package name used in tarballs
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael GraffLIB_MODULE=libX11
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael Graff
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael Graff# Version number (used in path names)
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael GraffLIB_VERS=1.1.3
a55d0a9080c8ef4117d2fc27f63220a56afb2434Andreas Gustafsson
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael Graff# Patches to apply to source after unpacking, in order
353dcaf1cc77d122d9b4b750bbbfc4c96b4b292bAndreas GustafssonSOURCE_PATCHES = \
615f17d0171dd807c6803b25a255a8ea2051fbd4David Lawrence lintlib.patch,-p1 \
615f17d0171dd807c6803b25a255a8ea2051fbd4David Lawrence manpages.patch,-p1 \
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael Graff XErrorDB.patch,-p1 \
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael Graff 1234757.patch \
58007c5fde59b756174280d26916eb27f593e6ccBob Halley 4010755.patch \
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael Graff 4614834.patch \
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael Graff 5039226.patch \
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael Graff 6409332.patch \
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael Graff solaris-abi.patch \
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael Graff solaris-i18n.patch \
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael Graff solaris-kbd.patch \
a55d0a9080c8ef4117d2fc27f63220a56afb2434Andreas Gustafsson SolarisIA.patch \
7e4d75a5daeaaf8a7f559f9bd7fbf540184e235cMark Andrews sme.patch \
353dcaf1cc77d122d9b4b750bbbfc4c96b4b292bAndreas Gustafsson 4076297.patch \
615f17d0171dd807c6803b25a255a8ea2051fbd4David Lawrence 1261271.patch \
615f17d0171dd807c6803b25a255a8ea2051fbd4David Lawrence 6686591.patch \
615f17d0171dd807c6803b25a255a8ea2051fbd4David Lawrence 6690054.patch \
615f17d0171dd807c6803b25a255a8ea2051fbd4David Lawrence 6681985.patch \
615f17d0171dd807c6803b25a255a8ea2051fbd4David Lawrence 6691236.patch
615f17d0171dd807c6803b25a255a8ea2051fbd4David Lawrence
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael Graff# Library name (used for specfiles/mapfiles)
615f17d0171dd807c6803b25a255a8ea2051fbd4David LawrenceLIBNAME=X11
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael Graff
58007c5fde59b756174280d26916eb27f593e6ccBob Halley# Man pages to apply Sun footer to & attributes to list
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael GraffSUNTOUCHED_MANPAGES=man/*.man man/xkb/*.man
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael GraffSUN_PACKAGE=SUNWxwplt
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael GraffLIB_STABILITY=Committed
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael GraffLIB_MAN_SUFFIX=3X11
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael Graff
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael Graff# Command line options to GNU autoconf configure script
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael GraffLIB_ADD_CONFIG_OPTS = --enable-xthreads --enable-loadable-i18n \
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael Graff --with-xcb=no --enable-loadable-xcursor --enable-xcms \
615f17d0171dd807c6803b25a255a8ea2051fbd4David Lawrence --enable-xlocaledir --enable-xkb --enable-man-pages=$(LIB_MAN_SUFFIX) \
615f17d0171dd807c6803b25a255a8ea2051fbd4David Lawrence --with-lint --enable-lint-library \
615f17d0171dd807c6803b25a255a8ea2051fbd4David Lawrence --with-locale-lib-dir='$${exec_prefix}/lib/X11/locale$(LIBSUBDIR)'
58007c5fde59b756174280d26916eb27f593e6ccBob Halley
58007c5fde59b756174280d26916eb27f593e6ccBob Halley# -xF is needed for mapfile reordering to work
58007c5fde59b756174280d26916eb27f593e6ccBob HalleyLIB_ADD_CFLAGS = -xF -g
615f17d0171dd807c6803b25a255a8ea2051fbd4David Lawrence
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael Graff# -DSUNSOFT enables SUN_SME (Shared Memory transport extension)
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael Graff# -DMOTIFBC enables compatibility with bugs in Motif & other apps
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael Graff# -DSUNSOFT_KBD enables Solaris traditional keyboard handling
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael GraffLIB_ADD_CPPFLAGS = -DSUNSOFT -DMOTIFBC -DSUNSOFT_KBD
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael Graff
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael Graff# Work around libtool's interference
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael GraffLIB_ADD_BUILD_DEPS = delibtoolize
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael Graff
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael Graff# Use -KPIC instead of -Kpic because we have too many symbols on SPARC
58007c5fde59b756174280d26916eb27f593e6ccBob HalleyDELIBTOOLIZE_FLAGS_sparc = -P
58007c5fde59b756174280d26916eb27f593e6ccBob HalleyDELIBTOOLIZE_FLAGS_i386 =
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael GraffDELIBTOOLIZE_FLAGS = $(DELIBTOOLIZE_FLAGS_$(MACH))
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael Graff
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael Graff# Need additional mapfile for additional symbols in 64-bit versions
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael GraffBUILD_64_FLAGS = ADD_libX11_LDFLAGS="-M $(PWD)/mapfile-vers-64"
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael Graff
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael Graff# Library built in tree
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael GraffLIB_BUILT=$(SOURCE_DIR)/src/.libs/libX11.so.4
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael Graff
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael Graff# pkg-config files that need to have -R added
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael GraffFIX_PC_FILES=x11.pc.in
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael Graff
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael Graff# Regenerate Makefile.in's from Makefile.am's after patching them
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael GraffAUTORECONF=true
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael Graff
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael Graffinclude ../Makefile.inc
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael Graff
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael Graff# Merge in additional sources from sun-src directory
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael Graffsource_gen:: $(LNDIR)
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael Graff mkdir -p $(SOURCE_DIR)
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael Graff (cd $(SOURCE_DIR) && $(LNDIR) ../../sun-src)
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael Graff
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael Graffinstall_gen::
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael Graff mkdir -p $(PROTODIR)/usr/X11/lib$(ARCHLIBSUBDIR)
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael Graff -rm -f $(PROTODIR)/usr/X11/lib$(ARCHLIBSUBDIR)/libX11.so
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael Graff ln -s libX11.so.4 $(PROTODIR)/usr/X11/lib$(ARCHLIBSUBDIR)/libX11.so
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael Graff
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael Graff# Install additional headers we need in other parts of the build or ship in
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael Graff# packages, but which X.Org doesn't
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael Graffinstall_32::
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael Graff mkdir -p $(PROTODIR)/usr/X11/include/X11/extensions
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael Graff cp -pf sun-src/include/X11/Xvarargs.h $(PROTODIR)/usr/X11/include/X11/
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael Graff cp -pf sun-src/include/X11/extensions/XInteractive.h \
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael Graff $(PROTODIR)/usr/X11/include/X11/extensions/
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael Graff cp -pf sun-src/include/X11/extensions/XInteractive.h \
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael Graff $(PROTODIR)/usr/X11/include/X11/extensions/
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael Graff cp -pf $(BUILD_DIR_32)$(SOURCE_DIR)/src/ks_tables.h \
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael Graff $(PROTODIR)/usr/X11/include/
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael Graff cp -pf $(BUILD_DIR_32)$(SOURCE_DIR)/src/xlibi18n/Xlc*.h \
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael Graff $(PROTODIR)/usr/X11/include/X11/
5a0ffa97751ef1ff29d1bf9d7f332eeb9f8edc21Michael Graff