Makefile revision 493
b0f4d39e96eeaa00cde7525a9a5991feefa17a3aTimo Sirainen###############################################################################
b0f4d39e96eeaa00cde7525a9a5991feefa17a3aTimo Sirainen# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
201108608e6686d3e9dce9b95678a814122b6471Timo Sirainen# Use subject to license terms.
ca8863af6ce6b695a369dfb7b50e909420dc45dfTimo Sirainen# Permission is hereby granted, free of charge, to any person obtaining a
b0f4d39e96eeaa00cde7525a9a5991feefa17a3aTimo Sirainen# copy of this software and associated documentation files (the
b0f4d39e96eeaa00cde7525a9a5991feefa17a3aTimo Sirainen# "Software"), to deal in the Software without restriction, including
b0f4d39e96eeaa00cde7525a9a5991feefa17a3aTimo Sirainen# without limitation the rights to use, copy, modify, merge, publish,
b0f4d39e96eeaa00cde7525a9a5991feefa17a3aTimo Sirainen# distribute, and/or sell copies of the Software, and to permit persons
b0f4d39e96eeaa00cde7525a9a5991feefa17a3aTimo Sirainen# to whom the Software is furnished to do so, provided that the above
b0f4d39e96eeaa00cde7525a9a5991feefa17a3aTimo Sirainen# copyright notice(s) and this permission notice appear in all copies of
b0f4d39e96eeaa00cde7525a9a5991feefa17a3aTimo Sirainen# the Software and that both the above copyright notice(s) and this
b0f4d39e96eeaa00cde7525a9a5991feefa17a3aTimo Sirainen# permission notice appear in supporting documentation.
b0f4d39e96eeaa00cde7525a9a5991feefa17a3aTimo Sirainen# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
b0f4d39e96eeaa00cde7525a9a5991feefa17a3aTimo Sirainen# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
b0f4d39e96eeaa00cde7525a9a5991feefa17a3aTimo Sirainen# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
b0f4d39e96eeaa00cde7525a9a5991feefa17a3aTimo Sirainen# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
b0f4d39e96eeaa00cde7525a9a5991feefa17a3aTimo Sirainen# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
b0f4d39e96eeaa00cde7525a9a5991feefa17a3aTimo Sirainen# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
b0f4d39e96eeaa00cde7525a9a5991feefa17a3aTimo Sirainen# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
b0f4d39e96eeaa00cde7525a9a5991feefa17a3aTimo Sirainen# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
b0f4d39e96eeaa00cde7525a9a5991feefa17a3aTimo Sirainen# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
b0f4d39e96eeaa00cde7525a9a5991feefa17a3aTimo Sirainen# Except as contained in this notice, the name of a copyright holder
b0f4d39e96eeaa00cde7525a9a5991feefa17a3aTimo Sirainen# shall not be used in advertising or otherwise to promote the sale, use
b0f4d39e96eeaa00cde7525a9a5991feefa17a3aTimo Sirainen# or other dealings in this Software without prior written authorization
b0f4d39e96eeaa00cde7525a9a5991feefa17a3aTimo Sirainen# of the copyright holder.
b0f4d39e96eeaa00cde7525a9a5991feefa17a3aTimo Sirainen# @(#)Makefile 1.13 08/08/08
b0f4d39e96eeaa00cde7525a9a5991feefa17a3aTimo Sirainen# Package name used in tarballs
b0f4d39e96eeaa00cde7525a9a5991feefa17a3aTimo Sirainen# Version number (used in path names)
b0f4d39e96eeaa00cde7525a9a5991feefa17a3aTimo Sirainen# Source tarball
b0f4d39e96eeaa00cde7525a9a5991feefa17a3aTimo SirainenSOURCE_TARBALL_NAME=MesaLib-$(MODULE_VERSION).tar.bz2
b0f4d39e96eeaa00cde7525a9a5991feefa17a3aTimo Sirainen# Download site for source
b0f4d39e96eeaa00cde7525a9a5991feefa17a3aTimo SirainenSOURCE_URL=$(SF_DOWNLOADS_URL)/mesa3d/$(SOURCE_TARBALL_NAME)
b0f4d39e96eeaa00cde7525a9a5991feefa17a3aTimo Sirainen# Directory created by unpacking source
b0f4d39e96eeaa00cde7525a9a5991feefa17a3aTimo Sirainen# Patches to apply to source after unpacking, in order
b0f4d39e96eeaa00cde7525a9a5991feefa17a3aTimo Sirainen# Need to use GNU Make to build
b0f4d39e96eeaa00cde7525a9a5991feefa17a3aTimo Sirainen# Mesa doesn't use GNU autoconf until Mesa 7.1, but has it's own configuration
b0f4d39e96eeaa00cde7525a9a5991feefa17a3aTimo SirainenCONFIGURE_TARGETS=$(SOURCE_DIR)/configs/current
b0f4d39e96eeaa00cde7525a9a5991feefa17a3aTimo Sirainen# Build with gcc on x86:
b0f4d39e96eeaa00cde7525a9a5991feefa17a3aTimo Sirainen# Build with Sun Studio cc on x86:
b0f4d39e96eeaa00cde7525a9a5991feefa17a3aTimo Sirainen#MODULE_COMPILER=suncc
b0f4d39e96eeaa00cde7525a9a5991feefa17a3aTimo Sirainen#MODULE_COMPILER_SET=yes
b0f4d39e96eeaa00cde7525a9a5991feefa17a3aTimo Sirainen#MESA_CFG_32_i386=solaris-x86-cc-dri
b0f4d39e96eeaa00cde7525a9a5991feefa17a3aTimo Sirainen#MESA_CFG_64_i386=solaris-x64-cc-dri
201108608e6686d3e9dce9b95678a814122b6471Timo Sirainen# pkg-config --cflags libdrm
b0f4d39e96eeaa00cde7525a9a5991feefa17a3aTimo SirainenLIBDRM_CFLAGS = -I$(PROTODIR)$(X11_INCLUDES_DIR) -I$(PROTODIR)$(X11_INCLUDES_DIR)/drm
b0f4d39e96eeaa00cde7525a9a5991feefa17a3aTimo Sirainen# pkg-config --libs libdrm
201108608e6686d3e9dce9b95678a814122b6471Timo SirainenLIBDRM_LIB = -L$(PROTODIR)$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR) -R$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR) -ldrm
b0f4d39e96eeaa00cde7525a9a5991feefa17a3aTimo Sirainen# Additional flags to pass to make
b0f4d39e96eeaa00cde7525a9a5991feefa17a3aTimo Sirainen PASSED_INCLUDES="$(DEFAULT_CONFIG_CPPFLAGS) $(MODTYPE_CPPFLAGS)" \
b0f4d39e96eeaa00cde7525a9a5991feefa17a3aTimo Sirainen LIBDRM_CFLAGS="$(LIBDRM_CFLAGS)" LIBDRM_LIB="$(LIBDRM_LIB)" \
b0f4d39e96eeaa00cde7525a9a5991feefa17a3aTimo Sirainen# Additional environment variables to pass to make
b0f4d39e96eeaa00cde7525a9a5991feefa17a3aTimo SirainenMODULE_BUILD_ENV= PKG_CONFIG_PATH=$(DEFAULT_PKG_CONFIG_PATH)
b0f4d39e96eeaa00cde7525a9a5991feefa17a3aTimo Sirainen# Merge in additional sources from sun-src directory
b0f4d39e96eeaa00cde7525a9a5991feefa17a3aTimo Sirainen### Include common rulesets
b0f4d39e96eeaa00cde7525a9a5991feefa17a3aTimo Sirainen### Rules specific to this directory:
b0f4d39e96eeaa00cde7525a9a5991feefa17a3aTimo Sirainen# Configure Mesa
b0f4d39e96eeaa00cde7525a9a5991feefa17a3aTimo Sirainen$(SOURCE_DIR)/configs/current: $(UNPACK_TARGET)
b0f4d39e96eeaa00cde7525a9a5991feefa17a3aTimo Sirainen# Additional headers to install that X server builds use
b0f4d39e96eeaa00cde7525a9a5991feefa17a3aTimo Sirainen mkdir -p $(PROTODIR)/$(X11_INCLUDES_DIR)/GL/internal/