Makefile revision 101
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering###############################################################################
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering# Use subject to license terms.
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering# Permission is hereby granted, free of charge, to any person obtaining a
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering# copy of this software and associated documentation files (the
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering# "Software"), to deal in the Software without restriction, including
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering# without limitation the rights to use, copy, modify, merge, publish,
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering# distribute, and/or sell copies of the Software, and to permit persons
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering# to whom the Software is furnished to do so, provided that the above
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering# copyright notice(s) and this permission notice appear in all copies of
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering# the Software and that both the above copyright notice(s) and this
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering# permission notice appear in supporting documentation.
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
ad867662936a4c7ab2c7116d804c272338801231Lennart Poettering# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
ad867662936a4c7ab2c7116d804c272338801231Lennart Poettering# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
46f08bea4b09e2cce4b50e3c082df4a92a22598cLennart Poettering# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
4ad7f2761da661853dcc29d542efb4727abb1101Nick Owens# Except as contained in this notice, the name of a copyright holder
3ffd4af22052963e7a29431721ee204e634bea75Lennart Poettering# shall not be used in advertising or otherwise to promote the sale, use
3ffd4af22052963e7a29431721ee204e634bea75Lennart Poettering# or other dealings in this Software without prior written authorization
3ffd4af22052963e7a29431721ee204e634bea75Lennart Poettering# of the copyright holder.
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering# @(#)Makefile 1.5 07/01/31
aea2429d6ec32261dbf6b9caa125fcc6ea9ea76aLennart Poettering# Build 32-bit, 64-bit, or both?
9df3ba6c6cb65eecec06f39dfe85a3596cedac4eTom Gundersen# Version number (used in path names)
0dd25fb9f005d8ab7ac4bc10a609d00569f8c56aLennart Poettering# Source tarball
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart PoetteringSOURCE_TARBALL_NAME=MesaLib-$(MESA_VERS).tar.bz2
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering# Download site for source
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart PoetteringSOURCE_URL=http://easynews.dl.sourceforge.net/sourceforge/mesa3d/$(SOURCE_TARBALL_NAME)
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering# Patches to apply to source after unpacking, in order
1716f6dcf54d4c181c2e2558e3d5414f54c8d9caLennart Poettering# Directory created by unpacking source
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering# Library built in tree
1716f6dcf54d4c181c2e2558e3d5414f54c8d9caLennart Poettering# Where to install most files
aea2429d6ec32261dbf6b9caa125fcc6ea9ea76aLennart Poettering# Where to install libraries
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering# What to build
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering### Include common rulesets
1716f6dcf54d4c181c2e2558e3d5414f54c8d9caLennart Poettering### Rules specific to this directory:
f9ebb22ab4758bc5bbaaf8eeead74b5b4f81d5c3Lennart Poettering# Merge in additional sources from sun-src directory
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering (cd $(SOURCE_DIR) && $(LNDIR) ../../sun-src)
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering# Build with gcc on x86:
ec2c5e4398f9d65e5dfe61530f2556224733d1e6Lennart PoetteringMESA_CFLAGS=$(DEFAULT_GCC_CFLAGS) $(ARCH_GCC_FLAGS) -D_REENTRANT
801ad6a6a9cd8fbd58b9f9c27f20dbb3c87d47ddLennart Poettering# Build with Sun Studio cc on x86:
801ad6a6a9cd8fbd58b9f9c27f20dbb3c87d47ddLennart Poettering#MESA_CFLAGS=$(LIB_CFLAGS)
801ad6a6a9cd8fbd58b9f9c27f20dbb3c87d47ddLennart Poettering#MESA_CFG_32_i86pc=solaris-x86-cc-dri
801ad6a6a9cd8fbd58b9f9c27f20dbb3c87d47ddLennart Poettering#MESA_CFG_64_i86pc=solaris-x64-cc-dri
801ad6a6a9cd8fbd58b9f9c27f20dbb3c87d47ddLennart PoetteringMESA_CFG_32:sh=arch | sed 's/^\(.*\)$/\$\(MESA_CFG_32_\1\)/'
801ad6a6a9cd8fbd58b9f9c27f20dbb3c87d47ddLennart PoetteringMESA_CFG_64:sh=arch | sed 's/^\(.*\)$/\$\(MESA_CFG_64_\1\)/'
801ad6a6a9cd8fbd58b9f9c27f20dbb3c87d47ddLennart PoetteringBUILD_32_FLAGS=ARCH_GCC_FLAGS="$(ARCH32_GCC_FLAGS)" MESA_CFG=$(MESA_CFG_32)
801ad6a6a9cd8fbd58b9f9c27f20dbb3c87d47ddLennart PoetteringBUILD_64_FLAGS=ARCH_GCC_FLAGS="$(ARCH64_GCC_FLAGS)" MESA_CFG=$(MESA_CFG_64)
801ad6a6a9cd8fbd58b9f9c27f20dbb3c87d47ddLennart Poettering# pkg-config --cflags libdrm
801ad6a6a9cd8fbd58b9f9c27f20dbb3c87d47ddLennart PoetteringLIBDRM_CFLAGS = -I$(PROTODIR)$(X11_INCLUDES_DIR) -I$(PROTODIR)$(X11_INCLUDES_DIR)/drm
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering# pkg-config --libs libdrm
f9ebb22ab4758bc5bbaaf8eeead74b5b4f81d5c3Lennart PoetteringLIBDRM_LIB = -L$(PROTODIR)$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR) -R$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR) -ldrm
1e43061b67336052b5b231840a38508a5397a363Michal SchmidtMESA_INCLUDES= -I$(PROTODIR)$(X11_INCLUDES_DIR)
a407657425a3e47fd2b559cd3bc800f791303f63Lennart PoetteringMESA_MAKEVARS= SHELL=/bin/ksh PASSED_CFLAGS="$(MESA_CFLAGS)" PASSED_INCLUDES="$(MESA_INCLUDES)" ARCH_FLAGS="" LIBDRM_CFLAGS="$(LIBDRM_CFLAGS)" LIBDRM_LIB="$(LIBDRM_LIB)"
a407657425a3e47fd2b559cd3bc800f791303f63Lennart PoetteringMESA_MAKEENV= PKG_CONFIG_PATH=$(PROTODIR)/usr/lib$(ARCHLIBSUBDIR)/pkgconfig:$(TOP)/common/pc-files/$(BUILD_DIR):/usr/lib$(ARCHLIBSUBDIR)/pkgconfig
a407657425a3e47fd2b559cd3bc800f791303f63Lennart Poettering# LD_OPTIONS="$(LIB_REQUIRED_LDFLAGS)"
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering (cd $(SOURCE_DIR)/configs && rm -f current && ln -s $(MESA_CFG) current)
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering (cd $(SOURCE_DIR) && $(MESA_MAKEENV) $(GNUMAKE) $(MFLAGS) -e $(MESA_MAKEVARS) default)
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering (cd $(SOURCE_DIR) && $(GNUMAKE) $(MFLAGS) -e DESTDIR=$(PROTODIR) ARCHLIBSUBDIR=$(ARCHLIBSUBDIR) install )