Makefile revision 1423
98N/A###############################################################################
98N/A#
98N/A# Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
98N/A#
1383N/A# Permission is hereby granted, free of charge, to any person obtaining a
98N/A# copy of this software and associated documentation files (the "Software"),
98N/A# to deal in the Software without restriction, including without limitation
919N/A# the rights to use, copy, modify, merge, publish, distribute, sublicense,
919N/A# and/or sell copies of the Software, and to permit persons to whom the
919N/A# Software is furnished to do so, subject to the following conditions:
919N/A#
919N/A# The above copyright notice and this permission notice (including the next
919N/A# paragraph) shall be included in all copies or substantial portions of the
919N/A# Software.
919N/A#
919N/A# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
919N/A# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
919N/A# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
919N/A# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
919N/A# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
919N/A# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
919N/A# DEALINGS IN THE SOFTWARE.
919N/A#
919N/A#
98N/A
98N/A# Package name used in tarballs
98N/AMODULE_NAME=glu
98N/A
493N/A# Package metadata
98N/AUPSTREAM = The Mesa 3-D Graphics Library
98N/AUPSTREAM_URL = http://mesa3d.org/
1351N/AUPSTREAM_SET = yes
98N/A
911N/AMODULE_LICENSE = Mesa License (Mixed: MIT, LGPLv2, others)
1351N/AMODULE_LICENSE_SET = yes
1351N/AMODULE_LICENSE_PREPEND = $(GPL_CHOICE_FILE)
1351N/AMODULE_DESC = the Mesa 3-D Graphics Libraries
911N/AORACLE_TPNO = 9926
98N/A
1178N/A# ARC cases that covered this module
1352N/A# LSARC/2005/109 MESA, Open Source OpenGL clone
1383N/AMODULE_ARC_CASES = LSARC/2005/109
1383N/A
817N/A# Version number (used in path names)
98N/AMODULE_VERSION=9.0.0
98N/A
493N/A# Checksums for upstream tarball
98N/ATARBALL_MD5 = be9249132ff49275461cf92039083030
98N/ATARBALL_SHA1 = c2814bbaf1e60e28a75ec80f4646047c0da742bd
1352N/A
98N/A# Download site for source
910N/ASOURCE_URL=ftp://ftp.freedesktop.org/pub/mesa/glu/$(SOURCE_TARBALL_NAME)
910N/ASOURCE_URL_SET=yes
910N/AGIT_URL=$(FDO_GIT_URL)/mesa/glu
1351N/AGIT_URL_SET=yes
1351N/A
1351N/A# Patches to apply to source after unpacking, in order
1351N/ASOURCE_PATCHES=glu-exports.patch
1351N/A
1351N/A# Regenerate Makefile.in's from Makefile.am's after applying glu-exports.patch
98N/AAUTORECONF=yes
98N/A
998N/A# delibtoolize does not get along with glu-exports.patch
998N/ADELIBTOOLIZE = no
998N/A
998N/A# Need to find libdrm in protodir at build time, since libGL links to it
998N/AMODULE_LDFLAGS= -L$(PROTODIR)$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR)
98N/A
998N/A# Override LDFLAGS passed to configure to not include CFLAGS, since that
998N/A# breaks building libGLU with Sun Studio C++ compiler
998N/AMODULE_CONFIG_ENV = LDFLAGS="$(DEFAULT_CONFIG_LDFLAGS) $(ARCH_FLAGS) $(MODTYPE_LDFLAGS) $(MODULE_CFLAGS) $(MODULE_LDFLAGS)"
# Add proto area to path to find makedepend
MODULE_BUILD_ENV = PATH="$(PROTODIR)/$(X11_BIN_DIR):$(PATH)"
MODULE_CONFIG_ENV += $(MODULE_BUILD_ENV)
# Need to use GNU Make to build
MODULE_MAKE=$(GNUMAKE)
MODULE_MAKE_SET=yes
# Need to build with gcc
MODULE_COMPILER=gcc
MODULE_COMPILER_SET=yes
# Tell Sun compiler to not apply optimizations that increase binary sizes
# Without this flag, Studio 12 binaries are almost 2x bigger (CR 6808868)
#MODULE_CFLAGS = -xspace
# Add include paths and linker paths needed for DRM modules
MODULE_CPPFLAGS = -I$(PROTODIR)/usr/include/libdrm
MODULE_LDFLAGS= -L$(PROTODIR)$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR) \
-R$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR) -z ignore
### Include common rulesets
include ../Makefile.inc
HEADERS_TO_MOVE = glu.h glu_mangle.h
HEADERS_TO_DIRECT_LINK = glu.h
LIBRARY_TO_LINK = libGLU.so.1.3.1
# Run just once after all other install steps are done for both 32/64-bit
install: install_ogl_layout
install_ogl_layout:
-rm -f $(PROTODIR)/usr/lib/libGLU.so.1
-rm -f $(PROTODIR)/usr/lib/libGLU.so
-rm -f $(PROTODIR)/usr/lib/$(SUBDIR64)/libGLU.so.1
-rm -f $(PROTODIR)/usr/lib/$(SUBDIR64)/libGLU.so
mv $(PROTODIR)/usr/include/GL/glu.h $(PROTODIR)/usr/include/mesa
mv $(PROTODIR)/usr/include/GL/glu_mangle.h $(PROTODIR)/usr/include/mesa
ln -s $(HEADERS_TO_DIRECT_LINK:%=../mesa/%) \
$(PROTODIR)/usr/include/GL
mkdir -p $(PROTODIR)/usr/lib/GL/$(SUBDIR64) \
$(PROTODIR)/usr/lib/mesa/$(SUBDIR64)
mv $(LIBRARY_TO_LINK:%=$(PROTODIR)/usr/lib/%) \
$(PROTODIR)/usr/lib/mesa/
mv $(LIBRARY_TO_LINK:%=$(PROTODIR)/usr/lib/$(SUBDIR64)/%) \
$(PROTODIR)/usr/lib/mesa/$(SUBDIR64)/
ln -s libGLU.so.1.3.1 $(PROTODIR)/usr/lib/mesa/libGLU.so.1
ln -s libGLU.so.1 $(PROTODIR)/usr/lib/mesa/libGLU.so
ln -s libGLU.so.1.3.1 $(PROTODIR)/usr/lib/mesa/$(SUBDIR64)/libGLU.so.1
ln -s libGLU.so.1 $(PROTODIR)/usr/lib/mesa/$(SUBDIR64)/libGLU.so
(cd $(PROTODIR)/usr/lib/GL; ln -s $(LIBRARY_TO_LINK:%=../mesa/%) .)
ln -s libGLU.so.1.3.1 $(PROTODIR)/usr/lib/GL/libGLU.so.1
ln -s libGLU.so.1 $(PROTODIR)/usr/lib/GL/libGLU.so
(cd $(PROTODIR)/usr/lib/GL/$(SUBDIR64); ln -s $(LIBRARY_TO_LINK:%=../../mesa/$(SUBDIR64)/%) .)
ln -s libGLU.so.1.3.1 $(PROTODIR)/usr/lib/GL/$(SUBDIR64)/libGLU.so.1
ln -s libGLU.so.1 $(PROTODIR)/usr/lib/GL/$(SUBDIR64)/libGLU.so
(cd $(PROTODIR)/usr/lib; ln -s $(LIBRARY_TO_LINK:%=GL/%) .)
ln -s libGLU.so.1.3.1 $(PROTODIR)/usr/lib/libGLU.so.1
ln -s libGLU.so.1 $(PROTODIR)/usr/lib/libGLU.so
(cd $(PROTODIR)/usr/lib/$(SUBDIR64); ln -s $(LIBRARY_TO_LINK:%=../GL/$(SUBDIR64)/%) .)
ln -s libGLU.so.1.3.1 $(PROTODIR)/usr/lib/$(SUBDIR64)/libGLU.so.1
ln -s libGLU.so.1 $(PROTODIR)/usr/lib/$(SUBDIR64)/libGLU.so
(cd $(PROTODIR)/usr/X11/lib; ln -s $(LIBRARY_TO_LINK:%=GL/%) .)
ln -s libGLU.so.1.3.1 $(PROTODIR)/usr/X11/lib/libGLU.so.1
ln -s libGLU.so.1 $(PROTODIR)/usr/X11/lib/libGLU.so
(cd $(PROTODIR)/usr/X11/lib/$(SUBDIR64); ln -s $(LIBRARY_TO_LINK:%=../GL/$(SUBDIR64)/%) .)
ln -s libGLU.so.1.3.1 $(PROTODIR)/usr/X11/lib/$(SUBDIR64)/libGLU.so.1
ln -s libGLU.so.1 $(PROTODIR)/usr/X11/lib/$(SUBDIR64)/libGLU.so