Makefile revision 1418
5f5870385cff47efd2f58e7892f251cf13761528Timo Sirainen###############################################################################
a914bff43644dd9b3977244203839ca74161e40cTimo Sirainen# Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
a914bff43644dd9b3977244203839ca74161e40cTimo Sirainen# Permission is hereby granted, free of charge, to any person obtaining a
a914bff43644dd9b3977244203839ca74161e40cTimo Sirainen# copy of this software and associated documentation files (the "Software"),
a914bff43644dd9b3977244203839ca74161e40cTimo Sirainen# to deal in the Software without restriction, including without limitation
a914bff43644dd9b3977244203839ca74161e40cTimo Sirainen# the rights to use, copy, modify, merge, publish, distribute, sublicense,
a914bff43644dd9b3977244203839ca74161e40cTimo Sirainen# and/or sell copies of the Software, and to permit persons to whom the
a914bff43644dd9b3977244203839ca74161e40cTimo Sirainen# Software is furnished to do so, subject to the following conditions:
a914bff43644dd9b3977244203839ca74161e40cTimo Sirainen# The above copyright notice and this permission notice (including the next
a914bff43644dd9b3977244203839ca74161e40cTimo Sirainen# paragraph) shall be included in all copies or substantial portions of the
a914bff43644dd9b3977244203839ca74161e40cTimo Sirainen# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
a914bff43644dd9b3977244203839ca74161e40cTimo Sirainen# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
a914bff43644dd9b3977244203839ca74161e40cTimo Sirainen# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
a914bff43644dd9b3977244203839ca74161e40cTimo Sirainen# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
a914bff43644dd9b3977244203839ca74161e40cTimo Sirainen# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
a914bff43644dd9b3977244203839ca74161e40cTimo Sirainen# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
a914bff43644dd9b3977244203839ca74161e40cTimo Sirainen# DEALINGS IN THE SOFTWARE.
a914bff43644dd9b3977244203839ca74161e40cTimo Sirainen# Package name used in tarballs
a914bff43644dd9b3977244203839ca74161e40cTimo Sirainen# Package metadata
a914bff43644dd9b3977244203839ca74161e40cTimo SirainenMODULE_LICENSE = Mesa License (Mixed: MIT, LGPLv2, others)
a914bff43644dd9b3977244203839ca74161e40cTimo Sirainen# ARC cases that covered this module
a914bff43644dd9b3977244203839ca74161e40cTimo Sirainen# LSARC/2005/109 MESA, Open Source OpenGL clone
a914bff43644dd9b3977244203839ca74161e40cTimo Sirainen# Version number (used in path names)
a914bff43644dd9b3977244203839ca74161e40cTimo Sirainen# Checksums for upstream tarball
a914bff43644dd9b3977244203839ca74161e40cTimo SirainenTARBALL_SHA1 = c2814bbaf1e60e28a75ec80f4646047c0da742bd
a914bff43644dd9b3977244203839ca74161e40cTimo Sirainen# Source tarball
a914bff43644dd9b3977244203839ca74161e40cTimo SirainenSOURCE_TARBALL_NAME=glu-$(MODULE_VERSION).tar.bz2
a914bff43644dd9b3977244203839ca74161e40cTimo Sirainen# Download site for source
a914bff43644dd9b3977244203839ca74161e40cTimo SirainenSOURCE_URL=ftp://ftp.freedesktop.org/pub/mesa/glu/$(SOURCE_TARBALL_NAME)
a914bff43644dd9b3977244203839ca74161e40cTimo Sirainen# Directory created by unpacking source
a914bff43644dd9b3977244203839ca74161e40cTimo Sirainen# Patches to apply to source after unpacking, in order
a914bff43644dd9b3977244203839ca74161e40cTimo Sirainen# pkg-config files to update
a914bff43644dd9b3977244203839ca74161e40cTimo Sirainen# Build mesa with this define (CR 7032292)
a914bff43644dd9b3977244203839ca74161e40cTimo Sirainen# Override LDFLAGS passed to configure to not include CFLAGS, since that
a914bff43644dd9b3977244203839ca74161e40cTimo Sirainen# breaks building libGLU with Sun Studio C++ compiler
a914bff43644dd9b3977244203839ca74161e40cTimo SirainenMODULE_CONFIG_ENV = LDFLAGS="$(DEFAULT_CONFIG_LDFLAGS) $(ARCH_FLAGS) $(MODTYPE_LDFLAGS) $(MODULE_CFLAGS) $(MODULE_LDFLAGS)"
a914bff43644dd9b3977244203839ca74161e40cTimo Sirainen# Add proto area to path to find makedepend
a914bff43644dd9b3977244203839ca74161e40cTimo SirainenMODULE_BUILD_ENV = PATH="$(PROTODIR)/$(X11_BIN_DIR):$(PATH)"
a914bff43644dd9b3977244203839ca74161e40cTimo Sirainen# Need to use GNU Make to build
a914bff43644dd9b3977244203839ca74161e40cTimo Sirainen# Need to use GNU indent
a914bff43644dd9b3977244203839ca74161e40cTimo Sirainen# To build with gcc, uncomment these lines and comment out the MODULE_CFLAGS
a914bff43644dd9b3977244203839ca74161e40cTimo Sirainen# Tell Sun compiler to not apply optimizations that increase binary sizes
a914bff43644dd9b3977244203839ca74161e40cTimo Sirainen# Without this flag, Studio 12 binaries are almost 2x bigger (CR 6808868)
a914bff43644dd9b3977244203839ca74161e40cTimo Sirainen#MODULE_CFLAGS = -xspace
a914bff43644dd9b3977244203839ca74161e40cTimo Sirainen# Add include paths and linker paths needed for DRM modules
a914bff43644dd9b3977244203839ca74161e40cTimo SirainenMODULE_CPPFLAGS = -I$(PROTODIR)/usr/include/libdrm
54e5dadb95d8b7ffce6b5a1f6dbba22044663451Timo SirainenMODULE_LDFLAGS= -L$(PROTODIR)$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR) \
54e5dadb95d8b7ffce6b5a1f6dbba22044663451Timo Sirainen -R$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR) -z ignore
a914bff43644dd9b3977244203839ca74161e40cTimo Sirainen### Include common rulesets
66ecc94150cbce23aad3240135e0782e0a74d479Timo Sirainen# Run just once after all other install steps are done for both 32/64-bit
a914bff43644dd9b3977244203839ca74161e40cTimo Sirainen -rm -f $(PROTODIR)/usr/lib/$(SUBDIR64)/libGLU.so.1
a914bff43644dd9b3977244203839ca74161e40cTimo Sirainen -rm -f $(PROTODIR)/usr/lib/$(SUBDIR64)/libGLU.so
a914bff43644dd9b3977244203839ca74161e40cTimo Sirainen mv $(PROTODIR)/usr/include/GL/glu.h $(PROTODIR)/usr/include/mesa
a914bff43644dd9b3977244203839ca74161e40cTimo Sirainen mv $(PROTODIR)/usr/include/GL/glu_mangle.h $(PROTODIR)/usr/include/mesa
a914bff43644dd9b3977244203839ca74161e40cTimo Sirainen mv $(LIBRARY_TO_LINK:%=$(PROTODIR)/usr/lib/%) \
a914bff43644dd9b3977244203839ca74161e40cTimo Sirainen mv $(LIBRARY_TO_LINK:%=$(PROTODIR)/usr/lib/$(SUBDIR64)/%) \
66ecc94150cbce23aad3240135e0782e0a74d479Timo Sirainen ln -s libGLU.so.1.3.1 $(PROTODIR)/usr/lib/mesa/libGLU.so.1
ef5fb27361cc5e15766e85e28355750ff04b13c9Timo Sirainen ln -s libGLU.so.1 $(PROTODIR)/usr/lib/mesa/libGLU.so
a914bff43644dd9b3977244203839ca74161e40cTimo Sirainen ln -s libGLU.so.1.3.1 $(PROTODIR)/usr/lib/mesa/$(SUBDIR64)/libGLU.so.1
a914bff43644dd9b3977244203839ca74161e40cTimo Sirainen ln -s libGLU.so.1 $(PROTODIR)/usr/lib/mesa/$(SUBDIR64)/libGLU.so
a914bff43644dd9b3977244203839ca74161e40cTimo Sirainen (cd $(PROTODIR)/usr/lib/GL; ln -s $(LIBRARY_TO_LINK:%=../mesa/%) .)
a914bff43644dd9b3977244203839ca74161e40cTimo Sirainen ln -s libGLU.so.1.3.1 $(PROTODIR)/usr/lib/GL/libGLU.so.1
a914bff43644dd9b3977244203839ca74161e40cTimo Sirainen ln -s libGLU.so.1 $(PROTODIR)/usr/lib/GL/libGLU.so
a914bff43644dd9b3977244203839ca74161e40cTimo Sirainen (cd $(PROTODIR)/usr/lib/GL/$(SUBDIR64); ln -s $(LIBRARY_TO_LINK:%=../../mesa/$(SUBDIR64)/%) .)
a914bff43644dd9b3977244203839ca74161e40cTimo Sirainen ln -s libGLU.so.1.3.1 $(PROTODIR)/usr/lib/GL/$(SUBDIR64)/libGLU.so.1
a914bff43644dd9b3977244203839ca74161e40cTimo Sirainen ln -s libGLU.so.1 $(PROTODIR)/usr/lib/GL/$(SUBDIR64)/libGLU.so
a914bff43644dd9b3977244203839ca74161e40cTimo Sirainen (cd $(PROTODIR)/usr/lib; ln -s $(LIBRARY_TO_LINK:%=GL/%) .)
a914bff43644dd9b3977244203839ca74161e40cTimo Sirainen ln -s libGLU.so.1.3.1 $(PROTODIR)/usr/lib/libGLU.so.1
a914bff43644dd9b3977244203839ca74161e40cTimo Sirainen ln -s libGLU.so.1 $(PROTODIR)/usr/lib/libGLU.so
a914bff43644dd9b3977244203839ca74161e40cTimo Sirainen (cd $(PROTODIR)/usr/lib/$(SUBDIR64); ln -s $(LIBRARY_TO_LINK:%=../GL/$(SUBDIR64)/%) .)
a914bff43644dd9b3977244203839ca74161e40cTimo Sirainen ln -s libGLU.so.1.3.1 $(PROTODIR)/usr/lib/$(SUBDIR64)/libGLU.so.1
a914bff43644dd9b3977244203839ca74161e40cTimo Sirainen ln -s libGLU.so.1 $(PROTODIR)/usr/lib/$(SUBDIR64)/libGLU.so
a914bff43644dd9b3977244203839ca74161e40cTimo Sirainen (cd $(PROTODIR)/usr/X11/lib; ln -s $(LIBRARY_TO_LINK:%=GL/%) .)
a914bff43644dd9b3977244203839ca74161e40cTimo Sirainen ln -s libGLU.so.1.3.1 $(PROTODIR)/usr/X11/lib/libGLU.so.1
a914bff43644dd9b3977244203839ca74161e40cTimo Sirainen ln -s libGLU.so.1 $(PROTODIR)/usr/X11/lib/libGLU.so
a914bff43644dd9b3977244203839ca74161e40cTimo Sirainen (cd $(PROTODIR)/usr/X11/lib/$(SUBDIR64); ln -s $(LIBRARY_TO_LINK:%=../GL/$(SUBDIR64)/%) .)
a914bff43644dd9b3977244203839ca74161e40cTimo Sirainen ln -s libGLU.so.1.3.1 $(PROTODIR)/usr/X11/lib/$(SUBDIR64)/libGLU.so.1