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