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