Makefile revision 764
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe###############################################################################
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe#
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe# Use is subject to license terms.
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe#
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe# Permission is hereby granted, free of charge, to any person obtaining a
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe# copy of this software and associated documentation files (the
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe# "Software"), to deal in the Software without restriction, including
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe# without limitation the rights to use, copy, modify, merge, publish,
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe# distribute, and/or sell copies of the Software, and to permit persons
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe# to whom the Software is furnished to do so, provided that the above
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe# copyright notice(s) and this permission notice appear in all copies of
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe# the Software and that both the above copyright notice(s) and this
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe# permission notice appear in supporting documentation.
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe#
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
f71f7a61dec7c9089378d14493ad564a1dedf0b5neil_a_wilson# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe#
a3d3ab94806056d2355afea6fe8daac41059b9fbludovicp# Except as contained in this notice, the name of a copyright holder
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe# shall not be used in advertising or otherwise to promote the sale, use
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe# or other dealings in this Software without prior written authorization
69de0fe5b7ed905860bef5f86937d30cc206ef7dneil_a_wilson# of the copyright holder.
69de0fe5b7ed905860bef5f86937d30cc206ef7dneil_a_wilson#
69de0fe5b7ed905860bef5f86937d30cc206ef7dneil_a_wilson# @(#)Makefile 1.24 09/07/30
69de0fe5b7ed905860bef5f86937d30cc206ef7dneil_a_wilson#
69de0fe5b7ed905860bef5f86937d30cc206ef7dneil_a_wilson
3cedecd5ea21cca5d9709abf320a2082cd3694e5jvergara# Package name used in tarballs
69de0fe5b7ed905860bef5f86937d30cc206ef7dneil_a_wilsonMODULE_NAME=mesa
69de0fe5b7ed905860bef5f86937d30cc206ef7dneil_a_wilson
69de0fe5b7ed905860bef5f86937d30cc206ef7dneil_a_wilson# Version number (used in path names)
69de0fe5b7ed905860bef5f86937d30cc206ef7dneil_a_wilsonMODULE_VERSION=7.4.4
69de0fe5b7ed905860bef5f86937d30cc206ef7dneil_a_wilson
69de0fe5b7ed905860bef5f86937d30cc206ef7dneil_a_wilson# Source tarball
69de0fe5b7ed905860bef5f86937d30cc206ef7dneil_a_wilsonSOURCE_TARBALL_NAME=MesaLib-$(MODULE_VERSION).tar.bz2
69de0fe5b7ed905860bef5f86937d30cc206ef7dneil_a_wilsonSOURCE_TARBALL_NAME_SET=yes
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe# Download site for source
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipeSOURCE_URL=$(SF_DOWNLOADS_URL)/mesa3d/$(SOURCE_TARBALL_NAME)
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipeSOURCE_URL_SET=yes
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipeGIT_URL=$(FDO_GIT_URL)/mesa/mesa
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipeGIT_URL_SET=yes
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe# Directory created by unpacking source
266c5071a91fda6a5159b08ea8d45261228d03d5neil_a_wilsonSOURCE_DIRNAME=Mesa-$(MODULE_VERSION)
27f8adec83293fb8bd3bfa37175322b0ee3bb933jvergaraSOURCE_DIRNAME_SET=yes
27f8adec83293fb8bd3bfa37175322b0ee3bb933jvergaraSOURCE_DIR = $(BUILD_DIR)/$(SOURCE_DIRNAME)
27f8adec83293fb8bd3bfa37175322b0ee3bb933jvergara
27f8adec83293fb8bd3bfa37175322b0ee3bb933jvergara# Patches to apply to source after unpacking, in order
27f8adec83293fb8bd3bfa37175322b0ee3bb933jvergaraSOURCE_PATCHES= \
27f8adec83293fb8bd3bfa37175322b0ee3bb933jvergara install-pc-dir.patch,-p1 \
27f8adec83293fb8bd3bfa37175322b0ee3bb933jvergara glu-no-mangled-exports.patch \
27f8adec83293fb8bd3bfa37175322b0ee3bb933jvergara solaris-port.patch 6866668.patch
27f8adec83293fb8bd3bfa37175322b0ee3bb933jvergara
39e085accf228684b9573bc8ad707a364ed6242ejvergara# File created by running configure script
27f8adec83293fb8bd3bfa37175322b0ee3bb933jvergaraAUTOCONF_TARGET=$(SOURCE_DIR)/configs/autoconf
39e085accf228684b9573bc8ad707a364ed6242ejvergaraAUTOCONF_TARGET_SET=yes
266c5071a91fda6a5159b08ea8d45261228d03d5neil_a_wilsonMODULE_ADD_CONFIGURE_TARGETS=set_pc_dir
27f8adec83293fb8bd3bfa37175322b0ee3bb933jvergara
5c6cfc2988a5121fd22081643ef0790e38c99379neil_a_wilsonDRI_DRIVER_LIST_sparc=
5c6cfc2988a5121fd22081643ef0790e38c99379neil_a_wilsonDRI_DRIVER_LIST_i386=i915 i965 r200 r300 radeon
5c6cfc2988a5121fd22081643ef0790e38c99379neil_a_wilsonDRI_DRIVER_LIST= $(DRI_DRIVER_LIST_$(MACH)) swrast
5c6cfc2988a5121fd22081643ef0790e38c99379neil_a_wilson
5c6cfc2988a5121fd22081643ef0790e38c99379neil_a_wilson# Command line options to GNU autoconf configure script
5c6cfc2988a5121fd22081643ef0790e38c99379neil_a_wilsonMODULE_CONFIG_OPTS = --with-driver=dri \
37f9a536593b696e5a3dcec443e1475f22fb5afdjvergara --with-dri-driverdir='$(X11_SERVERMODS_DIR)/dri$(SERVERMOD_subdir)' \
5c6cfc2988a5121fd22081643ef0790e38c99379neil_a_wilson --with-dri-drivers='$(DRI_DRIVER_LIST)'
5c6cfc2988a5121fd22081643ef0790e38c99379neil_a_wilson
5c6cfc2988a5121fd22081643ef0790e38c99379neil_a_wilson# Override LDFLAGS passed to configure to not include CFLAGS, since that
61ae414d98d24ba4a72a905b07db9424353669f4neil_a_wilson# breaks building libGLU with Sun Studio C++ compiler
5c6cfc2988a5121fd22081643ef0790e38c99379neil_a_wilsonMODULE_CONFIG_ENV = LDFLAGS="$(DEFAULT_CONFIG_LDFLAGS) $(ARCH_FLAGS) $(MODTYPE_LDFLAGS) $(MODULE_CFLAGS) $(MODULE_LDFLAGS)"
7070667c2dffad87009999bdeb16d5305e0afdbejvergara
7070667c2dffad87009999bdeb16d5305e0afdbejvergara# Need to use GNU Make to build
7070667c2dffad87009999bdeb16d5305e0afdbejvergaraMODULE_MAKE=$(GNUMAKE)
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipeMODULE_MAKE_SET=yes
27f8adec83293fb8bd3bfa37175322b0ee3bb933jvergara
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe# To build with gcc, uncomment these lines and comment out the MODULE_CFLAGS
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe# MODULE_COMPILER=gcc
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe# MODULE_COMPILER_SET=yes
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe
61ae414d98d24ba4a72a905b07db9424353669f4neil_a_wilson# Tell Sun compiler to not apply optimizations that increase binary sizes
61ae414d98d24ba4a72a905b07db9424353669f4neil_a_wilson# Without this flag, Studio 12 binaries are almost 2x bigger (CR 6808868)
37f9a536593b696e5a3dcec443e1475f22fb5afdjvergaraMODULE_CFLAGS = -xspace
61ae414d98d24ba4a72a905b07db9424353669f4neil_a_wilson
61ae414d98d24ba4a72a905b07db9424353669f4neil_a_wilson# Add include paths and linker paths needed for DRM modules
37f9a536593b696e5a3dcec443e1475f22fb5afdjvergaraMODULE_CPPFLAGS = -I$(PROTODIR)$(X11_INCLUDES_DIR)/drm
61ae414d98d24ba4a72a905b07db9424353669f4neil_a_wilson
61ae414d98d24ba4a72a905b07db9424353669f4neil_a_wilsonMODULE_LDFLAGS= -L$(PROTODIR)$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR) \
fbae67e0ce2395d66b4cec5b17c54ddf8dd3dcb2jvergara -R$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR)
fbae67e0ce2395d66b4cec5b17c54ddf8dd3dcb2jvergara
fbae67e0ce2395d66b4cec5b17c54ddf8dd3dcb2jvergara# Merge in additional sources from sun-src directory
fbae67e0ce2395d66b4cec5b17c54ddf8dd3dcb2jvergaraADDITIONAL_SOURCE_DIR=sun-src
37f9a536593b696e5a3dcec443e1475f22fb5afdjvergara
fbae67e0ce2395d66b4cec5b17c54ddf8dd3dcb2jvergara# pkg-config files that need to have -R added
ca7fd1a989fecd15241ed293d67750c6049d06d2neil_a_wilsonFIX_PC_FILES=src/*/*.pc.in src/mesa/drivers/dri/dri.pc.in
fbae67e0ce2395d66b4cec5b17c54ddf8dd3dcb2jvergara
fbae67e0ce2395d66b4cec5b17c54ddf8dd3dcb2jvergara
fbae67e0ce2395d66b4cec5b17c54ddf8dd3dcb2jvergara### Include common rulesets
fbae67e0ce2395d66b4cec5b17c54ddf8dd3dcb2jvergarainclude ../Makefile.inc
fbae67e0ce2395d66b4cec5b17c54ddf8dd3dcb2jvergara
fbae67e0ce2395d66b4cec5b17c54ddf8dd3dcb2jvergara# Mesa makefiles use a different variable name/method for pkgconfig path
fbae67e0ce2395d66b4cec5b17c54ddf8dd3dcb2jvergaraset_pc_dir: $(AUTOCONF_TARGET)
fbae67e0ce2395d66b4cec5b17c54ddf8dd3dcb2jvergara echo 'INSTALL_PC_DIR=$(PKGCONFIG_DIR)' >> $(AUTOCONF_TARGET)
fbae67e0ce2395d66b4cec5b17c54ddf8dd3dcb2jvergara