Makefile revision 325
824N/A###############################################################################
824N/A#
824N/A# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
824N/A# Use subject to license terms.
824N/A#
824N/A# Permission is hereby granted, free of charge, to any person obtaining a
824N/A# copy of this software and associated documentation files (the
824N/A# "Software"), to deal in the Software without restriction, including
824N/A# without limitation the rights to use, copy, modify, merge, publish,
824N/A# distribute, and/or sell copies of the Software, and to permit persons
824N/A# to whom the Software is furnished to do so, provided that the above
824N/A# copyright notice(s) and this permission notice appear in all copies of
824N/A# the Software and that both the above copyright notice(s) and this
824N/A# permission notice appear in supporting documentation.
824N/A#
824N/A# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
824N/A# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
824N/A# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
824N/A# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
824N/A# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
824N/A# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
824N/A# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
824N/A# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
824N/A# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
824N/A#
824N/A# Except as contained in this notice, the name of a copyright holder
824N/A# shall not be used in advertising or otherwise to promote the sale, use
824N/A# or other dealings in this Software without prior written authorization
824N/A# of the copyright holder.
824N/A#
824N/A# @(#)Makefile 1.7 07/10/08
824N/A#
851N/A
824N/APWD:sh=pwd
824N/ATOP=$(PWD)/../..
824N/A
824N/A# Version number (used in path names)
824N/AMESA_VERS=6.5.2
824N/A
824N/A# Source tarball
824N/ASOURCE_TARBALL_NAME=MesaDemos-$(MESA_VERS).tar.bz2
824N/A
824N/A# Download site for source
824N/ASOURCE_URL=$(SF_DOWNLOADS_URL)/mesa3d/$(SOURCE_TARBALL_NAME)
824N/ASOURCE_URL_SET=yes
824N/A
824N/A# Patches to apply to source after unpacking, in order
824N/ASOURCE_PATCHES= \
824N/A null-display.patch \
824N/A Xorg-6.9-changes.patch
824N/A
824N/A# Directory created by unpacking source
824N/ASOURCE_DIR=$(BUILD_DIR)/Mesa-$(MESA_VERS)
824N/A
824N/A# Binaries built in tree
824N/AGLXGEARS_BIN=$(SOURCE_DIR)/progs/xdemos/glxgears
824N/AGLXINFO_BIN=$(SOURCE_DIR)/progs/xdemos/glxinfo
824N/A
824N/A# Where to install files
824N/AMESA_prefix=$(PROTODIR)/usr/X11
824N/A
824N/A# What to build
824N/ABUILD_TARGETS_sparc=$(GLXGEARS_BIN)
824N/ABUILD_TARGETS_i386=$(GLXGEARS_BIN) $(GLXINFO_BIN)
824N/ABUILD_TARGETS= $(BUILD_TARGETS_$(MACH))
824N/A
833N/A# What to install
824N/AINSTALL_TARGETS_sparc=install_glxgears install_man
824N/AINSTALL_TARGETS_i386=install_glxgears install_glxinfo install_man
824N/AINSTALL_TARGETS= $(INSTALL_TARGETS_$(MACH))
824N/A
824N/A### Include common rulesets
824N/Ainclude $(TOP)/common/Makefile.inc
824N/A
824N/A### Rules specific to this directory:
824N/A
824N/A# Merge in additional sources from Mesa library sun-src directory
824N/Asource_gen:: $(LNDIR)
824N/A mkdir -p $(SOURCE_DIR)
824N/A (cd $(SOURCE_DIR) && $(LNDIR) ../../../../lib/mesa/sun-src)
824N/A (cd $(SOURCE_DIR)/configs && touch default)
824N/A
824N/A# Only care about building X demos
824N/ADEMOS_DIR=$(SOURCE_DIR)/progs/xdemos
824N/A
824N/A# Mesa config file names
824N/AMESA_CFG_32_sparc=solaris-sparcv8-cc
824N/AMESA_CFG_64_sparc=sunos5-v9
824N/AMESA_CFG_32_i386=solaris-x86-cc-dri
824N/AMESA_CFG_64_i386=solaris-x64-cc-dri
824N/A
833N/AMESA_CFG_32= $(MESA_CFG_32_$(MACH))
824N/AMESA_CFG_64= $(MESA_CFG_64_$(MACH))
824N/A
824N/ABUILD_32_FLAGS= MESA_CFG=$(MESA_CFG_32)
824N/ABUILD_64_FLAGS= MESA_CFG=$(MESA_CFG_64)
824N/A
824N/A# Build Mesa demos
824N/A$(GLXGEARS_BIN): $(UNPACK_TARGET)
824N/A (cd $(SOURCE_DIR)/configs && rm -f current && ln -s $(MESA_CFG) current)
833N/A (cd $(DEMOS_DIR) && $(MAKE) $(MFLAGS) LDFLAGS="$(PROG_LDFLAGS)" glxgears )
824N/A
824N/A$(GLXINFO_BIN): $(UNPACK_TARGET)
824N/A (cd $(SOURCE_DIR)/configs && rm -f current && ln -s $(MESA_CFG) current)
824N/A (cd $(DEMOS_DIR) && $(MAKE) $(MFLAGS) LDFLAGS="$(PROG_LDFLAGS)" glxinfo )
824N/A
824N/A# For testing - we don't ship the rest of these
824N/Aall-xdemos_gen: $(UNPACK_TARGET)
824N/A (cd $(SOURCE_DIR)/configs && rm -f current && ln -s $(MESA_CFG) current)
824N/A (cd $(DEMOS_DIR) && $(MAKE) $(MFLAGS) LDFLAGS="$(PROG_LDFLAGS)")
824N/A
824N/Aall-xdemos:
851N/A $(MAKE) $(MFLAGS) BUILD_DIR=$(BUILD_DIR_32) ARCH_FLAGS="$(ARCH32_FLAGS)" $(BUILD_32_FLAGS) all-xdemos_gen
851N/A
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