Makefile revision 1089
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews###############################################################################
297be3708069ef31814d6d75c0d71a50a78feb03Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Permission is hereby granted, free of charge, to any person obtaining a
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# copy of this software and associated documentation files (the "Software"),
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# to deal in the Software without restriction, including without limitation
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# the rights to use, copy, modify, merge, publish, distribute, sublicense,
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# and/or sell copies of the Software, and to permit persons to whom the
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Software is furnished to do so, subject to the following conditions:
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# The above copyright notice and this permission notice (including the next
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# paragraph) shall be included in all copies or substantial portions of the
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Software.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
b49958b502ee45022010a0b1bed3968f598895a4Automatic Updater# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
e21a2904f02a03fa06b6db04d348f65fe9c67b2bMark Andrews# DEALINGS IN THE SOFTWARE.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Package name used in tarballs
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMODULE_NAME=mesa
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Package metadata
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsUPSTREAM = The Mesa 3-D Graphics Library
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsUPSTREAM_URL = http://mesa3d.org/
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsUPSTREAM_SET = yes
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMODULE_LICENSE = Mesa License (Mixed: MIT, LGPLv2, others)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMODULE_LICENSE_SET = yes
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMODULE_LICENSE_PREPEND = $(GPL_CHOICE_FILE)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# ARC cases that covered this module
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# LSARC/2005/109 MESA, Open Source OpenGL clone
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMODULE_ARC_CASES = LSARC/2005/109
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Version number (used in path names)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMODULE_VERSION=7.8.2
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Checksums for upstream tarball
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsTARBALL_MD5 = 6be2d343a0089bfd395ce02aaf8adb57
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsTARBALL_SHA1 = 21de672a1cbe307135d7f172dc6952041a38e1c7
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Source tarball
7329012471d165cd3dc4180ad2a0a43de91e7f01Mark AndrewsSOURCE_TARBALL_NAME=MesaLib-$(MODULE_VERSION).tar.bz2
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsSOURCE_TARBALL_NAME_SET=yes
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Download site for source
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsSOURCE_URL=ftp://ftp.freedesktop.org/pub/mesa/$(MODULE_VERSION)/$(SOURCE_TARBALL_NAME)
b49958b502ee45022010a0b1bed3968f598895a4Automatic UpdaterSOURCE_URL_SET=yes
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsGIT_URL=$(FDO_GIT_URL)/mesa/mesa
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsGIT_URL_SET=yes
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Directory created by unpacking source
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsSOURCE_DIRNAME=Mesa-$(MODULE_VERSION)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsSOURCE_DIRNAME_SET=yes
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsSOURCE_DIR = $(BUILD_DIR)/$(SOURCE_DIRNAME)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Patches to apply to source after unpacking, in order
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsSOURCE_PATCHES= \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews install-pc-dir.patch \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews glu-no-mangled-exports.patch \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews solaris-port.patch glsl.patch
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# File created by running configure script
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark AndrewsAUTOCONF_TARGET=$(SOURCE_DIR)/configs/autoconf
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsAUTOCONF_TARGET_SET=yes
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMODULE_ADD_CONFIGURE_TARGETS=set_pc_dir
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMODULE_INSTALL_DEPS=set_pc_dir
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsDRI_DRIVER_LIST_sparc=
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsDRI_DRIVER_LIST_i386=i915 i965 r200 r300 radeon
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsDRI_DRIVER_LIST= $(DRI_DRIVER_LIST_$(MACH)) swrast
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Command line options to GNU autoconf configure script
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMODULE_CONFIG_OPTS = --with-driver=dri --disable-egl --disable-gallium \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews --with-dri-driverdir='$(X11_SERVERMODS_DIR)/dri$(SERVERMOD_subdir)' \
b49958b502ee45022010a0b1bed3968f598895a4Automatic Updater --with-dri-drivers='$(DRI_DRIVER_LIST)'
b49958b502ee45022010a0b1bed3968f598895a4Automatic Updater
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Override LDFLAGS passed to configure to not include CFLAGS, since that
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# breaks building libGLU with Sun Studio C++ compiler
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMODULE_CONFIG_ENV = LDFLAGS="$(DEFAULT_CONFIG_LDFLAGS) $(ARCH_FLAGS) $(MODTYPE_LDFLAGS) $(MODULE_CFLAGS) $(MODULE_LDFLAGS)"
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Put /usr/xpg4/bin first in path so that grep -q works (CR 4843344)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMODULE_BUILD_ENV = PATH="/usr/xpg4/bin:$(PATH)"
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
b3cbb2f1ad021349e89807f3492df6e4e679cd56Mark Andrews# Need to use GNU Make to build
b3cbb2f1ad021349e89807f3492df6e4e679cd56Mark AndrewsMODULE_MAKE=$(GNUMAKE)
b3cbb2f1ad021349e89807f3492df6e4e679cd56Mark AndrewsMODULE_MAKE_SET=yes
b49958b502ee45022010a0b1bed3968f598895a4Automatic Updater
b49958b502ee45022010a0b1bed3968f598895a4Automatic Updater# To build with gcc, uncomment these lines and comment out the MODULE_CFLAGS
b3cbb2f1ad021349e89807f3492df6e4e679cd56Mark AndrewsMODULE_COMPILER=gcc
b3cbb2f1ad021349e89807f3492df6e4e679cd56Mark AndrewsMODULE_COMPILER_SET=yes
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Tell Sun compiler to not apply optimizations that increase binary sizes
b49958b502ee45022010a0b1bed3968f598895a4Automatic Updater# Without this flag, Studio 12 binaries are almost 2x bigger (CR 6808868)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#MODULE_CFLAGS = -xspace
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Add include paths and linker paths needed for DRM modules
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMODULE_CPPFLAGS = -I$(PROTODIR)/usr/include/libdrm
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMODULE_LDFLAGS= -L$(PROTODIR)$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR) \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews -R$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Merge in additional sources from sun-src directory
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsADDITIONAL_SOURCE_DIR=sun-src
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# pkg-config files that need to have -R added
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsFIX_PC_FILES=src/*/*.pc.in src/mesa/drivers/dri/dri.pc.in
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews### Include common rulesets
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsinclude ../Makefile.inc
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Mesa makefiles use a different variable name/method for pkgconfig path
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsset_pc_dir: $(AUTOCONF_TARGET)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews echo 'INSTALL_PC_DIR=$(PKGCONFIG_DIR)' >> $(AUTOCONF_TARGET)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Move installed files to mesa subdirs and make links back
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsLIBRARIES_TO_DIRECT_LINK = libGLU.so.1 libGLw.so.1
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsLIBRARIES_TO_RUNTIME_LINK = libGL.so.1
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsLIBRARIES_TO_MOVE = $(LIBRARIES_TO_DIRECT_LINK) $(LIBRARIES_TO_RUNTIME_LINK)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMESA_LIBDIR = $(PROTODIR)/usr/lib/mesa$(ARCHLIBSUBDIR)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsHEADERS_TO_MOVE = GLwDrawA.h GLwDrawAP.h GLwMDrawA.h GLwMDrawAP.h \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews gl.h gl_mangle.h glext.h glfbdev.h \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews glu.h glu_mangle.h glx.h glx_mangle.h glxext.h \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews mesa_wgl.h mglmesa.h osmesa.h vms_x_fix.h wglext.h wmesa.h
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsHEADERS_TO_DIRECT_LINK = GLwDrawA.h GLwDrawAP.h GLwMDrawA.h GLwMDrawAP.h \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews glu.h osmesa.h
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsHEADERS_TO_RUNTIME_LINK = gl.h glext.h glx.h glxext.h
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Run just once after all other install steps are done for both 32/64-bit
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsinstall: install_ogl_layout
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsinstall_ogl_layout: $(INSTALL_RULES)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews -rm -rf $(PROTODIR)/usr/include/mesa
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews mkdir -p $(PROTODIR)/usr/include/mesa/internal
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews mv $(HEADERS_TO_MOVE:%=$(PROTODIR)/usr/include/GL/%) \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(PROTODIR)/usr/include/mesa
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews mv $(PROTODIR)/usr/include/GL/internal/dri_interface.h \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(PROTODIR)/usr/include/mesa/internal
b49958b502ee45022010a0b1bed3968f598895a4Automatic Updater ln -s ../../mesa/internal/dri_interface.h \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(PROTODIR)/usr/include/GL/internal/
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews -rm -f $(HEADERS_TO_DIRECT_LINK:%=$(PROTODIR)/usr/include/GL/%) \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(HEADERS_TO_RUNTIME_LINK:%=$(PROTODIR)/usr/include/GL/%)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews ln -s $(HEADERS_TO_DIRECT_LINK:%=../mesa/%) \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(HEADERS_TO_RUNTIME_LINK:%=../../../var/run/opengl/include/%) \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(PROTODIR)/usr/include/GL
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews mkdir -p $(PROTODIR)/usr/lib/GL/$(SUBDIR64) \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(PROTODIR)/usr/lib/mesa/$(SUBDIR64)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews -rm -f $(PROTODIR)/usr/lib/GL/64 $(PROTODIR)/usr/lib/mesa/64
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews ln -s $(SUBDIR64) $(PROTODIR)/usr/lib/GL/64
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews ln -s $(SUBDIR64) $(PROTODIR)/usr/lib/mesa/64
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews -rm -f $(LIBRARIES_TO_MOVE:%=$(PROTODIR)/usr/lib/mesa/%) \
a1b05dea35aa30b152a47115e18bbe679d3fcf19Mark Andrews $(LIBRARIES_TO_MOVE:%=$(PROTODIR)/usr/lib/mesa/$(SUBDIR64)/%)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews mv $(LIBRARIES_TO_MOVE:%=$(PROTODIR)/usr/lib/%) \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(PROTODIR)/usr/lib/mesa/
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews mv $(LIBRARIES_TO_MOVE:%=$(PROTODIR)/usr/lib/$(SUBDIR64)/%) \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(PROTODIR)/usr/lib/mesa/$(SUBDIR64)/
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews @for l in $(LIBRARIES_TO_MOVE) ; do \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(START_CMD_ECHO) ; \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews rm -f $(PROTODIR)/usr/lib/mesa/$${l%.1} \
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews $(PROTODIR)/usr/lib/GL/$${l%.1} \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(PROTODIR)/usr/lib/mesa/$(SUBDIR64)/$${l%.1} \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(PROTODIR)/usr/lib/GL/$(SUBDIR64)/$${l%.1} ; \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews ln -s $${l} $(PROTODIR)/usr/lib/mesa/$${l%.1} ; \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews ln -s $${l} $(PROTODIR)/usr/lib/GL/$${l%.1} ; \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews ln -s $${l} $(PROTODIR)/usr/lib/mesa/$(SUBDIR64)/$${l%.1} ; \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews ln -s $${l} $(PROTODIR)/usr/lib/GL/$(SUBDIR64)/$${l%.1} ; \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews done
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews (cd $(PROTODIR)/usr/lib ; ln -s $(LIBRARIES_TO_MOVE:%=GL/%) .)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews (cd $(PROTODIR)/usr/lib/$(SUBDIR64) ; \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews ln -s $(LIBRARIES_TO_MOVE:%=../GL/$(SUBDIR64)/%) .)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews -rm -f $(LIBRARIES_TO_DIRECT_LINK:%=$(PROTODIR)/usr/lib/GL/%)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews (cd $(PROTODIR)/usr/lib/GL ; \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews ln -s $(LIBRARIES_TO_DIRECT_LINK:%=../mesa/%) .)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews -rm -f $(LIBRARIES_TO_DIRECT_LINK:%=$(PROTODIR)/usr/lib/GL/$(SUBDIR64)/%)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews (cd $(PROTODIR)/usr/lib/GL/$(SUBDIR64) ; \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews ln -s $(LIBRARIES_TO_DIRECT_LINK:%=../../mesa/$(SUBDIR64)/%) .)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews -rm -f $(PROTODIR)/usr/lib/GL/libGL.so.1 \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(PROTODIR)/usr/lib/GL/$(SUBDIR64)/libGL.so.1
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews ln -s ../../../var/run/opengl/lib/libGL.so.1 \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(PROTODIR)/usr/lib/GL/libGL.so.1
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews ln -s ../../../../var/run/opengl/lib/$(SUBDIR64)/libGL.so.1 \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(PROTODIR)/usr/lib/GL/$(SUBDIR64)/libGL.so.1
f6da30bb5447c23d880b09f601441e70c5313557Mark Andrews mkdir -p $(PROTODIR)/usr/X11/lib/$(SUBDIR64) \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(PROTODIR)/usr/X11/include
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews -rm -f $(PROTODIR)/usr/X11/lib/GL $(PROTODIR)/usr/X11/lib/mesa
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews ln -s ../../lib/GL $(PROTODIR)/usr/X11/lib/GL
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews ln -s ../../lib/mesa $(PROTODIR)/usr/X11/lib/mesa
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews -rm -f $(PROTODIR)/usr/X11/lib/64
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews ln -s $(SUBDIR64) $(PROTODIR)/usr/X11/lib/64
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews @for l in $(LIBRARIES_TO_MOVE) ; do \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(START_CMD_ECHO) ; \
a057e8e33baa5fa369be28a9680585200ce3ff73Mark Andrews rm -f $(PROTODIR)/usr/X11/lib/$${l} \
a057e8e33baa5fa369be28a9680585200ce3ff73Mark Andrews $(PROTODIR)/usr/X11/lib/$${l%.1} \
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews $(PROTODIR)/usr/X11/lib/$(SUBDIR64)/$${l} \
8c9957e63274e6ea44d182703116307b1a65dabbMark Andrews $(PROTODIR)/usr/X11/lib/$(SUBDIR64)/$${l%.1} ; \
a057e8e33baa5fa369be28a9680585200ce3ff73Mark Andrews ln -s $${l} $(PROTODIR)/usr/X11/lib/$${l%.1} ; \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews ln -s GL/$${l} $(PROTODIR)/usr/X11/lib/$${l} ; \
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews ln -s $${l} $(PROTODIR)/usr/X11/lib/$(SUBDIR64)/$${l%.1} ; \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews ln -s ../GL/$(SUBDIR64)/$${l} $(PROTODIR)/usr/X11/lib/$(SUBDIR64)/$${l} ; \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews done
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews -rm -f $(PROTODIR)/usr/X11/include/GL $(PROTODIR)/usr/X11/include/mesa
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews ln -s ../../include/GL ../../include/mesa $(PROTODIR)/usr/X11/include/
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(TOP)/open-src/data/ogl-select/mesa_vendor_select root="$(PROTODIR)"
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews