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