Makefile revision 851
321N/A###############################################################################
321N/A#
321N/A# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
321N/A# Use is subject to license terms.
321N/A#
321N/A# Permission is hereby granted, free of charge, to any person obtaining a
321N/A# copy of this software and associated documentation files (the
321N/A# "Software"), to deal in the Software without restriction, including
321N/A# without limitation the rights to use, copy, modify, merge, publish,
321N/A# distribute, and/or sell copies of the Software, and to permit persons
321N/A# to whom the Software is furnished to do so, provided that the above
321N/A# copyright notice(s) and this permission notice appear in all copies of
321N/A# the Software and that both the above copyright notice(s) and this
321N/A# permission notice appear in supporting documentation.
321N/A#
321N/A# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
321N/A# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
321N/A# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
321N/A# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
321N/A# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
321N/A# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
321N/A# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
321N/A# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
321N/A# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
321N/A#
321N/A# Except as contained in this notice, the name of a copyright holder
321N/A# shall not be used in advertising or otherwise to promote the sale, use
321N/A# or other dealings in this Software without prior written authorization
321N/A# of the copyright holder.
321N/A#
321N/A
321N/A# Package name used in tarballs
493N/AMODULE_NAME=MesaDemos
321N/A
321N/A# Version number (used in path names)
321N/AMODULE_VERSION=7.4.4
493N/A
321N/A# Directory created by unpacking source
321N/ASOURCE_DIRNAME=Mesa-$(MODULE_VERSION)
493N/ASOURCE_DIRNAME_SET=yes
321N/ASOURCE_DIR=$(BUILD_DIR)/$(SOURCE_DIRNAME)
321N/A
321N/A# Source tarball
321N/ASOURCE_TARBALL_NAME=MesaDemos-$(MODULE_VERSION).tar.bz2
321N/ASOURCE_TARBALL_NAME_SET=yes
321N/A
493N/A# Download site for source
493N/ASOURCE_URL=$(SF_DOWNLOADS_URL)/mesa3d/$(SOURCE_TARBALL_NAME)
321N/ASOURCE_URL_SET=yes
321N/A
# 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
### 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
install_gen:: $(INSTALL_TARGETS)
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