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