Makefile revision 1196
280a8a0544b4aeb52414d20e8c6e6c5b1108562eTinderbox User###############################################################################
6fe48fb46e53ffc37542853a1edb74cb481b7d94Automatic Updater# Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
c7fd128f8ea8a527fe27c1b95ab46df7155bc8e4Tinderbox User# Permission is hereby granted, free of charge, to any person obtaining a
2fee8782a6fd57d86a67949092ab9197111af390Evan Hunt# copy of this software and associated documentation files (the "Software"),
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# to deal in the Software without restriction, including without limitation
969eaf7df8ac651946f76b6631ff5db568c11ef6Tinderbox User# the rights to use, copy, modify, merge, publish, distribute, sublicense,
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# and/or sell copies of the Software, and to permit persons to whom the
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# Software is furnished to do so, subject to the following conditions:
a2c370ca12bb0360ff7e969474ead3f788c65fffTinderbox User# The above copyright notice and this permission notice (including the next
8de3f14f1c300c3e1ed99084cc03485b42c92bf1Tinderbox User# paragraph) shall be included in all copies or substantial portions of the
b886b04d8d2b085cbf3e1bf4442dee87f43ba5e4Tinderbox User# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
b91d11bfcc30b96f2c80f3a76d12e3dcc8597a68Mark Andrews# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# DEALINGS IN THE SOFTWARE.
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# Package name used in tarballs
415d630b6309922caee8469384a6fab75cf05032Mark Andrews# Package metadata
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews# pkg(5) name we deliver the files in (override default)
30370d905e9be3be7d9b947fd432bacecbb13bb9Evan Hunt# Version number (used in path names)
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews# Checksums for upstream tarball
e813f036c8251b6d9d2a72fa84f80c2c9d2795afMark AndrewsTARBALL_SHA1 = 8fc77885ae20f3b9cc22f65045a7573befbde2eb
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews# Download site for source
015055b6e23f5c08f6a5b34726f90b62597e9e45Tinderbox UserSOURCE_URL=ftp://ftp.freedesktop.org/pub/mesa/demos/$(MODULE_VERSION)/$(SOURCE_TARBALL_NAME)
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# Patches to apply to source after unpacking, in order
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# Need to regenerate autoconf files after applying glew-config.patch
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan Hunt# Binaries built in tree
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# Override some configure checks for libraries we don't need in the subset
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# we build & ship - have to set them to be non-empty strings though or
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# configure will fail.
cdfc81e048bd34c1d628380247bda6b80a89e20eAutomatic Updater GLEW_CFLAGS="-I-have-no-GLEW-" GLEW_LIBS="-I-have-no-GLEW-"
30370d905e9be3be7d9b947fd432bacecbb13bb9Evan Hunt# What to build
0eb371ca0dab50ae3462e98794a6126198c52f4bMark AndrewsBUILD_TARGETS= $(GLXGEARS_BIN) $(GLXINFO_BIN) $(MODTYPE_ADD_BUILD_TARGETS)
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews# What to install
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# Compatibility links from /usr/X11/bin to /usr/bin
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews### Include common rulesets
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews### Rules specific to this directory:
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# Only care about building X demos
fec6e13f2d1e69fe1c2b8fac36f732f124cf5398Mark AndrewsDEMO_LDFLAGS=$(PROG_LDFLAGS) -L$(PROTODIR)$(X11_LIB_DIR)$(ARCHLIBSUBDIR) \
b91d11bfcc30b96f2c80f3a76d12e3dcc8597a68Mark Andrews -L$(PROTODIR)$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR) -z ignore
fec6e13f2d1e69fe1c2b8fac36f732f124cf5398Mark Andrews# Flags passed on make command line when building
415d630b6309922caee8469384a6fab75cf05032Mark AndrewsMODULE_BUILD_MAKEFLAGS = LDFLAGS="$(DEMO_LDFLAGS)"
415d630b6309922caee8469384a6fab75cf05032Mark Andrews# Build Mesa demos
e813f036c8251b6d9d2a72fa84f80c2c9d2795afMark Andrews$(GLXGEARS_BIN): $(UNPACK_TARGET) $(CONFIGURE_TARGETS)
2ae159b376dac23870d8005563c585acf85a4b5aEvan Hunt $(MODULE_MAKE) $(MAKEFLAGS) $(DEFAULT_BUILD_MAKEFLAGS) glxgears )
e76dfff967cfbe00f4d1540434832e4499a9cd83Tinderbox User$(GLXINFO_BIN): $(UNPACK_TARGET) $(CONFIGURE_TARGETS)
549c517e2ecad52bb1d32f08920e29d4e8cda71eTinderbox User $(MODULE_MAKE) $(MAKEFLAGS) $(DEFAULT_BUILD_MAKEFLAGS) glxinfo )
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# For testing - we don't ship the rest of these
549c517e2ecad52bb1d32f08920e29d4e8cda71eTinderbox Userall-xdemos_gen: $(UNPACK_TARGET) $(CONFIGURE_TARGETS)
8f4e6ea383aa9a953c0adb5be6c4d8dc8dbd5c4aWitold Krecicki $(MODULE_MAKE) $(MAKEFLAGS) $(DEFAULT_BUILD_MAKEFLAGS))
b91d11bfcc30b96f2c80f3a76d12e3dcc8597a68Mark Andrews $(MAKE) $(MAKEFLAGS) $(BUILD_64_FLAGS) all-xdemos_gen
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson cp -pf $(GLXGEARS_BIN) $(GLXINFO_BIN) $(DESTDIR)$(MODULE_PREFIX)/bin
30370d905e9be3be7d9b947fd432bacecbb13bb9Evan Hunt mkdir -p $(DESTDIR)$(MODULE_PREFIX)/share/man/man1