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