Makefile revision 851
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend###############################################################################
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend#
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend# Use is 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.
52fff662005b1866a3ff09bb6c902800c5cc6dedjerenkrantz#
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
4b5981e276e93df97c34e4da05ca5cf8bbd937dand# 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
ad74a0524a06bfe11b7de9e3b4ce7233ab3bd3f7nd# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
3b3b7fc78d1f5bfc2769903375050048ff41ff26nd# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
3b3b7fc78d1f5bfc2769903375050048ff41ff26nd# 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
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend# Package name used in tarballs
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aendMODULE_NAME=MesaDemos
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend# Version number (used in path names)
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aendMODULE_VERSION=7.4.4
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend# Directory created by unpacking source
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aendSOURCE_DIRNAME=Mesa-$(MODULE_VERSION)
dc06c0ac17fcd3d721bb865d7fc5d2cefe67c57ftrawickSOURCE_DIRNAME_SET=yes
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aendSOURCE_DIR=$(BUILD_DIR)/$(SOURCE_DIRNAME)
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend# Source tarball
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aendSOURCE_TARBALL_NAME=MesaDemos-$(MODULE_VERSION).tar.bz2
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aendSOURCE_TARBALL_NAME_SET=yes
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend# Download site for source
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aendSOURCE_URL=$(SF_DOWNLOADS_URL)/mesa3d/$(SOURCE_TARBALL_NAME)
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aendSOURCE_URL_SET=yes
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend# Patches to apply to source after unpacking, in order
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aendSOURCE_PATCHES= \
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend# Xorg-6.9-changes.patch
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend# Binaries built in tree
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aendGLXGEARS_BIN=$(SOURCE_DIR)/progs/xdemos/glxgears
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aendGLXINFO_BIN=$(SOURCE_DIR)/progs/xdemos/glxinfo
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend# configure script is run in ../lib/mesa build, just link to results here
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aendCONFIGURE_TARGETS= $(SOURCE_DIR)/configs/current
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aendCONFIGURE_TARGETS_SET=yes
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend# What to build
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aendBUILD_TARGETS= $(GLXGEARS_BIN) $(GLXINFO_BIN)
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aendBUILD_TARGETS_SET=yes
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend# What to install
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aendINSTALL_TARGETS= install_glxgears install_glxinfo install_man
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aendINSTALL_TARGETS_SET=yes
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend### Include common rulesets
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aendinclude ../Makefile.inc
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend### Rules specific to this directory:
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend# Only care about building X demos
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aendDEMOS_DIR=$(SOURCE_DIR)/progs/xdemos
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aendDEMO_LDFLAGS=$(PROG_LDFLAGS) -L$(PROTODIR)$(X11_LIB_DIR)$(ARCHLIBSUBDIR) \
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend -L$(PROTODIR)$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR)
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend# Flags passed on make command line when building
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aendMODULE_BUILD_MAKEFLAGS = LDFLAGS="$(DEMO_LDFLAGS)"
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend# Use configuration generated by Mesa library build
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend$(SOURCE_DIR)/configs/current: $(UNPACK_TARGET)
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend mkdir -p $(SOURCE_DIR)/configs
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend (cd $(SOURCE_DIR)/configs && \
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend $(LNDIR) ../../../../../lib/mesa/$(SOURCE_DIR)/configs)
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend# Build Mesa demos
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend$(GLXGEARS_BIN): $(UNPACK_TARGET) $(CONFIGURE_TARGETS)
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend (cd $(DEMOS_DIR) && \
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend $(MODULE_MAKE) $(MAKEFLAGS) $(DEFAULT_BUILD_MAKEFLAGS) glxgears )
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend$(GLXINFO_BIN): $(UNPACK_TARGET) $(CONFIGURE_TARGETS)
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend (cd $(DEMOS_DIR) && \
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend $(MODULE_MAKE) $(MAKEFLAGS) $(DEFAULT_BUILD_MAKEFLAGS) glxinfo )
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend# For testing - we don't ship the rest of these
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aendall-xdemos_gen: $(UNPACK_TARGET) $(CONFIGURE_TARGETS)
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend (cd $(DEMOS_DIR) && \
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend $(MODULE_MAKE) $(MAKEFLAGS) $(DEFAULT_BUILD_MAKEFLAGS))
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aendall-xdemos:
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend $(MAKE) $(MAKEFLAGS) $(BUILD_32_FLAGS) all-xdemos_gen
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aendinstall_gen:: $(INSTALL_TARGETS)
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aendDESTDIR=$(PROTODIR)
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aendinstall_glxgears: $(GLXGEARS_BIN)
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend mkdir -p $(DESTDIR)$(MODULE_PREFIX)/bin
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend cp -pf $(GLXGEARS_BIN) $(DESTDIR)$(MODULE_PREFIX)/bin
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aendinstall_glxinfo: $(GLXINFO_BIN)
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend mkdir -p $(DESTDIR)$(MODULE_PREFIX)/bin
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend cp -pf $(GLXINFO_BIN) $(DESTDIR)$(MODULE_PREFIX)/bin
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aendinstall_man:
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend mkdir -p $(DESTDIR)$(MODULE_PREFIX)/share/man/man1
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend cp -pf glxgears.1 glxinfo.1 $(DESTDIR)$(MODULE_PREFIX)/share/man/man1
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend
38dd0bd0209a7e29ea44e66bfc3bec8edc03e9aend