Makefile revision 433
ee4d840f54fd2dcea8a73b1b86d5ec0db370b05dvboxsync###############################################################################
cbaf00194b28ee57e4aeee473f66f91f1be4e022vboxsync# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
dd97657cc7e8460edff31ebcff4c9d19bf8ad694vboxsync# Use subject to license terms.
dd97657cc7e8460edff31ebcff4c9d19bf8ad694vboxsync# Permission is hereby granted, free of charge, to any person obtaining a
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync# copy of this software and associated documentation files (the
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync# "Software"), to deal in the Software without restriction, including
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync# without limitation the rights to use, copy, modify, merge, publish,
e64031e20c39650a7bc902a3e1aba613b9415deevboxsync# distribute, and/or sell copies of the Software, and to permit persons
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync# to whom the Software is furnished to do so, provided that the above
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync# copyright notice(s) and this permission notice appear in all copies of
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync# the Software and that both the above copyright notice(s) and this
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync# permission notice appear in supporting documentation.
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
da957c069c2a3c582fe265ff88170ce4c42b499dvboxsync# Except as contained in this notice, the name of a copyright holder
914d33aebb63d8c288dfd1b7e74f8e2acf3eaa66vboxsync# shall not be used in advertising or otherwise to promote the sale, use
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync# or other dealings in this Software without prior written authorization
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync# of the copyright holder.
ee4d840f54fd2dcea8a73b1b86d5ec0db370b05dvboxsync# @(#)Makefile 1.12 08/06/02
ee4d840f54fd2dcea8a73b1b86d5ec0db370b05dvboxsync# Build 32-bit, 64-bit, or both?
914d33aebb63d8c288dfd1b7e74f8e2acf3eaa66vboxsync# Version number (used in path names)
0f1e77149ab5ab40fa2bd74a5330e087416b3c7bvboxsync# Source tarball
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync# Download site for source
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsyncSOURCE_URL=$(SF_DOWNLOADS_URL)/mesa3d/$(SOURCE_TARBALL_NAME)
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync# Patches to apply to source after unpacking, in order
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync# Directory created by unpacking source
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync# Library built in tree
914d33aebb63d8c288dfd1b7e74f8e2acf3eaa66vboxsync# Where to install most files
914d33aebb63d8c288dfd1b7e74f8e2acf3eaa66vboxsync# Where to install libraries
914d33aebb63d8c288dfd1b7e74f8e2acf3eaa66vboxsync# What to build
fe96bc0e43d9c137304462ef8c2d79cbff22446fvboxsync### Include common rulesets
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync### Rules specific to this directory:
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync# Merge in additional sources from sun-src directory
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync# Build with gcc on x86:
ee4d840f54fd2dcea8a73b1b86d5ec0db370b05dvboxsyncMESA_CFLAGS=$(DEFAULT_GCC_CFLAGS) $(ARCH_GCC_FLAGS) -D_REENTRANT
ee4d840f54fd2dcea8a73b1b86d5ec0db370b05dvboxsync# Build with Sun Studio cc on x86:
a39ea3668b7019c23a68936259545f9b71bce1aavboxsync#MESA_CFLAGS=$(LIB_CFLAGS)
a39ea3668b7019c23a68936259545f9b71bce1aavboxsync#MESA_CFG_32_i386=solaris-x86-cc-dri
ee4d840f54fd2dcea8a73b1b86d5ec0db370b05dvboxsync#MESA_CFG_64_i386=solaris-x64-cc-dri
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsyncBUILD_32_FLAGS=ARCH_GCC_FLAGS="$(ARCH32_GCC_FLAGS)" MESA_CFG=$(MESA_CFG_32)
0f1e77149ab5ab40fa2bd74a5330e087416b3c7bvboxsyncBUILD_64_FLAGS=ARCH_GCC_FLAGS="$(ARCH64_GCC_FLAGS)" MESA_CFG=$(MESA_CFG_64)
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsync# pkg-config --cflags libdrm
548ca31b6b47c36bacce49bed3339cb8075b9681vboxsyncLIBDRM_CFLAGS = -I$(PROTODIR)$(X11_INCLUDES_DIR) -I$(PROTODIR)$(X11_INCLUDES_DIR)/drm
f379f813372b948dc6603b556f0ade7f838a5a65vboxsync# pkg-config --libs libdrm
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsyncLIBDRM_LIB = -L$(PROTODIR)$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR) -R$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR) -ldrm
5b1d6bab9f4cf5dacf1883e7c4a40c84349f597fvboxsyncMESA_MAKEVARS= SHELL=/bin/ksh PASSED_CFLAGS="$(MESA_CFLAGS)" PASSED_INCLUDES="$(MESA_INCLUDES)" ARCH_FLAGS="" LIBDRM_CFLAGS="$(LIBDRM_CFLAGS)" LIBDRM_LIB="$(LIBDRM_LIB)"
85a8039cb441b4ab1462507454334d8d85969194vboxsyncMESA_MAKEENV= PKG_CONFIG_PATH=$(PROTODIR)/usr/lib$(ARCHLIBSUBDIR)/pkgconfig:$(TOP)/common/pc-files/$(BUILD_DIR):/usr/lib$(ARCHLIBSUBDIR)/pkgconfig
914d33aebb63d8c288dfd1b7e74f8e2acf3eaa66vboxsync# LD_OPTIONS="$(LIB_REQUIRED_LDFLAGS)"
914d33aebb63d8c288dfd1b7e74f8e2acf3eaa66vboxsync# Build Mesa
85a8039cb441b4ab1462507454334d8d85969194vboxsync (cd $(SOURCE_DIR)/configs && rm -f current && ln -s $(MESA_CFG) current)
85a8039cb441b4ab1462507454334d8d85969194vboxsync (cd $(SOURCE_DIR) && $(MESA_MAKEENV) $(GNUMAKE) $(MFLAGS) -e $(MESA_MAKEVARS) default)
914d33aebb63d8c288dfd1b7e74f8e2acf3eaa66vboxsync (cd $(SOURCE_DIR) && $(GNUMAKE) $(MFLAGS) -e DESTDIR=$(PROTODIR) ARCHLIBSUBDIR=$(ARCHLIBSUBDIR) install )