Makefile revision 355
d6fa26d0adaec6c910115be34fe7a5a5f402c14fMark Andrews###############################################################################
71cef386fae61275b03e203825680b39fedaa8c6Tinderbox User# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Use subject to license terms.
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User# Permission is hereby granted, free of charge, to any person obtaining a
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User# copy of this software and associated documentation files (the
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# "Software"), to deal in the Software without restriction, including
d6fa26d0adaec6c910115be34fe7a5a5f402c14fMark Andrews# without limitation the rights to use, copy, modify, merge, publish,
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# distribute, and/or sell copies of the Software, and to permit persons
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# to whom the Software is furnished to do so, provided that the above
cd32f419a8a5432fbb139f56ee73cbf68b9350ccTinderbox User# copyright notice(s) and this permission notice appear in all copies of
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# the Software and that both the above copyright notice(s) and this
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# permission notice appear in supporting documentation.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
cd32f419a8a5432fbb139f56ee73cbf68b9350ccTinderbox User# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
cd32f419a8a5432fbb139f56ee73cbf68b9350ccTinderbox User# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Except as contained in this notice, the name of a copyright holder
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# shall not be used in advertising or otherwise to promote the sale, use
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# or other dealings in this Software without prior written authorization
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# of the copyright holder.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# @(#)Makefile 1.10 08/03/07
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# Build 32-bit, 64-bit, or both?
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# Version number (used in path names)
a1ff871f78b7d907d6fc3a382beea2a640fe8423Tinderbox User# Source tarball
3ca1a32241189d1e02e59f6b56399eb9b40f2aafTinderbox UserSOURCE_TARBALL_NAME=MesaLib-$(MESA_VERS).tar.bz2
d253648fe3331622cebea02d60aaecca3082d78dTinderbox User# Download site for source
bfb7b680bf88c1fdd9949197b71c512c532280a4Tinderbox UserSOURCE_URL=$(SF_DOWNLOADS_URL)/mesa3d/$(SOURCE_TARBALL_NAME)
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# Patches to apply to source after unpacking, in order
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# Directory created by unpacking source
0da02c26a6631c25f075a8e4ac6de9e58f49a0c2Tinderbox User# Library built in tree
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# Where to install most files
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User# Where to install libraries
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User# What to build
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt### Include common rulesets
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt### Rules specific to this directory:
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User# Merge in additional sources from sun-src directory
33c9436ef1a43d3c0fc3d9be9b4b0509daa83223Tinderbox User# Build with gcc on x86:
33c9436ef1a43d3c0fc3d9be9b4b0509daa83223Tinderbox UserMESA_CFLAGS=$(DEFAULT_GCC_CFLAGS) $(ARCH_GCC_FLAGS) -D_REENTRANT
363b21045b718d06d414784c96193dc9a233e8c5Tinderbox User# Build with Sun Studio cc on x86:
33c9436ef1a43d3c0fc3d9be9b4b0509daa83223Tinderbox User#MESA_CFLAGS=$(LIB_CFLAGS)
363b21045b718d06d414784c96193dc9a233e8c5Tinderbox User#MESA_CFG_32_i386=solaris-x86-cc-dri
363b21045b718d06d414784c96193dc9a233e8c5Tinderbox User#MESA_CFG_64_i386=solaris-x64-cc-dri
33c9436ef1a43d3c0fc3d9be9b4b0509daa83223Tinderbox UserBUILD_32_FLAGS=ARCH_GCC_FLAGS="$(ARCH32_GCC_FLAGS)" MESA_CFG=$(MESA_CFG_32)
33c9436ef1a43d3c0fc3d9be9b4b0509daa83223Tinderbox UserBUILD_64_FLAGS=ARCH_GCC_FLAGS="$(ARCH64_GCC_FLAGS)" MESA_CFG=$(MESA_CFG_64)
33c9436ef1a43d3c0fc3d9be9b4b0509daa83223Tinderbox User# pkg-config --cflags libdrm
33c9436ef1a43d3c0fc3d9be9b4b0509daa83223Tinderbox UserLIBDRM_CFLAGS = -I$(PROTODIR)$(X11_INCLUDES_DIR) -I$(PROTODIR)$(X11_INCLUDES_DIR)/drm
33c9436ef1a43d3c0fc3d9be9b4b0509daa83223Tinderbox User# pkg-config --libs libdrm
33c9436ef1a43d3c0fc3d9be9b4b0509daa83223Tinderbox UserLIBDRM_LIB = -L$(PROTODIR)$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR) -R$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR) -ldrm
33c9436ef1a43d3c0fc3d9be9b4b0509daa83223Tinderbox UserMESA_INCLUDES= -I$(PROTODIR)$(X11_INCLUDES_DIR)
33c9436ef1a43d3c0fc3d9be9b4b0509daa83223Tinderbox UserMESA_MAKEVARS= SHELL=/bin/ksh PASSED_CFLAGS="$(MESA_CFLAGS)" PASSED_INCLUDES="$(MESA_INCLUDES)" ARCH_FLAGS="" LIBDRM_CFLAGS="$(LIBDRM_CFLAGS)" LIBDRM_LIB="$(LIBDRM_LIB)"
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox UserMESA_MAKEENV= PKG_CONFIG_PATH=$(PROTODIR)/usr/lib$(ARCHLIBSUBDIR)/pkgconfig:$(TOP)/common/pc-files/$(BUILD_DIR):/usr/lib$(ARCHLIBSUBDIR)/pkgconfig
0da02c26a6631c25f075a8e4ac6de9e58f49a0c2Tinderbox User# LD_OPTIONS="$(LIB_REQUIRED_LDFLAGS)"
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User (cd $(SOURCE_DIR)/configs && rm -f current && ln -s $(MESA_CFG) current)
8a48b6b9b6fa8486f24b22d1972b2b6ebb36a4a4Tinderbox User (cd $(SOURCE_DIR) && $(MESA_MAKEENV) $(GNUMAKE) $(MFLAGS) -e $(MESA_MAKEVARS) default)
8a48b6b9b6fa8486f24b22d1972b2b6ebb36a4a4Tinderbox User (cd $(SOURCE_DIR) && $(GNUMAKE) $(MFLAGS) -e DESTDIR=$(PROTODIR) ARCHLIBSUBDIR=$(ARCHLIBSUBDIR) install )