Makefile revision 127
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend###############################################################################
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend#
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend# xtrans 1.x Makefile
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend#
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend# Use subject to license terms.
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend#
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend# Permission is hereby granted, free of charge, to any person obtaining a
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend# copy of this software and associated documentation files (the
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend# "Software"), to deal in the Software without restriction, including
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend# without limitation the rights to use, copy, modify, merge, publish,
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend# distribute, and/or sell copies of the Software, and to permit persons
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend# to whom the Software is furnished to do so, provided that the above
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend# copyright notice(s) and this permission notice appear in all copies of
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend# the Software and that both the above copyright notice(s) and this
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend# permission notice appear in supporting documentation.
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend#
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
3b3b7fc78d1f5bfc2769903375050048ff41ff26nd# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
ad74a0524a06bfe11b7de9e3b4ce7233ab3bd3f7nd# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
3b3b7fc78d1f5bfc2769903375050048ff41ff26nd# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
3b3b7fc78d1f5bfc2769903375050048ff41ff26nd# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend#
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend# Except as contained in this notice, the name of a copyright holder
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend# shall not be used in advertising or otherwise to promote the sale, use
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend# or other dealings in this Software without prior written authorization
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend# of the copyright holder.
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend#
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend# @(#)Makefile 1.3 07/01/31
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend#
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend# IMPORTANT NOTE: xtrans is not really a library, but shared source code
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend# compiled into other modules at build time.
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aendPWD:sh=pwd
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aendTOP=$(PWD)/../..
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aendBUILD_TYPES=32
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend# Version number (used in path names)
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aendXTRANS_VERS=1.0.3
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend# Source tarball
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aendSOURCE_TARBALL_NAME=xtrans-$(XTRANS_VERS).tar.bz2
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend# Download site for source
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aendSOURCE_URL=$(XORG_RELEASES_URL)/lib/$(SOURCE_TARBALL_NAME)
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend# Patches to apply to source after unpacking, in order
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aendSOURCE_PATCHES = inetv6.patch socket-perm.patch
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend# Directory created by unpacking source
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aendSOURCE_DIR=$(BUILD_DIR)/xtrans-$(XTRANS_VERS)
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend# Library name (used for specfiles/mapfiles)
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aendLIBNAME=xtrans
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend# Man pages to apply Sun footer to & attributes to list
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend# - Xtrans has none
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aendinclude $(TOP)/common/Makefile.inc
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend# Where to install files
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aendXTRANS_prefix=$(X11_DIR)
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend# Command line options to GNU autoconf configure script
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aendCONFIG_OPTS = --enable-shared=yes --enable-static=no \
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend --prefix=$(XTRANS_prefix) --libdir='$${exec_prefix}/lib$(LIBSUBDIR)' \
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend --enable-xthreads --with-lint --enable-lint-library
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend# Environment variable options to GNU autoconf configure script
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aendCONFIG_ENV = CC=$(CC) CFLAGS="$(LIB_CFLAGS)" \
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend LD="$(LD) $(LDFLAGS)" LDFLAGS="$(LIB_LDFLAGS)" \
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend PKG_CONFIG_PATH=$(PROTODIR)/usr/lib/$(ARCHLIBSUBDIR)/pkgconfig \
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend LIB_MAN_SUFFIX=3xtrans
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend# Run configure script
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend$(SOURCE_DIR)/Makefile: $(UNPACK_TARGET) $(XPROTO_DEP)
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend (cd $(SOURCE_DIR) ; chmod a+x configure ; \
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend $(CONFIG_ENV) ./configure $(CONFIG_OPTS) )
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend# Library built in tree
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend# - Xtrans doesn't build a library, so we use the pkgconfig file it builds instead
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aendXTRANS_LIB = xtrans.pc
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aendbuild_gen: $(XTRANS_LIB)
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend$(XTRANS_LIB): $(SOURCE_DIR)/Makefile
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend (cd $(SOURCE_DIR) ; LD_OPTIONS="$(LIB_REQUIRED_LDFLAGS) -M $(PWD)/$(BUILD_DIR)/$(SPECMAP)" $(MAKE) $(MFLAGS) )
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aendinstall_gen: $(XTRANS_LIB)
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend (cd $(SOURCE_DIR) ; $(LIBPATHS) LD_OPTIONS="$(LIB_REQUIRED_LDFLAGS)" $(MAKE) $(MFLAGS) -e DESTDIR=$(PROTODIR) libdir=$(XTRANS_prefix)/lib$(ARCHLIBSUBDIR) install pkgconfigdir=/usr/lib/$(ARCHLIBSUBDIR)/pkgconfig)
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend -rm -f $(PROTODIR)/usr/lib/$(MACH64)/pkgconfig/xtrans.pc
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend ln -s ../../pkgconfig/xtrans.pc $(PROTODIR)/usr/lib/$(MACH64)/pkgconfig/xtrans.pc
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend