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