Makefile revision 577
0N/A###############################################################################
0N/A#
967N/A# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
0N/A# Use subject to license terms.
0N/A#
919N/A# Permission is hereby granted, free of charge, to any person obtaining a
919N/A# copy of this software and associated documentation files (the
919N/A# "Software"), to deal in the Software without restriction, including
919N/A# without limitation the rights to use, copy, modify, merge, publish,
919N/A# distribute, and/or sell copies of the Software, and to permit persons
919N/A# to whom the Software is furnished to do so, provided that the above
919N/A# copyright notice(s) and this permission notice appear in all copies of
919N/A# the Software and that both the above copyright notice(s) and this
919N/A# permission notice appear in supporting documentation.
919N/A#
919N/A# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
919N/A# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
919N/A# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
919N/A# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
919N/A# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
919N/A# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
919N/A# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
0N/A# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
0N/A# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
0N/A#
0N/A# Except as contained in this notice, the name of a copyright holder
493N/A# shall not be used in advertising or otherwise to promote the sale, use
810N/A# or other dealings in this Software without prior written authorization
810N/A# of the copyright holder.
810N/A#
810N/A# @(#)Makefile 1.10 08/08/08
493N/A#
493N/A
0N/A# Package name used in tarballs
493N/AMODULE_NAME=MesaDemos
822N/A
822N/A# Version number (used in path names)
493N/AMODULE_VERSION=6.5.2
493N/A
493N/A# Directory created by unpacking source
493N/ASOURCE_DIRNAME=Mesa-$(MODULE_VERSION)
493N/ASOURCE_DIRNAME_SET=yes
810N/ASOURCE_DIR=$(BUILD_DIR)/$(SOURCE_DIRNAME)
810N/A
810N/A# Source tarball
967N/ASOURCE_TARBALL_NAME=MesaDemos-$(MODULE_VERSION).tar.bz2
970N/ASOURCE_TARBALL_NAME_SET=yes
967N/A
967N/A# Download site for source
810N/ASOURCE_URL=$(SF_DOWNLOADS_URL)/mesa3d/$(SOURCE_TARBALL_NAME)
1056N/ASOURCE_URL_SET=yes
822N/A
822N/A# Patches to apply to source after unpacking, in order
1056N/ASOURCE_PATCHES= \
810N/A null-display.patch \
851N/A Xorg-6.9-changes.patch
851N/A
851N/A# Binaries built in tree
493N/AGLXGEARS_BIN=$(SOURCE_DIR)/progs/xdemos/glxgears
493N/AGLXINFO_BIN=$(SOURCE_DIR)/progs/xdemos/glxinfo
174N/A
970N/A# Where to install files
967N/AMESA_prefix=$(PROTODIR)$(X11_DIR)
8N/A
61N/A# 6.5.2 doesn't use autoconf, just links configuration files
493N/ACONFIGURE_TARGETS=$(SOURCE_DIR)/configs/current
1010N/ACONFIGURE_TARGETS_SET=yes
1010N/A
186N/A# What to build
70N/ABUILD_TARGETS_sparc=$(GLXGEARS_BIN)
851N/ABUILD_TARGETS_i386=$(GLXGEARS_BIN) $(GLXINFO_BIN)
822N/ABUILD_TARGETS= $(BUILD_TARGETS_$(MACH))
822N/ABUILD_TARGETS_SET=yes
970N/A
98N/A# What to install
430N/AINSTALL_TARGETS_sparc=install_glxgears install_man
214N/AINSTALL_TARGETS_i386=install_glxgears install_glxinfo install_man
98N/AINSTALL_TARGETS= $(INSTALL_TARGETS_$(MACH))
0N/AINSTALL_TARGETS_SET=yes
493N/A
493N/A### Include common rulesets
0N/Ainclude ../Makefile.inc
1056N/A
1056N/A### Rules specific to this directory:
1056N/A
1056N/A# Merge in additional sources from Mesa library sun-src directory
493N/Asource_gen:: $(LNDIR)
967N/A mkdir -p $(SOURCE_DIR)
0N/A (cd $(SOURCE_DIR) && $(LNDIR) ../../../../lib/mesa/sun-src)
493N/A (cd $(SOURCE_DIR)/configs && touch default)
493N/A
967N/A# Only care about building X demos
0N/ADEMOS_DIR=$(SOURCE_DIR)/progs/xdemos
# Mesa config file names
MESA_CFG_32_sparc=solaris-sparcv8-cc
MESA_CFG_64_sparc=solaris-sparcv9-cc
MESA_CFG_32_i386=solaris-x86-cc-dri
MESA_CFG_64_i386=solaris-x64-cc-dri
MESA_CFG_32= $(MESA_CFG_32_$(MACH))
MESA_CFG_64= $(MESA_CFG_64_$(MACH))
MODULE_BUILD_32_FLAGS= MESA_CFG=$(MESA_CFG_32)
MODULE_BUILD_64_FLAGS= MESA_CFG=$(MESA_CFG_64)
# Flags passed on make command line when building
ADD_MAKE_FLAGS = X11_INCLUDES="-I$(PROTODIR)$(X11_INCLUDES_DIR)" \
LDFLAGS="$(PROG_LDFLAGS) -L$(PROTODIR)$(X11_DIR)/lib$(ARCHLIBSUBDIR)"
# 6.5.2 doesn't use autoconf, just links configuration files
$(SOURCE_DIR)/configs/current: $(UNPACK_TARGET)
(cd $(SOURCE_DIR)/configs && \
rm -f current && \
ln -s $(MESA_CFG) current )
# Build Mesa demos
$(GLXGEARS_BIN): $(UNPACK_TARGET) $(CONFIGURE_TARGETS)
(cd $(DEMOS_DIR) && $(MAKE) $(MAKEFLAGS) $(ADD_MAKE_FLAGS) glxgears )
$(GLXINFO_BIN): $(UNPACK_TARGET) $(CONFIGURE_TARGETS)
(cd $(DEMOS_DIR) && $(MAKE) $(MAKEFLAGS) $(ADD_MAKE_FLAGS) glxinfo )
# For testing - we don't ship the rest of these
all-xdemos_gen: $(UNPACK_TARGET) $(CONFIGURE_TARGETS)
(cd $(DEMOS_DIR) && $(MAKE) $(MAKEFLAGS) $(ADD_MAKE_FLAGS) )
all-xdemos:
$(MAKE) $(MAKEFLAGS) $(BUILD_32_FLAGS) all-xdemos_gen
install_gen:: $(INSTALL_TARGETS)
install_glxgears: $(GLXGEARS_BIN)
mkdir -p $(MESA_prefix)/bin
cp -pf $(GLXGEARS_BIN) $(MESA_prefix)/bin
install_glxinfo: $(GLXINFO_BIN)
mkdir -p $(MESA_prefix)/bin
cp -pf $(GLXINFO_BIN) $(MESA_prefix)/bin
install_man:
mkdir -p $(MESA_prefix)/share/man/man1
cp -pf glxgears.1 glxinfo.1 $(MESA_prefix)/share/man/man1