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