Makefile revision 156
1345N/A###############################################################################
366N/A#
366N/A# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
919N/A# Use subject to license terms.
919N/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
366N/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
366N/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
366N/A# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
366N/A# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
366N/A# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
366N/A# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
366N/A#
366N/A# Except as contained in this notice, the name of a copyright holder
366N/A# shall not be used in advertising or otherwise to promote the sale, use
366N/A# or other dealings in this Software without prior written authorization
366N/A# of the copyright holder.
366N/A#
366N/A# @(#)Makefile 1.5 07/05/15
366N/A#
366N/A
366N/APWD:sh=pwd
366N/ATOP=$(PWD)/../..
1345N/A
366N/A# Version number (used in path names)
366N/AMESA_VERS=6.5.2
366N/A
366N/A# Source tarball
366N/ASOURCE_TARBALL_NAME=MesaDemos-$(MESA_VERS).tar.bz2
366N/A
366N/A# Download site for source
366N/ASOURCE_URL=$(SF_DOWNLOADS_URL)/mesa3d/$(SOURCE_TARBALL_NAME)
366N/ASOURCE_URL_SET=yes
366N/A
366N/A# Patches to apply to source after unpacking, in order
366N/ASOURCE_PATCHES= \
366N/A null-display.patch \
366N/A Xorg-6.9-changes.patch
366N/A
366N/A# Directory created by unpacking source
366N/ASOURCE_DIR=$(BUILD_DIR)/Mesa-$(MESA_VERS)
366N/A
366N/A# Binaries built in tree
366N/AGLXGEARS_BIN=$(SOURCE_DIR)/progs/xdemos/glxgears
366N/AGLXINFO_BIN=$(SOURCE_DIR)/progs/xdemos/glxinfo
366N/A
366N/A# Where to install files
366N/AMESA_prefix=$(PROTODIR)/usr/X11
366N/A
366N/A# What to build
366N/ABUILD_TARGETS=$(GLXGEARS_BIN) $(GLXINFO_BIN)
366N/A
366N/A### Include common rulesets
366N/Ainclude $(TOP)/common/Makefile.inc
366N/A
366N/A### Rules specific to this directory:
366N/A
366N/A# Merge in additional sources from Mesa library sun-src directory
366N/Asource_gen:: $(LNDIR)
366N/A mkdir -p $(SOURCE_DIR)
366N/A (cd $(SOURCE_DIR) && $(LNDIR) ../../../../lib/mesa/sun-src)
366N/A (cd $(SOURCE_DIR)/configs && touch default)
366N/A
366N/A# Only care about building X demos
366N/ADEMOS_DIR=$(SOURCE_DIR)/progs/xdemos
366N/A
366N/A# Mesa config file names
366N/AMESA_CFG_32_sparc=sunos5-v8
366N/AMESA_CFG_64_sparc=sunos5-v9
366N/AMESA_CFG_32_i386=solaris-x86-cc-dri
366N/AMESA_CFG_64_i386=solaris-x64-cc-dri
366N/A
366N/AMESA_CFG_32= $(MESA_CFG_32_$(MACH))
366N/AMESA_CFG_64= $(MESA_CFG_64_$(MACH))
366N/A
366N/ABUILD_32_FLAGS= MESA_CFG=$(MESA_CFG_32)
366N/ABUILD_64_FLAGS= MESA_CFG=$(MESA_CFG_64)
366N/A
366N/A# Build Mesa demos
366N/A$(GLXGEARS_BIN): $(UNPACK_TARGET)
366N/A (cd $(SOURCE_DIR)/configs && rm -f current && ln -s $(MESA_CFG) current)
366N/A (cd $(DEMOS_DIR) && $(MAKE) $(MFLAGS) LDFLAGS="$(PROG_LDFLAGS)" glxgears )
366N/A
366N/A$(GLXINFO_BIN): $(UNPACK_TARGET)
366N/A (cd $(SOURCE_DIR)/configs && rm -f current && ln -s $(MESA_CFG) current)
366N/A (cd $(DEMOS_DIR) && $(MAKE) $(MFLAGS) LDFLAGS="$(PROG_LDFLAGS)" glxinfo )
366N/A
366N/A# For testing - we don't ship the rest of these
366N/Aall-xdemos_gen: $(UNPACK_TARGET)
366N/A (cd $(SOURCE_DIR)/configs && rm -f current && ln -s $(MESA_CFG) current)
366N/A (cd $(DEMOS_DIR) && $(MAKE) $(MFLAGS) LDFLAGS="$(PROG_LDFLAGS)")
366N/A
366N/Aall-xdemos:
366N/A $(MAKE) $(MFLAGS) BUILD_DIR=$(BUILD_DIR_32) ARCH_FLAGS="$(ARCH32_FLAGS)" $(BUILD_32_FLAGS) all-xdemos_gen
366N/A
366N/Ainstall_gen: $(GLXGEARS_BIN) $(GLXINFO_BIN)
366N/A cp -p $(GLXGEARS_BIN) $(GLXINFO_BIN) $(MESA_prefix)/bin
366N/A
366N/A
366N/A