Makefile revision 1422
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync###############################################################################
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync#
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync# Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync#
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync# Permission is hereby granted, free of charge, to any person obtaining a
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync# copy of this software and associated documentation files (the "Software"),
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync# to deal in the Software without restriction, including without limitation
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync# the rights to use, copy, modify, merge, publish, distribute, sublicense,
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync# and/or sell copies of the Software, and to permit persons to whom the
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync# Software is furnished to do so, subject to the following conditions:
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync#
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync# The above copyright notice and this permission notice (including the next
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync# paragraph) shall be included in all copies or substantial portions of the
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync# Software.
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync#
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync# DEALINGS IN THE SOFTWARE.
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync#
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync#
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync# Package name used in tarballs
316572fd6bf59ec1038f0476f6536fc10163beebvboxsyncMODULE_NAME=glu
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync# Package metadata
316572fd6bf59ec1038f0476f6536fc10163beebvboxsyncUPSTREAM = The Mesa 3-D Graphics Library
316572fd6bf59ec1038f0476f6536fc10163beebvboxsyncUPSTREAM_URL = http://mesa3d.org/
316572fd6bf59ec1038f0476f6536fc10163beebvboxsyncUPSTREAM_SET = yes
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync
316572fd6bf59ec1038f0476f6536fc10163beebvboxsyncMODULE_LICENSE = Mesa License (Mixed: MIT, LGPLv2, others)
316572fd6bf59ec1038f0476f6536fc10163beebvboxsyncMODULE_LICENSE_SET = yes
316572fd6bf59ec1038f0476f6536fc10163beebvboxsyncMODULE_LICENSE_PREPEND = $(GPL_CHOICE_FILE)
316572fd6bf59ec1038f0476f6536fc10163beebvboxsyncMODULE_DESC = the Mesa 3-D Graphics Libraries
316572fd6bf59ec1038f0476f6536fc10163beebvboxsyncORACLE_TPNO = 9926
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync# ARC cases that covered this module
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync# LSARC/2005/109 MESA, Open Source OpenGL clone
316572fd6bf59ec1038f0476f6536fc10163beebvboxsyncMODULE_ARC_CASES = LSARC/2005/109
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync# Version number (used in path names)
316572fd6bf59ec1038f0476f6536fc10163beebvboxsyncMODULE_VERSION=9.0.0
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync# Checksums for upstream tarball
316572fd6bf59ec1038f0476f6536fc10163beebvboxsyncTARBALL_MD5 = be9249132ff49275461cf92039083030
316572fd6bf59ec1038f0476f6536fc10163beebvboxsyncTARBALL_SHA1 = c2814bbaf1e60e28a75ec80f4646047c0da742bd
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync# Download site for source
316572fd6bf59ec1038f0476f6536fc10163beebvboxsyncSOURCE_URL=ftp://ftp.freedesktop.org/pub/mesa/glu/$(SOURCE_TARBALL_NAME)
316572fd6bf59ec1038f0476f6536fc10163beebvboxsyncSOURCE_URL_SET=yes
316572fd6bf59ec1038f0476f6536fc10163beebvboxsyncGIT_URL=$(FDO_GIT_URL)/mesa/glu
316572fd6bf59ec1038f0476f6536fc10163beebvboxsyncGIT_URL_SET=yes
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync# Patches to apply to source after unpacking, in order
316572fd6bf59ec1038f0476f6536fc10163beebvboxsyncSOURCE_PATCHES=glu-exports.patch
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync# Regenerate Makefile.in's from Makefile.am's after applying glu-exports.patch
316572fd6bf59ec1038f0476f6536fc10163beebvboxsyncAUTORECONF=yes
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync# delibtoolize does not get along with glu-exports.patch
316572fd6bf59ec1038f0476f6536fc10163beebvboxsyncDELIBTOOLIZE = no
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync# Build mesa with this define (CR 7032292)
316572fd6bf59ec1038f0476f6536fc10163beebvboxsyncMODULE_CFLAGS = -D__EXTENSIONS__
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync# Override LDFLAGS passed to configure to not include CFLAGS, since that
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync# breaks building libGLU with Sun Studio C++ compiler
316572fd6bf59ec1038f0476f6536fc10163beebvboxsyncMODULE_CONFIG_ENV = LDFLAGS="$(DEFAULT_CONFIG_LDFLAGS) $(ARCH_FLAGS) $(MODTYPE_LDFLAGS) $(MODULE_CFLAGS) $(MODULE_LDFLAGS)"
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync# Add proto area to path to find makedepend
316572fd6bf59ec1038f0476f6536fc10163beebvboxsyncMODULE_BUILD_ENV = PATH="$(PROTODIR)/$(X11_BIN_DIR):$(PATH)"
316572fd6bf59ec1038f0476f6536fc10163beebvboxsyncMODULE_CONFIG_ENV += $(MODULE_BUILD_ENV)
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync# Need to use GNU Make to build
316572fd6bf59ec1038f0476f6536fc10163beebvboxsyncMODULE_MAKE=$(GNUMAKE)
316572fd6bf59ec1038f0476f6536fc10163beebvboxsyncMODULE_MAKE_SET=yes
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync# Need to use GNU indent
316572fd6bf59ec1038f0476f6536fc10163beebvboxsyncMODULE_INDENT=$(GNUINDENT)
316572fd6bf59ec1038f0476f6536fc10163beebvboxsyncMODULE_INDENT_SET=yes
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync# To build with gcc, uncomment these lines and comment out the MODULE_CFLAGS
316572fd6bf59ec1038f0476f6536fc10163beebvboxsyncMODULE_COMPILER=gcc
316572fd6bf59ec1038f0476f6536fc10163beebvboxsyncMODULE_COMPILER_SET=yes
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync# Tell Sun compiler to not apply optimizations that increase binary sizes
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync# Without this flag, Studio 12 binaries are almost 2x bigger (CR 6808868)
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync#MODULE_CFLAGS = -xspace
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync# Add include paths and linker paths needed for DRM modules
316572fd6bf59ec1038f0476f6536fc10163beebvboxsyncMODULE_CPPFLAGS = -I$(PROTODIR)/usr/include/libdrm
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync
316572fd6bf59ec1038f0476f6536fc10163beebvboxsyncMODULE_LDFLAGS= -L$(PROTODIR)$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR) \
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync -R$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR) -z ignore
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync### Include common rulesets
316572fd6bf59ec1038f0476f6536fc10163beebvboxsyncinclude ../Makefile.inc
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync
316572fd6bf59ec1038f0476f6536fc10163beebvboxsyncHEADERS_TO_MOVE = glu.h glu_mangle.h
316572fd6bf59ec1038f0476f6536fc10163beebvboxsyncHEADERS_TO_DIRECT_LINK = glu.h
316572fd6bf59ec1038f0476f6536fc10163beebvboxsyncLIBRARY_TO_LINK = libGLU.so.1.3.1
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync# Run just once after all other install steps are done for both 32/64-bit
316572fd6bf59ec1038f0476f6536fc10163beebvboxsyncinstall: install_ogl_layout
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync
316572fd6bf59ec1038f0476f6536fc10163beebvboxsyncinstall_ogl_layout:
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync -rm -f $(PROTODIR)/usr/lib/libGLU.so.1
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync -rm -f $(PROTODIR)/usr/lib/libGLU.so
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync -rm -f $(PROTODIR)/usr/lib/$(SUBDIR64)/libGLU.so.1
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync -rm -f $(PROTODIR)/usr/lib/$(SUBDIR64)/libGLU.so
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync mv $(PROTODIR)/usr/include/GL/glu.h $(PROTODIR)/usr/include/mesa
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync mv $(PROTODIR)/usr/include/GL/glu_mangle.h $(PROTODIR)/usr/include/mesa
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync ln -s $(HEADERS_TO_DIRECT_LINK:%=../mesa/%) \
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync $(PROTODIR)/usr/include/GL
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync mkdir -p $(PROTODIR)/usr/lib/GL/$(SUBDIR64) \
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync $(PROTODIR)/usr/lib/mesa/$(SUBDIR64)
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync mv $(LIBRARY_TO_LINK:%=$(PROTODIR)/usr/lib/%) \
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync $(PROTODIR)/usr/lib/mesa/
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync mv $(LIBRARY_TO_LINK:%=$(PROTODIR)/usr/lib/$(SUBDIR64)/%) \
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync $(PROTODIR)/usr/lib/mesa/$(SUBDIR64)/
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync ln -s libGLU.so.1.3.1 $(PROTODIR)/usr/lib/mesa/libGLU.so.1
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync ln -s libGLU.so.1 $(PROTODIR)/usr/lib/mesa/libGLU.so
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync ln -s libGLU.so.1.3.1 $(PROTODIR)/usr/lib/mesa/$(SUBDIR64)/libGLU.so.1
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync ln -s libGLU.so.1 $(PROTODIR)/usr/lib/mesa/$(SUBDIR64)/libGLU.so
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync (cd $(PROTODIR)/usr/lib/GL; ln -s $(LIBRARY_TO_LINK:%=../mesa/%) .)
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync ln -s libGLU.so.1.3.1 $(PROTODIR)/usr/lib/GL/libGLU.so.1
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync ln -s libGLU.so.1 $(PROTODIR)/usr/lib/GL/libGLU.so
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync (cd $(PROTODIR)/usr/lib/GL/$(SUBDIR64); ln -s $(LIBRARY_TO_LINK:%=../../mesa/$(SUBDIR64)/%) .)
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync ln -s libGLU.so.1.3.1 $(PROTODIR)/usr/lib/GL/$(SUBDIR64)/libGLU.so.1
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync ln -s libGLU.so.1 $(PROTODIR)/usr/lib/GL/$(SUBDIR64)/libGLU.so
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync (cd $(PROTODIR)/usr/lib; ln -s $(LIBRARY_TO_LINK:%=GL/%) .)
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync ln -s libGLU.so.1.3.1 $(PROTODIR)/usr/lib/libGLU.so.1
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync ln -s libGLU.so.1 $(PROTODIR)/usr/lib/libGLU.so
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync (cd $(PROTODIR)/usr/lib/$(SUBDIR64); ln -s $(LIBRARY_TO_LINK:%=../GL/$(SUBDIR64)/%) .)
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync ln -s libGLU.so.1.3.1 $(PROTODIR)/usr/lib/$(SUBDIR64)/libGLU.so.1
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync ln -s libGLU.so.1 $(PROTODIR)/usr/lib/$(SUBDIR64)/libGLU.so
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync (cd $(PROTODIR)/usr/X11/lib; ln -s $(LIBRARY_TO_LINK:%=GL/%) .)
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync ln -s libGLU.so.1.3.1 $(PROTODIR)/usr/X11/lib/libGLU.so.1
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync ln -s libGLU.so.1 $(PROTODIR)/usr/X11/lib/libGLU.so
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync (cd $(PROTODIR)/usr/X11/lib/$(SUBDIR64); ln -s $(LIBRARY_TO_LINK:%=../GL/$(SUBDIR64)/%) .)
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync ln -s libGLU.so.1.3.1 $(PROTODIR)/usr/X11/lib/$(SUBDIR64)/libGLU.so.1
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync ln -s libGLU.so.1 $(PROTODIR)/usr/X11/lib/$(SUBDIR64)/libGLU.so
316572fd6bf59ec1038f0476f6536fc10163beebvboxsync