Makefile revision 1010
321N/A###############################################################################
321N/A#
321N/A# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
321N/A#
943N/A# Permission is hereby granted, free of charge, to any person obtaining a
321N/A# copy of this software and associated documentation files (the "Software"),
321N/A# to deal in the Software without restriction, including without limitation
919N/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
321N/A# Package name used in tarballs
321N/AMODULE_NAME=MesaDemos
321N/A
321N/A# Package metadata
493N/AUPSTREAM = The Mesa 3-D Graphics Library
321N/AUPSTREAM_URL = http://mesa3d.org/
970N/AUPSTREAM_SET = yes
977N/A
970N/A# pkg(5) name we deliver the files in (override default)
970N/AMODULE_PKGNAME=x11/demo/mesa-demos
321N/AMODULE_PKGNAME_SET=yes
851N/A
321N/A# Version number (used in path names)
911N/AMODULE_VERSION=7.4.4
911N/A
911N/A# Checksums for upstream tarball
911N/ATARBALL_MD5 = 628142ec9a54cd28cc027e6ce26cff47
321N/ATARBALL_SHA1 = 190b51dd1e456f12c70cd428ec47ca8de0ed72fe
321N/A
321N/A# Directory created by unpacking source
321N/ASOURCE_DIRNAME=Mesa-$(MODULE_VERSION)
321N/ASOURCE_DIRNAME_SET=yes
493N/ASOURCE_DIR=$(BUILD_DIR)/$(SOURCE_DIRNAME)
321N/A
970N/A# Source tarball
970N/ASOURCE_TARBALL_NAME=MesaDemos-$(MODULE_VERSION).tar.bz2
970N/ASOURCE_TARBALL_NAME_SET=yes
321N/A
# Download site for source
SOURCE_URL=$(SF_DOWNLOADS_URL)/mesa3d/$(SOURCE_TARBALL_NAME)
SOURCE_URL_SET=yes
# Patches to apply to source after unpacking, in order
SOURCE_PATCHES= \
# Xorg-6.9-changes.patch
# Binaries built in tree
GLXGEARS_BIN=$(SOURCE_DIR)/progs/xdemos/glxgears
GLXINFO_BIN=$(SOURCE_DIR)/progs/xdemos/glxinfo
# configure script is run in ../lib/mesa build, just link to results here
CONFIGURE_TARGETS= $(SOURCE_DIR)/configs/current
CONFIGURE_TARGETS_SET=yes
# What to build
BUILD_TARGETS= $(GLXGEARS_BIN) $(GLXINFO_BIN)
BUILD_TARGETS_SET=yes
# What to install
INSTALL_TARGETS= install_glxgears install_glxinfo install_man
INSTALL_TARGETS_SET=yes
# Compatibility links from /usr/X11/bin to /usr/bin
MODULE_X11_BINCOMPAT_LINKS = glxinfo
### Include common rulesets
include ../Makefile.inc
### Rules specific to this directory:
# Only care about building X demos
DEMOS_DIR=$(SOURCE_DIR)/progs/xdemos
DEMO_LDFLAGS=$(PROG_LDFLAGS) -L$(PROTODIR)$(X11_LIB_DIR)$(ARCHLIBSUBDIR) \
-L$(PROTODIR)$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR)
# Flags passed on make command line when building
MODULE_BUILD_MAKEFLAGS = LDFLAGS="$(DEMO_LDFLAGS)"
# Use configuration generated by Mesa library build
$(SOURCE_DIR)/configs/current: $(UNPACK_TARGET)
mkdir -p $(SOURCE_DIR)/configs
(cd $(SOURCE_DIR)/configs && \
$(LNDIR) ../../../../../lib/mesa/$(SOURCE_DIR)/configs)
# 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_32_FLAGS) all-xdemos_gen
DESTDIR=$(PROTODIR)
install_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