Makefile revision 1351
015055b6e23f5c08f6a5b34726f90b62597e9e45Tinderbox User###############################################################################
18920d790825d96ca3943aa2dcb6eb80dc611c5fTinderbox User# Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
e9e4257668ff6c4e583b0c0db2508650b0b677b8Tinderbox User# Permission is hereby granted, free of charge, to any person obtaining a
e9e4257668ff6c4e583b0c0db2508650b0b677b8Tinderbox User# copy of this software and associated documentation files (the "Software"),
c57668a2fbbe558c1bd21652813616f2f517c469Tinderbox User# to deal in the Software without restriction, including without limitation
a7c412f37cc73d0332887a746e81220cbf09dd00Mark Andrews# the rights to use, copy, modify, merge, publish, distribute, sublicense,
1f4c645185bd8fc70048e0a69eee46193a284e5cTinderbox User# and/or sell copies of the Software, and to permit persons to whom the
dedefc0bdbb4e6e39eeb98aa2fc6883efec2ddb0Mark Andrews# Software is furnished to do so, subject to the following conditions:
950d203b64f512b85fcc093ee1e9e3e531a1aea3Tinderbox User# The above copyright notice and this permission notice (including the next
b886b04d8d2b085cbf3e1bf4442dee87f43ba5e4Tinderbox User# paragraph) shall be included in all copies or substantial portions of the
e676a596869d8a80a644c99a848afb53d1c5975eMark Andrews# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
a7c412f37cc73d0332887a746e81220cbf09dd00Mark Andrews# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
a7c412f37cc73d0332887a746e81220cbf09dd00Mark Andrews# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
e676a596869d8a80a644c99a848afb53d1c5975eMark Andrews# DEALINGS IN THE SOFTWARE.
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews# Package name used in tarballs
9ecb5d33470ebfb3719a1b8d56bcefdf4b27f7b2Tinderbox User# Package metadata
9ecb5d33470ebfb3719a1b8d56bcefdf4b27f7b2Tinderbox UserMODULE_LICENSE = Mesa License (Mixed: MIT, LGPLv2, others)
9ecb5d33470ebfb3719a1b8d56bcefdf4b27f7b2Tinderbox User# ARC cases that covered this module
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews# LSARC/2005/109 MESA, Open Source OpenGL clone
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan Hunt# Version number (used in path names)
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan Hunt# Checksums for upstream tarball
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic UpdaterTARBALL_MD5 = d546f988adfdf986cff45b1efa2d8a46
16f6050f29b6b0422cee858e609f65e474e70ef2Tinderbox UserTARBALL_SHA1 = c64f8c03caf9ededd5f7011e246c42a649096c8c
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan Hunt# Source tarball
dc238a06bffa79de141ee7655765e2df91498a8aTinderbox UserSOURCE_TARBALL_NAME=MesaLib-$(MODULE_VERSION).tar.bz2
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User# Download site for source
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic UpdaterSOURCE_URL=ftp://ftp.freedesktop.org/pub/mesa/$(MODULE_VERSION)/$(SOURCE_TARBALL_NAME)
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews# Directory created by unpacking source
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews# Patches to apply to source after unpacking, in order
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews# File created by running configure script
2ae159b376dac23870d8005563c585acf85a4b5aEvan Hunt# Command line options to GNU autoconf configure script
2ae159b376dac23870d8005563c585acf85a4b5aEvan HuntMODULE_CONFIG_OPTS = --with-driver=dri --disable-egl --disable-gallium \
2ae159b376dac23870d8005563c585acf85a4b5aEvan Hunt --with-dri-driverdir='$(X11_SERVERMODS_DIR)/dri$(ARCHLIBSUBDIR)' \
dedefc0bdbb4e6e39eeb98aa2fc6883efec2ddb0Mark Andrews# Build mesa with this define (CR 7032292)
27739dd25026283c24645c8a1044b95ef9eb5ac6Tinderbox User# Override LDFLAGS passed to configure to not include CFLAGS, since that
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# breaks building libGLU with Sun Studio C++ compiler
18920d790825d96ca3943aa2dcb6eb80dc611c5fTinderbox UserMODULE_CONFIG_ENV = LDFLAGS="$(DEFAULT_CONFIG_LDFLAGS) $(ARCH_FLAGS) $(MODTYPE_LDFLAGS) $(MODULE_CFLAGS) $(MODULE_LDFLAGS)"
7a6494cfb6cc7d3f67af07359561e05e6bb8c0edTinderbox User# Add proto area to path to find makedepend
0e573cdd111e060e5f6c18249b5ccacbe8abe278Tinderbox UserMODULE_BUILD_ENV = PATH="$(PROTODIR)/$(X11_BIN_DIR):$(PATH)"
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# Need to use GNU Make to build
9ecb5d33470ebfb3719a1b8d56bcefdf4b27f7b2Tinderbox User# To build with gcc, uncomment these lines and comment out the MODULE_CFLAGS
9ecb5d33470ebfb3719a1b8d56bcefdf4b27f7b2Tinderbox User# Tell Sun compiler to not apply optimizations that increase binary sizes
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews# Without this flag, Studio 12 binaries are almost 2x bigger (CR 6808868)
9ecb5d33470ebfb3719a1b8d56bcefdf4b27f7b2Tinderbox User#MODULE_CFLAGS = -xspace
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews# Add include paths and linker paths needed for DRM modules
9ecb5d33470ebfb3719a1b8d56bcefdf4b27f7b2Tinderbox UserMODULE_CPPFLAGS = -I$(PROTODIR)/usr/include/libdrm
9ecb5d33470ebfb3719a1b8d56bcefdf4b27f7b2Tinderbox UserMODULE_LDFLAGS= -L$(PROTODIR)$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR) \
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson -R$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR) -z ignore
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews# Merge in additional sources from sun-src directory
9ecb5d33470ebfb3719a1b8d56bcefdf4b27f7b2Tinderbox User# pkg-config files that need to have -R added
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonFIX_PC_FILES=src/*/*.pc.in src/mesa/drivers/dri/dri.pc.in
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews### Include common rulesets
28a5dd720187fddb16055a0f64b63a7b66f29f64Mark Andrews# Mesa makefiles use a different variable name/method for pkgconfig path
78f3ed4bc2fcd3d270bfd599804f3b27a1db4d91Mark Andrews echo 'INSTALL_PC_DIR=$(PKGCONFIG_DIR)' >> $(AUTOCONF_TARGET)
0e573cdd111e060e5f6c18249b5ccacbe8abe278Tinderbox User# Move installed files to mesa subdirs and make links back
37d8e0a4455876fe1e4cca511076cc2c5ab9eedeTinderbox UserLIBRARIES_TO_MOVE = $(LIBRARIES_TO_DIRECT_LINK) $(LIBRARIES_TO_RUNTIME_LINK)
37d8e0a4455876fe1e4cca511076cc2c5ab9eedeTinderbox UserMESA_LIBDIR = $(PROTODIR)/usr/lib/mesa$(ARCHLIBSUBDIR)
dedefc0bdbb4e6e39eeb98aa2fc6883efec2ddb0Mark Andrews glu.h glu_mangle.h glx.h glx_mangle.h glxext.h \
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsHEADERS_TO_RUNTIME_LINK = gl.h glext.h glx.h glxext.h
dedefc0bdbb4e6e39eeb98aa2fc6883efec2ddb0Mark Andrews# Run just once after all other install steps are done for both 32/64-bit
78f3ed4bc2fcd3d270bfd599804f3b27a1db4d91Mark Andrews mv $(HEADERS_TO_MOVE:%=$(PROTODIR)/usr/include/GL/%) \
dedefc0bdbb4e6e39eeb98aa2fc6883efec2ddb0Mark Andrews mv $(PROTODIR)/usr/include/GL/internal/dri_interface.h \
dedefc0bdbb4e6e39eeb98aa2fc6883efec2ddb0Mark Andrews -rm -f $(HEADERS_TO_DIRECT_LINK:%=$(PROTODIR)/usr/include/GL/%) \
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews $(HEADERS_TO_RUNTIME_LINK:%=$(PROTODIR)/usr/include/GL/%)
dedefc0bdbb4e6e39eeb98aa2fc6883efec2ddb0Mark Andrews $(HEADERS_TO_RUNTIME_LINK:%=../../../system/volatile/opengl/include/%) \
37d8e0a4455876fe1e4cca511076cc2c5ab9eedeTinderbox User -rm -f $(PROTODIR)/usr/lib/GL/64 $(PROTODIR)/usr/lib/mesa/64
cdfc81e048bd34c1d628380247bda6b80a89e20eAutomatic Updater ln -s $(SUBDIR64) $(PROTODIR)/usr/lib/mesa/64
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews -rm -f $(LIBRARIES_TO_MOVE:%=$(PROTODIR)/usr/lib/mesa/%) \
9ecb5d33470ebfb3719a1b8d56bcefdf4b27f7b2Tinderbox User $(LIBRARIES_TO_MOVE:%=$(PROTODIR)/usr/lib/mesa/$(SUBDIR64)/%)
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews mv $(LIBRARIES_TO_MOVE:%=$(PROTODIR)/usr/lib/%) \
fe80a4909bf62b602feaf246866e9d29f7654194Automatic Updater mv $(LIBRARIES_TO_MOVE:%=$(PROTODIR)/usr/lib/$(SUBDIR64)/%) \
fa0326cc2cf428f67575b6ba3b97b528a31b0010Tinderbox User $(PROTODIR)/usr/lib/mesa/$(SUBDIR64)/$${l%.1} \
9ecb5d33470ebfb3719a1b8d56bcefdf4b27f7b2Tinderbox User $(PROTODIR)/usr/lib/GL/$(SUBDIR64)/$${l%.1} ; \
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews ln -s $${l} $(PROTODIR)/usr/lib/mesa/$${l%.1} ; \
9ecb5d33470ebfb3719a1b8d56bcefdf4b27f7b2Tinderbox User ln -s $${l} $(PROTODIR)/usr/lib/GL/$${l%.1} ; \
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews ln -s $${l} $(PROTODIR)/usr/lib/mesa/$(SUBDIR64)/$${l%.1} ; \
9ecb5d33470ebfb3719a1b8d56bcefdf4b27f7b2Tinderbox User ln -s $${l} $(PROTODIR)/usr/lib/GL/$(SUBDIR64)/$${l%.1} ; \
9ecb5d33470ebfb3719a1b8d56bcefdf4b27f7b2Tinderbox User (cd $(PROTODIR)/usr/lib ; ln -s $(LIBRARIES_TO_MOVE:%=GL/%) .)
9ecb5d33470ebfb3719a1b8d56bcefdf4b27f7b2Tinderbox User ln -s $(LIBRARIES_TO_MOVE:%=../GL/$(SUBDIR64)/%) .)
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews -rm -f $(LIBRARIES_TO_DIRECT_LINK:%=$(PROTODIR)/usr/lib/GL/%)
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson ln -s $(LIBRARIES_TO_DIRECT_LINK:%=../mesa/%) .)
9ecb5d33470ebfb3719a1b8d56bcefdf4b27f7b2Tinderbox User -rm -f $(LIBRARIES_TO_DIRECT_LINK:%=$(PROTODIR)/usr/lib/GL/$(SUBDIR64)/%)
9ecb5d33470ebfb3719a1b8d56bcefdf4b27f7b2Tinderbox User ln -s $(LIBRARIES_TO_DIRECT_LINK:%=../../mesa/$(SUBDIR64)/%) .)
9ecb5d33470ebfb3719a1b8d56bcefdf4b27f7b2Tinderbox User $(PROTODIR)/usr/lib/GL/$(SUBDIR64)/libGL.so.1
dd65eb1efb40b1c47d57963192bfc54873b219beAutomatic Updater ln -s ../../../system/volatile/opengl/lib/libGL.so.1 \
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews ln -s ../../../../system/volatile/opengl/lib/$(SUBDIR64)/libGL.so.1 \
9ecb5d33470ebfb3719a1b8d56bcefdf4b27f7b2Tinderbox User $(PROTODIR)/usr/lib/GL/$(SUBDIR64)/libGL.so.1
133e6d43fa82e80d3798be4de00f4540f485ec6cAutomatic Updater -rm -f $(PROTODIR)/usr/X11/lib/GL $(PROTODIR)/usr/X11/lib/mesa
9ecb5d33470ebfb3719a1b8d56bcefdf4b27f7b2Tinderbox User ln -s ../../lib/GL $(PROTODIR)/usr/X11/lib/GL
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews ln -s ../../lib/mesa $(PROTODIR)/usr/X11/lib/mesa
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews $(PROTODIR)/usr/X11/lib/$(SUBDIR64)/$${l%.1} ; \
9ecb5d33470ebfb3719a1b8d56bcefdf4b27f7b2Tinderbox User ln -s $${l} $(PROTODIR)/usr/X11/lib/$${l%.1} ; \
5f7586ddbd3edd11272cdd30ed613d936129328bTinderbox User ln -s GL/$${l} $(PROTODIR)/usr/X11/lib/$${l} ; \
9ecb5d33470ebfb3719a1b8d56bcefdf4b27f7b2Tinderbox User ln -s $${l} $(PROTODIR)/usr/X11/lib/$(SUBDIR64)/$${l%.1} ; \
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews ln -s ../GL/$(SUBDIR64)/$${l} $(PROTODIR)/usr/X11/lib/$(SUBDIR64)/$${l} ; \
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews -rm -f $(PROTODIR)/usr/X11/include/GL $(PROTODIR)/usr/X11/include/mesa
015055b6e23f5c08f6a5b34726f90b62597e9e45Tinderbox User ln -s ../../include/GL ../../include/mesa $(PROTODIR)/usr/X11/include/