Makefile revision 439
688N/A###############################################################################
943N/A#
688N/A# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
688N/A# Use subject to license terms.
919N/A#
919N/A# Permission is hereby granted, free of charge, to any person obtaining a
919N/A# copy of this software and associated documentation files (the
919N/A# "Software"), to deal in the Software without restriction, including
919N/A# without limitation the rights to use, copy, modify, merge, publish,
919N/A# distribute, and/or sell copies of the Software, and to permit persons
919N/A# to whom the Software is furnished to do so, provided that the above
919N/A# copyright notice(s) and this permission notice appear in all copies of
919N/A# the Software and that both the above copyright notice(s) and this
919N/A# permission notice appear in supporting documentation.
919N/A#
919N/A# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
919N/A# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
919N/A# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
919N/A# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
919N/A# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
919N/A# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
688N/A# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
688N/A# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
688N/A# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
688N/A#
688N/A# Except as contained in this notice, the name of a copyright holder
943N/A# shall not be used in advertising or otherwise to promote the sale, use
688N/A# or other dealings in this Software without prior written authorization
943N/A# of the copyright holder.
688N/A#
688N/A# @(#)Makefile 1.12 08/06/02
688N/A#
688N/A
688N/APWD:sh=pwd
688N/ATOP=$(PWD)/../..
688N/A
688N/A# Build 32-bit, 64-bit, or both?
688N/ABUILD_TYPES=32 64
688N/ABUILD_TYPES_SET=yes
688N/A
688N/A# Version number (used in path names)
688N/AMESA_VERS=6.5.2
688N/A
688N/A# Source tarball
688N/ASOURCE_TARBALL_NAME=MesaLib-$(MESA_VERS).tar.bz2
688N/A
688N/A# Download site for source
688N/ASOURCE_URL=$(SF_DOWNLOADS_URL)/mesa3d/$(SOURCE_TARBALL_NAME)
688N/ASOURCE_URL_SET=yes
688N/A
688N/A# Patches to apply to source after unpacking, in order
688N/ASOURCE_PATCHES= \
688N/A solaris-paths.patch \
688N/A mklib.patch \
688N/A solaris-dri-port.patch \
688N/A glext.h.patch \
688N/A glxext.h.patch \
688N/A 6538497.patch \
688N/A 6559710.patch \
688N/A mesa965.patch \
688N/A 6709716.patch \
688N/A 6709720.patch \
688N/A maxtexunit.patch
688N/A
688N/A# Directory created by unpacking source
688N/ASOURCE_DIR=$(BUILD_DIR)/Mesa-$(MESA_VERS)
688N/A
688N/A# Library built in tree
688N/AMESA_LIB=$(SOURCE_DIR)/lib/libGL.so.1
688N/A
688N/A# Where to install most files
688N/AMESA_prefix=$(PROTODIR)$(X11_DIR)
688N/A
688N/A# Where to install libraries
688N/AMESA_libdir=$(MESA_prefix)/lib
688N/A
688N/A# What to build
688N/ABUILD_TARGETS=$(GNUMAKE) $(MESA_LIB)
688N/A
688N/A### Include common rulesets
688N/Ainclude $(TOP)/common/Makefile.inc
688N/A
688N/A### Rules specific to this directory:
688N/A
688N/A# Merge in additional sources from sun-src directory
688N/Asource_gen:: $(LNDIR)
688N/A mkdir -p $(SOURCE_DIR)
688N/A (cd $(SOURCE_DIR) && $(LNDIR) ../../sun-src)
688N/A
688N/AMESA_CFG_32_sparc=sunos5-v8
688N/AMESA_CFG_64_sparc=sunos5-v9
688N/A
688N/A# Build with gcc on x86:
688N/AMESA_CFLAGS=$(DEFAULT_GCC_CFLAGS) $(ARCH_GCC_FLAGS) -D_REENTRANT
688N/AMESA_CFG_32_i386=solaris-x86-gcc-dri
688N/AMESA_CFG_64_i386=solaris-x64-gcc-dri
688N/A
688N/A# Build with Sun Studio cc on x86:
688N/A#MESA_CFLAGS=$(LIB_CFLAGS)
688N/A#MESA_CFG_32_i386=solaris-x86-cc-dri
688N/A#MESA_CFG_64_i386=solaris-x64-cc-dri
688N/A
688N/AMESA_CFG_32 = $(MESA_CFG_32_$(MACH))
688N/AMESA_CFG_64 = $(MESA_CFG_64_$(MACH))
688N/A
688N/ABUILD_32_FLAGS=ARCH_GCC_FLAGS="$(ARCH32_GCC_FLAGS)" MESA_CFG=$(MESA_CFG_32)
688N/ABUILD_64_FLAGS=ARCH_GCC_FLAGS="$(ARCH64_GCC_FLAGS)" MESA_CFG=$(MESA_CFG_64)
688N/A
688N/A# pkg-config --cflags libdrm
688N/ALIBDRM_CFLAGS = -I$(PROTODIR)$(X11_INCLUDES_DIR) -I$(PROTODIR)$(X11_INCLUDES_DIR)/drm
688N/A# pkg-config --libs libdrm
688N/ALIBDRM_LIB = -L$(PROTODIR)$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR) -R$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR) -ldrm
688N/A
688N/AMESA_INCLUDES= -I$(PROTODIR)$(X11_INCLUDES_DIR)
688N/A
688N/AMESA_MAKEVARS= SHELL=/bin/ksh PASSED_CFLAGS="$(MESA_CFLAGS)" PASSED_INCLUDES="$(MESA_INCLUDES)" ARCH_FLAGS="" LIBDRM_CFLAGS="$(LIBDRM_CFLAGS)" LIBDRM_LIB="$(LIBDRM_LIB)"
688N/A
688N/AMESA_MAKEENV= PKG_CONFIG_PATH=$(PROTODIR)/usr/lib$(ARCHLIBSUBDIR)/pkgconfig:$(TOP)/common/pc-files/$(BUILD_DIR):/usr/lib$(ARCHLIBSUBDIR)/pkgconfig
688N/A# LD_OPTIONS="$(LIB_REQUIRED_LDFLAGS)"
688N/A
688N/A# Build Mesa
688N/A$(MESA_LIB): $(GNUMAKE) $(UNPACK_TARGET)
688N/A (cd $(SOURCE_DIR)/configs && rm -f current && ln -s $(MESA_CFG) current)
688N/A (cd $(SOURCE_DIR) && $(MESA_MAKEENV) $(GNUMAKE) $(MFLAGS) -e $(MESA_MAKEVARS) default)
688N/A
688N/Ainstall_gen:: $(MESA_LIB)
688N/A (cd $(SOURCE_DIR) && $(GNUMAKE) $(MFLAGS) -e DESTDIR=$(PROTODIR) ARCHLIBSUBDIR=$(ARCHLIBSUBDIR) install )
688N/A
688N/A
688N/A