Makefile revision 911
4d237bbe075b1d2c19428cd954d721d65b31f67cwrowe###############################################################################
ec79b29695b183f794264bbb578c51e93d1f9b1emartin#
1a5f954324f2584984fc9cee7a7a8ebe8ef39aeajim# Copyright 2010 Sun Microsystems, Inc. All rights reserved.
ed0d39878e79220baaa50c15b79b1fdf877cb919niq# Use is subject to license terms.
39c7699ec0799d394d3f67145d4a12ed82f587b8jorton#
39c7699ec0799d394d3f67145d4a12ed82f587b8jorton# Permission is hereby granted, free of charge, to any person obtaining a
39c7699ec0799d394d3f67145d4a12ed82f587b8jorton# copy of this software and associated documentation files (the
0abda771544fc85894befadc7800b726164c58afniq# "Software"), to deal in the Software without restriction, including
0abda771544fc85894befadc7800b726164c58afniq# without limitation the rights to use, copy, modify, merge, publish,
0abda771544fc85894befadc7800b726164c58afniq# distribute, and/or sell copies of the Software, and to permit persons
3511969853863eeb6e80018afe63831e5bf81447rpluem# to whom the Software is furnished to do so, provided that the above
3511969853863eeb6e80018afe63831e5bf81447rpluem# copyright notice(s) and this permission notice appear in all copies of
3511969853863eeb6e80018afe63831e5bf81447rpluem# the Software and that both the above copyright notice(s) and this
ab39e6d69a08324dbdea68e38de843a4a9ce7247niq# permission notice appear in supporting documentation.
ab39e6d69a08324dbdea68e38de843a4a9ce7247niq#
ab39e6d69a08324dbdea68e38de843a4a9ce7247niq# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
c6d33447e28403a90ad817dba4df75fae785be28pquerna# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
c6d33447e28403a90ad817dba4df75fae785be28pquerna# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
439ccf2a084e1da566548931c585cbcc3a9e7f4cminfrin# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
439ccf2a084e1da566548931c585cbcc3a9e7f4cminfrin# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
439ccf2a084e1da566548931c585cbcc3a9e7f4cminfrin# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
439ccf2a084e1da566548931c585cbcc3a9e7f4cminfrin# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
439ccf2a084e1da566548931c585cbcc3a9e7f4cminfrin# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
439ccf2a084e1da566548931c585cbcc3a9e7f4cminfrin# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
4ede070ca63bd4c48045e35a7192582769770290jorton#
4ede070ca63bd4c48045e35a7192582769770290jorton# Except as contained in this notice, the name of a copyright holder
795c9499a77c25695bcb9710ed67bbe51492e181rpluem# shall not be used in advertising or otherwise to promote the sale, use
795c9499a77c25695bcb9710ed67bbe51492e181rpluem# or other dealings in this Software without prior written authorization
795c9499a77c25695bcb9710ed67bbe51492e181rpluem# of the copyright holder.
936a4025e45887d9f366bf54360c51937b6bcacejim#
936a4025e45887d9f366bf54360c51937b6bcacejim
936a4025e45887d9f366bf54360c51937b6bcacejim# Package name used in tarballs
936a4025e45887d9f366bf54360c51937b6bcacejimMODULE_NAME=MesaDemos
936a4025e45887d9f366bf54360c51937b6bcacejim
936a4025e45887d9f366bf54360c51937b6bcacejim# Version number (used in path names)
a72ba68ecbbc61e4b513e50d6000245c33f753dcwroweMODULE_VERSION=7.4.4
a72ba68ecbbc61e4b513e50d6000245c33f753dcwrowe
7a079e0cd696baca90ac43e325f64582e2945c68wrowe# Checksums for upstream tarball
a72ba68ecbbc61e4b513e50d6000245c33f753dcwroweTARBALL_MD5 = 628142ec9a54cd28cc027e6ce26cff47
62c53a0dab4c85bfc6a5ab9abfb1b269d9f7458dniqTARBALL_SHA1 = 190b51dd1e456f12c70cd428ec47ca8de0ed72fe
62c53a0dab4c85bfc6a5ab9abfb1b269d9f7458dniq
62c53a0dab4c85bfc6a5ab9abfb1b269d9f7458dniq# Directory created by unpacking source
c6f2d0c33368d0ff719e176c3bef9c2ea5177d43niqSOURCE_DIRNAME=Mesa-$(MODULE_VERSION)
c6f2d0c33368d0ff719e176c3bef9c2ea5177d43niqSOURCE_DIRNAME_SET=yes
c6f2d0c33368d0ff719e176c3bef9c2ea5177d43niqSOURCE_DIR=$(BUILD_DIR)/$(SOURCE_DIRNAME)
c6f2d0c33368d0ff719e176c3bef9c2ea5177d43niq
c6f2d0c33368d0ff719e176c3bef9c2ea5177d43niq# Source tarball
f09bf2676d29e43c211b663f5c9423815d83395fniqSOURCE_TARBALL_NAME=MesaDemos-$(MODULE_VERSION).tar.bz2
f09bf2676d29e43c211b663f5c9423815d83395fniqSOURCE_TARBALL_NAME_SET=yes
f09bf2676d29e43c211b663f5c9423815d83395fniq
f09bf2676d29e43c211b663f5c9423815d83395fniq# Download site for source
11a0edf478ca9c59d80bf73491d89cf019259feeniqSOURCE_URL=$(SF_DOWNLOADS_URL)/mesa3d/$(SOURCE_TARBALL_NAME)
11a0edf478ca9c59d80bf73491d89cf019259feeniqSOURCE_URL_SET=yes
11a0edf478ca9c59d80bf73491d89cf019259feeniq
06446302a0a3e40cd8807bb25467c8f776cf2fbatrawick# Patches to apply to source after unpacking, in order
06446302a0a3e40cd8807bb25467c8f776cf2fbatrawickSOURCE_PATCHES= \
06446302a0a3e40cd8807bb25467c8f776cf2fbatrawick
06446302a0a3e40cd8807bb25467c8f776cf2fbatrawick# Xorg-6.9-changes.patch
b65a184929c97d0b0e4d3bad42648e0e9ce1b8ferpluem
b65a184929c97d0b0e4d3bad42648e0e9ce1b8ferpluem# Binaries built in tree
b65a184929c97d0b0e4d3bad42648e0e9ce1b8ferpluemGLXGEARS_BIN=$(SOURCE_DIR)/progs/xdemos/glxgears
9c97e6302f7624855e1909b35d448a5a2d5a4378minfrinGLXINFO_BIN=$(SOURCE_DIR)/progs/xdemos/glxinfo
9c97e6302f7624855e1909b35d448a5a2d5a4378minfrin
9c97e6302f7624855e1909b35d448a5a2d5a4378minfrin# configure script is run in ../lib/mesa build, just link to results here
9c97e6302f7624855e1909b35d448a5a2d5a4378minfrinCONFIGURE_TARGETS= $(SOURCE_DIR)/configs/current
9c97e6302f7624855e1909b35d448a5a2d5a4378minfrinCONFIGURE_TARGETS_SET=yes
ecc1538af1c08282fc2773d2eb3f1a54251862f9minfrin
ecc1538af1c08282fc2773d2eb3f1a54251862f9minfrin# What to build
ecc1538af1c08282fc2773d2eb3f1a54251862f9minfrinBUILD_TARGETS= $(GLXGEARS_BIN) $(GLXINFO_BIN)
ecc1538af1c08282fc2773d2eb3f1a54251862f9minfrinBUILD_TARGETS_SET=yes
3f5585f7f4a7d74f2f94ec729ea8c1879d419e35rederpj
3f5585f7f4a7d74f2f94ec729ea8c1879d419e35rederpj# What to install
3f5585f7f4a7d74f2f94ec729ea8c1879d419e35rederpjINSTALL_TARGETS= install_glxgears install_glxinfo install_man
3f5585f7f4a7d74f2f94ec729ea8c1879d419e35rederpjINSTALL_TARGETS_SET=yes
3f5585f7f4a7d74f2f94ec729ea8c1879d419e35rederpj
e4b96ba15dc8b2b27d251d53e29b86da32cd5066pquerna### Include common rulesets
e4b96ba15dc8b2b27d251d53e29b86da32cd5066pquernainclude ../Makefile.inc
49f39a4568dab427b2c4ae070d0f831d1ac9ebf8jim
49f39a4568dab427b2c4ae070d0f831d1ac9ebf8jim### Rules specific to this directory:
49f39a4568dab427b2c4ae070d0f831d1ac9ebf8jim
49f39a4568dab427b2c4ae070d0f831d1ac9ebf8jim# Only care about building X demos
470d223738c1dfc4e07c7fae5d186e9dfadd9643jortonDEMOS_DIR=$(SOURCE_DIR)/progs/xdemos
470d223738c1dfc4e07c7fae5d186e9dfadd9643jorton
470d223738c1dfc4e07c7fae5d186e9dfadd9643jortonDEMO_LDFLAGS=$(PROG_LDFLAGS) -L$(PROTODIR)$(X11_LIB_DIR)$(ARCHLIBSUBDIR) \
81bd9331da3bd0f53255d52b1475480ff3a4b395trawick -L$(PROTODIR)$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR)
81bd9331da3bd0f53255d52b1475480ff3a4b395trawick
81bd9331da3bd0f53255d52b1475480ff3a4b395trawick# Flags passed on make command line when building
cd3bbd6d2df78d6c75e5d159a81ef8bdd5f70df9trawickMODULE_BUILD_MAKEFLAGS = LDFLAGS="$(DEMO_LDFLAGS)"
cd3bbd6d2df78d6c75e5d159a81ef8bdd5f70df9trawick
cd3bbd6d2df78d6c75e5d159a81ef8bdd5f70df9trawick# Use configuration generated by Mesa library build
cd3bbd6d2df78d6c75e5d159a81ef8bdd5f70df9trawick$(SOURCE_DIR)/configs/current: $(UNPACK_TARGET)
c7c8dd19c90c5ee7205ccdf443585d14da3daecechrisd mkdir -p $(SOURCE_DIR)/configs
c7c8dd19c90c5ee7205ccdf443585d14da3daecechrisd (cd $(SOURCE_DIR)/configs && \
c7c8dd19c90c5ee7205ccdf443585d14da3daecechrisd $(LNDIR) ../../../../../lib/mesa/$(SOURCE_DIR)/configs)
c7c8dd19c90c5ee7205ccdf443585d14da3daecechrisd
13ce20bba632871d7ceb413f39dc73c718ddec7dchrisd# Build Mesa demos
c7c8dd19c90c5ee7205ccdf443585d14da3daecechrisd$(GLXGEARS_BIN): $(UNPACK_TARGET) $(CONFIGURE_TARGETS)
421e0a5d1c49de76406f61e9abef271af2336c31rpluem (cd $(DEMOS_DIR) && \
421e0a5d1c49de76406f61e9abef271af2336c31rpluem $(MODULE_MAKE) $(MAKEFLAGS) $(DEFAULT_BUILD_MAKEFLAGS) glxgears )
421e0a5d1c49de76406f61e9abef271af2336c31rpluem
108ebbb87b2a46f4416ec507824471a483c39fe1sctemme$(GLXINFO_BIN): $(UNPACK_TARGET) $(CONFIGURE_TARGETS)
108ebbb87b2a46f4416ec507824471a483c39fe1sctemme (cd $(DEMOS_DIR) && \
108ebbb87b2a46f4416ec507824471a483c39fe1sctemme $(MODULE_MAKE) $(MAKEFLAGS) $(DEFAULT_BUILD_MAKEFLAGS) glxinfo )
108ebbb87b2a46f4416ec507824471a483c39fe1sctemme
7abe34dd5a20fc8fde09dca9116b88e6ddfd55ddjorton# For testing - we don't ship the rest of these
7abe34dd5a20fc8fde09dca9116b88e6ddfd55ddjortonall-xdemos_gen: $(UNPACK_TARGET) $(CONFIGURE_TARGETS)
7abe34dd5a20fc8fde09dca9116b88e6ddfd55ddjorton (cd $(DEMOS_DIR) && \
10d486b9267800c5e376c22f6c0d45dc2ae86f67chrisd $(MODULE_MAKE) $(MAKEFLAGS) $(DEFAULT_BUILD_MAKEFLAGS))
10d486b9267800c5e376c22f6c0d45dc2ae86f67chrisd
10d486b9267800c5e376c22f6c0d45dc2ae86f67chrisdall-xdemos:
10d486b9267800c5e376c22f6c0d45dc2ae86f67chrisd $(MAKE) $(MAKEFLAGS) $(BUILD_32_FLAGS) all-xdemos_gen
3e155218733389e7b1ea3a9ffd0aea533fd929cechrisd
3e155218733389e7b1ea3a9ffd0aea533fd929cechrisdDESTDIR=$(PROTODIR)
3e155218733389e7b1ea3a9ffd0aea533fd929cechrisd
3e155218733389e7b1ea3a9ffd0aea533fd929cechrisdinstall_glxgears: $(GLXGEARS_BIN)
dd6199828976e6c7850ca6abd7a1ceba99e9ed16chrisd mkdir -p $(DESTDIR)$(MODULE_PREFIX)/bin
dd6199828976e6c7850ca6abd7a1ceba99e9ed16chrisd cp -pf $(GLXGEARS_BIN) $(DESTDIR)$(MODULE_PREFIX)/bin
dd6199828976e6c7850ca6abd7a1ceba99e9ed16chrisd
dd6199828976e6c7850ca6abd7a1ceba99e9ed16chrisdinstall_glxinfo: $(GLXINFO_BIN)
ab43b4a17b2ac31ccb1cf280be8c42a8a314cecbjorton mkdir -p $(DESTDIR)$(MODULE_PREFIX)/bin
ab43b4a17b2ac31ccb1cf280be8c42a8a314cecbjorton cp -pf $(GLXINFO_BIN) $(DESTDIR)$(MODULE_PREFIX)/bin
ab43b4a17b2ac31ccb1cf280be8c42a8a314cecbjorton
67139e2d50d1e11558d87f7042f61cb04bb0d1d2jiminstall_man:
f3a5934ca0fb0f0f813bd9d9d06af8937e3f401fjim mkdir -p $(DESTDIR)$(MODULE_PREFIX)/share/man/man1
67139e2d50d1e11558d87f7042f61cb04bb0d1d2jim cp -pf glxgears.1 glxinfo.1 $(DESTDIR)$(MODULE_PREFIX)/share/man/man1
67139e2d50d1e11558d87f7042f61cb04bb0d1d2jim
67139e2d50d1e11558d87f7042f61cb04bb0d1d2jim
a4ab95921be8ce5de50913cd6505d41b672eb375minfrin