Makefile revision 970
0N/A###############################################################################
0N/A#
0N/A# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
0N/A#
0N/A# Permission is hereby granted, free of charge, to any person obtaining a
0N/A# copy of this software and associated documentation files (the "Software"),
0N/A# to deal in the Software without restriction, including without limitation
0N/A# the rights to use, copy, modify, merge, publish, distribute, sublicense,
0N/A# and/or sell copies of the Software, and to permit persons to whom the
0N/A# Software is furnished to do so, subject to the following conditions:
0N/A#
0N/A# The above copyright notice and this permission notice (including the next
0N/A# paragraph) shall be included in all copies or substantial portions of the
0N/A# Software.
0N/A#
0N/A# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
0N/A# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
0N/A# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
0N/A# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
0N/A# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
0N/A# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
0N/A# DEALINGS IN THE SOFTWARE.
0N/A#
0N/A
0N/A# Package name used in tarballs
0N/AMODULE_NAME=MesaDemos
0N/A
0N/A# Package metadata
0N/AUPSTREAM = The Mesa 3-D Graphics Library
0N/AUPSTREAM_URL = http://mesa3d.org/
0N/AUPSTREAM_SET = yes
0N/A
0N/A# pkg(5) name we deliver the files in (override default)
0N/AMODULE_PKGNAME=x11/demo/mesa-demos
0N/AMODULE_PKGNAME_SET=yes
0N/A
0N/A# Version number (used in path names)
0N/AMODULE_VERSION=7.4.4
0N/A
0N/A# Checksums for upstream tarball
0N/ATARBALL_MD5 = 628142ec9a54cd28cc027e6ce26cff47
0N/ATARBALL_SHA1 = 190b51dd1e456f12c70cd428ec47ca8de0ed72fe
0N/A
0N/A# Directory created by unpacking source
0N/ASOURCE_DIRNAME=Mesa-$(MODULE_VERSION)
0N/ASOURCE_DIRNAME_SET=yes
0N/ASOURCE_DIR=$(BUILD_DIR)/$(SOURCE_DIRNAME)
0N/A
0N/A# Source tarball
0N/ASOURCE_TARBALL_NAME=MesaDemos-$(MODULE_VERSION).tar.bz2
0N/ASOURCE_TARBALL_NAME_SET=yes
0N/A
0N/A# Download site for source
0N/ASOURCE_URL=$(SF_DOWNLOADS_URL)/mesa3d/$(SOURCE_TARBALL_NAME)
0N/ASOURCE_URL_SET=yes
0N/A
0N/A# Patches to apply to source after unpacking, in order
0N/ASOURCE_PATCHES= \
0N/A
0N/A# Xorg-6.9-changes.patch
0N/A
0N/A# Binaries built in tree
0N/AGLXGEARS_BIN=$(SOURCE_DIR)/progs/xdemos/glxgears
0N/AGLXINFO_BIN=$(SOURCE_DIR)/progs/xdemos/glxinfo
0N/A
0N/A# configure script is run in ../lib/mesa build, just link to results here
0N/ACONFIGURE_TARGETS= $(SOURCE_DIR)/configs/current
0N/ACONFIGURE_TARGETS_SET=yes
0N/A
0N/A# What to build
0N/ABUILD_TARGETS= $(GLXGEARS_BIN) $(GLXINFO_BIN)
0N/ABUILD_TARGETS_SET=yes
0N/A
0N/A# What to install
0N/AINSTALL_TARGETS= install_glxgears install_glxinfo install_man
0N/AINSTALL_TARGETS_SET=yes
0N/A
0N/A# Compatibility links from /usr/X11/bin to /usr/bin
0N/AMODULE_X11_BINCOMPAT_LINKS = glxinfo
0N/A
0N/A### Include common rulesets
0N/Ainclude ../Makefile.inc
0N/A
0N/A### Rules specific to this directory:
0N/A
0N/A# Only care about building X demos
0N/ADEMOS_DIR=$(SOURCE_DIR)/progs/xdemos
0N/A
0N/ADEMO_LDFLAGS=$(PROG_LDFLAGS) -L$(PROTODIR)$(X11_LIB_DIR)$(ARCHLIBSUBDIR) \
0N/A -L$(PROTODIR)$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR)
0N/A
0N/A# Flags passed on make command line when building
0N/AMODULE_BUILD_MAKEFLAGS = LDFLAGS="$(DEMO_LDFLAGS)"
0N/A
0N/A# Use configuration generated by Mesa library build
0N/A$(SOURCE_DIR)/configs/current: $(UNPACK_TARGET)
0N/A mkdir -p $(SOURCE_DIR)/configs
0N/A (cd $(SOURCE_DIR)/configs && \
0N/A $(LNDIR) ../../../../../lib/mesa/$(SOURCE_DIR)/configs)
0N/A
0N/A# Build Mesa demos
0N/A$(GLXGEARS_BIN): $(UNPACK_TARGET) $(CONFIGURE_TARGETS)
0N/A (cd $(DEMOS_DIR) && \
0N/A $(MODULE_MAKE) $(MAKEFLAGS) $(DEFAULT_BUILD_MAKEFLAGS) glxgears )
0N/A
0N/A$(GLXINFO_BIN): $(UNPACK_TARGET) $(CONFIGURE_TARGETS)
0N/A (cd $(DEMOS_DIR) && \
0N/A $(MODULE_MAKE) $(MAKEFLAGS) $(DEFAULT_BUILD_MAKEFLAGS) glxinfo )
0N/A
0N/A# For testing - we don't ship the rest of these
0N/Aall-xdemos_gen: $(UNPACK_TARGET) $(CONFIGURE_TARGETS)
0N/A (cd $(DEMOS_DIR) && \
0N/A $(MODULE_MAKE) $(MAKEFLAGS) $(DEFAULT_BUILD_MAKEFLAGS))
0N/A
0N/Aall-xdemos:
0N/A $(MAKE) $(MAKEFLAGS) $(BUILD_32_FLAGS) all-xdemos_gen
0N/A
0N/ADESTDIR=$(PROTODIR)
0N/A
0N/Ainstall_glxgears: $(GLXGEARS_BIN)
mkdir -p $(DESTDIR)$(MODULE_PREFIX)/bin
cp -pf $(GLXGEARS_BIN) $(DESTDIR)$(MODULE_PREFIX)/bin
install_glxinfo: $(GLXINFO_BIN)
mkdir -p $(DESTDIR)$(MODULE_PREFIX)/bin
cp -pf $(GLXINFO_BIN) $(DESTDIR)$(MODULE_PREFIX)/bin
install_man:
mkdir -p $(DESTDIR)$(MODULE_PREFIX)/share/man/man1
cp -pf glxgears.1 glxinfo.1 $(DESTDIR)$(MODULE_PREFIX)/share/man/man1