Makefile revision 1097
577N/A###############################################################################
577N/A#
577N/A# Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
577N/A#
910N/A# Permission is hereby granted, free of charge, to any person obtaining a
810N/A# copy of this software and associated documentation files (the "Software"),
577N/A# to deal in the Software without restriction, including without limitation
577N/A# the rights to use, copy, modify, merge, publish, distribute, sublicense,
919N/A# and/or sell copies of the Software, and to permit persons to whom the
919N/A# Software is furnished to do so, subject to the following conditions:
919N/A#
919N/A# The above copyright notice and this permission notice (including the next
919N/A# paragraph) shall be included in all copies or substantial portions of the
919N/A# Software.
919N/A#
919N/A# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
919N/A# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
919N/A# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
919N/A# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
919N/A# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
919N/A# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
919N/A# DEALINGS IN THE SOFTWARE.
919N/A#
919N/A
919N/A# Package name used in tarballs
577N/AMODULE_NAME=mesa-demos
577N/A
577N/A# Package metadata
577N/AUPSTREAM = The Mesa 3-D Graphics Library
577N/AUPSTREAM_URL = http://mesa3d.org/
577N/AUPSTREAM_SET = yes
851N/A
577N/A# pkg(5) name we deliver the files in (override default)
911N/AMODULE_PKGNAME=x11/demo/mesa-demos
911N/AMODULE_PKGNAME_SET=yes
911N/A
911N/A# Version number (used in path names)
577N/AMODULE_VERSION=8.0.1
606N/A
829N/A# Checksums for upstream tarball
829N/ATARBALL_MD5 = 320c2a4b6edc6faba35d9cb1e2a30bf4
829N/ATARBALL_SHA1 = 8fc77885ae20f3b9cc22f65045a7573befbde2eb
577N/A
577N/A# Download site for source
577N/ASOURCE_URL=ftp://ftp.freedesktop.org/pub/mesa/demos/$(MODULE_VERSION)/$(SOURCE_TARBALL_NAME)
577N/ASOURCE_URL_SET=yes
577N/A
577N/A# Patches to apply to source after unpacking, in order
577N/ASOURCE_PATCHES = glew-config.patch,-p1
577N/A
577N/A# Need to regenerate autoconf files after applying glew-config.patch
577N/AAUTORECONF=yes
577N/A
577N/A# Binaries built in tree
577N/ADEMOS_DIR=$(SOURCE_DIR)/src/xdemos
577N/AGLXGEARS_BIN=$(DEMOS_DIR)/glxgears
577N/AGLXINFO_BIN=$(DEMOS_DIR)/glxinfo
577N/A
577N/A# Override some configure checks for libraries we don't need in the subset
615N/A# we build & ship - have to set them to be non-empty strings though or
615N/A# configure will fail.
615N/AMODULE_CONFIG_ENV = \
810N/A GLEW_CFLAGS="-I-have-no-GLEW-" GLEW_LIBS="-I-have-no-GLEW-"
810N/A
810N/A# What to build
810N/ABUILD_TARGETS= $(GLXGEARS_BIN) $(GLXINFO_BIN) $(MODTYPE_ADD_BUILD_TARGETS)
577N/ABUILD_TARGETS_SET=yes
577N/A
577N/A# What to install
910N/AINSTALL_TARGETS= install_demos install_man
577N/AINSTALL_TARGETS_SET=yes
577N/A
577N/A# Compatibility links from /usr/X11/bin to /usr/bin
577N/AMODULE_X11_BINCOMPAT_LINKS = glxinfo
577N/A
577N/A### Include common rulesets
577N/Ainclude ../Makefile.inc
577N/A
577N/A### Rules specific to this directory:
577N/A
910N/A# Only care about building X demos
577N/ADEMO_LDFLAGS=$(PROG_LDFLAGS) -L$(PROTODIR)$(X11_LIB_DIR)$(ARCHLIBSUBDIR) \
577N/A -L$(PROTODIR)$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR)
577N/A
577N/A# Flags passed on make command line when building
577N/AMODULE_BUILD_MAKEFLAGS = LDFLAGS="$(DEMO_LDFLAGS)"
577N/A
577N/A# Build Mesa demos
$(GLXGEARS_BIN): $(UNPACK_TARGET) $(CONFIGURE_TARGETS)
(cd $(DEMOS_DIR) && \
$(MODULE_MAKE) $(MAKEFLAGS) $(DEFAULT_BUILD_MAKEFLAGS) glxgears )
$(GLXINFO_BIN): $(UNPACK_TARGET) $(CONFIGURE_TARGETS)
(cd $(DEMOS_DIR) && \
$(MODULE_MAKE) $(MAKEFLAGS) $(DEFAULT_BUILD_MAKEFLAGS) glxinfo )
# For testing - we don't ship the rest of these
all-xdemos_gen: $(UNPACK_TARGET) $(CONFIGURE_TARGETS)
(cd $(DEMOS_DIR) && \
$(MODULE_MAKE) $(MAKEFLAGS) $(DEFAULT_BUILD_MAKEFLAGS))
all-xdemos:
$(MAKE) $(MAKEFLAGS) $(BUILD_64_FLAGS) all-xdemos_gen
DESTDIR=$(PROTODIR)
install_demos: $(INSTALL_DEPS)
mkdir -p $(DESTDIR)$(MODULE_PREFIX)/bin
cp -pf $(GLXGEARS_BIN) $(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